586,347 active members*
3,458 visitors online*
Register for free
Login
Page 1 of 2 12
Results 1 to 20 of 25
  1. #1
    Join Date
    Dec 2003
    Posts
    33

    stall detection

    Hi,

    I want to make a stall detection system. How can it be?
    I suppose,
    It will sense the step commands coming from computer and signals from step motor (with optical sensor or etc.) that whether it is turning or not.
    While steps are coming, it will check if step motor is turning or not. If motor is turning no problem but if motor is not turning, it will shut the system.(means stall).

    Anybody can help me in this subject.

    Best regards.

  2. #2
    Join Date
    Dec 2005
    Posts
    3319
    You are essentially describing exactly what the feedback system of a servo does.

    So, all you have to do is add a feedback encoder and wire it in and create the logic to respond to it.

    I'd look into merely installing a servo if it were my choice.

  3. #3
    Join Date
    Sep 2005
    Posts
    2
    You could use an optical encoder on the motor shaft and input the shaft position and step commands to a Picmicrocontroller. The PIC can then be used to shut down the system when a stall is detected.

  4. #4
    Join Date
    Jan 2006
    Posts
    31
    Another idea would be to use an accelerometer on the axis you want to detect stall conditions. If the accelerometer is reading zero when you are moving, probably you are stalled. :-)

    A 2 axis accelerometer is about $29 nowadays.

    Syp

  5. #5
    Join Date
    Mar 2003
    Posts
    35538
    You can get a system that will detect if the machine is out of position that works with Mach3 from www.rogersmachine.net

    Works with both steppers and servos, and will pause the machine if it loses position.
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  6. #6
    Join Date
    Dec 2005
    Posts
    3319
    Accelerometer = not so good idea

    Here's why:

    At rest, you have ZERO acceleration

    At ANY constant velocity you have ZERO acceleration.

    When you have any change in velocity, you have acceleration (positive=acceleraion whereas negative=deceleration). Its gonna be real hard to keep an error signal from occurring when you have to find a awy to come up with a control logic that will "think" about what's going on and when.

    With some AND or OR logic, you could get an accelerometer to work but a tachometer feedback would probably your easiest thing to integrate. If you were stepping, you better have an RPM of some king. Trouble is, if you step only enough to get a few thou movement, you won't generate a perceptible RPM.

    Still say, use a servo and drive - it is ultimately what you're trying to emulate and it is a bolt on if you are willing to spend the $$$.

  7. #7
    Join Date
    Jan 2005
    Posts
    364
    I have been thinking on this also, when I saw a small tool heavily bending because the Z stalled.
    The easiest way is indeed to detect motor, screw or table movement optically and compare that with the step pulses, there's no need for accuracy, it's only a safety issue.
    There could even be 10 step pulses for only one feedback pulse, a few thou shouldn't matter, it's not a servo emulation. Benefit of a servo is that this feature is incorporated.

    I have a basic concept in mind but no details yet.

    @ Gerry: The board you suggested looks like overkill for only this purpose. Do you intend to use it for your dual motor gantry? In your case a stall detection (for whatever reason) would be very usefull.

    BTW: It's also possible for the stepper driver to detect a stall, some have it and there's also a application note on the subject. But it seems quite complicated to implement it.

  8. #8
    Join Date
    Sep 2005
    Posts
    167

    easy solution

    according to my knowledge

    There are very easy solution that can be done and cost almost nothing. you can sense the current going to the motor , as dc motors takes too much current when in stall
    so you wither

    1. make a circuit to detect the current and stop the system or do whatever u want

    2. add a fuse with rating close to stall so it blows up

    3. add a fused switch (like the one found on homes) that when certain amperage is reached the switch is turend off

  9. #9
    Join Date
    Mar 2003
    Posts
    35538
    Quote Originally Posted by lucas
    @ Gerry: The board you suggested looks like overkill for only this purpose. Do you intend to use it for your dual motor gantry? In your case a stall detection (for whatever reason) would be very usefull.
    That board was designed to prevent damaging parts if you do happen to lose steps, not just let you know that you have.

    I don't plan on needing that for mine. If it's losing steps, I'll get bigger motors/ better drives.
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  10. #10
    Join Date
    Jan 2005
    Posts
    364
    Quote Originally Posted by ger21
    That board was designed to prevent damaging parts if you do happen to lose steps, not just let you know that you have.

    I don't plan on needing that for mine. If it's losing steps, I'll get bigger motors/ better drives.
    Gerry, Mechanicer (and me) would like to automatically stop the machine in time, not just signalling it to the operator to hit the E-stop and then it will be too late: ruined parts, tools or even wrecked machine.

    Aren't you worried on this? Your motors, drivers could be well sized and function properly but then one day the totally unexpected thing happens: failing drive, damaged cables (motors or limit switches), the cleaning lady does something wrong...
    Even the "unthinkable" like a mice feeding from cables or peeing on drives and when you start the machine the gantry get's wrecked.

    I've seen several stepper driven systems with optical feedback only for safety and I personally would like to have it on a big machine where a lot of time and money has been invested.

  11. #11
    Join Date
    Jul 2005
    Posts
    12177
    Quote Originally Posted by lucas
    ....The easiest way is indeed to detect motor, screw or table movement optically and compare that with the step pulses....I have a basic concept in mind but no details yet....
    Here is a cheap optical system: Mount an aluminum disc with a brushed or fine sand blasted finish somewhere on the drive system. Get a cheap optical mouse and mount it so it is looking at the disc and plug it into an available usb port. Write a program that looks for "mouse" signals at that port when step pulses are being sent; no signals no motion, stop the system.

  12. #12
    Join Date
    Jan 2005
    Posts
    364
    The real simple setup wich I would like to try is a 16 slot disc mounted on the screw with an optical sensor.
    There would be 12.5 steppulses for each sensor pulse using a 200 step/rev motor.
    Feed the steppulses in a simple counter and reset the counter with the sensor pulse.
    The counter would count up to 12 and then be reset to 0 by the sensor.
    When it reaches 16: something's wrong: create E-stop. 2 or 3 IC's should do the job.
    One problem: on a direction change when the counter has reached 9 and the motor reverses it will count up to 18 before the next sensor pulse arrives, a change in direction should also reset the counter.

    The number of slots and counter values are just an example, other combinations should work also.
    This is just an idea wich needs some more thinking but it would be a simple solution.

  13. #13
    Join Date
    Mar 2005
    Posts
    1498
    060120-1554 EST USA

    Consider this --- two pulse detectors each consisting of a diode from a pulse source charging a holding capacitor with a discharge resistor across the capacitor. The response time to charge the capacitor is until a positive pulse occurs to charge the capacitor. Very little delay beyond the leading edge if source is a low impedance. Make the detector from the motor pulser produce a lower output voltage than from the shaft detector. Both will produce 0 V for no motion, except for a bias into the shaft detector so that at 0 speed it produces an ok signal.

    The stepping motor driver pulser feeds one detector.

    The second detector I suggest is driven from a 100 hole disk on the lead screw shaft (this is reasonable on a 3" dia disk).

    This technique will not care which direction the motor is running.

    Set the discharge time constant of the lead screw pulse detector slightly longer than the command pulse detector.

    Use a comparator between the outputs of the two pulse detectors. Above said bias is so that at zero speed you get an OK signal meaning the same as when both pulse trains are running.

    May need a timer at the output of the comparator.

    See if my logic will work, or if it will not does it give you any ideas..

    Maybe you need a little series resistance in the diode charge side from the pulse to delay its buildup until the shaft side gets charged.

    Note this concept does not give instantaneous response to loss of shaft rotation.

    All of the above is just because it is an interesting question.

    You can use an up down counter method, but you may run into a cumulative error problem under some conditions.

    Do you really need it?

    .



    .

  14. #14
    Join Date
    Dec 2003
    Posts
    33
    i really need a stall detection system. Roland router and many other professional routers have stall detection systems.

    Step motor system is cheap and easy to construct. But i think the main disadvantage of step motor is that it is an open loop control. For proffesional usage a safety system must used in order to prevent tool damage, machine damage and operator safety.

    A fine dust may stick to bearings that cause motor stall. If one of the motor cable break out, it will cause a lot of thing.

    I designed and built my router. But those days i am not operating it. I hire an operator who knows nothing about CNC. And i want to be sure that when i am not there, he is working in safety.

    My disadvantage is i am a mechanical engineer. And my electronics knowledge is limited. Can you advice to me how i can build a controller which receives both optical sensor and step signals, and decide the stall situation and give halt command to the overall sytem.

    Best Regards,

  15. #15
    Join Date
    Dec 2003
    Posts
    33
    while step signals are coming to driver, but at that moment if no signal is coming from optical sensor (motor), it means there is a stall. I think there is no need to count anything.

    Am i right?

  16. #16
    Join Date
    Jan 2005
    Posts
    1695
    When the motor is moving the encoder signal will quickly change between high and low. When there is no motion, it will stay either high or low. Encoders are expensive compared to other solutions, so it would not be my first choice for simple motion detection.

    Many different techniques will work, so you can choose the one you like.

  17. #17
    Join Date
    Mar 2005
    Posts
    1498
    060122-0908 EST USA

    H500:

    You have identified one defect in my logic. That is on the motor output pulse detector we need a transition detector, a differentiator, feeding the diode peak hold. I neglected to consider that the pulse from the motor shaft could stop in a high state.

    mechanicer:

    My question on why do you need a stall detector is based on the following:

    1. I assume you are not tapping. Even if you were tapping and the tool broke would it matter? This is a function of probabilities and costs.

    2. I also assume from your question that you were not asking about stall detection on the spindle motor.

    3. Further I assume that each axis has end of travel limit switches so if the physical position was way out of synchronization with the commands that you would not mechanically bottom out.

    4. Thus, if any axis stalls it just does not move. You may destroy your part, but it does not appear to be safety problem.


    More on the theory of what you want to do.

    A. You want to trigger a latching circuit when stall is detected. All machine functions stop when the latch is set. The latch can only be reset manually.

    B. No pulses to the motor and no motor rotation, OR pulses to the motor and motor rotation is not a stall state.

    C. Only pulses to the motor AND no rotation is a stall state.

    D. Because there are time factors in both the pulses to the motor and whatever motion detector is on the output of the motor there has to be some delay in the response of the stall detector.

    E. You do not want false triggers to the stall detector.

    F. You need to design the stall detector so that there is no false trigger on a very slow moving axis, like one step per 10 seconds.

    G. We can assume that input pulses to step the motor are short positive pulses. If not, then we can simply use an inverter to change the phase.

    H. On the other hand if we use a chopper disk on the motor output, then this might rest in either a high or low state.

    I have to leave now, but I will continue these comments later.

    .

  18. #18
    Join Date
    Jan 2005
    Posts
    364
    Quote Originally Posted by mechanicer
    while step signals are coming to driver, but at that moment if no signal is coming from optical sensor (motor), it means there is a stall. I think there is no need to count anything.

    Am i right?
    If you want to do it like this you would need a sensor with exactly the same number of pulses per revolution as the stepper motor. It would need to be very accurate and perfectly mounted to produce one pulse for each step of the motor.
    I think this is too complicated and needs high precision to work error free.

    With a counter you can use a simple encoder and allow some margin of steps before it shuts down, this should make it easy to setup and produce less false errors due to vibration etc..
    It would only shutdown after a number op steps, would 10 or 20 lost steps be a problem?

    You would need a slotted or reflective disc with a optical sensor. But you could also consider a hal detector for the sensor.

    There should also be jumpers to select the number of missed steps before shutdown for flexibility between the motor's steps/rev and the sensor's pulses/rev. The output is wired to the E-stop and led's indicate wich motor caused the error.

    Gar: I did not plan to use a up/down counter just a normal up counter counting the number of step pulses between sensor pulses, a cumulative error is impossible because the counter is reset to zero by every sensor pulse.
    The direction of the motor doesn't matter as the counter is also reset by a change on the DIR signal.
    A counter is edge triggered and it doesn't matter if the sensor output is low or high.
    Your concept could work also but there are still a few problems to tackle.

    .

  19. #19
    Join Date
    Dec 2003
    Posts
    33
    gar:

    There are limit switches on the end of the axes. But on the table of my router i use a special fixture made of aluminium and consists pneumatic cylinders which hold the several workpieces. If one of the axis stall, this fixture is damaged by the spindle. Or the spindle is damaged by the fixture. All these happened

    lucas

    Miss steps are out of consideration. When stall occurs, the system will stop the step motors. Then operator will adjust all the axes again.

  20. #20
    Join Date
    Mar 2005
    Posts
    1498
    060122-1509 EST USA

    lucas:

    I think I like your method better than mine, but both have problems under some conditions if very short motions occur.

    In either your's or my method I believe one should have an interrupter with a count equal to the number of motor steps. This is going to be dependent upon what are the shortest motions made, and how they occur.

    .

Page 1 of 2 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •