Search code examples
raspberry-pigpio

Isolating powered-off raspberry-pi gpio pin from rest of circuit (that is powered on)


First of all sorry for the long title, I hope it is descriptive enough.

I am planning to connect a TSSOP4838 (IR Receiver) to a Raspberry PI GPIO input pin. My problem is that the TSSOP4838 will (at times) be powered on while the PI is powered off. The TSSOP4838 has an open-collector output with a 33k pullup. The same output will be connected to an input pin of an ATTiny85 (also powered on). As far as I can tell this is going to be a problem, as the output of the TSSOP4838 (normally high when idle) will feed power to the PI through the input pin clamp diode. Of course the power won't be enough to bring the PI up due to the 33k pullup.

My question is how to properly isolate the PI input pin while it is powered off, so that the TSSOP4838 output can still be read by the ATTiny and yet when the PI is powered on be able to read it from the PI as well.

I have not yet tried anything in fear of smoking my PI.

All supplies are 3.3v so no level shifting required.

Edit: Would a simple level shifter like this work?

Simple MOSFET level shifter

RPi side would go on the left (low voltage side). This would also take care of minor differences in supply voltage. My worry is that if RPi output is not HiZ when powered off, it could bring the level down to 0 on the other side.


Solution

  • you aren't going to smoke your pi with 3.3v on a gpio pin... I am guessing that you can hold power on a gpio pin with the pi off and it will be in a high impedance mode and not affect anything... you can check the impedance with a multimeter.

    if it isn't in high impedance mode then you should worry about power consumption rather than burning it up...

    but probably your design is somewhat flawed anyway and you should be going through a transistor or diode or some combination of those things anyway (just guessing without a diagram)