# Stop giving current to motor with Roboclaw

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

roboclaw.SpeedAccelDeccelPositionM1(address, 0, 0, 0, posicionM1, depth1);
} else {
Serial.println("Azimut - error es menor que deadzone");
}
roboclaw.SpeedAccelDeccelPositionM2(address, 0, 0, 0, posicionM2, depth2);
} else {
Serial.println("Zenith - error es menor que deadzone");
}


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?.

• Are the motors or servos (unclear) supporting a load when the command goes to zero? It sounds like they're just holding position. Jul 13 '17 at 14:49

Solved.

Controller error, even when the controller "says" there is current, actually there isn't any!

Update:

The problem is inside the controller Roboclaw. Roboclaw's forum moderator says the problem is because current is too low to get an accurate measure.

A current of .06 amps is noise, not actual current. Anythign under 1 amp isnt really accurate and even with no motors attached(so there is definitely no current) you will usually see readings from 60 to 200ma, .06 to .2, coming from the current sensors.

Also, the sensor is not very good calibrated, and there is no way a user can calibrate that.

The current sense is measuring .001v/amp. We already do a lot of filtering to get reasonably good values but there is no way to completely elliminate the noise or offset error(not without adding craszy costs).

Solution: Just ignore any current under 1 amp.

Robloclaw's forum moderator solution: You should use a conditional in your code to display zero if the value is less than around 200ma to 1amp.