I am working on a project in which I need to use Arduino Uno and motor shield to control 6 different motors. The motor shield we are using right now is this one: http://www.ladyada.net/make/mshield/index.html However, it can only control up to 4 motors right now using 4 out of 6 output pin (PWM signal)
My question: is there anyway I can have 2 motor controller on a breadboard, with 4 wires connect the first 4 output pin to the first controller, the use 2 other wires to connect other output pins on the Arduino Uno to the second controller?
longkmt:
My question: is there anyway I can have 2 motor controller on a breadboard, with 4 wires connect the first 4 output pin to the first controller, the use 2 other wires to connect other output pins on the Arduino Uno to the second controller?
Yes I think you could do that. Or you could take the servo signals from the connectors on the shield you have and wire those to the 2'nd controller. The question is do you have enough other free pins to control the other signals needed ? (Fwd, Reverse, Enable and perhaps a Brake signal or their equivalents).
@ Mee_n_Mac: Right now the 1st motor controller lays on the top of the Arduino, they connect through around 20 pins. I know we can send PWM through 6 pin on the Arduino. However, I do not know how the motor shield actually reads those signals? Other signals from other pins I guess I can share them between 2 motor shields through wires.
Btw I just need to control the speed, direction of the motors. The AFMotor library give me setSpeed() and run() function which are pretty much all I need. What I want is to use PWM from the Arduino (which get analog signal from a gamepad) as conditions to decide when to speed up motor and when to change direction. I don’t know if my approach makes sense since I have no prior experience dealing with hardware stuff like this.
longkmt:
@ Mee_n_Mac: Right now the 1st motor controller lays on the top of the Arduino, they connect through around 20 pins. I know we can send PWM through 6 pin on the Arduino. However, I do not know how the motor shield actually reads those signals? Other signals from other pins I guess I can share them between 2 motor shields through wires.
Correct. The 2 PWM signals that are not used by your shield are sent directly to 2 connectors that are intended to go (along with 5V and GND) to 2 servos. The shield does nothing with/to them other than route them from the normal Arduino pins (9 and 10 I think) to the aforementioned connectors. See the schematic for the shield :
longkmt:
Btw I just need to control the speed, direction of the motors. The AFMotor library give me setSpeed() and run() function which are pretty much all I need. What I want is to use PWM from the Arduino (which get analog signal from a gamepad) as conditions to decide when to speed up motor and when to change direction. I don’t know if my approach makes sense since I have no prior experience dealing with hardware stuff like this.
Any 2'nd motor driver you will use will need at least some way of controlling the forward or reverse function. That's at least 1 pin and usually 2. The shield you have uses a shift register and has the Arduino clock out all the control signals serially into it and then has the shift register output them in parallel (presumably at the same time). What signals and pins you need will depend on the motor driver you choose. Then again I'm taking your post to mean that you want to control 6 motors. I'm not sure I'm interpreting this sentence properly :
What I want is to use PWM from the Arduino (which get analog signal from a gamepad) as conditions to decide when to speed up motor and when to change direction.
Sometimes it can be confusing when English isn’t your primary language.