Connect Proteus 8 with Blynk Using Arduino

Mail confirmation2

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

  1. Go to the Blynk website and sign up.
    Blynk site

  2. Use your email address to create an account.
    Mail confirmation



  3. Check your email inbox for a confirmation mail and verify your account.

1.2 Create a New Template

  1. Log into Blynk.
  2. Click on New Template.
    Login to blynk

  3. Select Arduino as the hardware.
    Bynk right configuration

  4. Choose Wi-Fi as the connection type.
  5. Give your template a name (e.g., "Proteus Blynk").
  6. 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

  1. Visit the official Blynk GitHub page and download the Blynk Libray.
  2. Extract the downloaded ZIP file to a folder on your PC.
    Blynk library

2.2 Install the Virtual COM Port Driver
Virtual com driver

  1. Download the Virtual COM Port Driver (this allows Proteus to communicate with your PC).
  2. 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

  1. Open Arduino IDE.
  2. Go to File > Preferences.
  3. Copy and paste the Blynk Library link in the Additional Boards Manager URLs field.
  4. Click OK.
    Copy this link

Preferences



Past link here


3.2 Install the Blynk Library

  1. In Arduino IDE, go to file >preferences > Browse sketchbook location
  2. Search for library.
  3. past in it the files from extrated blynk release document.

Browse


Library

Release




3.3 Set Up Arduino Uno

  1. Go to Tools > Board and select Arduino Uno.
  2. Ensure that the correct port is selected under Tools > Port.
Arduino UNO port



Step 4: Copy and Paste the Blynk Authentication Token

  1. In Blynk, go to your newly created template.
    New template

    Create
    Proper configurations



  2. Copy the Authentication Token provided.
    Tocken
  3. Open your Arduino sketch and paste the token where required.
    Paste at the begining

  4. Make sure to have the auth tocken below right:Auth tocken
  5. Edit Blynk dashboard:
    Edit dashboard

  6. Add switch
    Add switch

  7. Configure switch parameters
    switch config

  8. Create datastream
    Creat datastream

  9. Virtual pin 
    chose virtual pin

  10. Virtual pin v0
    Chose v0 as virtual pin

  11. Create

    Create the virtual pin


  12. Chose V0


    Chose V0 again

  13. Save and apply

Save and apply


Step 5: Configure Proteus Simulation

Now, we will configure Proteus 8 to work with Blynk.

5.1 Add Components in Proteus

  1. Open Proteus 8.
  2. Add an Arduino Uno.
  3. 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.
Add compim
Compim correct configuration

5.2 Configure Virtual Serial Port

  1. Open the Virtual Serial Port Driver.
  2. Create a new pair:
    • Set COM3 as the virtual port.
    • Set COM4 as the secondary virtual port.
Create pair


  1. Apply the settings.
    Correct pairing


Step 6: Modify the Blynk Script

  1. Open the Blynk script file.
    Find blynk script

From blynk folder


then BLYNK


right click and modify


  1. Locate the section for serial port settings.
  2. Modify the port number to match your virtual COM port (e.g., COM4).
    Change the parameters

  3. Ensure the correct server port (8080 or 80).
    Correct parameters



Step 7: Upload the Code to Arduino

  1. Open Arduino IDE.
    open and compile

  2. Compile and upload your sketch.
    Upload by double clicking and select the file ending in .ino.hex

  3. Ensure the correct board and port are selected.

Step 8: Run the Proteus Simulation and the script

  1. 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

    Execute as admin

  2. Open Proteus.
  3. Click Run Simulation.
  4. If everything is set up correctly, you should see the LED or device responding via Blynk.
Demo



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.

Solution to problem



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
}
view raw Code.ino hosted with ❤ by GitHub


This is all the links i used

view raw alllinks.txt hosted with ❤ by GitHub

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)

CanaKit Raspberry Pi 5 Starter Kit PRO - Turbine Black (128GB Edition) (8GB RAM)

Post a Comment

0 Comments