Mini PID bot

NEET Autonomous Machines Competition

Mini PID bot

Fall 2021: I built a robot using Arduino, color sensor and PID control My robot won 1st place in the NEET Autonomous Machines competition. The challenge is the navigate through a maze with black lines successfully and accurately despite corners and intersections minimizing total time.

The diagram below shows the control loop the robot runs continuously as it follows the line.

Closed-loop line following: sense, correct, drive Σ + setpoint: offset = 0 error e Arduino PID P: Kp·e — steer back I: Ki·Σe — trim drift D: Kd·Δe — damp turns output u = steering correction u Differential drive left: base − u right: base + u speed gap turns robot Robot on the line e Color sensor black line vs. white floor measured offset e

Figure: The PID loop behind the robot — the color sensor measures the robot's offset from the black line, the Arduino's P, I, and D terms turn that error into a steering correction u, and a differential in wheel speeds re-centers the robot.

Here’s a demo of the robot working on a smaller scale board.