multiple motors
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- gradient
- Posts: 81
- Joined: Mon Sep 28, 2009 12:17 am
multiple motors
Hi, do you know a good way to turn on and off multiple motors and also be able to change direction? These are very small dc motors and only need only 1.5 volts for what I'm doing. I am turning them on quickly for (delay 70) and then off. I am using uln2803 chips to give them voltage. The problem is getting them to go in the other direction - is there a really simple way to do it? Or, could I use something like the LoL shield (replacing the leds with motors) since this is such low voltage?
- adafruit_support_bill
- Posts: 88088
- Joined: Sat Feb 07, 2009 10:11 am
Re: multiple motors
To reverse them, you need an H-bridge. The L293D dual H-bridge chip will handle 2 small motors each. The Adafruit MotorShield has 2 L293Ds for a total of 4 motors.
- gradient
- Posts: 81
- Joined: Mon Sep 28, 2009 12:17 am
Re: multiple motors
Ok thanks. But what would you suggest if I need to make more than 4 motors change direction?
Is there a way to expand the motor shield?
Or, what would be much better... since I'm using ULN2803 transistors already, is there a way to make a simple H-bridge with these?
Is there a way to expand the motor shield?
Or, what would be much better... since I'm using ULN2803 transistors already, is there a way to make a simple H-bridge with these?
- adafruit_support_bill
- Posts: 88088
- Joined: Sat Feb 07, 2009 10:11 am
Re: multiple motors
To build an H-bridge out of discrete transistors, you need both PNP and NPN types to handle the reversing. It is probably easier (and less expensive) to buy a few L293D chips.
Someone figured out a way to run 2 stacked motor shields. If you search these forums you can probably find it.
Someone figured out a way to run 2 stacked motor shields. If you search these forums you can probably find it.
- gradient
- Posts: 81
- Joined: Mon Sep 28, 2009 12:17 am
Re: multiple motors
Thanks a lot, that seems like it could be simple to wire.
Do you know if that chip is hooked up similarly to the uln2803, ie, is it basically Vcc, Ground, and connected to a pin on the board (or two pins). I am also wondering if I can use one Vcc for both Vcc1 and Vcc2. I have a very low voltage of only 1.5-2 volts. Could I have only one supply for both? Thanks a lot for your suggestion.
Do you know if that chip is hooked up similarly to the uln2803, ie, is it basically Vcc, Ground, and connected to a pin on the board (or two pins). I am also wondering if I can use one Vcc for both Vcc1 and Vcc2. I have a very low voltage of only 1.5-2 volts. Could I have only one supply for both? Thanks a lot for your suggestion.
- adafruit_support_bill
- Posts: 88088
- Joined: Sat Feb 07, 2009 10:11 am
Re: multiple motors
You will need 5v for the logic and about 3v for the motors (there is about a 1.2v drop through the H-bridge). You could run them both at 5v and throttle back on the motors by using PWM. Separate supplies is usually recommended, due to the brush noise from the motors.
- gradient
- Posts: 81
- Joined: Mon Sep 28, 2009 12:17 am
Re: multiple motors
ok, so maybe I could have the 5v from my arduino mega power the logic of the chips and then have my extrnal power for the motors set at that 3 or so. would i be able to get away with those two power supplies for 5 of these chips?
- adafruit_support_bill
- Posts: 88088
- Joined: Sat Feb 07, 2009 10:11 am
Re: multiple motors
That should work. The chip logic will not need much current and should work fine from the Mega regulated supply. The motor supply should be sized for whatever the motors are rated for.
- gradient
- Posts: 81
- Joined: Mon Sep 28, 2009 12:17 am
Re: multiple motors
That sounds great. I will give them a shot. Thanks a lot for your help.
- gradient
- Posts: 81
- Joined: Mon Sep 28, 2009 12:17 am
Re: multiple motors L293
I got the L293d chips in the mail and got them working really well. They reverse the motors like a charm. Thanks for your advice.
What I'm wondering now is: what is the best way to approach using 30 + or so motors in this way? Would I just use a whole slew of these chips in a row (they take 3 pins on the ardunio, however, per motor). Or could I combine something like the 16-Channel 12-bit PWM/Servo Driver ? Or is there a breakout board to help with this?
Thanks a lot for your help.
What I'm wondering now is: what is the best way to approach using 30 + or so motors in this way? Would I just use a whole slew of these chips in a row (they take 3 pins on the ardunio, however, per motor). Or could I combine something like the 16-Channel 12-bit PWM/Servo Driver ? Or is there a breakout board to help with this?
Thanks a lot for your help.
- adafruit_support_bill
- Posts: 88088
- Joined: Sat Feb 07, 2009 10:11 am
Re: multiple motors
2 PWM/Servo drivers will give you 32 PWM signals for the speed control. For the direction control pins, you could use a few of these: http://www.adafruit.com/products/732
They are all I2C, so they can all run off the same 2 pins (A4 & A5).
They are all I2C, so they can all run off the same 2 pins (A4 & A5).
- gradient
- Posts: 81
- Joined: Mon Sep 28, 2009 12:17 am
Re: multiple motors
Wow, that's amazing. I will check these out and see if I can get them working. Thanks a lot.
Please be positive and constructive with your questions and comments.