MotorShield with PWM

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
longkmt
 
Posts: 4
Joined: Mon Mar 11, 2013 11:06 pm

MotorShield with PWM

Post by longkmt »

Hi,

I have the same motorshield from adafruit:
Image

For now the motor shield can control up to 4 DC motors, but I need to control two more DC motors. As I know the shield is using 4 PWM signals from 4 out of 6 PWM output pins from the Arduino Uno. Is there anyway we can use the other 2 remaining PWM to control 2 motors using an additional H-bridge circuit?

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

Re: MotorShield with PWM

Post by adafruit_support_bill »

There are a couple of approaches to this:

If you do not need direction control for some motors, those motors can be controlled with just a PWM pin and a transistor.
If you do need both direction and speed on all motors, you could hook up another H-bridge chip with some of the unused pins. Or you could look into some of the serial motor control modules from Pololu.

longkmt
 
Posts: 4
Joined: Mon Mar 11, 2013 11:06 pm

Re: MotorShield with PWM

Post by longkmt »

Which PWM pins on the Arduino will connect to the Servo pins on the shield? Are they pin 9 and 10?

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

Re: MotorShield with PWM

Post by adafruit_support_bill »

Yes. 9 & 10 are the servo pins.

longkmt
 
Posts: 4
Joined: Mon Mar 11, 2013 11:06 pm

Re: MotorShield with PWM

Post by longkmt »

Great, I am using L293d H-Bridge. 2 PWM signals from the Servo will go to pin 1(EN) and Motor Logic 2A (pin 7), I still need one digital pin which will go to Motor Logic 1A (pin 2). I guess I can use pin 4,7,8 or 12 from the Arduino, but I don't know how they are connected to the shield. In other words, I want to know which pins on the shield are connected to pin 4,7,8,12 on the Arduino?!

Image

Thanks!

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

Re: MotorShield with PWM

Post by adafruit_support_bill »

In other words, I want to know which pins on the shield are connected to pin 4,7,8,12 on the Arduino?!
It's in the FAQ: http://learn.adafruit.com/adafruit-motor-shield/faq

longkmt
 
Posts: 4
Joined: Mon Mar 11, 2013 11:06 pm

Re: MotorShield with PWM

Post by longkmt »

Oh thanks a lot!

Zenock
 
Posts: 3
Joined: Tue Mar 12, 2013 7:06 pm

Re: MotorShield with PWM

Post by Zenock »

Hi:

Would it be correct to assume that all motors, DC and Stepper, must use the save voltage? For instance I couldn't use a 24 V power supply and a 24 volt motor and a 6 volt motor?

Or is there a way one could do this?

Z

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

Re: MotorShield with PWM

Post by adafruit_support_bill »

@Zenock: All would need to use the same voltage.

Zenock
 
Posts: 3
Joined: Tue Mar 12, 2013 7:06 pm

Re: MotorShield with PWM

Post by Zenock »

Could I cut the lead to PIN 8 on one of the chips and wire in a voltage regulator?

Also, If I understand correctly, the servos runs off 5 V even if I'm running the motors off 24 volts? Is this correct?

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

Re: MotorShield with PWM

Post by adafruit_support_bill »

Could I cut the lead to PIN 8 on one of the chips and wire in a voltage regulator?
Yes. That is possible.
Also, If I understand correctly, the servos runs off 5 V even if I'm running the motors off 24 volts? Is this correct?
Normally true. Although a separate supply for servos is possible as described in the FAQ: http://forums.adafruit.com/viewtopic.php?f=31&t=26873

Zenock
 
Posts: 3
Joined: Tue Mar 12, 2013 7:06 pm

Re: MotorShield with PWM

Post by Zenock »

Thank you so much. You are AWESOME.

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

Return to “Arduino Shields from Adafruit”