Introduction: Control Simulated Arduino Circuit With Android Blynk App - First Project : LEDs
Introduction
Blynk is very popular app founded by Bayborodin Pavlo and Dumanskiy Dmitriy which allows both hobbyists and professionals to build IoT apps connected to popular controllers like Arduino , Raspberry Pi and ESP8266 with other boards. The essence behind the success of this project is you will barely write any code to achieve such connectivity which naturally would be painful journey to survive.
This project is one of upcoming series to highlight how to use Blynk app with Proteus ISIS to create your IoT project without necessity of having real Arduino board at all. Not only this, but also in upcoming series, you will learn how to build a more advanced circuits and connecting it to Blynk via virtual pins.
Note: Before you begin, I should mention that Blynk server sometimes become unreachable due to heavy loads from users(it was about to ruin the demo of one of my students during presentation). Therefore, I recommend using Blynk local server on your machine. I recommend watching this YouTube tutorial.
Requirements
- An Android (or iPhone) mobile. You can use Emulator like bluestacks although I haven't tested it. Download Blynk app from the store.
- Proteus 8.5 ( or later). If you have earlier version, you can still follow the steps although my design file won't run directly on your machine.
- Arduino IDE sketch with Blynk library downloaded from Library Manager.
- Virtual Serial Port Emulator: There are many virtual serial port emulators. I used virtual serial port kit but you can use other free virtual serial port emulator.
Step 1: Create Proteus File With Arduino UNO
Starting from Proteus 8.0 , Arduino UNO can now be placed on schematic from project clip. If you have previous version, you can add Arduino library as instructed here. Make sure Arduino oscillator is 16 MHz to match the code generated from Arduino sketch compiler.
Step 2: Add 3 LEDs From Project Clip
Add 3 LEDs, Red, Green and Blue. You can either use project clips or as usual from proteus library.
Step 3: Create Virtual COM Port
Using any virtual com software, create virtual connection like : COM1<--->COM2. One will be used with Proteus and the other with Blynk Script.
Step 4: Add COMPIM From Proteus Library
Add COMPIM component found in proteus library. I created project clip for easy re-usability.I chose COM1 to be Proteus side while COM2 will be Blynk script side.
Step 5: Add Arduino Sketch Compiled Hex File to Proteus Folder
Here is the code (will be added to files of project later).
/****************************************************************************************
* Code is based on Blynk USB-Serial Example * Make sure you go to C:\Users\Your Username\Documents\Arduino\libraries\Blynk\scripts * Press CTRL + LMouse Button and select Open Command Windows Here * Then type in command windws >> blynk-ser.bat -c COM2 and click enter * Enjoy the Virtual IoT !!! ****************************************************************************************/ #include <BlynkSimpleStream.h>// Pin Assignments int redPin=8,greenPin=9,bluePin=10;
//Your app authentication token (can be fetched from your blynk app char auth[] = "d76e23d84cee461aa3f6869ff43e0d07";
void setup() { //Set the three LED pins as output pinMode(redPin,OUTPUT); pinMode(greenPin,OUTPUT); pinMode(bluePin,OUTPUT);
// Blynk will work through Serial Serial.begin(9600); Blynk.begin(auth, Serial); }
void loop() { // All the magic is here Blynk.run(); }
Step 6: Now Use Normal Blynk Procedure
Up to this point, you can run Proteus project.
- Use instructions of how to run Blynk using user-serial example from blynk website.
- Connect your Blynk app to server (local or cloud). Don't forget to change authentication token.
- In my demo I used local server. You can watch the youtube demo to create yours.
- It is done. You can now control LEDs on your PC from mobile. Happy Blynking !!
Step 7:

Participated in the
Maker Olympics Contest 2016
20 Comments
2 years ago
where can i dowload project clip files of arduino
3 years ago on Step 6
Thank! for .......
This is greats !
Reply 3 years ago
You are welcome for ......
5 years ago
Thanks, it has been a great help. I have a question. I have a USB-WiFi converter on my PC. Is it possible to connect the COMx of COMPIM to the COMx of the USB-WiFi? and if so, how? Thank you again.
Reply 3 years ago
Sorry for the late response, if the USB is recognized as com port, just write the com number on virtual com port and it is going to be connected.
3 years ago
Your software for the virtual com port, I did not find support for windows 10. I used to Virtual Serial Port Driver. He also did creating virtual serial ports.
For Proteus, good software options.
5 years ago
Hello. Been tearing my hair out for the last 6 hours. I just can't seem to get the device online. The server should be all set up correctly. I used COM3 AND COM 4 as COM1 was busy/overlapping, don't know why what though. When I start the simulation, the green/red don't match with yours, and I've used your clip of the compin, and adjusted is properties. Does what COM I use in the Arduino Ide have anything to say?
Thanks ☺️
6 years ago
Very nice first instructable! Thanks for sharing and welcome to the community!
Reply 6 years ago
Thanks
Reply 5 years ago
Sir That's a great intro video
But sir I first simulated this circuit and it worked out but now I am trying to simulate it but on the blynk app in my android shows device is offline
Please help me out in this one?
Thanks
Reply 5 years ago
Two things to do. First delete the serial connection and create it again. And secondly, refresh the token from Android app and send it to your EMail, then update the token in your sketch
Reply 5 years ago
Sir thanks for the reply sir I have done that but no progress yet
sir I have noted one difference that is when I start the simulation in proteus mine compim looks different i.e pin 3 neither its blinking nor its turned red mean energized as yours.server am using is blynk server
This pic is when I just start the simulation I haven't started the server yet and the other one when started server
Reply 5 years ago
From what I see, you may mistakenly connected Request To Send (RTS) and Clear To Send(CTS) with Transmit data line (Tx). The dot implies you did. So, make sure you disconnect Tx from that. TXD should be connected only to TXD.
Reply 5 years ago
Ok Sir Waleed I will do that and A bundle of thanks for taking in account my problem and helping me out.
Reply 5 years ago
Not at all. Just tell me if you need anything else.
Reply 5 years ago
Thanks for your time and support Sir
Reply 5 years ago
Thank you a lot respected Sir Waleed Its solved and I am running blynk plus arduino on proteus again. Thanks again Sir for giving me your precious time.
Reply 5 years ago
Awesome !. Glad you made it.
6 years ago
Congratulations, nice instructable! What kind of connection do you setup on android app?
Reply 5 years ago
USB