Pages: [1]   Go Down
Author Topic: Multiplexing Stepper motors  (Read 781 times)
0 Members and 1 Guest are viewing this topic.
Ontario
Offline Offline
Jr. Member
**
Karma: 0
Posts: 61
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everyone,
In an effort to free up some pins on my Uno, I've come up with a multiplexing schematic for the three stepper motors.  This hopefully allows me to free up 5 pins, drive all three motors from one ULN2004a, and drop one of the control IC's.  The idea is to drive all three motors with the same ULN2004a outputs, but control via NPN transistors which of the motors motor actually have 5v provided in order to actually obey those outputs.  I understand that the trade off is that I'd be only able to control one motor at a time, which if acceptable for this project.

I'd like some input if what I've built drawn out is practical before I start pulling apart my breadboard and re-writing code.

Two drawings attached - before and after the multiplexing.

Cheers
Peter



* CatFeeder_circuit.gif (26.1 KB, 806x569 - viewed 32 times.)

* CatFeeder - multiplexed.GIF (25.44 KB, 995x695 - viewed 35 times.)
Logged

Peter

Arduino and electronics newbie... but enjoying what I'm learning

Offline Offline
Edison Member
*
Karma: 8
Posts: 1341
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Very cool!  You could probably drive 4-5 tiny 28BYJ motors with only 4+n pins and 1 IC.  As long as they were going slow.  These motors don't need any power between steps because of the 64:1 gear drive.  They could all move at the same time!  Independently controlled. 
Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33295
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The resistors R5 to R7 at 1K are going to severely limit the current you can get through your motor to 5mA at the maximum.
Driving an NPN transistor like this is not a good idea. Make it a PNP transistor, with the emitter to +5V and collector to the motor and don't have a resistor, apart from putting one in line with the base and arduino output.

The only problem I can see is if you switch onto a motor and the energisation of the coil were not the same as when it was last on. This could give it a small kick that would upset the position of the motor you thought you had.  
Logged

South Texas
Offline Offline
Edison Member
*
Karma: 8
Posts: 1024
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Might be simpler to get several ATtiny2313's and program them to do the step sequence - they then drive the transistors and you would need 2 Arduino pins per motor.

Here is some of the explanation of what I did and how I went about it.
http://arduino.cc/forum/index.php/topic,84809.0.html

It can be done with Arduino, or if you want faster speeds you could use Assembly - If you are interested I can get you the .hex files.

Logged

Pages: [1]   Go Up
Jump to: