Upcoming SlideShare
×

# Pull up & pull-down resistors

3,990 views

Published on

0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total views
3,990
On SlideShare
0
From Embeds
0
Number of Embeds
55
Actions
Shares
0
32
0
Likes
0
Embeds 0
No embeds

No notes for slide

### Pull up & pull-down resistors

1. 1. Pull-up & Pull-down Resistors Often we want to connect a digital input line to our microcontroller. Typically this might be to allow us to monitor the on-off state of a switch. Eg. 5V Microcontroller switch 0V (gnd or ) At first glance this seems fine. When the switch is closed, the pin on our microcontroller is tied to 0 volt, ie. low. In contrast when the switch is open we would want the pin to be 5 volts, or high.
2. 2. The input pin would tend to “float” high. This however isn’t a true input signal, it is a very weak input and can readily switch from high to low through the slightest of electrical interference in any of the wiring.
3. 3. A simple solution might appear to involve simply connecting the other end of the switch to our 5 volt supply 5V Microcontroller switch 0V (gnd or ) This will give us a 5 volt (high) signal on the input pin when the switch is open. When the switch is closed however we will get a short between supply and ground => zero resistance => infinite current - this is not good news.
4. 4. The problem can be remedied by simply putting a resistor into the circuit. This is the pull-up resistor. 5V 10 kΩ Microcontroller switch 0V (gnd or ) When the switch is open, the input to the microcontroller is high. There is no direct connection to the 5v rail, however because the input impedence to the microcontroller is high, very little of the 5v is dropped over the pull up resistor. When the switch is closed current flows down through the resistor and through the closed switch to ground. The input pin is tied to ground and so will read low. This gives us what we want.
5. 5. A variation on this is the pull-down resistor. This ties the input pin to ground rather than the supply voltage. ie. 5V switch Microcontroller 10 kΩ 0V (gnd or )