Input current and voltage maximum for Arduino Digital pins

Hello

i just want to know what is the maximum input current and input voltage for the Digital pins. I am trying to convert 220V ac to 9V dc using a transformer and then 9V to 5V dc and this would be the input to one of the digital pins, for eg. consider pin 4. But I am skeptic whehter is it safe to use it or not as the output current after conversion of 9V to 5V would be around 1A.

Is it safe to use 1A current as the input to one of the digital pins?

Best Regards

Digital pins that are in the input mode draw almost no input current, so you have no concern about wiring a proper voltage to an input pin.

As far as maximum voltage that you can apply to a input pin that is in the datasheet for the AVR chip and is as I recall Vcc + 0.5vdc or +5.5vdc for a five volt Uno type board. There is also a maximum negative voltage that can be applied to an input pin which is -0.5vdc.

Lefty

It is not particularly obvious why you simply want to apply the voltage from a power pack to an Arduino pin, but since the pin has such a high impedance, it is quite easy to apply the voltage through a 47k resistor which will limit the current sufficiently to protect it.

That said, if what you actually want to do - which is the common problem here when fellows come along with an idea about how to do something presuming there is a particular way it must be done - if what you want to do is only to know if the mains is on, then an opto-coupler with a capacitor, couple of resistors and a diode will do that very simply - though admittedly, you require the competence to construct things in a safe manner to work from the power mains.

{Even more sneaky is to use a neon night-light with a LDR taped to it - no mains wiring at all involved!}