Stepper motor stall detection?

Hi all! First post here. I've had my arduino for about 2 weeks and already making progress. Currently I want to develop robotic contraptions using stepper motors. I can control a motor fine already with the easydriver board.

So here's the question: Has anybody experience on how to detect that a stepper motor has stalled (arrived at a mechanical stop). A simple switch won't do it in my application because the stop position is not known beforehand. Ideas that i have: - An encoder feedback: if the motor is told to advance but the encoder does not, then it has stalled - Somehow sense the Back EMF in the coil currents when stalling occurs (Hall sensor?) - motor body not rigidly mounted, so that if the rotor stalls, the stator should be forced to move, triggering a switch ...

Any other ideas or experience you can share would be highly appreciated!

Carles

The L298 motor driver chip brings out the grounds for the the output transistors to separate pins for precisely this purpose. You can put very small (.1 Ohm or so) resistors between those pins and ground to get analog signals proportional to the motors' current draw.

If you don't want to tie up analog inputs to read those signals, you could feed them into an analog comparator (very easy to do, even if you're a relative newbie: do a google search like "analog comparator examples" to find ideas) to get digital "motor stalled" signals. Finding the right threshold to determine when the motor is "stalled" can require a bit of experimentation: a small motor's "stalled" may well be less than a big motor's "working hard, but normally". But the fun of figuring this stuff out is why you picked this hobby, right? ;)

Ran

Thanks Ran for the helpful response. I like the idea of the current sensing instead of something mechanical . I think I'll try a pair of simple hall sensors (http://www.sparkfun.com/commerce/product_info.php?products_id=8882) because I have my driver already running and I like it's simplicity of use! I hope the current sensing is as simple as detecting a threshold!! otherwise maybe use a differentiator before the comparator. We'll see ::) Cheeers Carles