Stepper motor on 2 pins?

darktone

New Member
This might be a really neive question, but I want to control 2 bipolar (4-wire) stepper motors using a picaxe 18x and still have some output pins left for something else, so I would like to be able to control each stepper with 2 pins rather than 4.

The stepping sequence on the datasheet of my motors is:

(A-NotA-B-NotB)
1-1-0-0
0-1-1-0
0-0-1-1
1-0-0-1

It seems to me that there are only 2 inputs needed here. I was thinking of using an L293D H bridge to drive each motor, in which case would it be feasible to take a 2-bit output for each motor from the picaxe (a and b), run them through a 4049 NOT gate to get the NotA and NotB and then use these 4 signals as the inputs to each L293D? I don't know if that would cause timing problems or anything like that (I did an electronics degree but I have forgotten most of it!)

I think it's a similar idea to that described in manual3 on Pages 14 and 15, but that is for a unipolar motor. I don't know if this is a sensible idea or if I would be reinventing the wheel or anything. Anyone have any suggestions?
 

hippy

Ex-Staff (retired)
I'm not sure you can generate the four step phases from two inputs using just NOT gates, but you could using a 2-to-4 decoder and some additional logic. You could use a latching shift register with just two output lines and a mechanism to do auto-latching once the register has been updated.
 

Mycroft2152

Senior Member
If you look closely at the pattern, the 3rd and 4th values are the inverse of the 1st and 2nd . An inverter will work.

1-1 0-0
0-1 1-0
0-0 1-1
1-0 0-1

Myc
 

darktone

New Member
It's not the phases I am trying to generate in logic so much as the trying to create the 4bit input necessary to drive a bipolar stepper from a 2 bit output

I thought it would work like this:

These would be the 2-bit ouputs sent from the pins of the Picaxe:

A-B
1-1 (sent for phase 1)
0-1 (phase 2)
0-0 (phase 3)
1-0 (phase 4)

As I understand it, if I were to NOT these to get the other 2 bits for each phase it should work, producing the following:

A-NotA-B-NotB
1-0-1-0
0-1-1-0
0-1-0-1
1-0-0-1

which are the inputs I would need to the H bridge to drive the motor.

The thing I am slightly iffy about is if I take 2 wires from one output pin on the picaxe, will each wire be able to trigger ttl logic (enough current/voltage), and will there be a sufficient delay through the not gate to cause a timing problem?

I might end up just giving it a go to see if it works
 

Mycroft2152

Senior Member
Darktone wrote: "The thing I am slightly iffy about is if I take 2 wires from one output pin on the picaxe, will each wire be able to trigger ttl logic (enough current/voltage), and will there be a sufficient delay through the not gate to cause a timing problem?"

What you are describing is called "fan out". Even back in the old days with the power hungry TTL chips, it was a cosnideration, but still a typical fan out was 5.

Now with the low power cmos chips there is generally no problem. go for it. :)

Myc
 
Top