Dual Axis Solar Tracker System With Battery Charging
Dual Axis Solar Tracker System With Battery Charging
This project creates an advanced solar tracking system that follows the sun's movement across both horizontal and vertical axes for maximum energy efficiency. The system includes integrated battery charging with protection circuitry, making it a complete solar energy solution.
How the System Works
- Four LDR modules with adjustable potentiometers detect sunlight intensity from all directions
- Two SG90 servo motors provide dual-axis movement (horizontal and vertical)
- Arduino continuously compares LDR readings and adjusts panel position for optimal sunlight
- Two 6V solar panels connected in series provide 12V output
- TP5100 charging module converts 12V to 8.4V for battery charging
- 2S 20A BMS protects the 7.4V battery from overcharging, over-discharging, and short circuits
- System maintains 40% higher efficiency compared to fixed solar panels
Materials Required
- Arduino UNO - Buy Here
- SG90 Servo Motors (2x) - Buy Here
- LDR Modules (4x) - Buy Here
- 7.4V Battery - Buy Here
- 2S 20A BMS - Buy Here
- TP5100 Charging Module - Buy Here
- Jumper Wires - Buy Here
- Breadboard - Buy Here
- 6V Solar Panels (2x) - Buy Here
3D Model Files
Download the 3D printable files for the solar tracker mechanism and mounting brackets:
Google DrivePrint these files using JLCPCB's 3D printing service:
Order NowPower Management System
The advanced power management ensures optimal performance and battery safety:
- Solar Panels: Two 6V panels in series = 12V output
- TP5100 Module: Converts 12V to 8.4V for charging
- BMS Protection: Prevents overcharge, over-discharge, short circuits
- Battery: 7.4V provides stable power for servos and Arduino
- Efficiency: Dual-axis tracking increases energy capture by 40%
Step-by-Step Assembly
1. 3D Printing & Mechanical Assembly:
- Print all components from the provided 3D files
- Assemble the dual-axis mechanism with servo motors
- Mount solar panels securely to the moving platform
- Ensure smooth movement in both horizontal and vertical directions
2. Electronics Wiring:
- Connect horizontal servo to Arduino pin 3
- Connect vertical servo to Arduino pin 13
- Wire LDR modules to analog pins A0, A1, A2, A3
- Connect solar panels in series to TP5100 input
- Connect TP5100 output to BMS, then to battery
- Use breadboard for organized power distribution
3. Power System Setup:
- Connect two 6V solar panels in series for 12V output
- Wire TP5100 charging module between panels and BMS
- Connect 7.4V battery with BMS protection
- Verify all connections for proper voltage levels
4. Calibration & Testing:
- Upload the Arduino code
- Adjust LDR potentiometers for sensitivity
- Test tracking with a light source
- Verify battery charging functionality
- Check servo movement limits and smooth operation
🎥 Watch the video above for complete assembly and demonstration.
Arduino Code
Upload this code to your Arduino after completing all hardware connections:
#include <Servo.h>
Servo horizontal; // Horizontal Servo Motor
int servohori = 90;
int servohoriLimitHigh = 175;
int servohoriLimitLow = 5;
Servo vertical; // Vertical Servo Motor
int servovert = 90;
int servovertLimitHigh = 175;
int servovertLimitLow = 5;
// LDR module connections (using A0 pins)
int ldrTopLeft = A0; // Top Left LDR
int ldrTopRight = A1; // Top Right LDR
int ldrBottomRight = A2; // Bottom Right LDR
int ldrBottomLeft = A3; // Bottom Left LDR
void setup() {
horizontal.attach(3); // Horizontal servo on pin 3
vertical.attach(13); // Vertical servo on pin 13
horizontal.write(servohori);
vertical.write(servovert);
delay(2500);
}
void loop() {
// Read LDR values from A0 pins
int tl = analogRead(ldrTopLeft); // Top Left
int tr = analogRead(ldrTopRight); // Top Right
int br = analogRead(ldrBottomRight); // Bottom Right
int bl = analogRead(ldrBottomLeft); // Bottom Left
int dtime = 10;
int tol = 90; // Tolerance value for adjustment
// Calculate averages
int avt = (tl + tr) / 2; // Average value of top sensors
int avd = (bl + br) / 2; // Average value of bottom sensors
int avl = (tl + bl) / 2; // Average value of left sensors
int avr = (tr + br) / 2; // Average value of right sensors
// Calculate differences
int dvert = avt - avd; // Difference between top and bottom
int dhoriz = avl - avr; // Difference between left and right
// Vertical movement adjustment - REVERSED
if (abs(dvert) > tol) {
if (avt > avd) {
// More light on top, move DOWN (reversed)
servovert = --servovert;
if (servovert < servovertLimitLow) servovert = servovertLimitLow;
} else {
// More light on bottom, move UP (reversed)
servovert = ++servovert;
if (servovert > servovertLimitHigh) servovert = servovertLimitHigh;
}
vertical.write(servovert);
}
// Horizontal movement adjustment - REVERSED
if (abs(dhoriz) > tol) {
if (avl > avr) {
// More light on left, move RIGHT (reversed)
servohori = ++servohori;
if (servohori > servohoriLimitHigh) servohori = servohoriLimitHigh;
} else {
// More light on right, move LEFT (reversed)
servohori = --servohori;
if (servohori < servohoriLimitLow) servohori = servohoriLimitLow;
}
horizontal.write(servohori);
}
delay(dtime);
}
Code Explanation:
Setup:
Initializes two servo motors (horizontal on pin 3, vertical on pin 13) and sets them to their starting positions (90°). Waits 2.5 seconds for system stabilization.
Loop:
Continuously reads four LDR sensors, calculates average light intensities from different directions, and adjusts servo positions to maximize sunlight exposure. The system compares light intensity differences and moves the panel toward the brighter direction within predefined limits. Reversed logic ensures proper directional movement.
Why Choose This Design?
- ✅ Maximum Efficiency: Dual-axis tracking increases energy capture by 40%
- ⚡ Integrated Charging: Complete power management with battery protection
- 🔋 Battery Safety: BMS prevents overcharging and over-discharging
- 🌞 Precise Tracking: Four LDR sensors with adjustable sensitivity
- 🔄 Dual-Axis Movement: Tracks both daily and seasonal sun movements
- 🛠️ Professional Build: Custom 3D printed enclosure for durability
Performance Benefits
- 40% Higher Efficiency: Compared to fixed solar panels
- All-Day Tracking: Follows sun from sunrise to sunset
- Seasonal Adjustment: Adapts to changing sun angles throughout the year
- Battery Protection: Extends battery life with proper charging
- Weather Resistant: 3D printed parts provide environmental protection
Comments
Post a Comment