Does anyone know (1) how much transient current can be output from a pin and (2) how much (and how long) reverse current an output pin can take? For instance, consider the following circuit (driven by a series of 10 ms pulses at 5V):
o----------------
| |
= 10µF 1k LOAD
| |
o----------------
which would be a classical filtered (smoothed) PWM circuit. When the pin goes to +5V, the capacitor would act like a short and allow very high current (assuming about 20 ohm impedance, maybe 250 mA) for a millisecond or so. Similarly, when the voltage drops to 0V, the charged capacitor will discharge, leading to a reverse current until it bleeds through the load. Will either of these damage the diodes in the pin or even the IC? Thanks. (Worse comes to worse, does this mean that a resistor and diode are needed to protect the pin?)
More info
1) It's 10µF. 10 pF would be useless in a power supply, it would only store 0.05 µC of electricity at most, which would only be able to smooth the output for a few microseconds.
2) The load is resistance, 1 k ohms.
3) A diode would be handy if you wanted to prevent reverse current, since you could put a much larger diode outside than the protective diodes in the Arduino. They are classically used with motors (inductive load) as a clamp diode.
4) My general question is about high transient current or reverse currents. A capacitor is just an example of a situation that could cause this. Another example would be a pin that is putting out only occasional (for example) 1ms long 100 mA pulses, separated by many seconds. Such a circuit is really not delivering much power, but for very short periods it exceeds that recommended 40 mA. Would this burn out the pin or not?
5) A capacitor in parallel with the load is pretty much the classic filtered DC power supply. Open any wall wart you have and you'll see a transformer, a rectifier and several large (electrolytic) capacitors (along with a couple small ones) and a voltage regulator. Closer to this example, say you want to deliver current at 2 volts DC. You can do this by alternating 2 ms pulses (at 5V) with 3 ms at 0V. Then have a capacitor in series to smooth it to closer to DC, making it more like analog output. That is, in fact, exactly how adjustable power supplies often work.