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.

Arduino UnoMini or Major projectEEE, ECE, MECH, Diploma
UNOINA21971°1.41 AFeatured
Parts
₹3,110
Build
12 weeks
Board
Arduino Uno
Objectives
6

Block diagram

Inputs
  • Four LDRsSense where the sun is
  • INA219
    Two INA219Measure tracked and fixed panel energy
Controller
  • UNO
    Arduino UnoCompares light and moves the motors
  • PID
    PID controllerKeeps the output at the set value+
Power
  • BUCK
    Buck supplySeparate 6 V for the servos
Outputs
  • 71°
    Two servosTurn the panel on two axes
  • DATA
    Data loggerStores timestamped readings for analysis+

Objectives

  1. To track the sun on two axes with LDR feedback and a dead-band so the servos do not hunt.
  2. To measure energy from a tracked and a fixed panel side by side.
  3. To calculate the energy gain over three sunny days.
  4. To measure the energy the servos use and report the net gain.
  5. To log timestamped data and analyse it to support the conclusions with evidence.
  6. To implement and tune a PID controller and compare its response with on/off control.

Parts and specifications

Total about ₹3,110 at typical online prices. Tap a part for its pinout and datasheet notes.

Design calculations

Error signals

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.

Expected gain

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.

Net gain

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.

Energy from INA219

E = Σ (V × I × Δt). Sampling every 10 s, 0.9 W for an hour adds 0.9 Wh.

Pin map

SignalPin or connection
LDR top-left / top-right / bottom-left / bottom-rightA0 / A1 / A2 / A3 (10 kΩ dividers)
INA219 tracked / fixedI²C 0x40 / 0x41 on A4 / A5
Azimuth / elevation servoD9 / D10, powered from the 6 V buck, common ground

Firmware outline

  1. Read four LDRs, averaged over 8 samples.
  2. Compute the two error signals; move each servo 1° if outside the dead-band, with limits 10° to 170°.
  3. At night (all LDRs dark) park facing east for the morning.
  4. Every 10 s read both INA219s into 10 Ω loads and add energy.
  5. Print time, both powers and energy totals as CSV over serial.

Test plan

TestExpected result
Torch moved across the panelTracker follows smoothly without hunting
Three sunny daysTracked vs fixed energy in Wh
Servo energyMeasured and subtracted
Cloudy skyTracker 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.

1. Why do we need a dead-band?
2. Why a separate supply for the servos?
3. Is tracking worth it on rooftops?
4. What is the cosine effect?
5. How else can you track the sun?

Make it yours

One or two upgrades for a mini project, two to four for a major one.

Build these first

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.