# Can a capacitor damage an Arduino?

For a low-current IC (< 1 mA) where I need to be able to switch it on and off, I'm connecting it directly to an Arduino analog pin. In order to ensure a stable voltage, I was thinking of adding a small capacitor across the IC. But I'm wondering if this might damage the Arduino? The max current draw allowed per PIN is 40 mA, and adding the capacitor would mean that there's almost a high current draw while it is charging, albeit only for a very small time. But I can't find out if such a quick high draw is allowed.

I tried to calculate how much the current will be the but the equations in this Wikipedia capacitor article are not immediately usable.

There's an equation for current, but it depends on the derivative of the voltage function. And the voltage function in turn depends of the integral of the current function. Hence there's many pairs of solutions to these equations.

What is the general practice/recommendation here. Would putting a 100 nF capacitor be OK? I also thought I could add a small resistor - so I would add a resistor between the Arduino PIN and the IC source PIN, and then have the capacitor still across the IC's source and GND. The resistor could be, say, 180 Ω which would limit the max possible current to 27 mA while causing only a voltage drop of 0.18V when the draw is 1 mA.

• Arduino "analog" pins are pulsed between 0 and 5 V to approximate an analog voltage (PWM). If you connect an IC to an arduino's analog pin that isn't designed for 5 V it may well damage it. – LeoR Feb 11 '15 at 11:33
• The IC is designed for 3V to 5V so I think 5V should be OK? – Morty Feb 11 '15 at 11:33
• Please confirm you are wanting to use a 5V, 40ma Arduino pin as a 5V, <1ma power supply. – Jon Feb 11 '15 at 11:41
• For future reference, the kind of current to which you are referring is known as "inrush current" and is something that has to often be taken into consideration with many power supply systems. Especially things like USB where they actually specify a maximum allowable capacitance on the power pins. – Majenko Feb 11 '15 at 13:25
• Can you upload a schemetic of the circuit you intend to make ? – Parth Parikh Feb 11 '15 at 14:22

$$E = I \cdot R$$ $$R = \frac{E}{I}$$ $$R = \frac{5V}{0.0278A\ max} = 180 \Omega$$ $$E = I \cdot R$$ $$E = 0.001A * 180\Omega = 0.18V\ drop\ across\ R$$