Close

Prototype Motor Controller

A project log for Dogbot

A quadrupedal walking robot

charles-galambosCharles Galambos 07/21/2017 at 16:140 Comments

Initially I was intending to use the brushless motors like stepper motors, hoping to get the weight advantage over normal stepper motors.  How hard can controlling a motor be?  This is one of those rabbit holes, the more you go into it the more you discover there is.

One thing I quickly realised is that to run brushless motors efficiently at low speeds some kind of position feedback would be needed. If you ran them like stepper motors the batteries of the robot would be flat in no time, and motor windings would overheat.

One common technique of driving brushless motors is to use Hall effect switches, these sense the position of the motor and allow you to choose the correct winding to power ratio.  The problem with this is the information about the rotor position is quite coarse. Typically if you want finer position information you would use a shaft encoder, but after a bit of research I found them to be quite expensive and bulky. So I experimented with changing the magnetic Hall effect switches to linear Hall sensors.  The wave form out of these sensors looks like a truncated saw tooth, and if you position the sensors carefully the linear region overlaps.  The other worry was the current in the windings would interfere with the signal, but an experiment looking at the position signal while the motor was being run indicated that the readings remained stable.

The first motor controller I designed used an AVR,  and integrated mosfet drivers.  It worked, and drove the motor well, but getting the software to work reliably above around 5 kHz with all the feedback I wanted proved tricky, and so the motor was very noisy.   It is also around this time I came across ‘Field Oriented Control’, which the humble 20 MHz AVR wasn’t up to.

I also found getting good angular position sensing reliably from two Hall sensors was tricky, so I decided to move to 3 Hall sensors get better coverage.

Here you can see the motor controller attached to the gearbox

Early tests running the motor with the 3d printed gearbox.

In this video you can see the planetary gears in action.

Discussions