lipoja / AMSpi

Python class for controlling Arduino Motor Shield L293D from Raspberry Pi (using RPi.GPIO)
MIT License
33 stars 18 forks source link

When just one specific motor is turned on it doesn't work propely #11

Open mlamounier opened 4 years ago

mlamounier commented 4 years ago

Hi Jan, I'm try to using but I've a problema when I try turn on just a M3 motor. It start very slow or not start. When I turn on the four motors, everything is ok. I'm using raspberry pi 4 model B

Other issue, when I turn on the raspberry and motordrive together some motors start work unexpected

coding working:

amspi.run_dc_motors([amspi.DC_Motor_1, amspi.DC_Motor_2, amspi.DC_Motor_3, amspi.DC_Motor_4])    
time.sleep(3)

amspi.stop_dc_motors([amspi.DC_Motor_1, amspi.DC_Motor_2, amspi.DC_Motor_3, amspi.DC_Motor_4])

Not working propely :

amspi.run_dc_motors([amspi.DC_Motor_3]) time.sleep(3) amspi.stop_dc_motors([amspi.DC_Motor_3])

Zogoo commented 3 years ago

From blog comment: I also found that (as was written in a previous post) there is no regular ground connection between RaspberryPi and the motor shield. The only ground connection is used to pull pin 13 of IC 74HC595 to LOW. It would therefore be advisable to connect, for example, pin 6 (GND) from the RaspberryPi to one of the pins next to the 5V connection on the motor shield.

So you need to connect pin 6 (Raspberry) to GND of 74HC595 chip.