STORY
This project deals with building a light intensity monitoring system for plants. The system is built using a Bolt WiFi Module so that light intensity can be monitored and data sent to the Bolt Cloud.
At the end of the project, we will be able to collect the intensity of light at different times and plot the data using graph.
Let's get right into the project!
STEP 1 : CIRCUIT SETUP1. Keep Bolt WiFi Module off while connecting the circuit. This reduces the chance of short circuit of the device, in case any mistake is made.
2. LDR Connection
Connect one lead of the LDR into the 3V pin and the other lead into the A0 pin of the Bolt Module.
3. Resistor Connection
Connect one leg of the 10k Ohm resistor into the GND pin and the other leg into the A0 pin of the Bolt Module
NOTE: Make sure that the connections are proper. The wires or pins coming out of the 3V pin and GND should not touch other. If they do make contact, the Bolt Module will get destroyed due to the high current drawn.
4. The circuit is ready and the device can be switched on.
STEP 2 : CONNECT BOLT DEVICE TO THE CLOUD
Connect the device to your laptop using an USB cable. To connect the device to the cloud, open the Bolt IoT app in your phone and connect it to the Bolt Module. Once this is done, you will see a green LED on the Bolt Module blinking, indicating that the device is connected to the Cloud.
To visualize the collected light intensity data,
1. Login into cloud.boltiot.com and click on the 'Product' tab.
Go to Product
2. Select 'New Product' option on the left side of the screen in your laptop/computer. Create product for light monitoring system.
3. Now, configure the device by selecting 'Configure our Product' option
Now choose the hardware pins which you plan to use for this project. Since LDR is an Analog Sensor and Bolt WiFi Module has only one Analog pin, we have to choose only the A0 pin.
Now give a suitable variable name to the pin value. By this, you will create a variable which will store the sensor value as it is received. We can then use this value in our project.
With this, you have completed your hardware configuration. Save your configuration and move to the code tab.
4. Click on the 'Code' tab, and then click on the 'Import code' button to generate and import a new code.
There is an option to select the type of graph to visualize the data of light intensity.
The code tells the Bolt Cloud, how to plot the sensor data for visual representation.
Now let me explain each line of the code so that you could make suitable changes as you wish.
setChartLibrery function sets the data visualisation library you would use. The most commonly used one on Bolt Cloud is the Google Library. However, you could use any other JavaScript or HTML code here to visualise the data.
setChartTitle function sets the title of the chart/graph. Give a suitable name for your graph here which will be shown in the heading of the page. This is different from the name of the code file.
setChartType function is where you choose which type of chart you want i.e. Line Graph, Bar Graph etc.
setAxisName will set the name for the X Axis and Y Axis
plotChart is where you choose which variable you want to choose in your chart.
5. Give a name to your code and save the configurations.
6. Link Bolt with the 'Light_monitoring' product that you created. Linking allows your Bolt to access the configurations defined for a product.
7. Deploy the code to your Bolt. Deploying means to transfer the instructions and configuration to the Bolt device.
Deploy code
8. See the output on a plot. You can vary the light intensity by placing the circuit under the desk or glowing a torch on the LDR sensor.
OUTPUT READINGSOUTPUT PLOT
Comments