Building an Automatic Solar Tracker With Arduino UNO
by OmA17 in Circuits > Arduino
27778 Views, 46 Favorites, 0 Comments
Building an Automatic Solar Tracker With Arduino UNO
Solar energy is becoming more and more prevalent across the world. Currently, many methods are being researched to make solar panels output more energy, reducing our reliance on fossil fuels and coal. One way to do this is to have the panels move, always facing the sun in the sky. This allows optimal energy collection, making solar panels more efficient.
This Instructable will look into how solar trackers work, and implement such a method into a solar tracker prototype using an Arduino UNO.
How Solar Trackers Work
There are 3 main methods which are used to control a solar tracker. The first is a passive control system, and the other two are active control systems. The passively controlled solar tracker contains no sensors or actuators but changes its position based on heat from the Sun. By using gas with a low boiling point in a container mounted on hinges at its middle, similar to a see-saw, the solar panel can change its position based on the direction of heat from the Sun.
The active systems are a bit different. Both require a processing system, as well as actuators to move the panels. One way to actively control solar panels is to transmit the Sun's position to the panels. The panels then orient themselves to this position in the sky. Another method is by using sensors to detect the sun's position. By using Light Dependent Resistors (LDRs), its possible to detect varying light levels. These sensors are then used to determine where the sun is in the sky, allowing the panel to orient itself appropriately.
In this Instructable, we will use the sensor based active control system.
System Diagram/Component Overview
How this system works is shown in the pictures above. There will be 1 light dependent resistor on each side of a divider. This divider will cast a shadow on the sensor on one side of the panel, creating a drastic difference between the two sensor readings. This will prompt the system to move toward the brighter side to equalize sensor readings, optimizing solar panel position. In the case of a 2 axis solar tracker, this same principle can be used, with 3 sensors instead of two (1 on left, 1 on right, 1 on bottom). The left and right sensors can be averaged, and this reading can be compared with the bottom sensor to determine how much the panel must move up or down.
Main Components Overview
Arduino UNO: This is the microcontroller for this project. It reads sensor data and determines how much and in which direction the servos must turn.
Servo: These are the actuators used for this project. They are easy to control and very precise, making it perfect for this project.
Light Dependent Resistors (LDRs): These are variable resistors that detect light levels. These are used to determine the position of the sun in the sky.
Materials/Equipment
The materials used to build this project are:
- Arduino UNO
- 2 Servos
- 3 Light Dependent Resistors (LDRs)
- 3 10k Ohm Resistors
- Popsicle sticks
- Cardboard
The tools used to build this project are:
- Soldering Iron
- Tape
- Scissors
- Utility Knife
- Hot Glue Gun
Circuit Schematic
Above is the schematic used to wire the solar tracker together.
Pin Connections:
Left Photoresistor
Pin 1 – 3.3V
Pin 2 - A0, GND (10k ohm resistor between Pin 2 and GND)
Right Photoresistor
Pin 1 – 3.3V
Pin 2 - A1, GND (10k ohm resistor between Pin 2 and GND)
Bottom Photoresistor
Pin 1 – 3.3V
Pin 2 - A2, GND (10k ohm resistor between Pin 2 and GND)
LR Servo
Signal - 2
Ground - GND
VCC - 6 V Battery Pack
TB Servo
Signal - 3
Ground - GND
VCC - 6 V Battery Pack
Arduino Power
VIN - 6 V Battery Pack
GND - 6 V Battery Pack GND
Assembly
After soldering together the circuit onto a perf board (feel free to use a breadboard instead), its time to assemble the device. I used cardboard and a styrofoam block to create a base and panel holder for the tracker, as well as a divider wall for the sensors using popsicle sticks. This step is up to you. Try experimenting with different divider wall lengths, heights, and shapes, as well as sensor placement, to see how it affects the tracking ability of the device.
Software
Now that assembly is complete, its time to create software for the device. The Arduino sketch is attached below.
Downloads
Software Flowchart
Here is a flowchart of how the device works.
Conclusion
If you power the device up and shine a bright light on the panel, the tracker will orient itself to face the light directly. I have attached a test video of the project below. I hope you liked this project! Feel free to ask any question in the comments section and I will try to answer them. Thanks!