The SparkFun Wheel Encoder Kit (Figure 3.1) is a simple add-on to any wheeled robot that can be used to measure the distance traveled and the speed (average speed or instantaneous speed). The Wheel Encoder Kit comes with the following things:
- Two neodymium eight-pole magnets with rubber hubs
- Two hall-effect sensors terminated with 150 mm cables and 3-pin female servo headers:
Figure 3.1: The Wheel Encoder Kit. Image courtesy of SparkFun Electronics (https://www.sparkfun.com)—https://creativecommons.org/licenses/by/2.0/
A neodymium eight-pole magnet has four north poles and four south poles. In other words, it has four pairs of north and south poles. The hall-effect sensor can detect the poles from more than 3 mm (1/8 inch). You can get the number of pulses per wheel revolution with the hall-effect sensor, and it varies depending on the pulse...