1

I've got an Arduino Uno and two Sparkun's Monster Motor Shields. The aim is to control 4 motors.

There is no problem to control 2 DC motors with single motor shield. There's a manual on how to do it .

But how can I control all of motors (address commands to each of them) when I stack motor shields one on one?

Thanks in advance.

migrated from electronics.stackexchange.com Apr 12 '15 at 16:37

This question came from our site for electronics and electrical engineering professionals, students, and enthusiasts.

  • I actually wouldn't stack them. Check which inputs you have on the boards and which outputs you'll take for them on your arduino. Then wire them seperately. Or you could put one in the arduino and wire the other induvidually. Why do you actually need two motor shields if I may ask? – Paul Apr 14 '15 at 16:42
  • I need a 4WD vehicle being able to carry 50 kgs of weight. Splitting this load between 4 wheel drives helps find cheaper DC motors with moderate characteristics. That's it. Any ideas? – llaabbss Apr 14 '15 at 18:48
  • You can make it 4WD with one motor shield. Use one output for the left side and one for the right side. And I guess you should then wire the motors parrallel as then they'll have their own power circuit. This way you also avoid any possible driving mistakes, where you try to put both motors on one side against eachother. – Paul Apr 15 '15 at 6:47
  • can you please share the UNO to Monster Motor Shield pinout diagram please... and which Arduino code did you use with this combination? your help will be much appreciated. thanking you in advance. – saintofinternet Jul 14 '16 at 7:11
  • A shield is simply a PCB that fits on an Arduino. You cannot stack them, because then they would use the same pin layout. Instead, connect each shield to different pins based on the requirements set in the documentation of the shield. – Len Jul 14 '16 at 8:11
1

Not really the answer to your question, but an alternative solution, which has proven to work in my case. We were working on a line-following robot with an ATMega 328P (Same as arduino, but withouth shields) and thus we wired an shield directly. For the shield we used, we only needed 4 inputs (pwm left, pwm right, direction left, direction right). Try to find out what your shield is using, on which pin, and you can drive the shield directly withouth stacking them (as they then would use the same pin).


My alternative solution would be to use 1 driver. And wire the motors parrallel. If you choose to use 1 shield, you can stack it. But for other shields you have to check which pins to use. There is no drawback on using one shield, the only thing is that the motor driver will draw more current, but they're basically designed for this. motor driver schematic

  • 1
    Thank you pals! I have just decided to refuse using 2 shields at the same time because of possible driving mistakes. Converting my device into a tank is indeed a solution. Well, at least it'll drive more predictably. Thank you all one more time :) – llaabbss Apr 15 '15 at 13:06
  • You don't actually need to use threads/tracks on your 'car' (though it does look cool). In our application it actually worked with 4 wheels. Steering, would otherwise also need a servo. Consider accepting this solution as an 'answer' by pressing the ✓ – Paul Apr 15 '15 at 13:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.