Controlling a motor with DRV8835 on RPI 3 B+


I’m using the DRV8835 from here:

Also a Raspberry Pi 3 B+ Model

And a very small motor (I also tried w/ connecting one of them)

The connection setup can be found in the attached images, I’ll write here how it is connected:

Left part of the DRV8835 ( the left part is associated to the image that has only DRV8835 in it - third image ):

GND to GND of the battery

VIN to 7.2V of the battery (I’ll also try today w/ lower voltages)

O2 to + of motor

O1 to - of motor

Please note I also tried connecting another motor, It’s not connected in the images.

Right part of the DRV8835:

GND to GND of RPi

VCC to 5V connection in the RPi (I also tried the 3.3V option)

(B) IN2 is connected to GPIO 12 (PWM)

(B) IN1 is connected to GPIO 6

(A) IN2 is connected to GPIO 13 (PWM)

(A) IN1 is connected to GPIO 5

I’m using the github you posted on the RPi kit from here:

The problem is:

When I connected both the motors, one of them did work only driving it forward w/o reverse. The second one didn’t work at all.

I’ve no idea why this happens, and do I need to connect anything else (like a resistor) to make it work?

I didn’t purchase the kit of RPI 3b+ because I’ll need to make it work with older versions of RPi later (like RPi zero) because of weight constraints.


We did not notice your forum post before we responded to your email about the same issue yesterday, but I have copied my email reply below:

I am sorry to hear you are having trouble with your motor driver. You will need to solder the header pins to the DRV8835 board to make reliable electrical connections; simply resting the board on the header pins will not ensure reliable contact. Intermittent connections like this could also cause potentially damaging voltage spikes and other problems.

If you are new to soldering, the Adafruit Guide to Excellent Soldering might be a useful reference:

Tools | Adafruit Guide To Excellent Soldering | Adafruit Learning System

If you continue having trouble after soldering your connections, can you send me updated pictures?

- Patrick