Situation
http://imgur.com/DhMZwVa
Vs is 5V.
R1 is 10K ohms.
I've got this circuit hooked up to an Arduino Uno in an attempt to understand how pull up resistors work.
Pin 0 and Pin 1 are the analog inputs on the board which I'm using to measure voltage on the circuit.
Results
Pin 1 is always 0V.
Pin 0 is 5V when switch is open and 0V when switch is closed.
Problem
I don't understand why Pin 0 reports 5V when the switch is closed. I expected the resistor to eat up all of the voltage as it is the only active component.
I don't understand why Pin 0 reports 0V when the switch is open.
Putting the resistor on the other side of the switch gives me the expected results; 0V when switch is closed and 5V when it's open, but I don't understand why that works.
Edit: Flipped the pin reports like an idiot in the problem section, my bad.
http://imgur.com/DhMZwVa
Vs is 5V.
R1 is 10K ohms.
I've got this circuit hooked up to an Arduino Uno in an attempt to understand how pull up resistors work.
Pin 0 and Pin 1 are the analog inputs on the board which I'm using to measure voltage on the circuit.
Results
Pin 1 is always 0V.
Pin 0 is 5V when switch is open and 0V when switch is closed.
Problem
I don't understand why Pin 0 reports 5V when the switch is closed. I expected the resistor to eat up all of the voltage as it is the only active component.
I don't understand why Pin 0 reports 0V when the switch is open.
Putting the resistor on the other side of the switch gives me the expected results; 0V when switch is closed and 5V when it's open, but I don't understand why that works.
Edit: Flipped the pin reports like an idiot in the problem section, my bad.
Last edited: