output to stepper

adub

New Member
I am using the ULN2003 two pin stepper setup from Manual 3 pg 15 for a unipolar stepper.

It uses power all the time because one winding is always powered.

I thought if I changed the output pins to input that it would be tristated and the motors would not be using power. Had it all worked out in the software then thought....oops I really don't know how this circuit works. :confused:

Will making both output pins into inputs acutally cause damage to anything? I really don't like the blue smoke thing at all.

Arvin
 

BeanieBots

Moderator
Don't tri-state the outputs. Simply make them all go low. All darlington outputs and therefore coils, will be off.
Your motor will of course no longer hold position when powered off. There will be a certain amount of 'cogging' but nothing like as much as when powered.
 

adub

New Member
Don't tri-state the outputs. Simply make them all go low. All darlington outputs and therefore coils, will be off.
Your motor will of course no longer hold position when powered off. There will be a certain amount of 'cogging' but nothing like as much as when powered.
This is for a two pin setup to a stepper motor through the ULN2003. Both output pins go low for step 3 of the sequence of steps because of the way the circuit is wired. So just setting both pins to LOW will still power one of the windings.

Help!
 

BeanieBots

Moderator
So you are NOT using a ULN2003 darlington then!
I guess you are using the L293D H-bridge driver?
In which case, driving both outputs to the same level, either low OR high should stop current in the motor!

You've confused me.
Please describe in detail your connections including supply to the motor.
If you have a two wire motor and connect it to two darlington outputs, NO current can flow whatever you do with the PICAXE outputs. Those darlingtons can only SINK current. They cannot source it.
 

adub

New Member
You've confused me.
Obviously! :D

Well, I'm using the stepper driver shown in the picaxe manual-3 for the unipolar stepper motor. The circuit is on page 15. It uses two pins of the picaxe to control the four pins of the stepper.

The stepper is a 5v 0.75 amp so the ULN2003 does get hot. Have a heat sink on it but would like to power the stepper off. The ULN2003 is sinking the power. If both pins from the picaxe are set LOW then two of the pins to the stepper will be powered. If both picaxe pins are HIGH then those same two pins to the stepper will be LOW. There's a truth table on the same page as the circuit.

I thought if I tristated the pins from the picaxe that it would power off the stepper. I now don't think so, which is why I posted.

I guess I could put a relay on the power line and kill all power to the stepper when I don't need it but that uses another pin. Short on those or would have used 4 to the stepper to begin with.

Thanks for taking the time for me.
arvin
 

BeanieBots

Moderator
Ok, got it.
Simple answer, you can't turn them all off with that arrangement.
Tri-stating the PICAXE outputs will turn on outputs 1 & 4 because of the pull-ups on 6 & 7.
You could use a third PICAXE output diode OR'd to the ULN2003 outputs 6 & 7 such that when that PICAXE output is low, it pulls down the two darlington outputs resulting in all outputs off.
 
Last edited:

adub

New Member
That unfortunately is what I was afraid of. :( I love the new smilies.

Another thing I thought of instead of a relay was a manual switch. When not in use just flip the switch to save power.

Naw, I'll just live with it. Won't be on all that much anyway.

Thanks for the time.
arvin
 

BeanieBots

Moderator
You could put 'one-shots' on the outputs. If no pulse received within certain timeframe, then output goes off. Probably easier to use a slave 08. With that you could use an ADC input from the main PICAXE so that tri-state would disable the outputs, thus still only needing two lines.
Various options available but all require extra hardware. Really depends on how important it is to you.
 

adub

New Member
I'd say not that important. I was more or less just trying to conserve a little electricity.

One shots? I don't know what that is. Another person was told to do that but nothing else was said about it. Want to elucidate?

arvin
 

Michael 2727

Senior Member
One Shot = single pulse, e.g. an NE555 timer could be
set for a one shot pulse or as a continuous mulitvibrator.

If you apply DC to a series capacitor you will get a
one shot pulse, unless you disconnect the DC and
reapply it.

One shots commonly used to debounce switch noise.
 

BeanieBots

Moderator
What Michael said.
Normally, a one-shot is associated with providing a brief pulse from a signal level, but in your application the pulse length might be quite long and would be used to cut short a long period at logic high.
For example, if your stepper was being pulsed at say one step every second and your one-shot was set to 20 seconds, then there would be no difference with or without it.
If however, your controller stopped, either intentionally or not. All outputs would go low 20 seconds after they were last instructed to go high even if the PICAXE output was still at logic high.
There are two types, resetable and non-resetable. You would need the resetable type. A non-resetable one would keep the outputs on for a minimum period (20 seconds) irrespective of what the PICAXE demanded.
 
Top