Stepper motors generate a back electromotive force when they move. They also have 2 phases. If phase A is active and the core moves, then a voltage will be induced in phase B, the inactive one. As the core snaps into alignment, the core will ring; which is described as an over shooting then undershooting, back and forth like the strings of a guitar. This therefore means that as it’s doing so, It is inducing a BEMF onto Phase A and B. A stepper motor stalls when the speed matches this natural resonate frequency of the system the motor is connected to.
Sensorless Stall. The L6470 by ST Micro, has a built in sensor less stall mechanism which works by measuring the current that is being supplied to the phases. E.g. Let’s say the stepper has 2Ohms impedance per phase, and 12V is used to drive it. That means that current should be 2Amps. The BEMF phenomenon makes the phase impedance appear to go up. Now let’s say the motor is running at 300RPM, and the impedance goes up to 3Ohms. This means that current is now 4Amps. This causes the motor to loose power. This is why stepper motors loose torque at higher RPM. To compensate for this, the L6470 increases the voltage from 12 to 18 to return the amps to 6. If the rotor suddenly stops turning while the voltage is at 18 then there will be a spike in the amps from 6 to 9. This is how the sensorless stall works, in theory. In actuality, I believe that they just adjust the current flow not the voltage. I’ve just stated it like this for simplicity.
What I want to do is detect that first overshoot that the rotor makes. This means that as the rotor is accelerating toward the coil the effective impedance will be going up, peaking when the stator and rotor are aligned. There would then be a fall off of the impedance back to normal when the rotor reaches the apex of the overshoot.
I would like to be able to detect this with a circuit, and use it to trigger the next step. The system will be in full step mode. I plan on using Voltage Comparators across the phases to turn the higher voltage into CMOS 3V3 levels, and a peak detector circuit to trigger the next step as soon as the rotor begins to over shoot.
Does anyone see a flaw in this thinking? I’ve never used comparators before, but I have built peak detectors (for trance music 8)).
Ah, and I forgot one thing. The PWM frequency that is controlling the current is in the 20Khz range. However, since the motor has 200 steps per revolution, and I want a target RPM of 3000, I expect that the signal for the overshooting won’t be much higher than 10Khz. I intend to use a low pass filter to separate the PWM frequency from the overshoot frequency before applying the peak detector.
To bad, I hope someone jumps in as it is an interesting topic, but you are way over my level on this (I’m just a software dude, this is hard-core hardware talk). Last time I used a stepper I was using the L6470 module and I’m still wishing I picked a few more of those up.
Hi:
I wasn’t sure how to respond to this thread, I have used stepper motors extensively in a very mechanical medial instrument (15 stepper motors), that does pipetting to very precise levels. Most of our effort was centered around acceleration / deceleration curves customized for each type of mechanical gearing and load. Later the loss of steps due to mechanical jams and excessive friction, required retro fitting with shaft encoders and a FGPA to count and compare step pulses and the shaft encoder quadrature signals. We could program the allowable difference between counters on a stage that is stopped and one that was moving. Some of our moving stages would allow for up 40 steps difference, which would suggest there definitely not a one to one pulse relationship.
In reading your description at times I get the sense you want to build some comparators to detect a stall, but in practice I think this problem is typically solved with shaft encoders. I could be wrong in your application, but if I recall correctly you require very high RPMs, hence you need to deal with acceleration / deceleration issue first. If your load is very light then this may not be a factor, again I don’t know your exact requirements, planned motors and operating voltages.
I can pass on some good reference material however, Stepper Motors and their Microprocessor controls, 2nd Edition Takashi Kenjo and Akira Sugawara available in Canada for 168.00 ISBN 0-19-859385-6 and a paper published by D Austin on Generating stepper motor speed profiles in real time. Our solution used tables that were created by our analog hardware engineers and then digitized to become part of our microprocessor solution.
I am about to start my evaluation of the L6470 controller in a week or two, likely we will do a prototype PCB if we like what we find. I am hoping that the built in stall detection will be acceptable for this new instrument, otherwise the plan is to use the CUI shaft encoders that support up 1/8 micro-stepping rates.
@ PHITEK - Why build one when you can just buy one, if it’s for prototyping. [url]https://www.sparkfun.com/products/11611[/url]
Stall detection is picky. E.g. it may FLAG a stall even though the stepper is running. I’ve had limited experience with this function however i know it has to be dialed in for each application.
@ Mr. John Smith - I have several GHI modules on hand for the initial prototype, the PCB would be our USB client microcontroller with pressure sensors, solenoids, custom high voltage pulse generator, PID heater controllers, and multiple stepper motor controllers. I think we are up to 4 or 5 of them needed, hence the custom PCB. There would be a footprint for an small FPGA in-case the shaft encoder is a must have.
@ Mr. John Smith - Your right about the flag signal, it is the “OR” of an number of alarm conditions, these can be masked off in the ALARM_EN register, to just provide a Stall detection for Bridge A and B. Or if the other alarm conditions are required, then testing the STATUS register bits 13, and 14 STEP_LOSS_A / _B will provide the stall detection status.
Wouldn’t it be interesting if they discovered that down at the quantum level, the reason that every quantum particle can only exist in the quantum states, and not between, is that at that level it’s ALL tiny stepper motors.