Go Down

Topic: Recommendation for Over Current (Read 1 time) previous topic - next topic


What is anyones recomendation on how to protect the PWM pins from being over drawn / Shorted?

40ma PTCs seem to be hard to find and some of the ones I did find are 600ohm, any other suggestions?


You could put a low-value resistor in series, perhaps?


Depends on what you are doing with it. I like optocouplers because they provide very good protection.

I usually use a 4N33 because they are cheap (it's inexpensive to buy a couple dozen for the junk box), if I blow them up it doesn't matter. They are pretty slow though (get what you pay for), so they aren't suitable for applications that require higher speed.

When I don't want to use the 4N33 I usually just buffer the pin with a 2N2222 or something like that.


The easy solution is to put something like a 74ac540 in between the pins and whatever you're driving.  74AC series has somewhat higher drive capability than the AVR, should be pretty inexpensive, and if you overload it to the breaking point, it's the cheap 74ac540 that dies and not your arduino...

Current limiting resistors are a good idea too; you ought to have some idea what the max current your "connected thing" will draw...


A 330 ohm resistor connected in series with an Arduino ouput pin will limit a short circuit  current to ground at around 15ma which is well within the allowable maximum output current for an Arduino I/O pin.

If switching higher voltages or currents over what a AVR chip can handle a logic level MOSFET is the simplest device to use these days.



Dec 31, 2008, 01:10 pm Last Edit: Dec 31, 2008, 01:28 pm by Jassper Reason: 1
Hay thanks for all the suggestions. Let me elaborate a bit more on what I am doing here, now that I have more information.

One pin will be used to drive a G6HU-2-DC5 Low-Signal relay, no issues there (I don't think).

I will be using 3 other pins as "User interface Pins" where the user will feed a ground to a pin to signal an event. If I could rely on the user to always connect a ground to the input I don't think there would be an issue but I can't rely on that. So, what happens if the user connects +14 volts to the input? Will a simple diode suffice?

Is a 1K ohm resistor sufficient to hold the pin high until a ground is connected to the input?

Thanks again.

This is what I am thinking,


Yes, that circuit will protect a pin from high positive voltages.  And the 1k resistor is fine.  But what if the user connect a large negative voltage, say, -24V?  The diode will conduct and the input pin will be dragged down to -23.4V (0.6V diode drop).  If you want to protect pins against arbitrary external voltages, you'll need diodes to the 5V and 0V rails, and s series resistance and/or fuse.  Possibly also Zener diodes, too, back-to-back across the input.

Optoisolators are a good idea in this application, as another poster has mentioned.


But what if the user connect a large negative voltage, say, -24V?

The application is in the RV world, so at best they can connect either a ground or a positive voltage of 14v or 28v. If by chance they some how connect a -24v voltage, then they have much bigger worries than frying my Arduino ;)

I will however look into the Opto-coupler as a extra level of protection.
Thanks!  :D

Go Up