Arduino Forum

Topics => Device Hacking => Topic started by: fadman on Aug 17, 2018, 08:48 am

Title: UNO digital pin as input from 5vdc adapter with resistor
Post by: fadman on Aug 17, 2018, 08:48 am
Dear Friends,

I want to detect the presence of DC current in wire... Can I connect 5vdc power  adapter (mobile phone charger) to the digital input data pin for sensing that ?

I mean can I take 5vdc power adapter as input data in digital data pin as input..???
Title: Re: UNO digital pin as input from 5vdc adapter with resistor
Post by: Paul_KD7HB on Aug 17, 2018, 08:05 pm
Dear Friends,

I want to detect the presence of DC current in wire... Can I connect 5vdc power  adapter (mobile phone charger) to the digital input data pin for sensing that ?

I mean can I take 5vdc power adapter as input data in digital data pin as input..???
That would be detecting the VOLTAGE, not the CURRENT.

You need a pull-down resistor to set the pin to 0 when there is no voltage. Then the 5 volts would be read as a 1 on that pin.

If the voltage is above 5 volts, you may have a problem.

Paul