How do I power a 12V unipolar stepper with a Prop?
DavidZemon
Posts: 2,973
I thought a unipolar stepper was easy: hook it up to a BJT and drive the base with your uC pin. If the voltage is still too much, use a darlington pair. If that's still not enough, hook a couple darlington pairs in parallel. Either I got something wrong, or underestimated how big 12V is. I have a ULN2803 and a Howard Industries 1-19-4200 (12V, 75 ohm, 160 mA, unipolar) stepper. Each pin of the Propeller is (directly) plugged into a pair of pins on the ULN2803 (P16 -> P1 & P5, P17 -> P2 & 6, etc) and each wire of the of the stepper is plugged into a pair of pins to match. The ULN2803's ground is connected to ground, and VCC to 3.3V. I then connected the common lead of the stepper to 5V and I can move the stepper very slowly. Great... now I've proven that my wiring and software is good. Time to step it up! I tried going straight to 12 V and that was not such a good idea. The 5V regulator got really hot and I might have burned a prop chip. I swapped it with a spare and now all seems good again (I can drive the stepper again with 5V), but that leaves me a bit confused. It's been way too long since my EE classes in college, so I don't remember how to do the math on this. Do I need something bigger than a ULN2803 to drive this stepper?
Comments
Odd that the 5V regulator is getting hot when the stepper is connected to 12V. Can you post a wiring diagram?
The initial description does not quite match the wiring diagram. The ULN2803 does not have (at least TI nomenclature) a VCC pin. They call it a common and it sources all the backswing diodes in the output stages. If your common voltage is less than the driving supply voltage, the diodes will become forward biased and conduct. As kwinn mentions it should be at the supply voltage of the driving source. I would guess that when you had 5V for the supply line, you were not (after coil resistance and forward biased diode drops) not pushing back on the 3.3 V regulator so hard (so the prop survived the first test), also, the 5V would have, due to the forward biasing of all the backswing diodes, caused a current flow into all the windings of the stepper inhibiting its movement when you stepped it. This may account for the increase in RPM capability that you had after incorporated kwinn's note resulting in current flow in ONLY the selected coils. Then when you took the drive voltage to +12 you were trying to drive about 12V back into the 3.3V supply through the now forward biased backswing diodes. So if you think the prop got fried, this would be my guess as to how. You drove the supply from the 3.3 to close to 12V into its output.
That's my guess anyway, I have seen this circuit used many times in steppers in film processors, relays for x-ray control and a ton of others. As drawn, your diagram should work as expected as long as the common pin is at the same potential as the driving voltage of the stepper supply. The backswing diodes are there to protect the ULN driver stage from high reverse voltage pulses caused by the magnetic field collapsing when the driver is switched off. This is why you will see diodes on boards near relays or other magnetic devices. ULN just happens to incorporate them to make life easier. Other times, you may see a resistor in parallel with a capacitor for the same purpose (google snubber circuit).
Go forth boldly............
If ya cook one as shown with 12V, I'll owe ya a prop. Also, there are a lot of manuals on line for some medical imaging devices and the ones that actually still have schematics may have some good ideas you can uhm, "adopt"...
-Phil
Oh that's nothing. i was just trying to find a picture that more closely matched what I imagine to be the ground symbol Everything is on the same ground plane in this circuit.
-Phil
I'm aware of that on principle, but have no idea how to know when you've reached "high motor currents". Wish I knew an EE around me that was interested in building the electronics for this thing so I could concentrate on the software :P
-Phil
Once you start looking at using MOSFETs you may as well consider bipolar driver anyway.
NO, the TI version states 500mA (single) and when you read the Absolute Maximum specs you see that 500ma is the "Peak" output current, not even the continuous current etc. These chips were designed to pulse solenoids briefly but they have become an easy way to interface to motors. I have been guilty of misusing them in this way in one early vending machine design, the TI ones would have a very high failure rate and I assumed at the time that they were faulty, which they weren't, I had simply misused them. Thankfully the Allegro version exceeded these specifications and I was able to use them, but I made sure I never got caught again. It is just as easy to use tiny little SOT23 digital transistors as drivers and they take up less space and can drive much heavier loads continually and all together.
The advantage of the BJT over a MOSFET is that they can be driven very comfortably from 3.3V and they are cheap. I use dual MOSFET chips in SOIC8 when I want to drive much heavier loads but under 1A the BJTs have very low Vce(sat) and are easy to use.
The EFX-TEK HC-8+ controller has eight N-channel MOSFETs that you can drive a unipolar stepper with (I've got one sitting on my desk doing just that). In fact, I just wrote a driver for my friend John B who is upgrading another friend's project from a BS1 interpreter and ULN2803 (in the form of an EFX-TEK Prop-1 controller) to and HC-8+.
I just finalized the driver today. It's attached in the event you might find something useful.