Beginner2–4 h (estimate)6 parts
Single-axis light tracker
Two LDRs and a servo turn a small panel toward the brighter side.
Overview
Two light-dependent resistors sit either side of a small divider on a servo-mounted plate. When one side is brighter, the board turns the servo toward it until both readings match, a simple feedback loop you can tune with a deadband and a gain.
You will learn
- · Voltage dividers and analog readings
- · Error = left − right as a control signal
- · Proportional control with a deadband
- · Servo pulses (PWM) in practice
Parts list
| Part (generic) | Qty | Note |
|---|---|---|
| Arduino Uno-compatible board (5 V logic) | 1 | |
| Light-dependent resistor (LDR) | 2 | |
| 10 kΩ resistor | 2 | |
| Micro servo (SG90-class, 5 V) | 1 | |
| Small card or plastic plate with a divider wall between the LDRs | 1 | |
| Breadboard and jumper wires; 5 V supply for the servo | as needed |
Generic part names only. Pinouts and logic levels vary between modules of the same type, so check the documentation of the exact module you have.
Tools
- · USB cable and the Arduino IDE
- · A torch or phone light for testing
- · Hot glue or tape
Safety
- · Power the servo from a suitable 5 V supply with a common ground.
- · Do not point it at the sun for long through lenses; this is a learning model.
Learn the ideas first
Full build
- 01Build two voltage dividers and read both LDRs
- 02Mount the LDRs with a divider wall on the servo
- 03Compute the error and add a deadband
- 04Proportional tracking and gain tuning
- 05Add limits and smoothing
Checking your account…