Go Down

Topic: 24V signal into digital input (Read 8368 times) previous topic - next topic

weARvictorious

I'm just getting started into Arduino and am not sure what its limits are. I'm connecting another controller's main switch (prongs) to a physical switch then to Arduino's digital pin. I'm reading ~24V at the switch, would I damage my Arduino if I put that into the digital pin/ground? Currently, I have a 10k Ohm resistor between my ground node and the Arduino (not exactly sure why this is done; followed Massimo Banzi's instructions on that one) Thank you for your time and help!

retrolefty


I'm just getting started into Arduino and am not sure what its limits are. I'm connecting another controller's main switch (prongs) to a physical switch then to Arduino's digital pin. I'm reading ~24V at the switch, would I damage my Arduino if I put that into the digital pin/ground? Currently, I have a 10k Ohm resistor between my ground node and the Arduino (not exactly sure why this is done; followed Massimo Banzi's instructions on that one) Thank you for your time and help!


Yes, 24 volts AC or DC can/will destroy an arduino board. If AC then 'signal' would have to be rectified/filtered and reduced in voltage via perhaps a two resistor divider circuit before it was compatible with an arduino input pin. An optocoupler might be used if the original signal has enough current capacity to drive the opto led input.

Lefty

MarkT

You must never put any voltage on any pin outside the range -0.3V to +5.3V - otherwise it will likely be damaged.  24V will definitely destroy it instantly (and may explode some capacitors).

If you add series resistance to limit the current to a fraction of a milliamp then the outlook is OK - so 100k or more would likely protect inputs (but would rely on the chips input-protection diodes).

A voltage divider consisting of a 100k and a 22k resistor would reduce +24V to about +4.3V which would read as logic HIGH - this is probably the simplest and best solution - having that 100k resistor in series is reassuring.  If you have negative voltages this technique won't help.

You'll find many examples of such voltage-dividers in these forums.  The grounds need to be commoned - normally directly connected - the 10k value seems suspiciously high to me - but there might be an important reason - more information about the whole system would be useful...
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

Go Up