Stall protection & stopping when limit reached.

General discussion of using Roboclaw motor controllers
Post Reply
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Stall protection & stopping when limit reached.

Post by Basicmicro Support »

I was assuming you were using position control, but it sounds like you are just using speed control. Please confirm which it is.

The roboclaw can have a maximum current limit set but this is not a stall detect. It will simple chop the power each PWM pulse outputs to limit the current to that maximum setting so I dont think this would work for your application.

You could add hardware limit switches to your setup(I highly recommend it, especially if oyu are use speed control). They would disconnect the motor when the hardware limts are reached but still allow you to back away from the switch(you use a switch and a power diode to set this up).

I will need some more information on the case where you drive it into the frame and then return to the 0 position but it still keeps moving into the frame. This could be a power brownout problem. To test this set your minimum voltage to 1v to 2v less than your batteries/powersupplies nominal voltage. If the voltage dips below this the motor will enter freewheel mode. When the motor stalls the voltage will most likely drop below this point causing the motor to go into freewheel which will stop the voltage drop and prevent a brownout.

Your second problem is called hunting. Its caused by slop in your encoder inputs(eg the stretch) and/or stiction(static friction) preventing the unit from reaching the exact location you are requesting. Adding deadzone in the position controll would fix this.

However if you are using speed control only, then it is probably noise in the analog control input(noise from the motors could be coupling into the analog signal). You can add deadband(in the General settings) to remove this noise from the control input.

Also the Analog inputs are 0v to 2v with 1v at center. Above you said your high voltage was 5v. Was that a typo? If it was not a typo what is the source of the signal(a potentiometer or something else). If I know what you are using I can give you options to get the correct voltage range out of it.

Post Reply