Sunlight Intensity Tracker

by Adityadp in Circuits > Arduino

866 Views, 4 Favorites, 0 Comments

Sunlight Intensity Tracker

Screen Shot 2020-05-10 at 10.04.45 PM.png
Screen Shot 2020-05-10 at 10.05.19 PM.png
Screen Shot 2020-05-10 at 10.06.22 PM.png
Screen Shot 2020-05-10 at 10.02.58 PM.png

There are a lot of projects out there that rely on the sun's heat or light. E.g. the drying of fruits and vegetables. However, the sunlight's intensity is not always constant and it changes throughout the day.

This project attempts to map the sun's intensity throughout the day, about 8 hours, and determine if there were any extended periods of time where the sun had disappeared under thick clouds. This proves very crucial for some projects which are dependent on the time an object spends outside, e.g. desiccation. This can help corroborate the values you find with the primary project.

Using the logger function on the Arduino app, you will be able to get a solar intensity over the day (time) graph. Additionally, at the completion of the 8 hours, you will receive a list of the times for which the sunlight intensity was below a certain threshold, which you can set.

This information can prove very useful for a variety of projects such as solar tracking or PV systems management. Additionally, due to the simplicity of the setup, it can be incorporate with almost any other project. All that is required is an Arduino, a mini solar panel and two resistors. Most of the processing and heavy lifting is done by the code.

Supplies

1) 1 x Arduino Uno/Nano (link)

2) 1 x Small solar panel (link)

3) 2 x 330-ohm resistors

Building the Circuit

Screen Shot 2020-05-10 at 10.02.58 PM.png

Since the Arduino does most of the processing, the circuit is very simple.

You need two resistors with the same value. It would be better if the resistance is lower, around 300 ohms or less. This will be used to make the potential divider.

You can follow the schematic detailed in the image above. The green PCB represents the solar cell. The intersection between the two resistors will be connected to the Analog 0 pin of the Arduino. The red wire is the positive terminal of the solar cell/panel while the black wire is the negative terminal of the solar cell/panel.

Explaining the Circuitry

Screen Shot 2020-05-10 at 10.09.30 PM.png

The voltage that is produced by the solar panel is proportional to the solar intensity. Thus actually the voltage of the solar panel is being charted over time to help determine the light intensity.

However, in bright sunlight, some solar panels' open-circuit voltage exceeds the 5V limit on the Arduino Uno analogue pin. Thus you have to use a potential divider to cut the voltage in half so that is it still within the range of the Arduino.

This will not affect the graph or the trend over time. Additionally, it will still be able to pick up any long periods of cloudiness or lack of sunlight.

The Code

Screen Shot 2020-05-10 at 10.41.23 PM.png

The code measures the voltage of the solar panel every 5 minutes for 8 hours. The duration and frequency, however, can be changed if required. Each data point, measured every 5 minutes, is plotted on a graph against time. This can be done by utilising the serial plotter function on the Arduino program.

At the end of the 8-hour duration, the code runs through all the previous data points and calculates an average. Then the code runs to check if there are 2 consecutive points (10 min) which are less than 60% of the average voltage. Again this threshold value can be changed easily.

Finally, if it detects 10 minutes of consecutively low voltage of sun intensity, it records the time in which it happens and outputs an array with all the occurrences of low sunlight.

Here is a link to the code in a google drive folder: https://drive.google.com/open?id=1pDK-wJbQATSn0hax...