Multiple analog sensors monitor using Nodemcu esp8266

(Last Updated On: July 17, 2019)

multiple analog sensors

Description:

My previous tutorial was based on how to monitor an analog sensor using only 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 we have only one analog pin A0.

In many situation, 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 with 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: https://amzn.to/2tVz1vu
Nodemcu esp8266 wifi module: Best price: https://amzn.to/2NAvmiB
Mega 2560: https://amzn.to/2ze1kdu
lm7805 Voltage Regulator: https://amzn.to/2IZEl5x
330-ohm resistors pack: https://amzn.to/2NtlAeh
female DC power jack socket: https://amzn.to/2KEo1gt
470 uf capacitors: https://amzn.to/2xDCOzf
5×7 cm vero board: https://amzn.to/2OHGbvn
female headers: https://amzn.to/2zqmtiJ
connection wires: https://amzn.to/2DpBuW7
Super Starter kit for Beginners: https://amzn.to/2KJvmKG
Jumper Wires: https://amzn.to/2KMoVXs
Bread Board: https://amzn.to/2MS4q8X
12v Adaptor: https://amzn.to/2Ntr6h1
PCB plate: https://amzn.to/2IUwpCt
Variable Supply: https://amzn.to/2MT4Qfj
Digital Multimeter: https://amzn.to/2Nvft9i
Vero Board / strip board: https://amzn.to/2MTf9jD
Soldering iron kit: “best” You guys should definitely purchase this: https://amzn.to/2zfoNuJ
Solder wire: https://amzn.to/2ufUMWf
Wire Stripper: https://amzn.to/2KOqxfU
wire cutter: https://amzn.to/2ucIq14
PCB small portable drill machine: https://amzn.to/2Nu62XF
MFRC522 RFID module and tags: best deal: https://amzn.to/2PD9Ref
GSM sim900A: https://amzn.to/2Nv70TI


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.

The power supply is already explained in my previous tutorial, 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 Nodemcu 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 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.

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.


Arduino Programming:

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

Leave a Reply

Close