Today solar power is very important because world need clean and green energy, also solar tracking help make solar panels work better.
Move solar panel with sun all day so panel get more sunlight and gives more power.
Solar Tracking Circuit using Arduino is smart, DIY and fun project and Arduino is open-source board which is easy to use for making tracking system.
With this project students or hobby people can build solar tracker that follow sun and make more energy.
Furthermore, this article show how Arduino solar tracker makes panels more efficient, as it uses Arduino board, IC 7809, servo motor, solar panel, LDRs and resistors.
Here, project uses simple sensors and motors to teach electronics and coding in easy way and it is also good for learning and good for environment too!
Arduino Code:
#include <Servo.h>
Servo myservo; // create a servo object to control the servo
const int LDR1 = A0; // analog pin for LDR 1
const int LDR2 = A1; // analog pin for LDR 2
int LDR1Value = 0;
int LDR2Value = 0;
void setup() {
myservo.attach(9); // attach the servo to pin 9
Serial.begin(9600); // initialize serial communication
}
void loop() {
LDR1Value = analogRead(LDR1);
LDR2Value = analogRead(LDR2);
// calculate the difference in light levels
int difference = LDR1Value - LDR2Value;
// adjust the servo position based on the difference
if (difference > 100) {
myservo.write(90); // turn right
} else if (difference < -100) {
myservo.write(0); // turn left
} else {
myservo.write(45); // maintain current position
}
Serial.println(difference); // print the difference for debugging
delay(1000); // delay for 1 second
}
Circuit Working:

Parts List:
| Components | Quantity |
|---|---|
| Resistors | |
| 10k 1/4 watt | 2 |
| LDR (Light Dependent Resistor) | 2 |
| Semiconductors | |
| Arduino Uno Board | 1 |
| IC 7809 | 1 |
| Servo Motor 5V | 1 |
| Solar Panel 12V 1 Amp | 1 |
This Solar Tracking System using Arduino is a simple project and the circuit diagram above shows all the wiring connections.
Two LDRs placed on both sides of solar panel, because LDR changes resistance when sunlight changes during day.
Also, 10k resistors and LDRs make voltage divider circuit.
Moreover, this circuit gives two voltage signals based on light each LDR gets and then these voltages goes to Arduinos analog input pins.
Arduino reads values to compare light on both the sides.
The servo motor moves the solar panel and it works well for this application because it rotates the panel in small steps and follows the sun throughout the day.
Then servo motor operates at 5V and the Arduino sends control signals to it after comparing the light levels detected by the sensors.
Finally, the servo motor then rotates the panel toward the brighter light source to improve solar energy collection.
Hence, to power the Arduino and servo motor safely, the IC 7809 regulates the voltage supplied by the solar panel.
How to Build:
To build a Solar Tracking Circuit using Arduino follow the below mentioned steps for connections:
- First, collect all parts shown in circuit diagram.
- Next, connect IC 7809 to give stable 9V power to Arduino.
- Then connect servo motor (GND) to Arduino GND pin, connect servo motor (5V) to Arduino 5V pin and then connect servo motor orange wire (PWM) to pin 9 on Arduino.
- Now connect solar panel positive wire to Arduino 5V pin and connect solar panel negative wire to Arduino GND pin.
- After that, connect one side of LDR1 to A0 pin and other side connect to 5V pin on Arduino and then connect one side of LDR2 to A1 pin and other side connect to 5V pin on Arduino.
- Finally, connect 10k resistors one end between A0 and GND and other one connect between A1 and GND.
Conclusion:
To conclude, making Solar Tracking Circuit using Arduino is smart way to use more solar energy and to learn electronics.
With Arduino Uno, servo motor, LDRs, solar panel and voltage regulator we can build system that moves panel with sun; also it helps make more energy and shows how sensors and automation work.
Therefore, this project provides a simple yet powerful solution, offers a good learning experience and supports the development of larger projects in the future.