Notifications
Clear all

Button with pull up resistor

5 Posts
2 Users
0 Likes
935 Views
(@yurkshirelad)
Member
Joined: 3 years ago
Posts: 493
Topic starter  

I watched part of a video last night explaining buttons using a pull up resistor. I sort of understand the theory, so I tried creating it in EasyEDA.

When I run their simulation tool, the multimeter doesn't show 5V as the video tutorial implies I should. The tutorial said there is no current flowing when the button isn't pressed, so there should be no voltage drop across the pull up resistor.

I may have misunderstood something fundamental or my circuit could be wrong. Any pointers would be appreciated.

button pull up

 


   
Quote
(@yurkshirelad)
Member
Joined: 3 years ago
Posts: 493
Topic starter  

I took out the LED and its resistor to simplify things, and I see the 5V in the multimeter as I expected.

I'm not sure why that makes a difference, to be honest.


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2043
 

@yurkshirelad

 The tutorial said there is no current flowing when the button isn't pressed, so there should be no voltage drop across the pull up resistor.

In the circuit you show there is a path via the 330 ohm resistor and the LED to earth so electrons are flowing through the 10K resistor causing a voltage drop.

Perhaps a link to the video in question?

Pulling out the LED and its resistor removed that path to the earth so no electron flow through the 10K unless the switch is pressed.

 

 


   
ReplyQuote
(@yurkshirelad)
Member
Joined: 3 years ago
Posts: 493
Topic starter  

Sheesh, that was a silly question now I think about it. I was so focused on the pull up resistor that I wasn't thinking about the rest of the circuit.

The video shows the wire going to a GPIO, instead of an LED+resistor. I wasn't sure how to represent that in the EasyEDA editor, so I just used an LED, without thinking it through!

Thanks


   
ReplyQuote
(@yurkshirelad)
Member
Joined: 3 years ago
Posts: 493
Topic starter  

I managed to get a button working the other night with a pull down resistor. I used an interrupt to respond to the button press. So progress! 😀 

Baby steps.


   
ReplyQuote