Electrical – Protection diodes for Arduino pin passing current to +5V rail when powered down – what to do

arduinodiodesover-voltage-protection

schematic

simulate this circuit – Schematic created using CircuitLab

In the circuit above, I'm using a resistor (R1) and a couple of protection diodes (D3 and D4) to keep the voltage on an Arduino pin from 0V to 5V as the input from the LFO varies from -10V to 10V.

One thing that did not occur to me until I built this in reality was what happens when the Arduino is powered down. When the 5V rail on the far side of D3 isn't powered at all, but the +/- 10V is still applied at "In", the diode at D3 seems to be forward biased at all times. It seems to be allowing enough current to pass to at least light up the "on" LEDs of the Arduino, whether or not it's actually booting.

I suppose the maximum amount of current that would be passed in this situation would be (10V – Vf- 1V)/1K, so less than 9mA.

Could that be problematic for the Arduino? If so, is there a good way to prevent this?

Best Answer

You could just use a transistor for the input (assuming reasonably low frequency, as your 40Hz indicates- this will easily work to tens of kHz):

schematic

simulate this circuit – Schematic created using CircuitLab