Home All Projects
Intermediate

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.

Dual Axis Solar Tracker System Using Arduino
12,378 views
1 likes

Components, Tools and Machines

1x LDR (LIGHT DEPENDENT RESISTER)
🛒 Buy Now
1x Solar Power Manager Micro (2V 160mA Solar Panel Included)
-
1x Premium Male/Male Jumper Wires, 40 x 3" (75mm)
🛒 Buy Now

Apps and platforms

1x Arduino IDE Software
Official Site

Project description

Maximize Solar Energy Capture with Intelligent Sun Tracking

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.

Project Overview

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.

Dual Axis Solar Tracker System

What is a Dual Axis Solar Tracker System?

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.

Components Required

Hardware Components:

  1. Arduino UNO (1) - Main controller for the tracking system
  2. LDR 5mm sensors (4) - Light-dependent resistors detect sunlight direction
  3. Solar Panel (1) - Captures solar energy
  4. Micro-Servo Motors (2) - Controls horizontal and vertical axis movement
  5. 10kΩ Resistors (4) - Forms a voltage divider circuit with LDRs
  6. Breadboard (1) - Circuit prototyping and connections
  7. Jumper Wires (Required amount) - Electrical connections between components

Software Requirements:

  1. Arduino IDE

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.

Components

Circuit Connections

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:

  1. LDR Placement: Cross-configuration detects light from any angle
  2. Voltage Divider Network: 10kΩ resistors paired with each LDR provide accurate analog readings
  3. Separate Servo Controls: Independent control of X-axis and Y-axis servo motors
  4. Analog Input Pins: Channels A0-A3 used for LDR sensor readings

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.

Circuit Diagram

Arduino Code Explanation

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;

}

How It Works

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.

Assembly Process

The mechanical structure uses 3D-printed components, ensuring precise alignment and stable movement. The assembly includes:

  1. Base platform with horizontal servo mount
  2. Vertical servo mounting bracket
  3. Solar panel support frame
  4. LDR sensor housing in a cross configuration
  5. Arduino enclosure for weather protection

All parts are designed to work together, providing smooth two-axis rotation while maintaining structural stability.

3D Printing

Real-Time Tracking Demonstration

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.

Benefits and Applications

  1. Energy Efficiency: 30-40% increase in power generation compared to fixed panels
  2. Automatic Operation: No manual adjustments needed for seasonal changes
  3. Maximized Daily Output: Captures optimal sunlight from sunrise to sunset
  4. Improved ROI: Higher energy generation justifies the additional complexity
  5. Educational Value: Excellent platform for learning embedded systems, sensors, and renewable energy

Future Enhancements

Consider these improvements to expand the system:

  1. Weather sensors for automatic panel protection during storms
  2. Data logging to SD card for performance analysis
  3. WiFi module (ESP8266/ESP32) for remote monitoring
  4. Battery charge controller integration
  5. Multiple panel coordination for larger installations
  6. GPS module for astronomical tracking algorithms

Troubleshooting Tips

  1. Panel doesn't move: Check servo connections and power supply
  2. Erratic movement: Verify LDR readings in Serial Monitor; adjust tolerance values
  3. One axis not working: Test individual servo separately; check pin connections
  4. System too sensitive: Increase tolerance value in code to reduce minor adjustments
  5. Night mode not activating: Adjust light threshold value based on ambient conditions

Conclusion

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.

Code

🔒 Unlock Code

Support to get the Source Code for this project

Project Reference Code: dual-axis-solar-tracker-system-using-arduino-d1056a-en
2450 THB
PromptPay QR Code

Project estimate

Want something like this project? Open the estimate page.

The long estimate form has moved to a separate page so this project page stays clean.

รีวิวจากคนใช้งานจริง

รีวิวจากลูกค้าและคนที่เคยใช้งาน

ถ้าเคยสั่งงาน เคยอ่านหน้านี้แล้วได้ประโยชน์ หรือมีข้อเสนอแนะ ฝากรีวิวไว้ได้เลย

กำลังโหลดรีวิว...