Photointerrupters

After having troubles driving straight, we decided to use photointerrupters paired with encoder disks to count motor rotations. The photointerrupters detect the light emitted from a LED and thus when blocked by an encoder disk, is able to detect the low reading. As our encoder disk is mounted onto the motor, we are able to detect the rotations and consequentially control the motor's speed.

Picture of a photointerrupter.