input/output protection / eurorack

hello, i am building a patternsequencer for my eurorack. the code works fine, the inputs and outputs do what they should. what they lack is protection against harmfull voltages.

i did a lot of searching and at least found a solution for my input protection (hopefully):

however i want to protect the outputs as well, against accidentally plugged signals from the eurorack (which can be between -12...+12V)

the search gave me this thread, which sadly had no solution regarding the output protection

furthermore i came along the information that the outputs should not exceed 40mA and the total should not go beyond 200mA. i have six digital outputs in use. three of them have additional led's they light. should i better light them using a transistor?

Interesting Problem but you can solve it. You can protect your inputs by simply using a 74C914, its input will tolerate the voltages you are mentioning without any additional protection. If you expect heavy ESD you might consider placing about a 100K in series with the input of the gate. You can do this with a 74HC914, it will work well but any voltage input above the 5 volt supply will inject current into your 5 volt supply. I would then suggest you use a PolySwitch device in series with your output. Be sure when you plug it in the ground is the first connection made. For the outputs you can use an 30V or greater avalanche rated N-Channel MOSFET, choice depending on packaging. The avalanche capability will handle the reverse voltage and connect it to ground. Source goes to ground, gate to micro and drain is your output. No additional protection diodes needed. This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!

thank you Gil, i believe there is much valuable information in this. to me it seems like chinese or any other language i don't understand. so i just hope i dont kill my nano while getting thru it

[u]Here[/u] are more input-protection circuits. Since you want to protect from negative voltages, you'll need to use a Zener diode or two regular diodes.

The [u]Ruggeduino[/u] uses the Zener method with a lower-value resistor than the above examples so you can use the I/O pin for output (and supply more current).

three of them have additional led's they light

What does "additional" mean? You don't have to drive regular LEDs at 20mA. If you drive them at 5 or 10mA you may get enough brightness (especially if you use "high brightness" LEDs) and then maybe you won't exceed the current requirements.

thank you. i have a bunch of colored led's lying around. they had no information on the package about how much current they use. but since the module is able to trigger my modular and the led's lit up accordingly it seems to be fine. so i guess i only have to care about the protection on this circuit:

The easiest (and if you’re sure that is the highest voltage they will ever get) is a simple resistor in the signal wire. As long as it limits the current to <0.5 mA the Arduino’s clamping diodes will handle it. So 12V, 0.5 mA: that’s calling for a 24k resistor. As long as your inputs are high impedance, low capacitance that’ll work just fine.

If you want to use the circuits as shown in #3 you may use smaller resistor values, but that 100Ω is rather low: at -12V it’ll have over 100 mA of current. At +12V a bit less, still 60-70 mA. That may cause problems: your power supply has to be able to dissipate that additional current somehow to keep your supply voltage constant. Also it’ll cause significant heating of the 100Ω resistor (100 mA, 100Ω is 1W of dissipation). I’d not go below 1k in that case.