PCA9685 i2c problem

I have made a custum board with an ATMega32u4 (sparkfun pro micro 3.3v bootloader), an IMU (BNO055) and a PCA9685.
When I run the i2c scanner script (from the arduino website) it only recognized the BNO055 (0x29), but not the PCA9685, which should be at 0x40.

It does also not react to the example sketch from the adafruit library.

The schematic is a clone of adafruits 12 Channel servo board, I assembled 3 boards so far and none of them is working, so a chip fault is unlikely.

The schematic is attached and yes: the i2c bus has pullup resistors.

Thanks for your help!

Moritz

Edit: This is the QFN version of the chip

Hi, I read your previous posts, and you didn't get many answers so far :cry:
It is very hard to tell what to do, since you have your own board and I have no idea what your hardware and wiring is like.

The i2c_scanner should detect it. If it doesn't there is something wrong.

Did you make your ATmega32U4 compatible with the Sparkfun Pro Micro 3.3V board ?

The problem could be your board, for example missing 100nF decoupling capacitors, or the wiring, or a breadboard with bad contacts. Or a mismatch between 16MHz and 8MHz. You run you ATmega32U4 at 8MHz ?

It is possible to do some measurements on the I2C bus. Make a sketch that calls Wire.begin() and nothing else.
With a multimeter, it is allowed to measure the voltage of SDA and SCL and even the shortcut current of SDA and SCL to GND. It is an open-collector bus, the pullup resistors should pull it to 3.3V, and with 4k7 the shortcut current should be 3.3/4k7 = 0.7mA (probably a little more, perhaps closer to 1mA).

Do you have other I2C devices, just to test them ?
Do you have long wires ? (up to 50cm should be okay).
Do you use a flat ribbon cable for I2C ? (that is very bad for I2C).
Is the PCA9685 itself also decoupled at 3.3V and GND with 100nF ?
Could you test the PCA9685 with an Arduino Uno ?

Hi,
The I2C bus is fine, the arduino part of the board too. The arduino can communicate with the BNO055.
Alls chips have 100n decoupling caps.

I had a look at the schematic yesterday and found out that I switched SDA and SCL. I corrected it with some bodge wires and everything is working fine now.

But thanks for your help anyway.

I have a copy of the complete schematic attached

Moritz

Schematic.PDF (461 KB)

I'm glad that you found the problem.

I scrolled through the schematics.
Some voltage regulators require special capacitors at the output. The TPS61090 has something in the datasheet about ESR, but I didn't read everything. I suppose you use low ESR tantalum capacitors.
The STAT and LBO have a voltage divider of 1k and 2k2, those values are low. Perhaps 4k7 and 10k would be also okay.
You have connected AREF to 3.3V. That is wrong. Leave AREF open, or connect a 100nF capactor to GND and AREF (to reduce the noise at the AREF pin, that could increase the accuracy of the analog samples).
Your bluetooth is connected RX-RX and TX-TX, is that working ? or should it be RX-TX and TX-RX ?