Automatic Solar Tracker
In this project I will show you how to build a solar tracker that will turn the solar panel to face the direction where there is the most sun. It is a single direction (left and right) solar tracker so it can only rotate but it could easily be modified to become a two direction solar tracker (left, right, up and down). The circuit works off a Arduino that powers a servo motor that will then turn the solar panel.
Wiring
As the circuit is using a Arduino Uno you can connect all the components to the Arduino using jumper wires. You need to connect the signal wire of the servo motor to pin 9 and then connect the two LDRs to A0 and A1. I have included the wiring diagram.
Code
Once all the components are connected together you will need to upload the code to the Arduino. To do this connect the Arduino to the computer using a USB cable and open the Arduino IDE. Copy in my code and upload it to the Arduino.
Operational Test
After the circuit is built and programmed test to see if it operated as expected the servo should rotate in the direction of most light. If the circuit does not work check your connections
Enclosure
Now that you have the circuit working you can make an enclosure for it. You could do this many ways but I chose to 3D print the enclosure. The enclosure just needs to have a position to mount the two LDRs one on the left side and the other on the right side. Also the servo needs to be mounted upright so the solar panel can be connected to it.
Assembly and Finished Product
All you need to do now is mount the LDRs into the enclosure using hot glue and also hot glue the solar panel you want to use onto the mount for the servo. Now just connect the Arduino to a power source and place the solar tracker in a sunny location and the solar panel will turn to the direction with the most sunlight.
Acknowledgement
I thank LCSC Electronics for the partnership.
LCSC Electronics Is China's leading Electronic Components Distributor. LCSC sells a wide variety of high quality electronic components at low prices. With over 150, 000 parts in stock they should have the components you need for your next project. Sign up today and get $8 off on your first order.
Website
Check out more of my other projects on my website.