Pages: 1 [2]   Go Down
Author Topic: Strange behavior on digital pins  (Read 1020 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Sr. Member
****
Karma: 9
Posts: 296
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This might help the OP.
http://www.digikey.com/us/en/techzone/microcontroller/resources/articles/protecting-inputs-in-digital-electronics.html

Logged

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 158
Posts: 2888
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

No, no, no, no, no, no, no. Anyone in a right mind would go crazy adding 7 or 9 components
onto every single input pin on their controller. No company in the world would want to
spend the cost and use so much real estate.

The I/O pins already have internal clamping diodes. Those huge Rs [100K] are like big antennas.
A much better solution would be a 330 -1000 ohm series R to provide current-limiting for
the internal diodes, and then a 4.7 - 10K R to ground to make the ckt more low-impedance,
and so the pin doesn't float when nothing is connected. This will probably work for the majority
of cases.

If you really need voltage-clamping [zeners in the figure], better to use transzorbs.

Logged

Offline Offline
Sr. Member
****
Karma: 9
Posts: 296
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No, no no... The application note didn't call for all that protection on ALL pins.  Only for pins connected to "long lines".
And yes, while MCUs/opamps have built-in protection diodes, sometimes they're not enough if those particular lines may be subjected to high ESD/voltage situations.

I asked the OP earlier in the thread if R14/R15 values he picked are too high. His schematic shows 100K resistors. Me thinks they're too much. He has not changed them.
Logged

Riga, Latvia
Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Thank you, that was really helpful for a beginner like me. And Yes, I have changed 100k resistors to 10k, and thinking even about using 4k7 if my wires go longer than 5m... And I have also added 0.01uF caps to ground for IO pins... Runs fine now for 36h..
Logged

0
Offline Offline
Shannon Member
****
Karma: 200
Posts: 11694
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Using shielded coax or twisted-pair (preferably shielded) for remote sensors is a minimum to start from.

Routing sensor signal and ground in a twisted pair and connecting any shield to ground only at the Arduino end
would be a good idea.

Ferrite toroids over the wire at the Arduino end can reduce common-mode interference and pickup (as
well as radiation from the wire if carrying logic signals (however don't do this for unshielded twisted pair
logic wiring such as CAT5).

Keep sensor wiring well away from mains wiring.
Logged

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

Pages: 1 [2]   Go Up
Jump to: