Let's Make Robots!

Driving One Stepper Motor With L293D Using Two Pins

Question: Is it correct, that when I solder the following circuit there are only two pins nessessary
from the microcontroller to the L293D to drive a unipolar stepper motor ?

Answer: Yes. That is correct.


Question: Are the two NPN transistors and the 10kOhm pull-up resistors responsible for the signal inversion?

Answer: Yes. That is correct.


 

(Circuit from here)

There is a lot of information about the L293D on LMR and the web. But somehow I'm still unsecure if this circuit makes it possible to drive the stepper motor with only two control cables from the microcontroller to the L293D.

The stepper motor I use is the 28BYJ-48. With this stepper motor you need to make the following wiring:

  • Pink  is 1 out
  • Orange is 2 out
  • Yellow is 3 out
  • Orange is 4 out

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Basically what I'm saying is:

  • you have no way of switching current of in your coils, they are both fully loaded all the time.

I would call it waste of energy, and a lot of heat you need to get rid of.

  • you could go with 10K base current limiting resistors, and maybe lowering the collector pull-ups to say 1K

 

This is the NPN transistor I use: S8050 D331 NPN Transistor 

There is a nice complement IC that creates the needed pulses for the L293. It's name is L297. You feed it Direction, Step and other settings like full step or half step if I remember correctly.

Regarding your schematic, it seems correct and I think it will work fine.

Or you could use a ATmega8 instead of the L297, then you could code the exact behavior you want. At least thats what I'm working on. Commands on serial io, 4 pins to the darlington drivers, and a few end-stop switch inputs to reset internal position counter. 

And the ATmega8 goes for $1.5 where the L297 is $1.6, both on ebay, one piece, including shipping!

Ok, maybe it's stupid, these days I seem unable to comment anything without advertising the ATmega8.... make your own judgment.!

Pins 1 and 9 have to have a signal to drive either side, don't they?   I'm not sure if just holding them high will do it. The "two pin" system you usually hear about is two pins per bridge-one to control the high-low (forward/reverse) logic of the motor on that side and one sending a PWM signal to control the speed.  The inverter on one pin sacrifices the ability to "brake" that you would have by dedicating three pins per side.  I'm guessing that for a Bipolar Motor (and I've never used one) that you need 4 pins to control it in the same way.  Something like this:

(This is just a guess-I'm not an engineer by any means.)

Incidentally, does anyone have a logic table for a Bipolar Motor on a dual H-bridge?  I'm curious to see how it breaks out.  Otherwise I think your circuit looks good, but I am always curious about the choice to use Transistor Gates when it takes fewer components and fewer solder joints to insert a 4069 or a 74HC14 in the circuit.  Is it just part availability? 

Full Step

A B C D
 1 0 0  0
 0 1 0  0
 0 0 1  0
 0 0 0  1

Half Step

A B C D
 1 0 0  0
 1 1 0  0
 0 1 0  0
 0 1 1  0
 0 0 1  0
 0 0 1  1
 0 0 0  1
 1 0 0  1

Looking at the schematic and labeling from lower left around clockwise, half stepping 'should' not be a possibility.

C1 C2  A B C D
 0    0   0 1  1 0
 1    0   1 0  1 0
 0    1   0 1  0 1
 1    1   1 0  0 1

Based on what I think I know, I can't see how the above circuit will function. 

The stepper in my project carries a payload with a weight of about 40 grams.