Arduino and Nodemcu two way communication, Control and Monitoring

(Last Updated On: April 12, 2021)

Arduino Nodemcu

Arduino and Nodemcu Two-way communication Description:

Arduino Nodemcu two way communication – In this Tutorial, you will learn how to do two way communication between Arduino and Blynk through Nodemcu esp8266 wifi module. At the end of this tutorial, you will be able to monitor multiple analog sensors and you will also be able to control multiple loads. In this project, no multiplexers will be used. All the sensors and loads will be connected with the Arduino in a normal way while the Nodemcu esp8266 wifi module will be used as the bridge only. Let’s get started

Amazon Links:

12v Adaptor:

Arduino Uno

Arduino Nano

Mega 2560:

Nodemcu ESP8266 WiFi Module:

LM7805 Voltage Regulator:

470uf capacitor:

330-ohm resistor:

DC Female Power Jack:

Female Headers:

Male Headers:

Other Tools and Components:

Top Arduino Sensors:

Super Starter kit for Beginners

Digital Oscilloscopes

Variable Supply

Digital Multimeter

Soldering iron kits

PCB small portable drill machines

*Please Note: These are affiliate links. I may make a commission if you buy the components through these links. I would appreciate your support in this way!

This project is basically based on the Serial communication between the Arduino and Nodemcu esp8266 wifi module. As you know in Nodemcu esp8266 wifi module we have only one Analog pin and have less number of Input/Output pins, to increase the number of Analog pins and digital pins the best choice is to connect the Nodemcu module with the Arduino Uno or Mega.

Nodemcu Interfacing with Arduino Circuit Diagram:

Arduino Nodemcu

Let’s have a look at the complete circuit diagram. This schematic is designed in cadsoft eagle 9.1.0 version. If you want to learn how to make schematics and PCB’s then watch my tutorial.

The power supply is already explained in my previous tutorials, you can use this power supply to power the Arduino by connecting its output with the Vin pin of the Arduino. But I will connect a 12v adaptor directly with Arduino and  I will power up the Nodemcu esp8266 using the Arduino’s 5v and ground. As you can see the Arduino’s 5v is connected with Vin pin of the Nodemcu and the ground is connected with ground.

All the grounds are connected. A variable resistor is connected with A0 pin of the Arduino, an LDR is connected in series with a 10k resistor, which makes a voltage divider and is connected with A1 pin of the Arduino. The tx and Rx pin’s of the Nodemcu are connected with pin2 and pin3 of the Arduino. So the Nodemcu will communicate serially with Arduino Uno through pin2 and pin3. Pin2 is Rx and pin3 is tx, which will be defined in the programming using the software serial library.

For controlling these relays we will need relay drivers, the relay drivers simply consists of the 2n2222 NPN transistors, 10k ohm resistors, and diodes. As you can see a 10k resistor is connected with the base of 2n2222 NPN transistor as it’s a bjt “bipolar junction transistor” a current controlled device, that’s why we need a current limiting resistor. We usually use a 10k resistor.

The emitter of the 2n2222 NPN transistor is connected with the ground while the collector is connected with one side of the relay coil, while the other side of the relay coil is connected with 12v. This relay can be energized and de-energized using this transistor.  As you can see this relay consists of 5 pins, two coil pins, common, normally closed and normally open. These three pins have no physical connection with the coil pins.

Arduino Nodemcu

So this is the relay module, you can also use the readymade relay module.

Arduino Nodemcu

these are 10k resistors connected with the base of 2n2222 NPN transistors,

Arduino Nodemcu

these are the 1n4007 diodes connected across the relay coil pins,

Arduino Nodemcu

these are 12v SPDT type relays and these are the terminal blocks. I have soldered some jumper wires so that this relay module can be easily interfaced with other circuits. This relay module consists of 7 relays but I will be using 2 relays. Connect 2 relays with pin number13…and …pin number12 of the Arduino Uno or mega And connect the relay module ground with the ground of Arduino.

Blynk Application:

For the step by step Blynk application designing watch Video tutorial.

This is how the Blynk application looks like.

Arduino Nodemcu

Arduino and Nodemcu Programming:

Arduino Programming:

Nodemcu Programming:

Watch Video Tutorial:


Other Nodemcu and Arduino Related Projects:

YouTube Views and Subscribers count using Nodemcu ESP8266 & Arduino


IOT 3 Phase Transformer Load monitoring using Arduino and Nodemcu


IOT Water Quality monitoring using Arduino,pH Sensor,Nodemcu ESP8266


Nodemcu ESP8266 IOT Power Lines Mains frequency monitoring 50Hz


IOT light dimmer using Arduino and Nodemcu esp8266 wifi module


Nodemcu and BMP180 “temperature, pressure & Altitude” internet of things project “iot”


Arduino IOT Project: Nodemcu ESP8266 wifi Robot Car “L298N motor driver + Blynk + Joystick”


Nodemcu GPS Tracker using Arduino Nodemcu esp8266 and Blynk


Multiple analog sensors monitor using Nodemcu esp8266



Recommended For You

About the Author: Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

1 Comment

  1. Hai,
    I have problem from Arduino and Nodemcu two way communication, Control and Monitoring.

    my problem is relay cannot control from blynk, the code same with tutorial.
    any problem?


Leave a Reply