Overcoming DC motor deadband

I’m pretty new to the robotics space and I’ve designed and built a balancing robot. I made it with 2 of your 12v dc motors each driven by a VNH5019

There’s a video of it in action here

I was hoping the robot would end up with a more fluid balancing action, but it’s ended up with a much more jittery control. This is at least in part because of the deadband in the 12v motors, which leads to the motors being “stuck” for a bit before they get unstuck in a larger jolt than I would like. Of course, the PID tuning could always get better, but I’m pretty sure the deadband is playing a larger role at this stage.

I should also mention I’m running at 5ms duty cycles, which I understand should be quick enough

For these motors in particular I mapped out a power/rotation speed curve and you can see under no load, they don’t become “unstuck” until around 20% power.

I have done a bunch of experimentation to try and overcome the deadband, like mini-“jolts” of power for maybe 2-4ms before returning to a lower speed if I find robot isn’t moving in the intended direction (either by gyro or encoder input). I’ve tried tinkering with the length of time and the size of the “jolt”, but this is about the best I could make it.

My question is basically, what other options might you suggest to overcome the deadband? Maybe I’ve chosen the motors poorly or there’s a better motor driver for this kind of task? I know stepper motors are an option, but I think they may also lack in speed/torque. Maybe there’s something mechanical I can adjust or even lubrication or warming things up before hand?

Again, I’m pretty new to this and appreciate any guidance you can provide here. Thank you

That behavior is typical of unregulated PWM speed control, which is highly nonlinear. Without seeing the code, and basic details of the robot design, it is not possible to make sensible recommendations, other than to mention that PID speed control based on encoder feedback is a popular approach.

Please post the code, using code tags.

2 Likes

PID speed control based on encoder feedback is a popular approach

ahh duh, that makes a ton of sense. Indeed, I’ve just been using PID on the unregulated PWM speed control. So far I’ve just used the encoders to help detect if the robot has been moving in a particular direction

I’ll refactor the code and post again with the results