Pull-up resistors
2015-06-15 19:38
323 查看
1 Introduction
Pull-up resistors are very common in microcontrollers or any digital logic device.
With a pull-up resistor, the input pin will read a high state when the button is not pressed. When the button is pressed, it connects the
input pin directly to ground.
Keep in mind, if the resistor wasn’t there, your button would connect VCC to ground, which is very bad and is also known as a short.
A low resistor value is called a strong pull-up (more current flows), a high resistor value is called a weak pull-up (less current flows). Usually
we use a resistor value of 10kΩ for the pull-up.
2 Conditions
The value of the pull-up resistor needs to satisfy two conditions:
1) When the button is pressed, the input pin is pulled low. The value of R1 controls how much current will flow from VCC to ground.
2) When the button is not pressed, the input pin is pulled high. The value of R1 controls the voltage on the input pin.
For condition 1, we do not want R1 is too low. However, for condition 2, R1 should not be too large. The general rule is to use R1 that is 1/10 less than the input impedance(R2). Usually a input pin on a microcontroler has an impedance that can vary from 100k to 1MΩ.
3 Calculating
Assume we want to limit the current to 1mA when the button is pressed, where Vcc = 5V. What resistor value should we use?
It is easy to show how to calculate the pull-up resistor using Ohm’s Law:
R1 = Vcc/I = 5V/1mA = 5KΩ
Another thing is that the larger the pull-up resistance, the slower the pin is to respond to voltage changes.
Pull-up resistors are very common in microcontrollers or any digital logic device.
With a pull-up resistor, the input pin will read a high state when the button is not pressed. When the button is pressed, it connects the
input pin directly to ground.
Keep in mind, if the resistor wasn’t there, your button would connect VCC to ground, which is very bad and is also known as a short.
A low resistor value is called a strong pull-up (more current flows), a high resistor value is called a weak pull-up (less current flows). Usually
we use a resistor value of 10kΩ for the pull-up.
2 Conditions
The value of the pull-up resistor needs to satisfy two conditions:
1) When the button is pressed, the input pin is pulled low. The value of R1 controls how much current will flow from VCC to ground.
2) When the button is not pressed, the input pin is pulled high. The value of R1 controls the voltage on the input pin.
For condition 1, we do not want R1 is too low. However, for condition 2, R1 should not be too large. The general rule is to use R1 that is 1/10 less than the input impedance(R2). Usually a input pin on a microcontroler has an impedance that can vary from 100k to 1MΩ.
3 Calculating
Assume we want to limit the current to 1mA when the button is pressed, where Vcc = 5V. What resistor value should we use?
It is easy to show how to calculate the pull-up resistor using Ohm’s Law:
R1 = Vcc/I = 5V/1mA = 5KΩ
Another thing is that the larger the pull-up resistance, the slower the pin is to respond to voltage changes.
相关文章推荐
- 第六章作业
- Tip:Powershell无法连接到CAS服务器 推荐
- 10种值得一吃的“超级食物”
- [HDOJ2276]Kiki & Little Kiki 2
- 【转自EMC中文支持论坛】探秘I/O队列对磁盘性能的影响
- 栈的弹出、压入序列
- leetcode第53题-Maximum Subarray
- 关于genymotion模拟器无法启动的问题
- leetcode[111]:Minimum Depth of Binary Tree
- vb.net使用Newtonsoft.JSON解析JSON字串心得
- 进程的通信方式及特点
- mac 安装wget
- 前端技术(1) :JQuery学习笔记
- RANSAC算法笔记
- Linux中nat模式上不了网的问题怎么解决?
- 文本编辑器Vi和Vim(1)
- The Pilots Brothers' refrigerator
- 为Ubuntu安装SSH服务
- The Pilots Brothers' refrigerator 分类: POJ 2015-06-15 19:34 12人阅读 评论(0) 收藏
- 数据库的事务隔离级别