PCA9685 I2C address problem

Hi,
I am making a project that will include a servo motor. My first choice was the Adafruit servo shield with PCA9685 which I have for testing. After successful tests, I go for a PCB.

PCBs arrived, I soldered all of the components, but when I scanned the I2C I get two addresses, although I have only one PCA9685.

This is the schematic of the shield:
https://learn.adafruit.com/assets/36269

My schematic is in the attachment. As in the datasheet, if all 6 address pins are pulled low, I should get the 0x40. But I have two of the addresses on the I2C scanner, 0x40 and 0x70. And on the board (PCB), there are only Atmega, this chip, and few necessary components.

Am I doing something wrong? Is this ok? I don't have the shield anymore so I can not see if there were two addresses or one. It should be only one, I think.

Did you recall reading the paragraph in the PCA 9685 specification that identifies how to set the I2C address?

You'll have to determine how the address pins are set (by your PCB traces).

PCA Spec.png

General comments on designing hobby PCBs. Unless you have size restrictions:

  1. Always bring out unused pins, at least to a header pattern. You never know when you might find them useful.

  2. Never run traces from a pin directly under the IC to another pin. If you ever have to separate them it will require removal of the IC.

PCA Spec.png

I don't see here anything that will tell me why I have two I2C addresses.

who_took_my_nick:
I don't see here anything that will tell me why I have two I2C addresses.

Each device has an address for operation but all devices have a broadcast address so you can set parameters for all devices at the same time. So yes you will see two addresses if you only have one device on the bus. The fact you don’t see this in the data sheet means you have not read and understood it all.

Read yes, but obviously not understood.

I have never, ever encounter two I2C addresses while I scan I2C with only one I2C device attached. Never.

This is maybe the reason I missed the part you suggest.

Anyway, then, this with 2 addresses is ok?

this with 2 addresses is ok?

It would help if you actually told us the addresses you are seeing, one should be the one you set, and the other should be a high address about one or two from the end. Is this what you see?

I have never, ever encounter two I2C addresses while I scan I2C with only one I2C device attached. Never.

How much experience do you have? It is not a thing a sensor usually has, but a broadcast address is in the specification for the I2C standard, so manufacturers can use this feature.

Addresses I see on serial are written in the first post. Here again (0x40, 0x70).

I have SOME experience, but I am not an engineer. For someone big, for most small. I learn along the way. Say I connect some I2C device with an MCU on daily basis. Believe it or not, but never had two addresses on one device. Again, it is not something I learn in school. That is why I am here.

It is not the most common thing but yes it does happen. This is why I am here.

Have you tried actually using the chip? Does it malfunction?

From the data sheet of the PCA9685 you will see this:-

Notice here they are using the 8 bit convention where as the Arduino uses the 7 bit convention to define addresses. That means the address an Arduino would use is this address shifted to the right by one place.
So an address of 0xE0 shifted one place to the right becomes 0x70 - exactly what you are seeing.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.