How to protect from 3v/ground short

Status
Not open for further replies.

neroroxxx

Well-known member
Hi, I'm building a midi controller with an expression pedal input using a 1/4" jack, everything works as expected except that when i plug/unplug the expression pedal my teensy 3.6 restarts i'm guessing its due to the voltage touching the ground as the plug goes in/out.

What's the proper way to prevent that from happening?

Thank you in advance.
 
Simplest is to put a diode in series with VCC, preferably one with low forward voltage, like a Schottky diode. There are also a few clever circuits based on FETs that can be used if even a small voltage drop would pose a problem. Try searching for 'reverse voltage protection circuit'.
 
What's the sequence of contacts on the jack? Having gnd/power connections adjacent is a common cause of excitement with three/four pole plugs where the contacts slide past each other going in. Still also a good idea to engineer anything with plug in controls for a worst case 'what if any wire gets shorted to any other wire' approach on the basis that sooner or later it'll happen. Depending on what's in the pedal a ~100 ohm resistor on the power and gnd connectors can reduce the potential (and even allow smart code to report the problem), at the cost of reducing your dynamic range.
 
Usually a resistor is placed in series with the 3.3V power and the jack for the expression pedal. Values like 100 to 1K are common. During the moment the plug is inserted, the resistor limits how much current can flow. The rest of the time, the resistor is series with the pot. The result is you no longer get the full 0 to 3.3V range as the pot moves. But that's easy to correct in software. When the pot is a large value like 100K, the extra resistor costs you very little of the range.
 
Thank you for the help! I tried the diode i had a couple of 1n4001 i believe and it worked great the range of a 5k pot goes up to 860 or so, im going to try the resistor next, i wrote a companion app that i can use to calibrate the range so i dont mind if i loose some range.

Paul thank you for your work!!
 
Status
Not open for further replies.
Back
Top