I am not an expert on this topic and I know this is kind of old thread but im facing the same issue and I would like some help or advice.
I am using and Arduino and a Roboclaw 2x7A (old version)
At first I was also stopping the motors using
roboclaw.SpeedAccelM2(address, 0, 0);
on each one and it worked, but later I saw it is still consuming current. I used your suggestion and it works, but only for M1, M2 doesn't seem to stop recieving current, less than an ampere, but i would like it to be zero.
I am uploading a piece of code so I can explain myself and to show you what I am doing.
This is the part where it checks if error (difference between origin and goal) is greater than deadzone, if greater then keep moving, if lower, it would stop by itself but also it must stop giving current to that motor.
// M1 > Azimut
//M2 > Zenith
if (abs(error1) > deadzone1) {
roboclaw.SpeedAccelDeccelPositionM1(address, 0, 0, 0, posicionM1, depth1);
} else {
Serial.println("Azimut - error es menor que deadzone");
roboclaw.DutyM1(address, 0);
}
if (abs(error2) > deadzone2) {
roboclaw.SpeedAccelDeccelPositionM2(address, 0, 0, 0, posicionM2, depth2);
} else {
Serial.println("Zenith - error es menor que deadzone");
roboclaw.DutyM2(address, 0);
}
And this is the output (with some extra info)
Azimut - error es menor que deadzone
Zenith - error es menor que deadzone
Encoder1:15531 80 Speed1:0 Temp: 47.10 error : -24
Encoder2:15474 80 Speed2:0 Temp2: 0.00 error : -81
Pos Obj - M1 : 15555
Pos Real - M1 : 19.97
azimuthGlobal - M1 : 20.00
Pos Obj - M2 : 15555
Pos Real - M2 : 19.90
zenithGlobal - M2 : 20.00
PWM Zen : 0 Azi : 0
switch Pin Zen : 0 Azi : 0
e-Stop : 0
total revs Zen : 280000 Azi : 280000
Corrientes Zen : 0.06 Azi : 0.00
At the end, as you can see, Zen motor is still recieving 0.06 A, but the other motor is fully stopped.
Why does this only works with one of them?, Or. Is there some configuration I am doing wrong?.