Loading...
Pages: [1]   Go Down
Author Topic: Why would anyone ever use pull down resistors for momentary on switch?  (Read 512 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 68
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: 298
Posts: 26024
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: 68
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
Full Member
***
Karma: 8
Posts: 242
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

Austin, TX
Offline Offline
Faraday Member
**
Karma: 42
Posts: 5244
CMiYC
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

www.cmiyc.com - A guide to being an Enginerd

Grand Blanc, MI, USA
Online Online
Faraday Member
**
Karma: 47
Posts: 2567
"We're a proud service of the Lost Electricity Reclamation Agency"
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

Get the infamous "One Million Ohms" board at tINDIE.com: http://tinyurl.com/BuyMohms

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 282
Posts: 15442
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: 68
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
God Member
*****
Karma: 6
Posts: 950
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: 28
Posts: 1145
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

Port Angeles, Wa
Offline Offline
Edison Member
*
Karma: 13
Posts: 1410
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
Print
 
Jump to: