Instructables

2 input stepper driver

Picture of 2 input stepper driver
Picture 40.jpg
Picture 41.jpg
hi again,
this is my third project, it turned out very useful,so i'd like to share it with people.

overview:
i have a parallel port with only 6 functioning data outputs.
so i think twice before i do something.
for example,controlling two stepper motors at once.or sixteen at once etc..
there are probably tiny chips out there that do what my device does,but i like designing stuff.

this device accepts,only two inputs, a clock line (pulse), and a direction line for our motor.
and magically,it outputs the right sequence of bits to drive the motor with its four outputs.
i use it with my parallel port,but it can also be driven with a 555 timer,or any other clock source.
 
Remove these adsRemove these ads by Signing Up

Step 1: Step1

a disclaimer,
this device is tested on my system,and works with the parts that i have, and i don't have extensive electronics knowledge ,so be careful before you hook this up to your computer,and do your math twice. i can't be held responsible for any damage to your equipment or if you hurt yourself.
i have a very old computer that i don't care about,and many transistors to burn.so i simply build the circuit,and try it out.
luckily this circuit turned out great,and powerful.

a little theory:
i have two kinds of steppers,4 cables and 6 cables.however they both require 4 control cables.
the stepper is a great toy to play with,but it won't start directly right after you apply some voltage.
you have to send the data in a sequence.so that the coils start making the armature turn.
here is the sequence i found out thru trial and error,plus some google search.

o1 o2 o3 o4
0 0 0 1
0 0 1 1
0 0 1 0
0 1 1 0
0 1 0 0
1 1 0 0
1 0 0 0
1 0 0 1

while it is easy to create this sequence thru the parallel port using four outputs,we can create it using only two cables. one for the pulse, and the other for the direction.
go to step 2 to see how


crysisatutz3 years ago
I think you mean:
2^n = 8 => log_2 (2^n) = n = log_2 (8) = 3 <=> n = 3
ok so wears the chip dieagram so someone could build one for there self its kind of hard to know wear everything goes
laci375 years ago
You could upload a bit better image, the resolution is very low.
westfw6 years ago
Are you set on designing your own circuit or do you want pointers to other circuits? Your approach, where counted states are translated to different bit patterns, is a pretty classic approach to such problems. You MIGHT get a simpler circuit by using a shift-register instead of a counter, since the output somewhat resembles shift register outputs anyway. The usual stepper sequences are 4 steps; you seem to have a "half step" sequence that adds quite some complexity. Is that intentional? (In fact, there's a "simple" drive pattern that just has a single 1 circling a 4 bit shift register.) You should have base resistors before the transistors. 2n3904s are pretty wimpy for stepper drivers. You need protection diodes on the transistor outputs to keep the back EMF from the motor coils from frying the transistors. NPN transistors pretty much need to switch "low side", with the load between +V and the transistor, with the transistor emitter connected directly to ground.
dvlfrnd (author)  westfw6 years ago
Thank you very much for your reply westfw. i actually built the circuit and it works fine to my luck. the circuit isn't intended to drive the motor directly,its purpose is to create the sequence i wanted.i use its outputs to trigger other gates to drive the motor. so i have 2 different modules in my mind,this for the sequence and a simple one to drive the motor.i'm currently using 4 2n3904's on another circuit,which are being triggered as gates to drive the motor,but i appreciate it if you could recommend me a better transistor to use. while it gets very hot in the process,this circuit still can directly drive the stepper that i have, at an acceptable torque.but you are definitely right,i will add protection diodes and base resistors as soon as i can. the sequence is intentional.i found out by trial and error,that those half steps create a smoother,stronger motion in my case.and it is that sequence that made things complex. I also built a much simpler circuit that uses capacitors to create the half stepping effect,but i need to experiment more on it to get the values right. other than that,it looks promising.i'm planning to use the 2 bit data selector that i made to drive it. Thank you again
westfw dvlfrnd6 years ago
2n2222a transistors have considerably higher current ratings than 3904s, but motor drivers traditionally start looking at "power" transistors or darlingtons like the TIP series (or IC-based transistors like ULNxxxx)

Micro-guy that I am, I can't help but notice that a microcontroller would make the whole thing (except the power section) a lot more obvious and perhaps cheaper (assuming software and development environment is free.) (PIC16F54 = $1, ULN2803= $0.75, drives two steppers... (digikey Q 1 prices.))
dvlfrnd (author)  westfw6 years ago
i'm going through a learning process, i build these things out of curiosity,and to understand the inner workings of single chip solutions. i don't feel too comfortable with electronics yet,once i feel more or less complete with the theory and concept of the electronics world,i will start using more compact solutions. i already have 2 pic16f84's and 2 at90s2313's, but i don't want to start with them without having a solid foundation. i know there exists enough knowledge in google,to build something and run it smoothly without actually knowing anything about it as long as you're good at following instructions,however my primary goal is to learn,rather than making something that works for school or any other reason. it might sound weird,but that's how i am, i learned assembly before i learned C++ . Thank you for your reply, i added the 2n2222a and ULN to my shopping list.
westfw dvlfrnd6 years ago
That's fine. It's just that one of the turning points in my life was when I realized that I could program most of the electronics projects I had ever built on a general purpose piece of hardware, instead of having to build separate specialized hardware for each one. And I'm happy to pass on that thought when it seems appropriate :-)
dvlfrnd (author)  westfw6 years ago
Thank you westwf, i totally agree with you,that turning point probably boosted your productivity,and helped you finish what you started,sooner and better,adding a huge amount of desire and motivation for other projects,and i hope to get there soon :)
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!