multiple motors

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
gradient
 
Posts: 81
Joined: Mon Sep 28, 2009 12:17 am

multiple motors

Post by gradient »

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?

User avatar
adafruit_support_bill
 
Posts: 88088
Joined: Sat Feb 07, 2009 10:11 am

Re: multiple motors

Post by adafruit_support_bill »

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.

User avatar
gradient
 
Posts: 81
Joined: Mon Sep 28, 2009 12:17 am

Re: multiple motors

Post by gradient »

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?

User avatar
adafruit_support_bill
 
Posts: 88088
Joined: Sat Feb 07, 2009 10:11 am

Re: multiple motors

Post by adafruit_support_bill »

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.

User avatar
gradient
 
Posts: 81
Joined: Mon Sep 28, 2009 12:17 am

Re: multiple motors

Post by gradient »

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.

User avatar
adafruit_support_bill
 
Posts: 88088
Joined: Sat Feb 07, 2009 10:11 am

Re: multiple motors

Post by adafruit_support_bill »

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.

User avatar
gradient
 
Posts: 81
Joined: Mon Sep 28, 2009 12:17 am

Re: multiple motors

Post by gradient »

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?

User avatar
adafruit_support_bill
 
Posts: 88088
Joined: Sat Feb 07, 2009 10:11 am

Re: multiple motors

Post by adafruit_support_bill »

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.

User avatar
gradient
 
Posts: 81
Joined: Mon Sep 28, 2009 12:17 am

Re: multiple motors

Post by gradient »

That sounds great. I will give them a shot. Thanks a lot for your help.

User avatar
gradient
 
Posts: 81
Joined: Mon Sep 28, 2009 12:17 am

Re: multiple motors L293

Post by gradient »

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.

User avatar
adafruit_support_bill
 
Posts: 88088
Joined: Sat Feb 07, 2009 10:11 am

Re: multiple motors

Post by adafruit_support_bill »

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).

User avatar
gradient
 
Posts: 81
Joined: Mon Sep 28, 2009 12:17 am

Re: multiple motors

Post by gradient »

Wow, that's amazing. I will check these out and see if I can get them working. Thanks a lot.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”