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

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


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


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.

More info here

  • $\begingroup$ I'm glad you solved your problem, but could you please give more context to the solution? I followed your link and you discovered that the controller wasn't actually providing any current, but what was the fix? What did you change to get it to start providing current? Was this a wiring problem or a software problem? Etc. $\endgroup$ – Chuck Jul 20 '17 at 13:23
  • $\begingroup$ Also, it looks like you may have accidentally created two accounts (Carlos V. & Carlos Villa). Stack Exchange only allows an individual to actively use one account, so please follow the instructions at I accidentally created two accounts; how do I merge them? Note that moderators can't merge accounts for you, but may delete accounts they believe to be sock puppets. $\endgroup$ – Chuck Jul 20 '17 at 13:23
  • $\begingroup$ Lastly, please go ahead and accept your own answer as the solution with the check mark between the up and down arrows. Note you need to use the account with which you created the question to be able to accept the answer - please merge your accounts if you need to. By expanding your answer to include more details of what the fix was, and the accepting it as the answer, future visitors to the site can quickly find the answer if they are facing a similar problem :) $\endgroup$ – Chuck Jul 20 '17 at 13:25
  • 1
    $\begingroup$ There is no solution, actually the problem here is the controller, as the links says, "Anything under 1 amp is consider noise" and is inaccurate, readings in controller says there are current from 0.8 to 0.2 in M1 and from 0.02 to 0.00 in M2, but this is normal. If you test it with a ampere meter the reading is 0.00.. Sorry for creating other account I didn't remember the other password and was easier just create another one :$ $\endgroup$ – Carlos.V Jul 21 '17 at 17:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.