# PCF8591 I2C Problems on Raspberry Pi

I am using 3 PCF8591 ADC connected via i2c to a raspberry pi.

At first all 3 of the ADC worked. All of a sudden I started having issued with them. Occasionally one of the i2c devices stops showing up (i2cdetect -y 1). And now when reading some devices they show up and connect however they always read 0. I attributed this to a damaged ADC so I replaced it but got the same issue. Sometimes is works, sometimes it doesn't. Often after first starting it will work for about 10 seconds then start reading 0.

This is the layout of the PCB I used. I realised I had forgotten the pull up resistors so I jumpered 2 4.3k resistors from the SDA and SCL pins to 3.3V pin. I haven't had heaps of experience with PCB layouts so I'm wondering if I did something very wrong that is causing the i2c to not work all the time outside of the two pull up resistors I missed. I do not want to get another batch of PCBs made if I have made some other big mistake.

bus = smbus.SMBus(1)

x = 0
value = 0
tot = 0
x+=1
return value


This is the code I am using. As you can see I'm using SMbus to talk to the different devices.

• Eliminate some options. Did you try another RPi or other i2c host? Did you try another board? Software from scratch? – Passerby Mar 30 at 23:00
• I reflashed the OS to make sure. I am also pretty sure I used a different RPi but there is always a chance I got mixed up and grabbed the one I was already using. Ill try again with another RPi in a second and let you know how I go. – jdm Mar 30 at 23:02
• Update: I have also tried a new RPi. Same thing. Works for a little but then reads 0. – jdm Mar 30 at 23:11
• If the problem would not been solved already, I would have suggested to double check the soldering of the I2C pins of the 40 pins connector . – Huisman Apr 2 at 9:48