Motor drivers

I previously posted about a DRV8835 dual motor driver. In my new balancing robot, I've used a a TB6612FNG instead, basically because the board is a tiny bit bigger, so I can use PCB card guides to hold it. Pololu and Sparkfun both make carrier boards which are nearly identical.

If you use the TB6612FNG like an LM293D, then it drive/breaks rather than drive/coasts. For lots of things, this works well: the relation between speed and PWM pulse width is more linear. I'm not sure how it interacts with PID though: the torque applied depends on the speed. When the speed is low, the torque is higher. That tends to happen when the bot is close to upright and balance. That sounds sub-optimal.

It turns out that if you just set the PWM pins on the TB6612FNG high, it then behaves just like a DRV8835 - i.e. you can choose between drive/break, and drive/coast. You again need two PWM pins, but these STM32 boards have plenty of timers, each able to drive 4 PWM outputs, so that's fine.

I guess on that basis this is my new favourite motor driver: it's a drop in replacement for an LM293D where that's convenient, but is also as versatile as a DRV8835.

So I've switched to drive/coast. It makes this weird whining noise now. It does seem to behave better, but I think there's plenty more tinkering to go.

Popular posts from this blog

3D Printer ramblings

Balance Bot V2

Robot arm