Playing with stepper drivers

Thread Starter

Metalfan1185

Joined Sep 12, 2008
170
Hey guys,

I recently recieved some stepper motors and the controller IC's to drive them,

They give me 4 inputs (A, A(not), B, and B(Not)) and i can drive the motor in steps as long as i give the right Logic number at the inputs.

Here is the datasheet for the controller:

http://www.allegromicro.com/en/Products/Part_Numbers/97024/97024.pdf

I would like to develop a circuit that would allow me to control the motor in both directions...Thinking out loud, i was thinking of using a 4 bit counter to give the steps a sequence , and then for each binary count, the corresponding logic to give the Driver IC the right combination of H's and L's to drive the motor to step increasingly, and decreasingly.



So i give a Binary counter 1 pulse, and I get this:

A /A B /B
------------
H L H L

Next pulse: (2ND)

A /A B /B
------------
L H H L

NEXT (3RD) PULSE:

A /A B /B
------------
L H L H

NEXT (4TH) PULSE

A /A B /B
------------
H L L H


Then the next pulse will be the first one again, so my binary counter will count:

0 0000
1 0001
2 0010
3 0011
----then repeat

0 0000
1 0001
2 0010
3 0011
0 0000
1 0001
2 0010
3 0011
0 0000
1 0001
2 0010
3 0011 ....and so on.


While the logic after the binary counter is giving the Driver the appropriate Logic Levels to turn the stepper ->

1 H L H L
2 L H H L
3 L H L H
4 H L L H


So by counting in binary up will spin in one direction, and down will spin the other direction...


Am i thinking in the right direction here? is there an easier way to do this with logic circuits and not processors (I dont know how nor have the resources to program them)

I hope this is written in a way that is easily understood...Thanks
 

beenthere

Joined Apr 20, 2004
15,819
Try 4 74151's. Each multiplexes 8 lines into 1, so they will do full or half stepping sequences.

You'll need an Up/Down counter (BCD) and a clock source - plus some transistors to drive current through the stepper coils.
 

SgtWookie

Joined Jul 17, 2007
22,230
Look at a 74x193; syncronous binary up/down counter.
If you clock the UP input, it counts up.
If you clock the DOWN input, it counts down.
Just use the QA and QB outputs.

Since it's a synchronous counter, you will not have "glitches" on the outputs.
 

Thread Starter

Metalfan1185

Joined Sep 12, 2008
170
If i used the 74193 would i still need to use the 4 bit Binary signal for the stepper? if you convert them to decimal, i think i need 6, 7, 10, 11.
 

SgtWookie

Joined Jul 17, 2007
22,230
If i used the 74193 would i still need to use the 4 bit Binary signal for the stepper? if you convert them to decimal, i think i need 6, 7, 10, 11.
I meant to just use Qa and Qb (bits 0 and 1) from the 74193, along with inverters to get the opposites (Qa\ and Qb\).

You don't have to worry about presetting/resetting the counter. It doesn't matter what the upper two bits are doing. However, you need to use a binary counter; a BCD counter will reset at inappropriate times.
 

Thread Starter

Metalfan1185

Joined Sep 12, 2008
170
Try 4 74151's. Each multiplexes 8 lines into 1, so they will do full or half stepping sequences.

You'll need an Up/Down counter (BCD) and a clock source - plus some transistors to drive current through the stepper coils.

The IC that i pulled off of the board has MOSFETS for the output stages. So the main High Current side is covered. All im trying to do, is use a clock source to control the speed, and an option to change it's direction. I think if i give the Driver IC the Binary Numbers in succession, (7,6,10,11,7,6,10,11, and so on) and reverse succession, This may allow me to change direction. And by changing the clock speed either way, that will change the speed.


There is something listed on that datasheet as "2 Phase" operation, would this offer more speed or torque over driving it a different way? I want it to have as much torque as possible.
 

Thread Starter

Metalfan1185

Joined Sep 12, 2008
170
I meant to just use Qa and Qb (bits 0 and 1) from the 74193, along with inverters to get the opposites (Qa\ and Qb\).

You don't have to worry about presetting/resetting the counter. It doesn't matter what the upper two bits are doing. However, you need to use a binary counter; a BCD counter will reset at inappropriate times.

Ahhh! This just may be the solution! I mis-read it the first time. I understand it now!

Very Much Thanks, why didn't i think of that?!!!
 

Thread Starter

Metalfan1185

Joined Sep 12, 2008
170
Wow, forget all that BS, i think im going to order some of those chips!

The motors I have a Uni-polar (they have 2 center tapped coils) but i think if i left the centers disconnected it would do the same thing.

1 Question though, I see a clock input for the speed, how do you reverse the Motor?
 

SgtWookie

Joined Jul 17, 2007
22,230
Wow, forget all that BS, i think im going to order some of those chips!

The motors I have a Uni-polar (they have 2 center tapped coils) but i think if I left the centers disconnected it would do the same thing.
Yes, you can use unipolar steppers as bipolar by ignoring the center tap if you wish. You can obtain more torque from them in bipolar mode, since you can pass current both ways; in unipolar mode you only pass current one way.

Bipolar steppers are more difficult to drive due to the reverse current requirement; you need an H-bridge for each coil. IC's like I mentioned in the prior post incorporate two complete H-bridges along with logic to control them, which greatly simplifies driver complexity.

However, you could benefit by experimenting with the steppers in unipolar mode. It's quite common to source current to the center taps of the two windings, and use Darlington transistors to sink current from the ends of the windings. You can get Darlington drivers in IC's like the ULN2803A and ULN2804A, both have eight Darlington pairs with internal protection diodes.

1 Question though, I see a clock input for the speed, how do you reverse the Motor?
There is a CW\/CCW input. When held low, each clock causes the motor to step clockwise; when held high, each clock causes the motor steps counter-clockwise.
 

Thread Starter

Metalfan1185

Joined Sep 12, 2008
170
Thanks, you guys are great! Im going to look for some of those IC's and see if i can get some soon.

Im new to stepper motors, i know how they work, but unsure of the many ways to drive them
 

SgtWookie

Joined Jul 17, 2007
22,230
Before you go ordering things, tell us more about your stepper motors.

What is their rated voltage and current?

Since they are unipolar, the voltage rating will be for the center tap to the ends of the coil.

If you are going to use them in bipolar mode, you'll need twice the voltage, same current.
 

Thread Starter

Metalfan1185

Joined Sep 12, 2008
170
ok, well they are 4V, 1.8 deg/step


and another is 3.7V, 1.8 deg/step

my dad said they are a something 16, which is a size i suppose...

i just want to rig one or two up so i can control the direction and speed, like, maybe try and use one to slide out a shelf or something...

but that would need something programmable, i have no expierience with programmable IC's, the tutoriaLS THAt i have read make it sound so complex. clocks and buffers and address lines and crap...im lost lol
 
Top