SlideShare une entreprise Scribd logo
1  sur  5
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.
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.
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.
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.
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    )

Contenu connexe

Tendances (20)

Sequential cmos logic circuits
Sequential cmos logic circuitsSequential cmos logic circuits
Sequential cmos logic circuits
 
Unit 1 graph theory
Unit 1 graph theoryUnit 1 graph theory
Unit 1 graph theory
 
Op amp-electronics
Op amp-electronicsOp amp-electronics
Op amp-electronics
 
Boost converter
Boost converterBoost converter
Boost converter
 
741 Integrated circuit (IC)
741 Integrated circuit (IC)741 Integrated circuit (IC)
741 Integrated circuit (IC)
 
Rectifier and Amplifer instruments
Rectifier and Amplifer instruments Rectifier and Amplifer instruments
Rectifier and Amplifer instruments
 
TRANSFORMER
TRANSFORMERTRANSFORMER
TRANSFORMER
 
Clamping Circuit and Clipping Circuit
Clamping Circuit and Clipping CircuitClamping Circuit and Clipping Circuit
Clamping Circuit and Clipping Circuit
 
Oscillatorsppt
OscillatorspptOscillatorsppt
Oscillatorsppt
 
14827 mosfet
14827 mosfet14827 mosfet
14827 mosfet
 
Automatic control of street light using LDR
Automatic control of street light using LDRAutomatic control of street light using LDR
Automatic control of street light using LDR
 
BJT CE
BJT CEBJT CE
BJT CE
 
Question Bank linear integrated circuits and applications
Question Bank linear integrated circuits and applicationsQuestion Bank linear integrated circuits and applications
Question Bank linear integrated circuits and applications
 
CMOS LOGIC STRUCTURES
CMOS LOGIC STRUCTURESCMOS LOGIC STRUCTURES
CMOS LOGIC STRUCTURES
 
Rectifiers
RectifiersRectifiers
Rectifiers
 
Transistor
TransistorTransistor
Transistor
 
Design of cmos based ring oscillator
Design of cmos based ring oscillatorDesign of cmos based ring oscillator
Design of cmos based ring oscillator
 
Chapter-4 FET (1).ppt
Chapter-4 FET (1).pptChapter-4 FET (1).ppt
Chapter-4 FET (1).ppt
 
Negative feedback Amplifiers
Negative feedback AmplifiersNegative feedback Amplifiers
Negative feedback Amplifiers
 
Charged pump plls
Charged pump pllsCharged pump plls
Charged pump plls
 

En vedette

Why sending patches back is so important
Why sending patches back is so importantWhy sending patches back is so important
Why sending patches back is so importantMacpaul Lin
 
OpenWRT, A value-add base solution for your product. (2nd, Macpual)
OpenWRT, A value-add base solution for your product. (2nd, Macpual)OpenWRT, A value-add base solution for your product. (2nd, Macpual)
OpenWRT, A value-add base solution for your product. (2nd, Macpual)Macpaul Lin
 
Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)Macpaul Lin
 
1169_ali_mohamed
1169_ali_mohamed1169_ali_mohamed
1169_ali_mohamedMohamed Ali
 
AVR_Course_Day7 timers counters and interrupt programming
AVR_Course_Day7 timers counters and  interrupt programmingAVR_Course_Day7 timers counters and  interrupt programming
AVR_Course_Day7 timers counters and interrupt programmingMohamed Ali
 
USB Specification 2.0 - Chapter 9 - Device Framework
USB Specification 2.0 - Chapter 9 - Device FrameworkUSB Specification 2.0 - Chapter 9 - Device Framework
USB Specification 2.0 - Chapter 9 - Device FrameworkMacpaul Lin
 
U boot porting guide for SoC
U boot porting guide for SoCU boot porting guide for SoC
U boot porting guide for SoCMacpaul Lin
 
AVR_Course_Day2 what is pcb
AVR_Course_Day2 what is pcbAVR_Course_Day2 what is pcb
AVR_Course_Day2 what is pcbMohamed Ali
 
8051 architecture
8051 architecture8051 architecture
8051 architecturesb108ec
 
AVR Fundamentals
AVR FundamentalsAVR Fundamentals
AVR FundamentalsVinit Vyas
 
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERSPIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERSVISHNU KP
 
AVR_Course_Day1 basic electronics
AVR_Course_Day1 basic electronicsAVR_Course_Day1 basic electronics
AVR_Course_Day1 basic electronicsMohamed Ali
 
Hardware interfacing basics using AVR
Hardware interfacing basics using AVRHardware interfacing basics using AVR
Hardware interfacing basics using AVRMohamed Abdallah
 

En vedette (17)

Why sending patches back is so important
Why sending patches back is so importantWhy sending patches back is so important
Why sending patches back is so important
 
OpenWRT, A value-add base solution for your product. (2nd, Macpual)
OpenWRT, A value-add base solution for your product. (2nd, Macpual)OpenWRT, A value-add base solution for your product. (2nd, Macpual)
OpenWRT, A value-add base solution for your product. (2nd, Macpual)
 
Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)
 
1169_ali_mohamed
1169_ali_mohamed1169_ali_mohamed
1169_ali_mohamed
 
AVR_Course_Day7 timers counters and interrupt programming
AVR_Course_Day7 timers counters and  interrupt programmingAVR_Course_Day7 timers counters and  interrupt programming
AVR_Course_Day7 timers counters and interrupt programming
 
USB Specification 2.0 - Chapter 9 - Device Framework
USB Specification 2.0 - Chapter 9 - Device FrameworkUSB Specification 2.0 - Chapter 9 - Device Framework
USB Specification 2.0 - Chapter 9 - Device Framework
 
U boot porting guide for SoC
U boot porting guide for SoCU boot porting guide for SoC
U boot porting guide for SoC
 
AVR_Course_Day2 what is pcb
AVR_Course_Day2 what is pcbAVR_Course_Day2 what is pcb
AVR_Course_Day2 what is pcb
 
Interrupt
InterruptInterrupt
Interrupt
 
DPA
DPADPA
DPA
 
Interrupts
InterruptsInterrupts
Interrupts
 
8051 architecture
8051 architecture8051 architecture
8051 architecture
 
AVR Fundamentals
AVR FundamentalsAVR Fundamentals
AVR Fundamentals
 
Interrupts
InterruptsInterrupts
Interrupts
 
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERSPIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
 
AVR_Course_Day1 basic electronics
AVR_Course_Day1 basic electronicsAVR_Course_Day1 basic electronics
AVR_Course_Day1 basic electronics
 
Hardware interfacing basics using AVR
Hardware interfacing basics using AVRHardware interfacing basics using AVR
Hardware interfacing basics using AVR
 

Similaire à Pull up & pull-down resistors

Simple Automatic Water Level Controller by using ic 555 timer.
Simple Automatic Water Level Controller by using ic 555 timer.Simple Automatic Water Level Controller by using ic 555 timer.
Simple Automatic Water Level Controller by using ic 555 timer.PRASHANTH RAO
 
Simple Automatic Water Level Controller
Simple Automatic Water Level ControllerSimple Automatic Water Level Controller
Simple Automatic Water Level Controllerselvalakshmi24
 
switch circuit control
switch circuit controlswitch circuit control
switch circuit controlKumar Shivam
 
Fed vonverter project design and progress report
Fed vonverter project design and progress reportFed vonverter project design and progress report
Fed vonverter project design and progress reportMehboobUET
 
3.Arduino projects.pptx
3.Arduino projects.pptx3.Arduino projects.pptx
3.Arduino projects.pptxMohamed Essam
 
Integrated circuit
Integrated circuitIntegrated circuit
Integrated circuitddsshukla
 
zero cross detector.pptx
zero cross detector.pptxzero cross detector.pptx
zero cross detector.pptxAman bharti
 
Mains operated under voltage over voltage trip switch
Mains operated under voltage over voltage trip switchMains operated under voltage over voltage trip switch
Mains operated under voltage over voltage trip switchEdgefxkits & Solutions
 
LIGHT DETECTOR USING NAND GATE
LIGHT DETECTOR USING NAND GATELIGHT DETECTOR USING NAND GATE
LIGHT DETECTOR USING NAND GATEabdullahkhalid50
 
WIRE BREAK CIRCUIT ALARAM
WIRE BREAK CIRCUIT ALARAMWIRE BREAK CIRCUIT ALARAM
WIRE BREAK CIRCUIT ALARAMrookiedope8326
 

Similaire à Pull up & pull-down resistors (20)

Stabilised Power Supplies
Stabilised Power SuppliesStabilised Power Supplies
Stabilised Power Supplies
 
Simple Automatic Water Level Controller by using ic 555 timer.
Simple Automatic Water Level Controller by using ic 555 timer.Simple Automatic Water Level Controller by using ic 555 timer.
Simple Automatic Water Level Controller by using ic 555 timer.
 
Clap switch mini project using 555 timer IC
Clap switch mini project using 555 timer ICClap switch mini project using 555 timer IC
Clap switch mini project using 555 timer IC
 
Simple Automatic Water Level Controller
Simple Automatic Water Level ControllerSimple Automatic Water Level Controller
Simple Automatic Water Level Controller
 
switch circuit control
switch circuit controlswitch circuit control
switch circuit control
 
Fed vonverter project design and progress report
Fed vonverter project design and progress reportFed vonverter project design and progress report
Fed vonverter project design and progress report
 
Ic555
Ic555Ic555
Ic555
 
UNIT-5.pptx.ppt
UNIT-5.pptx.pptUNIT-5.pptx.ppt
UNIT-5.pptx.ppt
 
Comparator
ComparatorComparator
Comparator
 
3.Arduino projects.pptx
3.Arduino projects.pptx3.Arduino projects.pptx
3.Arduino projects.pptx
 
Switches and LEDs interface to the 8051 microcontroller
Switches and LEDs interface to the 8051 microcontrollerSwitches and LEDs interface to the 8051 microcontroller
Switches and LEDs interface to the 8051 microcontroller
 
Sepic
SepicSepic
Sepic
 
Integrated circuit
Integrated circuitIntegrated circuit
Integrated circuit
 
zero cross detector.pptx
zero cross detector.pptxzero cross detector.pptx
zero cross detector.pptx
 
Pass Transistor Logic
Pass Transistor LogicPass Transistor Logic
Pass Transistor Logic
 
Need of Decoupling Capacitor
Need of Decoupling CapacitorNeed of Decoupling Capacitor
Need of Decoupling Capacitor
 
10 lm 555 timer
10 lm 555 timer10 lm 555 timer
10 lm 555 timer
 
Mains operated under voltage over voltage trip switch
Mains operated under voltage over voltage trip switchMains operated under voltage over voltage trip switch
Mains operated under voltage over voltage trip switch
 
LIGHT DETECTOR USING NAND GATE
LIGHT DETECTOR USING NAND GATELIGHT DETECTOR USING NAND GATE
LIGHT DETECTOR USING NAND GATE
 
WIRE BREAK CIRCUIT ALARAM
WIRE BREAK CIRCUIT ALARAMWIRE BREAK CIRCUIT ALARAM
WIRE BREAK CIRCUIT ALARAM
 

Plus de prathik

Ieee format
Ieee formatIeee format
Ieee formatprathik
 
Thyristor Commutation Techniques
Thyristor Commutation TechniquesThyristor Commutation Techniques
Thyristor Commutation Techniquesprathik
 
Ave - TV receiver (PAL - D circiut main)
Ave - TV receiver (PAL - D circiut main)Ave - TV receiver (PAL - D circiut main)
Ave - TV receiver (PAL - D circiut main)prathik
 
"Dad you are the best"
"Dad you are the best""Dad you are the best"
"Dad you are the best"prathik
 
" Dad you are the best "
" Dad you are the best "" Dad you are the best "
" Dad you are the best "prathik
 
Microcontrollers 80 Marks Sample Question Paper
Microcontrollers   80 Marks Sample Question PaperMicrocontrollers   80 Marks Sample Question Paper
Microcontrollers 80 Marks Sample Question Paperprathik
 
Microcontrollers 80 Marks Sample Question Paper
Microcontrollers   80 Marks Sample Question PaperMicrocontrollers   80 Marks Sample Question Paper
Microcontrollers 80 Marks Sample Question Paperprathik
 
Industrial Electronics 80 Marks Sample Test Paper
Industrial Electronics    80 Marks Sample Test PaperIndustrial Electronics    80 Marks Sample Test Paper
Industrial Electronics 80 Marks Sample Test Paperprathik
 
Digital Communication 80 Marks Sample Test Paper
Digital Communication   80 Marks Sample Test PaperDigital Communication   80 Marks Sample Test Paper
Digital Communication 80 Marks Sample Test Paperprathik
 
Principles Of Computer Architecture And Maintenance 80 Marks Sample Questio...
Principles Of Computer Architecture And Maintenance   80 Marks Sample Questio...Principles Of Computer Architecture And Maintenance   80 Marks Sample Questio...
Principles Of Computer Architecture And Maintenance 80 Marks Sample Questio...prathik
 

Plus de prathik (12)

Ieee format
Ieee formatIeee format
Ieee format
 
Thyristor Commutation Techniques
Thyristor Commutation TechniquesThyristor Commutation Techniques
Thyristor Commutation Techniques
 
Ave - TV receiver (PAL - D circiut main)
Ave - TV receiver (PAL - D circiut main)Ave - TV receiver (PAL - D circiut main)
Ave - TV receiver (PAL - D circiut main)
 
Ecom
EcomEcom
Ecom
 
Ecom
EcomEcom
Ecom
 
"Dad you are the best"
"Dad you are the best""Dad you are the best"
"Dad you are the best"
 
" Dad you are the best "
" Dad you are the best "" Dad you are the best "
" Dad you are the best "
 
Microcontrollers 80 Marks Sample Question Paper
Microcontrollers   80 Marks Sample Question PaperMicrocontrollers   80 Marks Sample Question Paper
Microcontrollers 80 Marks Sample Question Paper
 
Microcontrollers 80 Marks Sample Question Paper
Microcontrollers   80 Marks Sample Question PaperMicrocontrollers   80 Marks Sample Question Paper
Microcontrollers 80 Marks Sample Question Paper
 
Industrial Electronics 80 Marks Sample Test Paper
Industrial Electronics    80 Marks Sample Test PaperIndustrial Electronics    80 Marks Sample Test Paper
Industrial Electronics 80 Marks Sample Test Paper
 
Digital Communication 80 Marks Sample Test Paper
Digital Communication   80 Marks Sample Test PaperDigital Communication   80 Marks Sample Test Paper
Digital Communication 80 Marks Sample Test Paper
 
Principles Of Computer Architecture And Maintenance 80 Marks Sample Questio...
Principles Of Computer Architecture And Maintenance   80 Marks Sample Questio...Principles Of Computer Architecture And Maintenance   80 Marks Sample Questio...
Principles Of Computer Architecture And Maintenance 80 Marks Sample Questio...
 

Dernier

Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 

Dernier (20)

Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 

Pull up & pull-down resistors

  • 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. 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. 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. 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. 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 )