How to detect motor stall?
Is there any simple way to detect motor stall? I have a tracked robot running on two 12v geared motors, with no encoders. I drive the motors via the L6205 based H-Bridge on the MSR1 Propeller board. Basically I want to sense when my robot's obstacle avoidance system misses an obstacle and the robot gets stuck in a piece of furniture while the motors are still issued a "go forward" command. I want to prevent motor stalling, overheating, battery drain, circuit shutdown, etc... Also, does the MSR1 provide stall protection? I assume since it has thermal protection, it will just shut down, right? I'd test it, but the board costs 100 bucks, I'd rather ask here
EDIT: Sorry guys, just saw this: http://forums.parallax.com/showthread.php?108495-Stall-Sensors-anyone in the "Similar Threads" section. However, when I did a forum search (I always try that before asking...) for the word "stall", I didn't get any hits.
EDIT2: Oh yeah, plenty of hits now... Is it possible I was searching while the new forum was indexing, etc...? BTW, love the new look.
EDIT: Sorry guys, just saw this: http://forums.parallax.com/showthread.php?108495-Stall-Sensors-anyone in the "Similar Threads" section. However, when I did a forum search (I always try that before asking...) for the word "stall", I didn't get any hits.
EDIT2: Oh yeah, plenty of hits now... Is it possible I was searching while the new forum was indexing, etc...? BTW, love the new look.
Comments
PS. I'm reading an older thread of yours on using optical mice to track motion http://forums.parallax.com/showthread.php?119032-Optical-Mouse-for-Robot-Odometry&highlight=optical+mouse
-Phil
BUT... if I may offer a quick & dirty solution, it's to use the Stamp's 1.4V transition from reading low to high on an input pin. It's a voltage level check that can be used as aone-step ADC without any extra hardware. Doesn't always fit the situation, but it's sweet when it does. All you care about is a digital YES/NO stall sensor, which will draw a certain higher current. IF you can afford a higher value resistor in series with your motor (which will slow it down somewhat) that will yield a voltage drop of 1.4 volts or more at your stall current, then feed that voltage into a Stamp pin. Reading low, motor not stalled. Reading high, motor is stalled.
Might work for you; it interferes less with higher motor voltages where you won't miss a ~1 volt drop across the series resistor under normal conditions.
"But, for some inexplicable reason, these are permanently grounded on the MSR1 board, rather than being jumpered so sense resistors could be employed." - Again I agree, This was probably to reduce the part count, although in reality it was just a simple oversight with the thought that it's good practice to use a wheel encoder and a current sense resistor wasn't necessary in such a case. Perhaps an oversight, but since I was not involved in the design process review with this product, it's hard to say.
As a consequence, it was decided to add an encoder to the idler wheel. Even with the drive wheels turning, the idler will be stationary if the 'bot isn't moving. However, since the idler on the S2 is not gimbaled, it will also not rotate when the 'bot is turning in place. As a consequence, the S2's stall detection algorithm has to consider a number of factors in coming up with a stall/no-stall decision.
-Phil
The CD4070 should be powered from the motor supply (assuming it's < 15V). Rsense should be equal to 0.6V / Istall, or thereabouts. A stall is detected when A is high and C < Motor Vdd - 0.6V or A is low and C > 0.6V. In either case, the inputs to the XOR gate will be different, and its output will go high (to motor Vdd). A high-value series resistor on its output (greater than [motor Vdd - 3.9V] / 500 uA) protects the Prop input.
Also, when A and B are floating (i.e. the motor is unpowered), the stall output will be high, due to both transistor bases being forward biased through their resistors.
-Phil
Phil, I was just about to ask about the S2, I noticed it has a stall detector - question answered!!
I tried something pretty dumb, but at the time I was doing it it sounded very exciting: My bot runs on tank tracks and is very 'noisy', there's a lot of vibration, I figured I can read an accelerometer and if I notice that there are no 'g' variations being tracked, but the motors are commanded to spin, then there is a stall. However, I couldn't get accurate readings and filtering all that data is too insane for a basic "stall sensor".
I'll try to get the resistor method working...