list of products from Amazon (Not mine, i just link them!) Scroll Down For Article! Note: Elegoo boards are not Arduino, but they are compatible with Arduino IDE and are mutch more affordable!
Connect Proteus 8 with Blynk Using Arduino: A Complete Step-by-Step Guide
Looking to seamlessly connect Proteus 8 with Blynk using Arduino? This detailed tutorial covers everything from setting up a Blynk account, installing Blynk libraries, configuring Arduino IDE, and troubleshooting Proteus 8 simulations. Start by creating a Blynk template, downloading the Blynk library from GitHub, and installing the Virtual COM Port Driver to establish communication between Proteus and Blynk. Configure Arduino IDE by adding the Blynk authentication token, selecting the correct virtual serial ports, and modifying the Blynk script for seamless integration. Finally, upload the code, run the Proteus simulation, and ensure smooth operation by troubleshooting common Blynk connection issues like server port mismatches or virtual COM port errors. This Arduino Proteus Blynk integration guide ensures a flawless IoT simulation setup, perfect for embedded systems projects and IoT development.Step 1: Create a Blynk Account and Set Up a Template
Before we can start connecting Proteus with Blynk, we need to create an account on Blynk and set up a template.
1.1 Sign Up on Blynk
- Go to the Blynk website and sign up.
- Use your email address to create an account.
- Check your email inbox for a confirmation mail and verify your account.
1.2 Create a New Template
- Log into Blynk.
- Click on New Template.
- Select Arduino as the hardware.
- Choose Wi-Fi as the connection type.
- Give your template a name (e.g., "Proteus Blynk").
- Save the template.
Step 2: Download and Install Required Files
To integrate Proteus with Blynk, we need to download and install some essential files.
2.1 Download the Blynk Library
- Visit the official Blynk GitHub page and download the Blynk Libray.
- Extract the downloaded ZIP file to a folder on your PC.
2.2 Install the Virtual COM Port Driver
- Download the Virtual COM Port Driver (this allows Proteus to communicate with your PC).
- Install it by following the on-screen instructions.
Step 3: Set Up Arduino IDE for Blynk
To make everything work, we need to configure Arduino IDE with Blynk.
3.1 Add Blynk Library to Arduino IDE
- Open Arduino IDE.
- Go to File > Preferences.
- Copy and paste the Blynk Library link in the Additional Boards Manager URLs field.
- Click OK.
3.2 Install the Blynk Library
- In Arduino IDE, go to file >preferences > Browse sketchbook location
- Search for library.
- past in it the files from extrated blynk release document.
3.3 Set Up Arduino Uno
- Go to Tools > Board and select Arduino Uno.
- Ensure that the correct port is selected under Tools > Port.
Step 4: Copy and Paste the Blynk Authentication Token
- In Blynk, go to your newly created template.
- Copy the Authentication Token provided.
- Open your Arduino sketch and paste the token where required.
- Make sure to have the auth tocken below right:
- Edit Blynk dashboard:
- Add switch
- Configure switch parameters
- Create datastream
- Virtual pin
- Virtual pin v0
- Create
- Chose V0
- Save and apply
Step 5: Configure Proteus Simulation
Now, we will configure Proteus 8 to work with Blynk.
5.1 Add Components in Proteus
- Open Proteus 8.
- Add an Arduino Uno.
- Add a virtual COM port and connect:
- TX (Transmit) of the COM port to RX (Receive) of Arduino.
- RX (Receive) of the COM port to TX (Transmit) of Arduino.
5.2 Configure Virtual Serial Port
- Open the Virtual Serial Port Driver.
- Create a new pair:
- Set COM3 as the virtual port.
- Set COM4 as the secondary virtual port.
- Apply the settings.
Step 6: Modify the Blynk Script
- Open the Blynk script file.
- Locate the section for serial port settings.
- Modify the port number to match your virtual COM port (e.g.,
COM4
). - Ensure the correct server port (
8080
or80
).
Step 7: Upload the Code to Arduino
- Open Arduino IDE.
- Compile and upload your sketch.
- Ensure the correct board and port are selected.
Step 8: Run the Proteus Simulation and the script
- Right click the blynk-ser.bat and run as admin, then wait for text to appear on the terminal, if not then check the last paragraph of this article for trouble shooting
- Open Proteus.
- Click Run Simulation.
- If everything is set up correctly, you should see the LED or device responding via Blynk.
Troubleshooting Common Issues
If Blynk does not work as expected, try the following:
Issue 1: Blynk Not Connecting
✅ Change COM4 to COM1 in the Blynk script and Virtual Serial Port settings.
Issue 2: Server Port Issues
✅ Change the server port from 8080
to 80
and retry.
Issue 3: Device Not Responding in Proteus
✅ Ensure the Baud Rate in Proteus matches the settings in Arduino.
This is the code, make sure to get the 4 data slots right
#define BLYNK_TEMPLATE_ID "" | |
#define BLYNK_TEMPLATE_NAME "" | |
#define BLYNK_AUTH_TOKEN "" | |
#include <BlynkSimpleStream.h> // Use this for USB Serial connection | |
#include <SoftwareSerial.h> | |
// Create a serial connection (For USB Serial connection with Blynk) | |
SoftwareSerial DebugSerial(2, 3); // RX, TX | |
// Define the LED pin | |
#define LED_PIN 13 | |
// Blynk auth token | |
char auth[] = ""; | |
void setup() { | |
pinMode(LED_PIN, OUTPUT); // Set pin 13 as output | |
Serial.begin(9600); // Start Serial Monitor | |
Blynk.begin(Serial, auth); // Initialize Blynk using Serial | |
} | |
void loop() { | |
Blynk.run(); // Run Blynk process | |
} | |
// Blynk function to control the LED | |
BLYNK_WRITE(V0) { | |
int switchState = param.asInt(); // Read switch state from Blynk | |
digitalWrite(LED_PIN, switchState); // Turn LED on/off | |
} |
This is all the links i used
https://blynk.cloud/dashboard/login | |
https://github.com/blynkkk/blynk-library/releases | |
https://www.virtual-serial-port.org/ | |
http://arduino.esp8266.com/stable/package_esp8266com_index.json |
Conclusion
By following these steps, you should now have Proteus 8 successfully connected with Blynk using Arduino. If you encounter any issues, refer to the troubleshooting section.
FAQs
1. Can I use a different board instead of Arduino Uno?
Yes, you can use ESP8266, ESP32, or other Arduino-compatible boards, but the configurations may slightly differ.
2. What if the virtual COM port is not detected?
Try reinstalling the Virtual Serial Port Driver and restart your PC.
3. Do I always need an internet connection for Blynk?
Yes, Blynk requires an active internet connection to function properly.
4. What if the Blynk authentication token is incorrect?
Check your Blynk dashboard and copy the correct token.
5. How can I control multiple devices with Blynk?
You can create multiple virtual pins in Blynk and assign them to different Arduino pins.
list of products from Amazon (Not mine, i just link them!)
Please NOTE that ELEGOO is not Arduino but it is compatible with Arduino IDE, and mutch cheaper!
CanaKit Raspberry Pi 5 Starter Kit PRO - Turbine Black (128GB Edition) (8GB RAM)
0 Comments