Motor turns at different rates, sometimes stalls

Will there be a firmware update to fix this in the near future?


Austromatt, we’re working on an update for this. Just to confirm, you were able to use Karan’s fix above, right?

We’ve put the work-around here in case you missed it:


I checked your code. It appears that in the PID control part:

  if(mf[1]==1)// || mf[1]==1)
            if(td1>10000)// &&td2>10000)

mf[1]==1 should be mf[0]==1 to be consistent with td1. Indeed, I changed that, recompile the firmware and the problem is gone.

I am not sure whether this is the problem. Please check and confirm.

I could see potentially checking only mf[1] doesn’t work. If motor 2 stops, it will never generate an interrupt. So f2 remains 0, so will be mf[1]. That speed adjust part will never be called. I remember when the motor 2 dies, I spin it manually, and it will continue to run a while. I understand now this is to regenerate a f2.

Thanks a lot for looking into this. We are currently testing this out and would let you know how it goes.


Hi Karan,

I’ve tried using the motor_fwd() command instead of the fwd() command. However, I still get a difference in motor voltages between left and right motors, just like reply 3584 by ludy.

I’ve disconnected the motors and got the voltage from the GoPiGo board’s motor out pins (with jumper wires).