A more accurate dual-axis solar tracker using 4 LDRs and 2 servo motors to follow the sun throughout the day (leftβright and upβdown).
- Arduino Uno
- 4x LDRs
- 4x 10kΞ© resistors
- 2x Servo motors (SG90 or MG996R)
- Breadboard & jumper wires
- Mount structure (cardboard, 3D printed, or wood)
| Component | Arduino Pin |
|---|---|
| LDR Top Left | A0 |
| LDR Top Right | A1 |
| LDR Bottom Left | A2 |
| LDR Bottom Right | A3 |
| Servo (Azimuth) | D9 |
| Servo (Elevation) | D10 |
- Each LDR is connected in a voltage divider with a 10kΞ© resistor.
- Servo motors are powered from 5V (external supply recommended for MG996R).
- Ground all components to Arduino GND.
The tracker compares light values:
- Left vs Right β Horizontal movement (EastβWest)
- Top vs Bottom β Vertical movement (Elevation)
Servos adjust panel orientation based on which side receives more light.
π Recommended layout:
TL ---- TR
\ /
[ Solar Panel ]
/ \
BL ---- BR
See solar_tracker_dual_axis.ino
- Add GPS or RTC for time-based solar angles
- Data logging (SD card or cloud)
- Solar-powered version
- Automatic reset at night
- Use a flashlight to simulate sun movement
- Test servos separately before full assembly
- Make sure LDRs are equally spaced and aligned
MIT License β Free to use, modify, and share