LDR — Light-Following Robot (Solar Tracker)
It always faces the brightest spot
LDR
Servo
analogRead
Compare
What you will learn
- How to use TWO sensors of the same type to make a decision
- How to compare readings and act on the difference
- How a simple "if A > B + threshold" controls real movement
What you will need
| Component |
|---|
| 1× 9V battery |
| 2× LDRs (left + right) |
| 2× 10kΩ resistors |
| 1× servo motor (SG90) |
| Breadboard |
| 8× jumper wires |
Step by step
Take it further
- Add a third LDR pointing up — if the sky is dark (clouds), park the panel flat to avoid wind damage.
- Print the (L, R) values to the Serial Monitor to see how they change when you cover one LDR.
- Use the LDRs to ALSO turn on an LED when light is too low (night mode).
Practise it before you build it
Wire this circuit in the ThinkEdge Learn simulator first. The simulator runs a real Arduino sketch against a modified-nodal-analysis solver, so the LED on screen actually lights when the current is right — no hardware, no burnt components, and a class can try it in a browser.
Related projects
Servo — Knob to AngleTwist to point
LDR — Sunrise Alarm ClockWhen the sun rises, the room wakes up with a soft glow
Arduino — Solar Tracker with Two LDRsA servo that follows the light, like a real solar panel
Sound Sensor — VU Meter (5 LEDs)The louder the sound, the more LEDs light up
Arduino — RGB LED Color MixerThree pots, one RGB LED — mix any color of the rainbow
Arduino Mega — 4-Servo Robot ArmDrive 4 servos at once for a pan-tilt-gripper-tilt arm
Guides that use this project
3 guides on the site build this project as part of a longer explanation. The guide says why the circuit works; this page says how to wire it.
Solar and Renewable Energy ProjectsSolar and renewable energy projects for students: a light tracker, a solar water heater, a wind generator and a home energy monitor, with the physics behind each.
Solar-Powered DevicesHow to build a solar-powered device: charge controllers, energy budgets, why a panel alone is not enough, and how to size everything for a sensor that runs all year.
Drone Inspection and SurveillanceWhere drones genuinely pay for themselves: inspection of towers, roofs, pipelines and power lines. The sensor choices, the regulation and the real economics.
Where this project sits
It is also part of these lists, which is how a class usually finds it.
Arduino servo motor projects for students12 projects in this list
Arduino LDR light sensor projects7 projects in this list
Try the full simulator with your class
103 guided circuit projects, 21 lessons and an in-browser Arduino simulator. The first 15 projects are free, no account needed. One licence covers a whole school.