Introduction
We all know that plants require sunlight for their healthy growth. However, at times we may not be able to keep a track of it or maybe we are not sure if our plants are getting enough sunlight.In this project, we will build a system so that we could monitor the light our plants get and send the data to Bolt Cloud at any fixed specific time.
Procedure
1. Make sure we have not powered on our Bolt Module while connecting the circuit. This will ensure that in case we make any mistake, it will not short circuit our device. Switch off the power if it is connected and this is the also necessary for own safety purpose.
2. Connect one end of the LDR to the A0 (Analog) pin of the Bolt device and other ends of the LDR to the 3.3V pin of the Bolt as shown in the image below (after 3rd point).
3. Connect the 10K ohm resistor between the GND and A0 pin of the Bolt so that LDR and the resistor form a series connection.
4. Now our circuit is ready. We may power on your device.
5. Connect our Bolt device to the Bolt Cloud. We can skip this step if we already connected our Bolt device to the Bolt Cloud. To check if it is connected to Cloud, have a look at the green coloured Cloud LED on the Bolt WiFi module. It should be glowing.
6.Login into cloud.boltiot.com and click on the 'Product' tab.
7. Create a new product for our light monitoring system. Products are created once and can be used for multiple Bolt devices. This ensures scalability for IoT products we build on Bolt.
8.we need to 'Configure our product'. For this click on the Configure Product icon as shown below in the image.
Now choose the hardware pins which we plan to use for this project. Since LDR is an Analog Sensor and Bolt WiFi Module has only one Analogue pin, we have to choose only the A0 pin. Here screenshot is available
Now give a suitable variable name to the pin value. By this, we 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, we have completed our hardware configuration. Save our configuration and move to the code tab.
9. Click on the 'Code' tab, and then click on the 'Import code' button to generate and import a new code.
Here we will choose the option of Line Graph since we want to plot the line graph for our sensor value. However, in case we want to choose any other type of graph then we could do so.
The code tells the Bolt Cloud, how to plot the sensor data for visual representation. In the code, we will find the keyword, the name is plotChart is where we choose which variable we want to choose in your chart. In the code, we will also choose the time limit. At what time interval we want to monitor the light for the plants. After the completion of these steps, we will save our code. Here screenshot is available
10.Link Bolt with the 'Light_monitoring' product that we created. Linking allows our Bolt to access the configurations defined for a product.
11. Deploy the code in our Bolt. Deploying means to transfer the instructions and configuration to the Bolt device. Here screenshot is available
12. See the output on a plot. We can vary the light intensity by placing the circuit under the desk or glowing a torch on the LDR sensor.
Here screenshot is available of monitored data. Please see above. (For the conversion in centigrade we divided from 10.24 into count data)
Working principle
This project is based on the principle that whenever the light falling on the sensor changes, the resistance of sensor changes which is then converted into a change in voltage. The ADC pin on Bolt WiFi Module converted this analog voltage level into digital values which are shown on the graphs.
We connect the LDR between 3.3V pin and the analog input pin (A0), so that when light intensity increases, the resistance of LDR decreases so the voltage across the LDR decreases and as a result, the voltage on the analog input pin increases.
This means that as the light intensity increases, the voltage on the analog input pin also increases. The Bolt then converts that the voltage a 10 bit (10 places in binary number system) digital value that varies from 0-1024 (0 to 2 raised to 10).
This digital data is then sent to the cloud where it is plotted for visual representation.
Final Touch
Precautions
1)Make sure connections are made properly. Ensure that there are no short-circuit connections.
2)Product names can only have alphabets, numbers, and underscore ( _ ) as a special character. Spaces are not allowed.
Comments
Please log in or sign up to comment.