I was just wondering, how does one protect an output pin? There is lot of info about protecting inputs, such as the ruggeduino project.
If i'd like to protect output from anything, negative voltage, overvoltage, overcurrent, you name it, is it similar to the ruggeduino solution?
or do i have to do the same thing they did to the 5v output pin?
OK, tackle these separately:
Simple over current (with no fancy voltages around), just use 150 ohm resistor in series to limit current to below 40mA.
Voltage out of range you want a divider circuit with schottky diodes from the pin to the two supply rails (normally reverse biased
so don't interfere with the circuit). A series resistor (say a 150 ohm one!) will then take the extra voltage as the diodes
conduct the current to the rails (at -0.3V and +5.3V).
Gross over voltage needs more resistance to limit the current, and you have to be sure the extra current to the +5V
rail won't pull it above 5.0V (extra dummy load or a voltage clamp might solve that, extra decoupling can help absorb
spikes). The schottky diodes are mimicking the standard CMOS input protection circuit but with better diodes.
The ruggeduino circuit is a little different, using a single zener to protect from over and under voltage (I personally don't
like this, a 5.1V zener doesn't clamp very hard - schottky diodes turn on hard (and fast) in a fraction of a volt). They
use a 220 ohm resistor that doubles as a fuse (its resistance increases on gross overload due to overheating).
Apart from over current and over-voltage what other thing did you have in mind? High power RF-interference?