Skip to content
Back
Robotics

PID Light Tracker

A two-axis robot that turns to follow a light, steadied by the same control loop as the arrows on the home page.

My partLed the software, with Wassim Ghaddar on hardware

PID Light Tracker

In short

An Arduino project that uses light sensing and two servo axes to follow a light source with PID control.

What it is
An Arduino two-axis light-tracking robot that runs a PID controller against a small light-sensor array.
Why it matters
A tracker that can be made to move with proportional control is not the same as one that settles: gain, noise, saturation, and mechanical behavior all conspire.
My part
I led the software and system architecture; Wassim Ghaddar handled hardware integration and testing.

Step by step

  1. 1

    Sense

    Light-dependent resistors produce an error signal in two axes. Filtering and centering matter as much as the raw reading.

  2. 2

    Control

    A PID controller converts error into servo commands. Proportional gain provides response; integral removes bias; derivative damps motion when the sensor is quiet enough for it to help.

  3. 3

    Actuate

    Yaw and pitch servos move the sensor assembly. Backlash, limited travel, and chassis flex are inside the loop, not outside it.

  4. 4

    Calibrate

    The system requires a defined center, safe mechanical limits, sensible sensor filtering, and a consistent update rate before tuning is meaningful.

For engineersHow it is built, its limits, and its keywords.

How it works

Four light-dependent resistors form directional error signals, the Arduino runs a PID controller against them, and yaw and pitch servos move the sensor assembly. Calibration includes safe mechanical limits, sensor filtering, and a consistent update rate.

Limits

  • PID tuning is system-specific; per-axis gains may differ because inertia and friction differ per axis.
  • Sensor noise can turn derivative action into jitter unless it is filtered.

Keywords

  • PID tuning
  • light tracker
  • Arduino
  • two-axis servo
  • sensor filtering

Read the write-up →