Pages: [1]   Go Down
Author Topic: How to protect input, pins  (Read 871 times)
0 Members and 1 Guest are viewing this topic.
uk
Offline Offline
Sr. Member
****
Karma: 0
Posts: 314
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi
just wondering if there is anyway to protect input pins from external cabling, im using low's for my inputs and a cable run of 15 metres,  ive tested the run it works ok,  but a bit worried about static, noise ect that might damage the pins
thanks
« Last Edit: April 29, 2012, 12:41:12 pm by jonisonvespa » Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 217
Posts: 13739
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

connect a pull-down resistor to the pins not used?
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Offline Offline
Edison Member
*
Karma: 9
Posts: 1016
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There are diode clamps inside the AVR chip, but with long cable they could blow.
Just one resistor for every input pin is the most common solution. Say about 1K.
A coil with two capacitors is also a good solution, but the resistor in the line is most of the time a better solution. The input impedance of the AVR chip is very high, so the resistor does almost not influence the input signal.

If there are very heavy spikes or danger for high voltages, you have to add a good protection circuit. But that will probably slow the signal.
Logged

0
Offline Offline
Shannon Member
****
Karma: 207
Posts: 12200
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can use external diodes to beef up the internal ones - best way is to use some schottky diodes (which have a lower forward voltage and will take all the current away from the internal diodes - schottky diodes are also very fast and won't affect the signal at all.)

You wire one diode cathode-to-signal, anode-to-ground

The other is anode-to-signal, cathode-to-5V

In the absence of schottky diodes the traditional signal diode like 1N4148 will give a reasonable degree of protection as they can take 100mA or so happily, but to be sure add a 1k resistor between the diode junction and the input pin to limit current to the internal diodes.

Logged

[ I won't respond to messages, use the forum please ]

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 627
Posts: 34220
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

See this page
http://www.thebox.myzen.co.uk/Tutorial/Protection.html
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6619
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Simplest solution is a resistor in series with each input that's connected to the long cable, however I'd choose 10K rather than 1k.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

0
Offline Offline
Full Member
***
Karma: 1
Posts: 225
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Are there any guidelines/references for when such protection measures are necessary?  I'm curious because I have a model railroad installation;  actual interfaces to the track are optoisolated, but there are still 3A AC electromagnets going off in the vicinity.

And if so, what about an output pin?  I.e., if I have the Arduino controlling a LED over a meter or so of wire, where the wire runs through a noisy environment?
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 627
Posts: 34220
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

[quoteAre there any guidelines/references for when such protection measures are necessary][/quote]
No you must treat each case individually, unless you are trying to comply with some ESD standards ( Electro Static Discharge )

Because outputs are a much lower impedance than inputs they pick up much less interference so clamping in not so important.
Logged

Pages: [1]   Go Up
Jump to: