Motor Driver won't work with separate power supplies

I’m trying to drive a motor with the DRV8838.

It will only work if the power supply for both the logic and motor is from the same source. For example:

  • Raspberry Pi PICO - if I plug VCC, VIN and both GND into the PICO power I can control the motor with the GPIO into ENABLE and PHASE. This works well, but I can only use a small motor.

  • Just a battery - If I plug VCC, VIN, both GND and ENABLE into a 5V battery it will spin the motor. If I then plug PHASE into the 5V it will spin the other way, as expected.

However, I can’t plug the logic and the motor into separate power sources.

  • If I try to power the Logic (VCC) with the PICO and power the motor (VIN) with the 5V battery it won’t work. Just to be clear, in this scenario I am wiring as follows:

Motor Side
Driver GND to Battery -
Driver VIN to Battery +
Driver O2 to Motor
Driver O1 to Motor

Logic Side
Driver GND to PICO GND
Driver VCC to PICO 3V3
Driver EN to PICO Pin17
Driver PH to PICO Pin 16

I’ve tried multiple motor drivers and multiple PICOS.

Any help will be greatly appreciated. I’ve been slowly losing my mind with this problem.

1 Like

You’ll need a common ground - try connecting the ground of your Pico to your negative battery terminal, or alternatively connecting both GND pins on the driver together.

Edit: Disregard, the grounds are tied on the under side of the board.
image
image

Are you sure you’re driving and have your Pico GPIO pins configured correctly?

Can you share your code?

2 Likes

Thanks for your help. I think I have figured out my mistake. I think the VCC should be connected to VBUS and not 3V3. I haven’t had a chance to test yet. I’ll test and then update this thread.

3 Likes

Oliver33 - You were correct. I needed to connect the grounds. Thanks very much for your help, I have regained my sanity!

4 Likes

No worries, though from the photos it does look like there’s continuity between the ground pads - guess not!

3 Likes

The GND pins are connected on that board. I just checked with a multimeter.
I think the problem was, as Christopher has stated, VCC to VBUS not 3V3.

Regards
Jim

2 Likes

Hi All,

Welcome to the forum Christopher!!

Excellent discussion, just curious myself did you run into any issues when trying to move the motor? A capacitor close to the Pico’s power in should help.

Liam

1 Like