Stepper motor help
Technic-R-C
Posts: 117
Hello
I am currently trying to gain control of my Hurst AS unipolar (6 wire) stepper motor and I need some help.· The cheapest alternative that I have found to control the stepper is included below in·the schematic below.· Each of the four coils are activated simultaneously with·TIP31 NPN transistors, which are protected by 1N4003 micro 1 amp diodes.· The BS2px pins·I believe protected by the 1 KoHm 1/4 watt resistors (will they protect the stamp pins?)· The stepper I want to control is a Hurst AS stepper motor (datasheet)· Here is a link to the website I am using for wiring.· Would the current wiring and parts work with this stepper? Do i need stronger transistors? Will i destroy the stamp?
Stepper motor is 12 VDC -·3W.· 6 wire
Thanks
Technic-R-C
Post Edited (Technic-R-C) : 7/26/2008 7:09:38 AM GMT
I am currently trying to gain control of my Hurst AS unipolar (6 wire) stepper motor and I need some help.· The cheapest alternative that I have found to control the stepper is included below in·the schematic below.· Each of the four coils are activated simultaneously with·TIP31 NPN transistors, which are protected by 1N4003 micro 1 amp diodes.· The BS2px pins·I believe protected by the 1 KoHm 1/4 watt resistors (will they protect the stamp pins?)· The stepper I want to control is a Hurst AS stepper motor (datasheet)· Here is a link to the website I am using for wiring.· Would the current wiring and parts work with this stepper? Do i need stronger transistors? Will i destroy the stamp?
Stepper motor is 12 VDC -·3W.· 6 wire
Thanks
Technic-R-C
Post Edited (Technic-R-C) : 7/26/2008 7:09:38 AM GMT
Comments
(pic attached.)
So with the schematic that you provided your saying that I whould be able to run my 12 VDC 3 Watt motor from·four BS2px pins with no problem whatsoever (no burnign pins)?· If this is the case, what do you mean by attaching the diodes across the coils?· Would one end of the diode be attached to the battery supply (positive or negative?? im assuming its positive)·whilst the other is attached to the wire distinguishing one coil from another?· What would be the amperage of my stepper motor considering it is 12 volt and 3 watt.· Is there a way to calculate this?· If so will the TIP31 NPN transistor work with a max amperage of 3.0?
Technic-R-C
therefore
I = P / E
I = 3W / 12V
I = 0.25A
Post Edit:
Check -- 12V x 0.25A = P
··················3W = P
The cathode would go to +V and the anode to the motor terminal/wire.· From what you're showing, it had better be positive.
Post Edited (PJ Allen) : 7/26/2008 5:50:48 PM GMT
Technic-R-C
Post Edited (Technic-R-C) : 7/26/2008 5:56:14 PM GMT
Technic-R-C
Use an LED and a resistor in place of each coil.· I specifically mentioned a 1kΩ.· So that's an LED and a 1kΩ in place of each coil.· Do you require a schematic?
Post Edit -- pic attached
Post Edited (PJ Allen) : 7/26/2008 7:06:21 PM GMT
Thanks for all the help by the way
Technic-R-C
You should run it with the specified voltage or within the specified range.
Does this mean If I use the 12 V battery power source for my stepper will it damage the transistor. (man 1.8 V????)· Or will the pin voltage off of my BS2px damage the transistor? (5V)
Technic-R-C
Vce(sat) is the voltage measured between the collector and emitter when the transistor is saturated under certain conditions (which are stated). Similarly, Vbe(sat) is the voltage measured between the base and emitter when the transistor is saturated under the conditions stated.
For questions about potential for damage, look under "absolute maximum" ratings. There are also graphs that show "safe area" and power dissipation vs. case temperature.
min 40 V, am I reading this correctly??· I am sure I dont need a 40V supply to run the transistor?
And it appears like there is no maximum
Technic-R-C
Each of the four coils are activated simultaneously with·TIP31 NPN transistors, which are protected by 1N4003 micro 1 amp diodes.
end quote
you activate the coils sequentialy to move the stepper forward or back, in full or half step mode
in regards to stepper motor operation...
you can use up to 20 times the voltage that the stepper is rated for, to get better current response.
however never exceed the rated current for the stepper.
it sounds like you need to read up on stepper ops, before hooking it up, do like pj said and check the rest of your circut before hooking up the wires.
you can limit the current with resistors , or with chopper chips, but do limit it
there are many fine documents out there that explain how to do steppers.
if i wanted to control a low current stepper, i would probally use a ULN2803A Darlington Array· since i believe it already includes the diodes and the bemf protection diode ( check the docs to make sure )
and some current limiting resistors in line with the coils, if i was to go above the rated voltage.
dan
Post Edited (Sawmiller) : 7/27/2008 12:22:07 AM GMT
At the moment I have given· up my attempt to connect my stepper to my BS2px and started to do a little bit more research.· Well lo and behold the research was beneficial·because I found a website insiting that my current circuit schematic·was not good and not made for a stepper but for a relay.· So here it the link to this website.· Proper schematic attached below.
It seems that i need to also add a zener diode into my circuit to prevent motion breaking, drive breaking, etc.· So will this 1N4742A 1-Watt Zener Diode zener diode work?· It is rated at 1 watt while the stepper is rated at 3.· Will this cause problems?
Second, i believe in the document it states that i need 2 zener diodes for the entire circuit correct?· ( 1 for a pair of coils)· Is this right?
Finally, what is the C1 in the circuit?·
So many questions, sorry?
Thanks
Technic-R-C
use the eqation e = I *R where e is voltage. so you have to find out what resistance your coil has, then add enough resistance in the form of a current limiting resister to limit your current to .25A
like so
I = E/R , .25 = 9.6/( x +y ) where x is your coil resistance, and y is the additional resistance you have to add to keep the current to .25 A... plug in the coil resistance and solve for y
that drawing you have looks complicated
the purpose of the diodes accross the coil is that when you cut the current to the coil, the coil will generate a voltage/current of its own as the magnetic field colapses only in the reverse direction.
so you put the diode so it wont conduct normally, but will when the field collapses, short circuting the back emf
i'm not sure about the zeners, i've only used them to limit the voltage in paraell with them.
as i said before look arooound , google stepper basics, there are some articles here on that if i remember right, in the nuts and volts issues.
or look here at the stepper motor docs...
http://www.parallax.com/Store/Microcontrollers/BASICStampModules/tabid/134/txtSearch/stepper/List/1/ProductID/65/Default.aspx?SortField=ProductName%2cProductName
theres a diagram and code
·look at the datasheet for the chip if you want to use discete componets.
dan
Post Edited (Sawmiller) : 7/27/2008 6:34:57 AM GMT
I was reading some Nuts and Volts columns when I came upon some info about controlling steppers and other devices with a ULN2803A Darlington Array.· Well the schematiac of the Darlington array was exactly similar to my original schematic.· And I was wondering wether or not to buy the darlington instead of building my own.· Before I make my decision I have a couple of questions.
1.· In the datasheet it states that the input·current is typically .93mA (max 1.35mA)·per input.· So in theory, would I be able to control(25mA/.93mA=·~4 Darlingtons)·25 inputs (4 Darlington Arrays·controlling 4 steppers) without exceeding the max source of the Stamp? (For my project I would only need 12 inputs from 3 darlington arrays to control 3 steppers)???
2.· Since I my stepper is rated at 0.25 amps - 250 mA (3 watt 12 V), will i be able to control the stepper when using half steps (250 mA + 250 mA = 500 (danger zone) -·2 coils turned on at once)? (500 mA max for darlington)
3.··What kind of transistors and diodes·are used in the ULN2803A?
Thanks
Technic-R-C
Technic-R-C
it's about the same as yours
dan
The transistors and diodes in the ULN2803A are not made to look like some kind of numbered standard. They're all integrated on a single piece of silicon. It doesn't make sense to ask "what kind of transistors and diodes" they are. They're just what the datasheet says, Darlington pairs with diodes to absorb reverse EMF pulses from relays or motor coils with specifications as described in the datasheet.
······Technic-R-C
focus.ti.com/lit/ds/symlink/uln2803a.pdf
www.st.com/stonline/products/literature/ds/1536/uln2804a.pdf
Look at Figure 11 on the ST datasheet. It shows peak collector current vs duty cycle vs
# of transistors on at the same time. This mostly gives some idea of heat load.
The TI datasheet indicates that the absolute maximum total ground current on the chip is 2.5A. This will
be exceeded if more than 5 transistors are on and conducting the 500mA maximum current per transistor.
The issue in bringing this up is that the figures for maximum current for one transistor don't apply to the
whole chip which has limits of its own. You have to look at all the information on the datasheet. You can't
just pick and choose what's important to you. You asked about two transistors being on at once and what
total current is allowed. You figure it out based on the information in the datasheets. It's all there.
You need to figure out enough about heat to determine whether that's a limiting factor. The collector to emitter
voltage (Vce) and the current you want to switch will tell you how much heat will be produced which has to be
gotten rid of.
Due to the fact that I can't buy the Darlington Array in any local store I have bought 4 TIP31 transistors, 4 IN4003 silicon diodes, and·4·1k-Ohm 1/4 watt·resistors·to control my stepper.· The stepper I am using is rated at 3W, 12V, 0.25A (250mA) and I should be able to drive it with the schematic posted in my first post. Thanks to all for helping me comprehend this rather new topic.
However like usual I still have a couple of questions.· I would like to use my BS2px power source (9V, 300mA) to power my stepper (12V, 3W, 250mA) as well as the Stamp by using the Vin pin.· However I am know that the stamp will not be able to sink 300mA of current.· Is there any way to use my power outlet as a means of driving the stepper as well as the stamp?
Technic-R-C
Post Edited (Technic-R-C) : 7/30/2008 3:24:21 AM GMT
Couldn't find any info on the web or prior posts.
Technic-R-C
1) Your power source is rated at 9V with a maximum drain of 300mA. If it really fulfills the specification, it will put out power at somewhat more than 9V at low current drains. As the current demand increases, the voltage will drop until it becomes roughly 9V at a drain of 300mA, then the voltage will drop rapidly after that. At some current drain, the power supply will either become damaged or some kind of internal protective mechanism will come into play essentially cutting off the output.
The Stamp itself requires a certain amount of current and the switching transistors require some base current all of which comes out of the power source. The stepper motor, while rated at 250mA, probably draws much more than that for peak current as it's starting to move and when it's under heavy mechanical load. All of this is to say that a 300mA power supply is inadequate for the task.
2) Your stepper motor is rated at 12V while the power source is rated at 9V. At 9V, the motor will not be able to draw its maximum current (which is a good thing for the 300mA power source), but it also won't have much torque and will be very slow at coming up to speed. Motor windings have a certain amount of resistance and Ohm's law says: Current = Voltage / Resistance.
Ok.. so·I got the parts and tried to connect the·LED with the 1k resistor (schematic·provided by PJ)·before·I connected the motor·and something REALLY wierd happened...
Before I get to that I am giong to quickly explain my wiring, which might be the problem.
-Only one transistor at the moment is connected
-Pin 15 is wired along with a 1k resistor to the base of the TIP31 transistor
-The collecter of the transistor is wired to the power supply (9V Duracell Alkaline battery) and a IN4003 diode.
···· -In betweein the diode a 1k 1/4W resistor is connected to an LED.
-The emitter is connected to the negative terminal of the 9V battery
·(Images of wiring attached below)
here is the code
The problem:
If I use the wiring listed above and the code nothing happens (the LED does no light up at all).
However If I just touch the BS2px withough turning it on, the LED lights up.· Isn't the pin supposed to activate the transistor not my finger???
I have no idea what to do.· Help would be appreciated
Technic-R-C
·
You didn't mention that the (-) 9V lead is connected to the Stamp's Vss. That's necessary.
The base current has nowhere to flow if that's not connected.
I have added a diagram to help clear up my circuit.
So I connect the negative terminal of my external power supply to the stamps Vss (wouldn't this be too much current to sink)? Or do i connect the emitter wire of the transistor to the Vss as well as too my 9V external power supply?· I though that my external battery was able to sink both the stamps current and its own current?
Technic-R-C
Post Edited (Technic-R-C) : 7/31/2008 8:06:03 PM GMT
I got the LED working perfectly!!!!
All I had to do was connect the emitter terminal to Vss and the negative terminal of the battery.· Thanks Mike
I found a link online with a schematic to help me out also.
Now its time to connect the stepper
Technic-R-C
Post Edited (Technic-R-C) : 7/31/2008 10:38:12 PM GMT
Well the LED worked great, but now when I attached the stepper I came across an unfortunate problem.·
The stepper coils, instead of turning on when the Basic Stamp sent a High comman to a pin, were all turned on at once when the stamp was powered up.·(checked with LED's.)· Wiring diagram from the manufactur for my stepper attached as well as a diagram of my current schematic.·
When the stamp is turned on, the coils act as an energy source and turn on the LED's.· Now I am completely lost.
I am leaving for vacation in 3 days and I need to have this done before those 3 days.
If anyone could provide some help or guidance I would really appreciate it!!!
Technic-R-C