I’m building a robot with four DC motors and I’d like to control all four motors from one Raspberry Pi. To this end, I bought two separate dual G2 motor driver boards. I can take care of remapping control pins myself, but I am concerned about the power regulation given that I want to run the RPi off the same batteries as the motors. If I stack the motor controllers and power each one off a different battery bank, will the power regulators on the boards share the load of powering the RPi without frying these nice, expensive boards? If one battery bank starts running low, will the other board pick up the slack?
(There are a bunch of topics about stacking the Arduino motor controller shields but I’m using the Raspberry Pi ones.)
Our Dual G2 High-Power Motor Drivers for Raspberry Pi have a built-in ideal diode circuit that makes it safe to connect another 5V source to their 5V output, so connecting the two 5V outputs on the drivers will be fine. However, how the regulators will share the load is not an easy question. The RPi is not necessarily going to draw power from both supplies evenly, or all from one supply or the other. If you want to make sure you know where power for your RPi is coming from, you could disconnect the regulator on one of the drivers from the 5V output. To do that you would cut the traces indicated in the picture in the Power section of each driver’s product page.
By the way, in case you have not already thought about it, the Raspberry Pi has at most 2 hardware PWM outputs, so if you want to independently control 4 motors, you might need to write a program for using software PWM, which could be tricky since the RPi does not have a real-time operating system like a standard microcontroller. You might also look into this RPIO.PWM library that does semi-hardware PWM.
Thanks Claire! That’s very helpful.
Next time I need parts I’m checking Pololu first.