DRV8838 only drives forward [SOLVED]


I understand the title make it sound like this previous thread but I could not figure out my issue with it.

I’m using the DRV8838 motor driver to control a 7V input to a lego motor from a raspberri pi zero. Here’s a picture (motor replaced with a multimeter until I get this right):

The 7.2V battery pack feeds the driver at VIN/GND, then feeds a step converter (S13V20F5) to get a 5V current into VCC/GND (ie GND is shared). The pi is fed via USB for now.

My issue is that I can drive the motor forward (phase=0, enable=1) but not backward (phase=1, enable=1).

Here’s a closeup on the driver soldering job:

What I checked/validated (using a multimeter):

  • the “backbone” circuit is properly built. I get around 8V at all plugs before the converter and around 5V after it.
  • phase/enable voltages out the rpi are as expected
  • VIN and VCC voltages on the driver are as expected
  • when I plug the motor, I can make it turn CC but not the other way around. When I plug the motor the other way around, it does turn clockwise. I also validated the motor by just plugging it on the 8V feed and it turns both ways depending on how it’s connected.

I measure voltage between OUT1 and OUT2 by routing the voltmeter right in between them (sorry about the approximate terminology, I’m still learning the technical linguo) as seen in the picture, as if the multimeter was the motor. Is that an issue?

  • with phase=0 and enable=1 I read 8V in between O1 and O2.
  • with phase=1 and enable=1 I read 0V in between O1 and O2. Same thing when plugging both phase and enable on VCC, as I’ve seen suggested elsewhere in the forum. I should expect -8V, right?

The final assembly will have 3 motors so I have 3 DRV8838 drivers to test from, and they all behave the same way, so I assume it’s not one broken driver, but I’m just out of ideas what to test for. Let me know if more picture would help.

Edit: both phase and enable pins are set with a frequency of 100Hz on the pi, not sure if that’s relevant here.

Wow I found the issue myself!

I did read in the DRV8838’s page that

Ground connection points for the motor and logic power supplies. The control source and the motor driver must share a common ground

And thought this was about both GND on the driver, but it means the rpi (or whatever is the source of PHASE and ENABLE), and driver’s GND.

To fix it in my case, I unplugged the USB power and replaced it with one of the 5V plugs coming out the converter. Everything shares the same ground now, and I’m able to turn the motor both ways.

So glad I could fix it myself!

1 Like