Multiple analog sensors monitor using Nodemcu esp8266

(Last Updated On: September 12, 2020)

multiple analog sensors

Description:

multiple analog sensors with Nodemcu ESP8266 and Arduino- My previous tutorial was based on how to monitor an analog sensor using only the Nodemcu esp8266 wifi module and Blynk application. The disadvantage of using Nodemcu alone is that, you can monitor only one analog sensor, as in Nodemcu ESP8266 Wifi Module we have only one analog pin A0.

In many situations, you need to monitor multiple analog sensors. But when it comes to the Nodemcu esp8266 wifi module we can only monitor one analog sensor. As in Nodemcu module we have only one analog pin A0. But no worries we have some other options.  ,

  1. We can go for a multiplexer and use it with Nodemcu esp8266 wifi module and connect multiple analog sensors. Or
  2. We can use Nodemcu esp8266 wifi module with the Arduino Uno or Mega and connect as many sensors as we want.

The first option involves a lot of coding, wiring and its overall price increases above the price of Arduino UNO or mega. And you will find a lot of videos on this, but personally, I didn’t like this. While The second option is really easy, you don’t need heavy coding, you can connect many sensors as you want. So my choice is the second option.

So in this Tutorial, you will learn how to monitor multiple analog sensors using Nodemcu esp8266 wifi module, Arduino or mega, and Blynk Application.

For the libraries installation and Nodemcu esp8266 wifi module power supply making, you can watch a video given at the end of this Article.


The components and tools used in this project can be purchased from Amazon, the components Purchase links are given below:

Arduino Uno:
Nodemcu esp8266 wifi module: Best price:
Mega 2560:

Other Tools and Components:

Super Starter kit for Beginners

Two Channel / 200 MHz Digital Oscilloscope

Variable Supply:

Digital Multimeter:

Soldering iron kit: “best”

PCB small portable drill machine:

*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!


Multiple Analog Sensors with Nodemcu ESP8266 and Arduino Circuit Diagram:

multiple analog sensors

This is the complete circuit diagram of the multiple analog sensors monitoring using Nodemcu, Arduino Uno or Mega and Blynk application. For the schematics and PCB designing, I used Cadsoft eagle 9.1.0 Verison. This version of the Cadsoft eagle can be downloaded freely from the Cadsoft official website.

On the left side, you can see the 5V regulated power supply based on the LM7805 voltage regulator. This power supply is used to power up the Nodemcu ESP8266 Wifi Module. But as in this small project I am using only one sensor so that’s why I have not connected the output of the voltage regulator with the Vin Pin of the Nodemcu module. But my recommendation is, you should connect a wire from the output of the voltage regulator with the VIN pin of the Nodemcu Module.

When the sensors with the Arduino Uno or Mega board are increased, then the Arduino won’t be able to power up the Nodemcu Module, as a result the Nodemcu Module will keep resetting, and on the Blynk application it will show the Nodemcu module in the offline mode. So if you end up in a situation like this, then you should power up Nodemcu ESP8266 Wifi Module using the 5V regulated power supply, and don’t forget to add the capacitors.


A variable resistor is connected with A0 pin of Arduino and 5v to this variable resistor is given through pin4 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.


The reason for defining another serial port on pin number 2 and pin number 3 is that, we want to use the Arduino’s default serial port only for the debugging purposes. Using the Sofware serial library we can define multiple serial ports without any problem. So, in this project, the Arduino’s default serial port will be used for sending the information to the computer serial terminal while the with the other serial port Nodemcu esp8266 wifi module will be connected.

Blynk Application:

The Blynk application designing is explained in the video given at the end of this Article.

Multiple Analog Sensors Programming:

In this project two programs are used, one program is written for the Arduino and another program is written for the Nodemcu esp8266 wifi module.


Multiple Analog Sensors Arduino Programming:

Multiple Analog Sensors Nodemcu esp8266 wifi module Programming:

Before you start the programming first of all make sure you download all the necessary libraries and also make sure you install the latest version of the Arduino IDE.



Watch Video Tutorial:

 

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

3 Comments

  1. Hi thanks for the good job. I only want to know if esp-01 could be used to replace the nodemcu in your tutorial. And if there’s any change/s to be made in the code. Thanks.

  2. hello,i have a question regarding the nodemcu 3.3v refrence voltage and you giving it 5v as a serial communication to the node mcu.is it safe as doing it
    thank you.

Leave a Reply