I need to control 5 motors so i will need 3 Ardumoto shields.
Is there a way to stack those shields in order to control each motor?
I've been looking up on the internet and i didn't find something satisfying but i've been thinking :
I have a breadboard and only the GND, 5V, 3V3, RESET, and AREF pins are in common. Is there a way to put the shields on the breadbord and put a wire from Arduino's pwm pin (from 2 to 13) on Ardumoto's pwm pin (pwmA or B), and apply the same reasoning regarding the directions pins ?
I need to control 5 motors so i will need 3 Ardumoto shields.
So a link would be good.
Is there a way to stack those shields in order to control each motor?
Generally, no. If the first shield uses pins 9, 10, 11, and 12, for instance, those pins won't be available to the shield above it. Since motor shields tend to use fixed pins, stacking a second one would be useless.
Is there a way to put the shields on the breadbord and put a wire from Arduino's pwm pin (from 2 to 13) on Ardumoto's pwm pin (pwmA or B), and apply the same reasoning regarding the directions pins ?
I put some stacking headers on my first shield, i stacked it on the controller so motor 1 and 2 belong to the pwm's pin 11 and 3.
Then i welded wires on PWMA and PWMB holes of the second shield and linked those wires to the first shield's pin 7 and 10 ( i've chosen those at random). I put stackin headers on the left side of the sheild (for the RESET, 3.3V 5V etc pins) and i stack shield 2 on shield 1.
Then i go like :
pinMode(11, OUTPUT); // Motor 1
pinMode(3, OUTPUT); // motor 2
pinMode(7, OUTPUT); // motor 3
pinMode(10, OUTPUT); // motor 4
and i try to make them rotate with the analogWrite() but only the 1 and 2 are working
Am i doing something wrong ?
Thanks for reading
EDIT : i've been thinking, is the AREF pin need to be connected too on the shield 2?
It sounds reasonable but means visualising the circuit and you may not have built it the way I'm imagining it. I suggest you post a drawing showing the connections you've made, and your code.
You should also be able to test the second and subsequent shields by removing the shield beneath them and connecting them directly to the Arduino (via your headers and wired connectors to map the pins). If your logic is correct, they should behave just the same when you connect them directly.
I don't have your Ardumotor shields but on the shields I've used there are various options to derive logic and motor power supplies either from the external power connector or from connections to the Arduino, and also options to power the Arduino 5V supply from the driver board. If you have any options like that make sure you understand them thoroughly and know how all the boards are being powered.