Pages: [1]   Go Down
Author Topic: Why would anyone ever use pull down resistors for momentary on switch?  (Read 1480 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 84
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm still new at this arduino thing. When I first began I needed a button array. The tutorial I went by used pull down resistors for the switches.  I'm learning now that the arduino has built in pull up resistors so all we need to do is wire one side of switch and other to ground then set the switch pin as INPUT and HIGH to get it to work. Of course then checking if the pin is LOW for when pressed etc. I read up on it.

My real question is why would anyone ever use pull down resistors with a momentary switch? I've read there's less noise using the onboard pull up resistors.

Thanks in advance!
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 631
Posts: 34506
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Read this for the full discussion of this topic:-
http://www.thebox.myzen.co.uk/Tutorial/Inputs.html
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 84
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you Mike. smiley I read it. Looks like in most cases with short wire runs are fine with internal pull up resistor. I haven't tested yet though. My button board is working but I'm totally switching to panel mount switches instead of through hole switches. Going to be a bit until I actually have to chance to see how it works.

Cheers


Logged

Värmland, Sweden
Offline Offline
Sr. Member
****
Karma: 9
Posts: 262
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Read this for the full discussion of this topic:-
http://www.thebox.myzen.co.uk/Tutorial/Inputs.html


Nice write-up Mike!
Logged

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

My real question is why would anyone ever use pull down resistors with a momentary switch?
It has been my experience that software-minded people tend to use pull-downs.  They like the logic of "low = off, high = on."  As Mike's write-up points out, pull-downs can be dangerous in some situations which is why hardware-minded generally use pull-ups.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.c

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4089
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It has been my experience that software-minded people tend to use pull-downs.  They like the logic of "low = off, high = on."  As Mike's write-up points out, pull-downs can be dangerous in some situations which is why hardware-minded generally use pull-ups.

This is why some of us are crazy, it comes from thinking backwards all the time.
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17301
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It has been my experience that software-minded people tend to use pull-downs.  They like the logic of "low = off, high = on."  As Mike's write-up points out, pull-downs can be dangerous in some situations which is why hardware-minded generally use pull-ups.

This is why some of us are crazy, it comes from thinking backwards all the time.

Even easier if you are born lefthanded, we are use to flipping the world around to our point of view.  smiley-wink

Lefty
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 84
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm a backwards type of person as well lol. Thanks for the replies.
Logged

0
Offline Offline
Edison Member
*
Karma: 8
Posts: 1250
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

software minded.. AND a lefty?


(am I screwed?)  smiley-wink


Logged


Ayer, Massachusetts, USA
Offline Offline
Edison Member
*
Karma: 54
Posts: 1857
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

My real question is why would anyone ever use pull down resistors with a momentary switch?
It has been my experience that software-minded people tend to use pull-downs.  They like the logic of "low = off, high = on."  As Mike's write-up points out, pull-downs can be dangerous in some situations which is why hardware-minded generally use pull-ups.
I dunno.  This software type hates having to put in extra resistors in his design.  Of course, I solved the inversion problem by writing my own class library to cover different types of buttons, and did the inversion there, so in the normal code it will be non-zero for the button being pressed.  smiley-roll
Logged

Cumming, GA
Offline Offline
Edison Member
*
Karma: 20
Posts: 1657
Ultimate DIY: Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Being a hardware type... It doesn't take me much to rationalize adding a part where a part should be... even if that part is only for insurance that the circuit will behave when things go wonky.   To me... you seldom have EXTRA resistors in a design... but the bad stuff can happen when you don't add enough.  I personally behave as if the internal pullups don't even exist.  If Atmel won't guarantee that they are a specific resistor value, I have no specific use for them.
Logged

Pages: [1]   Go Up
Jump to: