I have a PI 3b+ in a MIDI foot controller and part of the IO is a pair of expression pedal sockets. After, ahem, getting the tip and sleeve round the wrong way, they are working correctly now. But during testing I disconnected one while the system was powered up and it shorted out the PI, which is now dead. The circuit feeds 3v3 to the ring, which is connected to the pedal potentiometer, and measures the voltage off the tip (connected to the pot’s wiper). When the pedal is disconnected the plug temporarily shorts the ring (3V3) to ground. So I added a 150ohm resistor on the 3v3 supply wire. But I don’t know if that’s enough and I’m not game enough to try it without being fairly certain I won’t destroy another PI.
Is a current limiting resistor enough? If so what value is “enough”?
Or do I need something more complicated to protect the PI?
I don’t know exactly how long the short lasts for, but it’s well less than a second in practice.
Note: The circuit has an switch in the socket so I can add a little bit of extra resistance when the jack is plugged in. That way I can detect the “unplugged” state (ADC reads full 3V3) and max plugged voltage 3V1 as separate states.
(1) The treadle pot schematic
(2) ADS1115 Wiring and Testing
(3) Rpi4B pinout for reference to connect to treadle pot and ADC
If you short circuit the 3.3V rail to Gnd you will instantly kill the Pi.
Frankly anyone who connects a power rail to external circuitry (from the Pi or any other device) is just asking for trouble!
You can use the power rails to provide power to external circuitry with suitable care – which excludes a TRS plug which is practically guaranteed to cause a short – they are designed for audio (or occasionally video) signals. You should NEVER connect power on a live system – devices which are designed for hot plugging e.g. USB use special connectors to ensure safe connection.
No responsible engineer would connect a live power rail to use for logic connection without protection and would not use a TRS jack for power!
If you are powering an external circuit any series resistance will compromise its operation (unless the current is minimal). You DON”T put resistors in power rails.
No one can design your circuit for you, even if you published a proper specification.