Pca9685 servo board wiring error

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
mmollen1
 
Posts: 10
Joined: Sat Aug 14, 2021 3:55 pm

Pca9685 servo board wiring error

Post by mmollen1 »

I apologize for no diagram. My UNO sends i2C to an mcp23017. The mcp sends I2C to a PCA servo board. The board controls 4 servos. The board also sends pwm to two L293 Hbridges, so 2 channels per chip. The bridges manage 12volts for the motors. Everybody shares a ground. This is for N -scale model train. There are two other mcp’s in the system. Resistors are 4k7.
The arrangement can work fine for hours, then suddenly the pca9685 is partly fried(?). It can still drive servos, but produces zero volts on the other PWMs. The L293’s still run with PWM straight from the arduino.
I’d just use the arduino, but without knowing my mistake, I’ll just fry that too. Thanks in advance! Mark

User avatar
mmollen1
 
Posts: 10
Joined: Sat Aug 14, 2021 3:55 pm

Re: Pca9685 servo board wiring error

Post by mmollen1 »

From the author: it's an L298 H bridge not an L293.
Fritzing attached.

Thanks again!
Mark
Attachments
train 03_25_23a_bb.png
train 03_25_23a_bb.png (421.92 KiB) Viewed 110 times

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

Re: Pca9685 servo board wiring error

Post by adafruit_support_bill »

The path of the signal ground between the PCA9685 & the L298 is rather indirect compared with the signal itself. And part of it is shared with current return path for the motors. I would run a direct connection between the PCA9685 & the L298.

Motors are very noisy loads. They also tend to have spikey current demands - especially when starting up. This can cause 'ground bounce' in addition to all the brush noise.

Since everything is measure relative to ground, noisy grounds can cause all sorts of problems. It is best if the motors have a dedicated ground path back to their power source.

User avatar
mmollen1
 
Posts: 10
Joined: Sat Aug 14, 2021 3:55 pm

Re: Pca9685 servo board wiring error

Post by mmollen1 »

Thanks for your reply! I’m a little confused. I can let the L298 module rely solely on its power supply for its ground easily enough.
However, the only place the PCA9685 can share a ground with the L298 module is through the power ground.
Should I let the PCA9685 get its ground from its own power supply, and also its I2C ground?
In case you’re wondering, the 9685, 298, and UNO all ultimately get power from a 19V 4A 90W laptop power supply.

Thanks again!

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

Re: Pca9685 servo board wiring error

Post by adafruit_support_bill »

However, the only place the PCA9685 can share a ground with the L298 module is through the power ground.
Yes, you need to connect to the power ground terminal, but the signal ground should not share any wiring with the power ground.

Run a wire from the PCA9685 ground pin *directly* to the L298 board - just as you have with the signal wire. Do not route it through the breadboard and do not splice it into the motor power wiring.

This wire will serve as the ground reference for the signals. Since no motor current will be flowing through this wire, it will not be subject to 'ground bounce' effects from the motor loads.

User avatar
mmollen1
 
Posts: 10
Joined: Sat Aug 14, 2021 3:55 pm

Re: Pca9685 servo board wiring error

Post by mmollen1 »

OK. I understand the concept, but there’s nowhere on the L298 module to attach a ground. Just 4 “in” pins and 2 “enable” pins.

Maybe I’ll look for a different brand.

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

Re: Pca9685 servo board wiring error

Post by adafruit_support_bill »

You should be able to use the same screw-terminal connection as your power supply ground. Just twist the ends of the wires together before inserting into the terminal block.

User avatar
mmollen1
 
Posts: 10
Joined: Sat Aug 14, 2021 3:55 pm

Re: Pca9685 servo board wiring error

Post by mmollen1 »

Ohhhh, thanks! I thought that was the same as having them share a ground.

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

Re: Pca9685 servo board wiring error

Post by adafruit_support_bill »

Ultimately, all of the grounds need to be connected together. But the goal here is to minimize the common wiring so that your signal wires don't have motor current running through them.

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

Return to “Other Products from Adafruit”