1 × Arduino Uno
1 × Servo Motor
2 × Light Dependent Resistors (LDRs)
2 × 10kΩ Resistors (for LDR voltage divider)
Jumper Wires
Breadboard
USB Cable for Arduino
Red wire → 5V
Brown/Black wire → GND
Yellow/Orange wire → Digital Pin 9
One leg → 5V
Other leg → Analog Pin A0
Connect a 10kΩ resistor between A0 and GND
One leg → 5V
Other leg → Analog Pin A1
Connect a 10kΩ resistor between A1 and GND
The two LDR sensors detect light intensity.
Arduino compares readings from both sensors.
The servo motor rotates toward the side with higher light intensity.
This allows the system to continuously track the sun.
Place a small barrier between the two LDRs to improve accuracy in detecting light direction.
file code:
Here, I encountered a problem where the servo motor unfortunately refused to rotate. I suspect there is an internal mechanical issue with the servo, as I tried connecting it directly to a 5V supply, but it still did not work. It only produced a very faint sound that was barely audible.