This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PCF8575: Disconnect PCF8575 from VCC while in operation

Part Number: PCF8575

Hi!

I want to use PCF8575 to drive a series of 5V optocouplers from my RaspberryPi. The optoculper is internally connected to VCC and the control pin must be lowered to activate them. Each one draws ~3.8mA when connected to the GND. (16 channel 12V SaintSmart relay board) I imagine that the total power drain when all the optocuplors are set to low is 3.8 * 16 ~=60mA. That's below 100mA specified in PCF8575 datasheet.

I tested first the cirucit:

One i2C level shifter between RPI and PCF8575. PCF8575 is powered by 5V. I Put a LED+1K between P0x and VCC. I write the correct bytes (eg 0x00) to I2C and everything works.

Q1: I accidentally unplugged the VCC from the PCF8575 while the LED was still on and surprise, it did not shut down. Why? Did it worked with the power drawn through I2C intrerface? In the tech sheet, there is a power reset (I believe below 1V or sth). Should I put a large pulldown to VCC pin to shut the PCF8575 down when not powered?

Q2: Above scenario is not unrealistic, the relay board (optocuplers) have a spearate 5V power supply and I intend to power the PCF8575 using that power supply. When that one is off, how much current will PCF8575 draw from I2C? Am i in danger to burn something? [The goal is to reduce the burden of 60mA from raspberry and put it to the relay board. (That  one is powered with 12V 2A anyway, and is not that sensitive to voltage drops). On RaPi I have ADCs, 4 1Wire busses, wireless network, storage, etc)

Thak you!

  • Hey Christi,

    "Q1: I accidentally unplugged the VCC from the PCF8575 while the LED was still on and surprise, it did not shut down. Why?"

    -Do you have a block diagram or schematic I could look at. I wanna be sure the device is set up properly.

    "Did it worked with the power drawn through I2C intrerface?"

    -This is very unlikely. I'm wondering if it may be related to the FETs on the output of the device still in saturation because it wasn't powered down correctly. Is your LED powered on when the device output is high or low?

    "In the tech sheet, there is a power reset (I believe below 1V or sth). Should I put a large pulldown to VCC pin to shut the PCF8575 down when not powered?"

    -This could help, as this device does have a power down requirement on page 21 of the datasheet. The pull down resistor could help with the ramp down.

    "Q2: Above scenario is not unrealistic, the relay board (optocuplers) have a spearate 5V power supply and I intend to power the PCF8575 using that power supply. When that one is off, how much current will PCF8575 draw from I2C?"

    -If you are saying PCF8575 is powered off then it will not ACK or send information on the I2C bus thus the current from the I2C bus (from PCF8575) will just be any leakage current likely in the uA area. If you are saying our device will be powered on and communicating with I2C to your Raspberry, then the amount of current this device sinks will be based on the equivalent resistance of the I2C bus and it's pull up voltage minus the VoL of our device. So if your equivalent resistance is 5k ohm and a 5V I2C bus then you will have about 1 mA of current when either SDA/SCL pulls low. If both pull low then you have about 2mA at most.

    I don't think you'll damage your raspberry device through I2C communication as long as you pick your pull up resistors correctly.

    Thanks,

    -Bobby

  • Hi! Thanks for the reply!

    The insert image feature of the forum is broken or does not work on my Ubuntu/Chrome. So I can't paste any schematics. Not that I could find a free web service where one can draw with generic circuits.

    The I2C are pulled up by 10K resistors, as seen in the schematic of ADC breakout board that I am using ( https://www.abelectronics.co.uk/p/56/ADC-Pi-Plus-Raspberry-Pi-Analogue-to-Digital-converter ). 10K might not be enough for more slave circuits as stackoverflow informed me :)

    LEDs still on issue: I tried running a script that opens and closes the LEDs. That script was active when I removed the Vcc. The LEDs continued to blink, with dimmed luminosity but still. So I assume that the current is drawn from I2C somehow. 

    I linked the PCF8575 with my relay board and RaspPi. Everything works as expected, except when I am powering down Pi before the relay board. The PCF8575  allows some leakage current enough to power the optocuplors in the relay board. For the pulldown resistor connecting the Vcc to GND I couldn't find a decent value. In power off state, RaspberryPi allows approx 10mA to pass from GND to Vcc (!) and this current was obviously too strong to be cutted off with anything above 4K. [Note that I have more circuits on I2C and raspberry so maybe RPi is not the culprit]

    I also tried putting a diode between Vcc and PCF8575  (so no leaking current when the Pi is off). Solves the power off issue but it messes with I2C bus.

    Anyway, in normal conditions (PCF8575's Vcc linked to Vcc and with a stronger I2C pullup) the brave PCF8575 behaves as expected!

    More or less you confirmed that is possible to draw some current over the I2C interface so I consider this issue closed! (also, I will avoid putting I2C at higher voltage than Vcc)

    Thank you!

    p.s. For the Pi off Relay board ON issue, I plan to use a solid state relay to cut off the relay board power when Pi is off. Crude but hopefully effective!