Close

Encoder

A project log for MORPH : Modular Open Robotics Platform for Hackers

An affordable modular platform for open robotics development for hackers. Provides a jump start to build your own robot.

Roald LemmensRoald Lemmens 07/18/2017 at 07:570 Comments

In order to improve the odometry data I wanted to add an encoder. The downside of using a brushless DC outrunner hub motor is there is no shaft to mount an encoder to. The shaft fixed to the robot remains stationary and only the wheel turns. The VESC already had support for the AS5047 magnetic rotary sensor and I read a positive experience about that sensor. It seemed doable to mount a magnet to the side of the wheel, so I ordered some development boards. The development board contains the sensor mounted to a small PCB and a diametric magnet of 6mm diameter and 2.5mm depth.

First step of testing the encoders was removing the RC filters on the hall sensor port as Benjamin describes very clearly in his video.


Next step was mounting the magnet exactly centered at the outside of the wheel. The wheel already has a circle with an elevated edge, so I just needed to create an holder which would fit within. Literally 3 commands in OpenScad:

difference() {
    cylinder(2.5,11.25,11.25);
    cylinder(2.5,3,3);
}

And after a short print the magnet would fit snugly on the wheel within the holder:

Now the only step remaining was mounting the sensor board. I created a frame out of some MakerBeam and brackets and attached the sensor board with some removable double adhesive tape. The slots in the MakerBeam would allow me to adjust the position of the board to align with the magnet. When I first tested the board with regular header wires it didn't work: the readings went back and forth all over the place. It seems the high speed SPI over the distance of ~20cm combined with the electrical noise of the hub motor required some shielded wires.

Discussions