Robotics can be challenging. The code is perfect, yet the robot doesn’t perform the required task. Other times, the robot does too much, and unexpected results occur. In this case, a robot with only a single light sensor was able to perfectly navigate a difficult “zigzag” section multiple times, something of an unexpected result.
This robot uses a proportional-integral-derivative, or PID, control system to follow a black line with a white background. The general system calculates an error value by subtracting the measured value from the desired value. The prevalent system used for this model out of the P, I, and D is the I. This method uses the accumulated past values of error. If the current output of the controller is minimal, error will soon accumulate over time, and the controller will begin to output a stronger signal, resulting in stronger action. This allowed the robot to complete the course with relative ease and with little wobble.