Dual-axis solar tracker with energy comparison
Rooftop solar is growing fast in India under PM Surya Ghar. A tracker that follows the sun can raise the energy from a panel, and students can measure by how much and whether it is worth the motor energy.
- Parts
- ₹3,110
- Build
- 12 weeks
- Board
- Arduino Uno
- Objectives
- 6
Block diagram
- Four LDRsSense where the sun is
- Two INA219Measure tracked and fixed panel energy
- Arduino UnoCompares light and moves the motors
- PID controllerKeeps the output at the set value+
- Buck supplySeparate 6 V for the servos
- Two servosTurn the panel on two axes
- Data loggerStores timestamped readings for analysis+
Objectives
- To track the sun on two axes with LDR feedback and a dead-band so the servos do not hunt.
- To measure energy from a tracked and a fixed panel side by side.
- To calculate the energy gain over three sunny days.
- To measure the energy the servos use and report the net gain.
- To log timestamped data and analyse it to support the conclusions with evidence.
- To implement and tune a PID controller and compare its response with on/off control.
Parts and specifications
- Arduino Uno R3 (CH340 clone)ATmega328P 16 MHz, 32 KB flash, 2 KB SRAM, 5 V logic, 6 analog inputs (10-bit), 6 PWM pins₹450Buy
- LDR with 10 kΩ resistorAbout 1 MΩ dark to 1 kΩ bright, response 20 to 30 ms, use in a voltage divider₹40Buy
- MG996R metal gear servo9.4 kg·cm at 4.8 V, 0 to 180°, stall up to 2.5 A so give it its own 5 to 6 V supply₹700Buy
- LM2596 buck converter (servo supply 6 V)4 to 40 V in, 1.25 to 37 V out, up to 2 A continuous (3 A peak), about 85% efficient₹90Buy
- Mounting frame and hardware₹400
- × 210 Ω 2 W load resistors₹20
- DS3231 RTC moduleTemperature-compensated, ±2 ppm (about 1 minute a year), I²C 0x68, CR2032 backup₹150Buy
Total about ₹3,110 at typical online prices. Tap a part for its pinout and datasheet notes.
Design calculations
Horizontal error = (TL + BL) − (TR + BR); vertical = (TL + TR) − (BL + BR). Move 1° towards the brighter side only when the error is above a dead-band of about 30 ADC counts.
A fixed panel loses output with the cosine of the angle to the sun. At 60° off it gives cos 60° = 50%, so trackers gain most in the morning and evening: about 20 to 35% a day in practice.
Servos draw about 0.3 A at 6 V while moving, roughly 2 s every 2 minutes ≈ 0.6 Wh a day. Compare that with the measured extra energy from a 1 W panel.
E = Σ (V × I × Δt). Sampling every 10 s, 0.9 W for an hour adds 0.9 Wh.
Pin map
| Signal | Pin or connection |
|---|---|
| LDR top-left / top-right / bottom-left / bottom-right | A0 / A1 / A2 / A3 (10 kΩ dividers) |
| INA219 tracked / fixed | I²C 0x40 / 0x41 on A4 / A5 |
| Azimuth / elevation servo | D9 / D10, powered from the 6 V buck, common ground |
Firmware outline
- Read four LDRs, averaged over 8 samples.
- Compute the two error signals; move each servo 1° if outside the dead-band, with limits 10° to 170°.
- At night (all LDRs dark) park facing east for the morning.
- Every 10 s read both INA219s into 10 Ω loads and add energy.
- Print time, both powers and energy totals as CSV over serial.
Test plan
| Test | Expected result |
|---|---|
| Torch moved across the panel | Tracker follows smoothly without hunting |
| Three sunny days | Tracked vs fixed energy in Wh |
| Servo energy | Measured and subtracted |
| Cloudy sky | Tracker holds still instead of chasing noise |
These rows start your results table when you plan the project.
Viva practice
Say your answer out loud first, then check. The first 2 answers are free; Maker opens all 5.
Make it yours
One or two upgrades for a mini project, two to four for a major one.
Datasheets and sources to cite
- Texas Instruments INA219 datasheet
- MNRE rooftop solar programme guidelines
- Duffie and Beckman, Solar Engineering of Thermal Processes (sun position)
About this project
How much does the dual-axis solar tracker with energy comparison project cost?
About ₹2,500 for the parts in the base list: Arduino Uno R3 (CH340 clone), LDR with 10 kΩ resistor × 4, MG996R metal gear servo × 2, Solar panel 6 V 1 W × 2, INA219 current and power sensor × 2, LM2596 buck converter (servo supply 6 V), 12 V 2 A DC adapter, Mounting frame and hardware, 10 Ω 2 W load resistors × 2.
How long does it take?
About 8 weeks for the base project, built on an Arduino Uno. Each upgrade adds time.
Which branches is it suitable for?
Electrical and Electronics, Electronics and Communication, Mechanical / Mechatronics, Diploma (any electronics branch), as a mini or major project.
Which pins and design calculations does it use?
LDR top-left / top-right / bottom-left / bottom-right on A0 / A1 / A2 / A3 (10 kΩ dividers); INA219 tracked / fixed on I²C 0x40 / 0x41 on A4 / A5; Azimuth / elevation servo on D9 / D10, powered from the 6 V buck, common ground. Worked calculations on this page: error signals, expected gain, net gain, energy from ina219.
How do I test it?
Torch moved across the panel: Tracker follows smoothly without hunting. Three sunny days: Tracked vs fixed energy in Wh. Servo energy: Measured and subtracted. Cloudy sky: Tracker holds still instead of chasing noise.
What are the objectives?
To track the sun on two axes with LDR feedback and a dead-band so the servos do not hunt. To measure energy from a tracked and a fixed panel side by side. To calculate the energy gain over three sunny days. To measure the energy the servos use and report the net gain.
