DRV8833 DC/Stepper Motor Driver Breakout Board with Raspberr

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
AAurion
 
Posts: 5
Joined: Mon Oct 11, 2021 12:01 am

DRV8833 DC/Stepper Motor Driver Breakout Board with Raspberr

Post by AAurion »

Hello,

I'm trying to run a DC motor off my Raspberry Pi Pico, so I got this motor driver off Adafruit. I'm trying to follow a bunch of tutorials, and eventually gave up trying to find documentation in C and went with Micropython. Right now, both motors I have will make a little buzzing/whining sound, but not turn. I'm not sure if this means they're not getting enough power, or if something is wired incorrectly.

I've included a power supply module on my board, which is plugged into a 5V 1A wall adaptor, so I thought I'd avoid having inadequate power...
PXL_20211019_204632716.jpg
PXL_20211019_204632716.jpg (242 KiB) Viewed 376 times
This is the code that makes the whining noise:

Code: Select all

import utime
from machine import Pin

motor1a = Pin(14, Pin.OUT)
motor1b = Pin(15, Pin.OUT)

def forward():
   motor1a.high()
   motor1b.low()
   
def backward():
   motor1a.low()
   motor1b.high()
   
def stop():
   motor1a.low()
   motor1b.low()
   
def test():
   forward()
   utime.sleep(2)
   backward()
   utime.sleep(2)
   stop()
   
for i in range(5):
    test()
I appreciate any help, thank you!

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: DRV8833 DC/Stepper Motor Driver Breakout Board with Rasp

Post by adafruit_support_bill »

I don't see any common ground connection between the Pi and the DRV8833. All signals are measured relative to ground, so if there is no common ground, the behavior is unpredictable.

User avatar
AAurion
 
Posts: 5
Joined: Mon Oct 11, 2021 12:01 am

Re: DRV8833 DC/Stepper Motor Driver Breakout Board with Rasp

Post by AAurion »

adafruit_support_bill wrote:I don't see any common ground connection between the Pi and the DRV8833. All signals are measured relative to ground, so if there is no common ground, the behavior is unpredictable.
Oh, I thought that since I was supplying power from the power supply, the DRV8833 should be connected to ground from that? Is that not how it would work?

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: DRV8833 DC/Stepper Motor Driver Breakout Board with Rasp

Post by adafruit_support_bill »

Looks like you have two different power sources. There is no guarantee that their grounds are at the same potential. You need to have a solid ground connection between them to establish the reference voltage of your signals.

User avatar
AAurion
 
Posts: 5
Joined: Mon Oct 11, 2021 12:01 am

Re: DRV8833 DC/Stepper Motor Driver Breakout Board with Rasp

Post by AAurion »

adafruit_support_bill wrote:Looks like you have two different power sources. There is no guarantee that their grounds are at the same potential. You need to have a solid ground connection between them to establish the reference voltage of your signals.
I connected a ground pin on the Pico to the breadboard, where there's a ground connection going to the power supply, but the motor still makes the same whining noise...
2.png
2.png (811.3 KiB) Viewed 342 times

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: DRV8833 DC/Stepper Motor Driver Breakout Board with Rasp

Post by adafruit_support_bill »

What happens if you connect the AIN1 pin from the DRV8833 directly to 5v?

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”