What it shows
Four LDRs in a cross with small dividing walls sense which side is brighter. Two servos tilt a small solar panel left-right and up-down until all four read the same, so the panel faces the sun. A voltmeter reading from the panel shows the gain over a fixed panel.
The science
Each LDR divider gives a higher reading in brighter light. The dividing walls shade the LDRs on the far side from the light, so the difference between left and right pairs tells the horizontal error and top and bottom pairs the vertical error. The sketch moves each servo one degree towards the brighter side whenever the difference exceeds a dead band, a simple proportional control. Servo limits in code stop the frame from hitting itself. The panel voltage, divided to under 5 V, gives a measure of how well the panel is aimed.
Materials
Cost: under Rs 1,500. Many items come from home or from waste; spare parts such as LEDs, motors and wire are in the store.
- An Arduino Uno clone and USB cable
- Four LDRs and four 10 kΩ resistors
- Two SG90 servos and a pan-tilt bracket or cardboard frame
- A small 5 V or 6 V solar panel
- A 100 kΩ and 10 kΩ divider to read the panel voltage on A4
- A separate 5 V supply for the servos
- Cardboard for the LDR cross walls
Safety
For this project: Battery or USB power only. Do not look at the sun; test with a torch indoors and with the sun only briefly outdoors.
Never use mains electricity: power models with cells, batteries or a low-voltage adapter. Sharp and hot tools, flames and lab chemicals need an adult or your teacher beside you. Keep magnets, button cells and small parts away from young children, and wash your hands after making.
All the safety rulesStep by step
9 steps. Do them in order, and test each part before you go on to the next. Write what you notice in a notebook as you go.
Mount the four LDRs at the ends of a cross on top of the panel with cardboard walls between them.
Wire each LDR with its 10 kΩ resistor as a divider to A0 to A3.
Mount the panel on the pan-tilt frame; wire the pan servo to pin 9 and the tilt servo to pin 10, with their power from the separate 5 V supply, grounds joined.
Wire the panel through the 100k:10k divider to A4 and show its voltage in the serial monitor.
Compute averages: top = (TL + TR)/2, bottom, left, right; then the vertical and horizontal differences.
If a difference is larger than 30, move the matching servo one degree towards the brighter side, within limits of 10 to 170 degrees.
Loop every 50 ms so the motion is smooth and does not overshoot.
Test indoors with a torch moved around the frame; the panel should follow it.
Outdoors, compare the panel voltage when tracking with the voltage when fixed flat, every half hour.
What you should see
The panel turns to face a moving torch within a few seconds and, outdoors, gives a higher voltage than a fixed flat panel through most of the day.
Viva questions
A teacher or a judge will ask how it works. Try to answer each question before you open it, then compare.
1Why are walls needed between the LDRs?
Without shading, all four see the same light and cannot tell which direction the sun lies.
2What is a dead band?
A small range of error where no correction is made, which stops the servos jittering.
3How much more energy does tracking give?
Typically 20 to 40 percent over a fixed panel, more in clear weather.
4Why separate power for the servos?
Servo current spikes can drop the Arduino supply and cause resets.
Take it further
Log the panel voltage for both modes all day and plot the energy gain.
Change one thing, measure what happens, and add a table or chart of your readings: that is what turns a model into your own investigation.
Free ebooks for this project
Robotics
Motors, Gears and Motor Drivers
Make things move: DC motors, servos, steppers and how to drive them
