Connecting encoders to your robot

Dagu encoders are composed of two parts for each wheel. A magnetic disk with eight poles: four north poles and four south poles and a Hall effect sensor. The magnet disk is placed in a shaft of a wheel and the Hall effect must face it at a maximum distance of 3 mm.

Dagu encoders: sensors and magnet, example of installation

Once you have placed the encoder on the wheel, you can connect it to the Arduino. The Hall effect sensor is directly soldered to three wires: black, ground, and white.

The black wire is the ground of the sensor and must be connected to Arduino ground; the red one is for power supply and ...

Get ROS Programming: Building Powerful Robots now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.