*(1) The treadle pot schematic*
*(2) ADS1115 Wiring and Testing*
*(3) Rpi4B pinout for reference to connect to treadle pot and ADC*
(4) EV-2 + ADS1115 + Rpi4B Schematic
(5) [EV-2 schematic with pull up to avoid floating input]
(1) [EV-2 Expression/Volume Pedal – Fractal Audio Systems $120]
(2) [ADS1115 16-Bit ADC – 4 Channel with Programmable Gain Amplifier – AdaFruit $15]
(3) [Why is my linear pot is causing a non-linear voltage at my ADC input? Asked 2020feb08 Viewed 70 times]
(4) [Understanding Expression Pedals – 2014mar20]
(5) [Use Pi as a MIDI Controller Input – 2019apr28]
(6) [EV-2 + ADS1115 + Rpi4Bb Schematic V0.1 – CircuitLab (public)] 
(7) [EV-2 + ADS1115 + Rpi4B Schematic V0.1 – PDF (public)]
(8) [Strymon Tech Corner #1 – Anatomy of an expression pedal – Terry 2010jul12]
(9) [Strymon Tech Corner #1 – Anatomy of an Expression Pedal – 35,062 views 2010jul12]
I have a Pi 3b+ in a MIDI foot controller and part of the I/O 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 3.3 V 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 (3.3 V) to ground. So I added a 150 Ω resistor on the 3.3 V 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 3.3 V) and max plugged voltage 3.1 V as separate states.
How do I avoid a temporary short circuit from destroying the PI?
It’s very easy really:
- power down your Pi
- alter the connections
- power on the Pi again
Electronics are not hot-pluggable by nature, they have to be designed in a special way to be hot-pluggable. People start to forget that because many modern interfaces support hot-plugging, notably USB. In older times you would apply the procedure above if you needed to connect an external keyboard to your laptop.
If you want to design a hot-pluggable interface, you have two options:
- make sure the connector prevents unwanted contacts and ensures the correct connect-disconnect sequence (as USB does)
- make sure your device survives any possible connections in any sequence
The latter is how audio jacks are designed: amplifiers have current limitation so they can survive a short, and a headphone can handle 2x voltage if it gets accidentally connected between L and R instead of L/R and GND.
Current limiting resistors are often used in JTAG/UART/debug adaptors to make them hot-pluggable or at least more robust. Whenever such a resistor will be enough depends on the circuit you have designed.
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.
(1) The treadle pot schematic
(2) ADS1115 Wiring and Testing
(3) Rpi4B pinout for reference to connect to treadle pot and ADC
Not the answer you’re looking for? Browse other questions tagged gpio or ask your own question.