Ubidots Nodemcu Light Intensity monitoring using Gauges and Charts

(Last Updated On: July 17, 2019)

ubidots

Description:

In this Tutorial, you will learn how to monitor the Light intensity using Ubidots Gauges and Charts along with the time and date information. This is a Ubidots Nodemcu LDR based Light Intensity Monitoring system. This is a getting started tutorial and explains the extreme basics like for example

  1. How to send the sensor data from the Nodemcu esp8266 wifi module to the Ubidots IoT Platform.
  2. How to display the value stored in a variable on gauges and charts.
  3. Circuit diagram explanation
  4. Interfacing and finally number
  5. Testing


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
Variable Resistor or a Potentiometer: https://amzn.to/2LocD8T
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

Circuit Diagram:

ubidots

As you can see the Circuit Diagram is really simple. LDR is connected in series with a 10k resistor, which makes a voltage divider circuit. As you know LDR stands for “Light dependent Resistor”. LDR is basically a variable resistor whose resistance changes with the amount of light falling on the LDR. So as the resistance changes due to the light, it results in the change of voltage. This change of voltage is monitored using the Analog Pin A0 of the Nodemcu esp8266 wifi module.


Interfacing:

ubidots

As you can see the LDR is connected in series with a 10k resistor. The orange wire is the 3.3v wire. Blue wire is the Ground wire. While the white wire is connected with the A0 pin of the Nodemcu module. These connections are as per the circuit diagram as already explained.

Ubidots esp8266 library:

Before you start the programming first of all make sure that you download the Ubidots-esp8266 library. Click Here

After you download the library the next step is to open the latest version of the Arduino IDE and add this library.


Programming:

For the Step by Step program explanation and how to find your Ubidots TOKEN watch video Click Here


Before you upload the program first of all make sure that the right board is selected…

ubidots

and also make sure that the right com port is selected. In your case the com port number can be different.

ubidots

then click on the upload button and wait for a while….After the program is uploaded wait for the Nodemcu esp8266 wifi module to connect with the WIFI.

Open your Ubidots account.


ubidots

click on the devices menu and select devices….

ubidots

ubidots

as you can see a new device with the name esp8266 has been added. Now if you click on this device you will see the value of the ldr in real-time.

ubidots

you will see a change in the value as u change the amount of light falling on the LDR… as you can see the variable name LDR, this is the name which I defined in the programming. So this is the variable which we can use now with different gauges and charts. lets display this value on a gauge and chart. click on the data menu and select dashboards…

ubidots

click on add new widget.

ubidots

After you click on the add new widget a list of all the widgets available is displayed.

ubidots

as you can see we have different widgets but for now lets use a Gauge.

ubidots

ubidots

click on the add variables.then click on the device which is esp8266…and then select the variable LDR…

ubidots

you can change the name of the widget…you can change the range value…

ubidots

now you can monitor the light intensity in real-time using a Gauge…

now let’s add the line chart the same way we added the Gauge….

ubidots

This is how easily we can use the widgets in Ubidots.

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