Light Intensity refers to the amount of light emitted in unit time per unit solid angle. It is like brightness and tells us the amount of light energy delivered by a surface. It is one of the major factors for our ecosystem. Light duration affects the growth of flora and brings about variation in the habits of fauna. Therefore, it is necessary to measure the intensity of light in creating desired outcomes in real-time applications such as gardening, farming, street light system, traffic light system, at emergencies etc. In this post, I've described a simple light monitoring system which would help you track the intensity of light regularly and record the data.
Light Dependent Resistor(LDR)
Light dependent resistors or photoresistors are sensitive to light. The resistance of an LDR varies inversely with light i.e. the resistance decreases as intensity of light falling on the LDR increases. In other words, an LDR allows higher voltages to pass through it (low resistance) whenever the intensity of light is high and passes a low voltage whenever it is low. This property of an LDR can be used to monitor the intensity of light.
LDR with Arduino
LDR produces analog output voltage with respect to the incident light i.e. the magnitude of the voltage is proportional to the amount of light falling on it. Therefore, it is connected to the analog pin of the arduino. Arduino has a built in analog to digital converter(ADC) which converts the analog voltage ranging from 0-5volts into a digital value in the range of 0-1023.
First, connect one leg of the LDR to the analog pin A0 of the arduino and the other to the 5v pin. Then, connect a 10k resistor with the same leg of the LDR which is connected to A0 and ground the other leg.
Code
Now, the next step after completing the connection is to write a code to read the values from the sensor and collect the data. Sensor values can be read by using the analogRead function and then these values can be printed on the serial monitor using Serial.println function. The code for the same looks like this:
Now, the next step after completing the connection is to write a code to read the values from the sensor and collect the data. Sensor values can be read by using the analogRead function and then these values can be printed on the serial monitor using Serial.println function. The code for the same looks like this:
Next, upload the code in the arduino. The output can be seen on the serial monitor.
Note the change in values by covering the surface of the LDR or by switching off the lights of your room.
Light Monitoring for Plants
The basic requirement for the healthy growth of a plant is sunlight. We all keep our plants under the sun, however, we forget the fact that not all plants require direct sunlight. Some of them need indirect sun rays or a very little amount of light. To keep track of the amount of light falling on plants, a light monitoring system can be used, the one we developed above. The data collected by the sensor can be read on the serial monitor and the location of the plant can be changed accordingly.
Darkness Eliminator
Wouldn't it be amazing if we could eliminate darkness? The light monitoring system can also be used to eliminate darkness. During the night, if there is a power cut or we're walking in a dark street this system can be used to turn an LED or a bulb on when an LDR detects darkness(less intensity or zero intensity of light). There will be a minor change in the connection as well as the code.
Connect an LED with any of the digital pins of the arduino and ground the other leg.
The previous code will have the following changes:
The readings would be noted from the LDR and then be analysed by the arduino. If the output of the LDR is less than 400 it means that the intensity of light is less(darkness), the LED or the bulb will be switched on, or else it will remain off. This would help in eliminating darkness.
Please note that in order to connect a bulb, a relay should be used.
In this way, the light monitoring system can be used for practical purposes and it will help us combat our problems.
I hope you like it.
This was so innovative and informative.
ReplyDeleteEagerly waiting for your next idea
Thank you
Delete