Dual Axis Solar Tracker System Using Arduino
Arduino dual-axis solar tracker with LDR sensors boosts energy capture 40% by following sun's position automatically on both horizontal & vertical axes.
Arduino dual-axis solar tracker with LDR sensors boosts energy capture 40% by following sun's position automatically on both horizontal & vertical axes.
Project Supporter Team
Posted by
As fossil fuel reserves decline, renewable energy sources become increasingly vital. Solar energy stands out as one of the most reliable options, with sunlight available throughout the day. However, conventional fixed solar panels cannot fully utilise sunlight as the sun moves across the sky. This project presents a solution: a dual axis solar tracking system using Arduino that adjusts both horizontally and vertically to follow the sun's position, increasing energy output by up to 40% compared to fixed installations.
This dual axis solar tracker Arduino project uses LDR (Light Dependent Resistor) sensors and servo motors to automatically orient a solar panel toward the brightest point in the sky. Unlike single-axis trackers that only follow the sun's east-west movement, this system tracks both azimuth (horizontal) and elevation (vertical) angles, ensuring optimal panel positioning from sunrise to sunset throughout all seasons.

A dual axis solar tracker system is an automated mechanism that adjusts a solar panel's orientation along two axes of rotation. By continuously measuring sunlight intensity using four LDR sensors positioned in a cross formation, the system calculates the sun's position and commands servo motors to physically adjust the panel angle. This maximizes solar radiation capture throughout the day, dramatically improving energy generation efficiency.
Hardware Components:
Software Requirements:
Mechanical Components
All mechanical parts for this project were 3D-printed for precise alignment and stable movement. The 3D models provide mounting structures for servos, panel brackets, and sensor housings.

Understanding the wiring is crucial for successful implementation. The circuit architecture centres around an Arduino UNO orchestrating two servo motors for horizontal (azimuth) and vertical (elevation) rotation.
Key Circuit Features:
Each LDR is paired with a 10kΩ resistor to form a voltage divider, enabling accurate analog readings. Based on light detected by each sensor, the Arduino calculates the brightest point and adjusts servos accordingly, keeping the panel aligned throughout the day.

The Arduino program controls two servo motors using feedback from four LDR sensors, continuously comparing light levels and rotating servos to point the panel toward the brightest direction.
Servo Initialization
Two servo objects are defined to control horizontal and vertical movement, with initial angles and movement limits set to prevent over-rotation.
Servo horizontal;
Servo vertical;
LDR Sensors
Four LDR sensors are positioned at the corners to detect light intensity from each direction.
int ldrlt = A0; // Top-left
int ldrrt = A3; // Top-right
int ldrld = A1; // Bottom-left
int ldrrd = A2; // Bottom-right
Averaging Sensor Readings
This function reads each LDR multiple times and averages the result, reducing noise and fluctuations.
int readAverage(int pin) {
long total = 0;
for (int i = 0; i < 10; i++) {
total += analogRead(pin);
delay(2);
}
return total / 10;
}
Light Difference Calculation
The code computes average light intensity on top, bottom, left, and right sides to determine the brightest light source direction.
int avt = (lt + rt) / 2; // Average top
int avd = (ld + rd) / 2; // Average bottom
int avl = (lt + ld) / 2; // Average left
int avr = (rt + rd) / 2; // Average right
Servo Adjustment Logic
If the difference between top-bottom or left-right light levels exceeds a tolerance threshold, servos move slightly to align the panel toward higher intensity.
if (abs(dvert) > tol) { ... }
if (abs(dhoriz) > tol) { ... }
Night Mode
When ambient light is too low (nighttime), the system pauses tracking to save energy and prevent unnecessary movement.
if (avgLight < 200) {
Serial.println("Low light detected — Tracker on standby...");
return;
}
The dual axis solar tracking system operates by constantly comparing light intensities from the four LDR sensors. When one side receives more sunlight than another, the Arduino instructs the corresponding servo motor to rotate the panel toward that direction.
Tracking Algorithm Workflow:
∗ Light Sampling: All four LDR sensors take simultaneous light intensity readings
∗ Data Processing: Arduino averages readings and computes horizontal and vertical differential intensities
∗ Decision Making: If differentials exceed tolerance, the system decides movement direction to optimise exposure
∗ Servo Actuation: Horizontal servo controls east-west positioning; vertical servo adjusts north-south tilt
∗ Continuous Monitoring: Process repeats every few seconds throughout daylight hours for optimal alignment
This continuous adjustment allows the panel to maintain the most favourable position relative to the sun, significantly improving energy capture compared to fixed or single-axis systems.
The mechanical structure uses 3D-printed components, ensuring precise alignment and stable movement. The assembly includes:
All parts are designed to work together, providing smooth two-axis rotation while maintaining structural stability.

The system actively responds to changes in light direction. When the light source moves left, right, upward, or downward, the tracker responds instantly by rotating the panel in the corresponding direction, ensuring continuous alignment with the brightest point.
The animation in the full documentation demonstrates this real-time tracking operation, showing how effectively the dual-axis system follows light source movement.
Consider these improvements to expand the system:
This dual axis solar tracker Arduino project using LDR and servo motors demonstrates how affordable components and intelligent algorithms can dramatically improve solar panel efficiency. The system makes solar panels "smart" by automatically following the sun, maximising energy capture throughout the day and across seasons.
The project provides hands-on experience with analog sensors, servo control, algorithmic decision-making, and renewable energy optimisation. It serves as an excellent learning platform for understanding both embedded systems and practical solar energy engineering.
By implementing dual axis solar tracking system using Arduino captures significantly more solar energy than fixed installations, contributing to more efficient and sustainable energy generation. The combination of real-time sensing, intelligent control algorithms, and mechanical actuation creates a modern solar tracking solution addressing renewable energy challenges.
Support to get the Source Code for this project
Project estimate
The long estimate form has moved to a separate page so this project page stays clean.
รีวิวจากคนใช้งานจริง
ถ้าเคยสั่งงาน เคยอ่านหน้านี้แล้วได้ประโยชน์ หรือมีข้อเสนอแนะ ฝากรีวิวไว้ได้เลย
ยังไม่มีรีวิวบนหน้านี้ ถ้าเคยใช้งานหรือมีข้อเสนอแนะ เขียนเป็นคนแรกได้เลย