Two DRV8835, RaspberryPi B+ and 4 DC motors


  1. I want to control a robot driving platform with 4 DC motors by 2 DRV8835 Dual Motor Driver Carriers. How to connect them to Raspberry Pi B+ and how to control DC motors for directions and speed by using any python library…?

  2. I would like to make a module consist of two DRV8835 Dual Motor Driver Carriers because I can not find nothing like this in pololu offer as douther-card with power for RaspberryPi B+ possibility. More - in future I plan to enchance this for servo control (I have no favourites one for this project).

  3. Finally I want to add someting for power - battery, charger which can charge battery, my module and RaspberryPi simultaneously by micro USB port (5V 2A wall-lug charger).

Any advice…?


Do you really need independent control of all four motors? Typically, you can connect all the motors on each side of your chassis in parallel to a single motor driver channel, which would let you get by with a two-channel driver. If this would work with your setup, I recommend you consider our new Pololu Dual MC33926 Motor Driver for Raspberry Pi, which can handle more than twice the current of the DRV8835.

If you have a large number of servos to control, you might be able to use one of our Maestro servo controllers, which can be controlled by serial commands over a USB virtual serial port.

We do not have any products designed to charge batteries from a USB power source. However, there is a header and the appropriate power source selection circuit on the Dual MC33926 Motor Driver for Raspberry Pi I mentioned above to use one of our voltage regulators to power a Raspberry Pi from different types of batteries.


I just modify my copy of and from site to drive not only 2 but also 4 motors. After that I was trying to run with 2 modules and 4 motors connected but… nothing happend. None of motors was running during this test. After many hours of trying I prepared version of files and to work only with one motor (with only one module DRV8835) and… it was work! My one-motor wheel just spinnied up and down properly :slight_smile:

Maybe product “Pololu DRV8835 Dual Motor Driver Kit for Raspberry Pi” have sth else to working with 2 motors than “DRV8835 Dual Motor Driver Carrier”…? I was trying also with 20kOhm resistor between MODE pin and 3.3 V on RaspberryPI - in this case I have no luck to run anything from example. Maybe I should to try connect this pin with some GPIO and set for HIGH…?

Anyway - I want to control 2 motors on one module DRV8835 at the same time - any advice…?
So… I should to chcnge the name of topic for… “My module DVR8835 not working with 2 motors” (1.26 KB)


There are only two hardware PWM pins on the Raspberry Pi B+ GPIO header, so you can only achieve full control of two motors. Connecting one of the PWM pins on the Pololu DRV8835 Dual Motor Driver Kit for Raspberry Pi to a GPIO pin on the Raspberry Pi that is driven high should cause the motor attached to that channel to run at full speed. However, motor speed control using hardware PWM will not be available and I would not expect our PWM code to work with other pins that do not support hardware PWM.

If you need variable speed control for additional motors with the Raspberry Pi, you might be able to use something like our Pololu Qik Dual Serial Motor Controllers, which can be controlled using a TTL serial port, or our Simple Motor Controllers, which can be controlled using a TTL serial port, or a virtual serial port over USB connection.

It sounds like you are now having troubles driving 2 motors using one Pololu DRV8835 Dual Motor Driver Kit for Raspberry Pi board. Have you tried this with an unmodified board and unmodified code?