What will the voltage be at my input pin?

Hi all,

I'm trying to work out how these pins work, and also trying to make sure I don't short out my board or break my new arduino...

If I connect an input pin directly to the 5V pin, I assume that the voltage coming into the pin will be 5V. However, if I connect the two pins with a 100 ohm resistor in between, what will the voltage be at the input pin?

Also, what is the maximum voltage that can safely go into an input pin?

Thanks!

Sam

Assuming your board powers the ATmega chip with a 5V supply you shouldn't go above
five volts. If there is a chance you could above 5V use a diode to limit the voltage
and a resistor to limit the current.

(* jcl *)

If you add a 100 Ohm resistor, the voltage at the input pin will still be 5V. This is because very little current flows through the resistor, therefor very little voltage is lost across it. Very little current flows because AVR input pins are high impedance (high resistance) pins.

Why are you worried about the 100 Ohm thing, anyway?

Thanks for the replies!

I wasn't worried about having 100 ohms -- rather, I was wondering if using a 100 ohm resistor between a 5V power and a pin was a safe way of keeping the arduino safe. I guess I have to use a diode though?

Also, I was surprised because I made a mini program where if a pin read a HIGH input, it would turn an LED on. I discovered that the LED would turn on if even I just touched the 5V output with one hand and the input pin with the other. Apparently an input pin needs >3V to read as HIGH, so I was shocked that I was providing at least 3V through my body. Is that right?

I was providing at least 3V through my body. Is that right?

Yes that is correct. You only need a very tiny amount of current through your body.

if using a 100 ohm resistor between a 5V power and a pin was a safe way of keeping the arduino safe.

For a discussion of protection of you input pins see:-
http://www.thebox.myzen.co.uk/Tutorial/Protection.html

but it is not needed for normal playing about with the Arduino.

Cool, thanks!