User avatar
ric96
Posts: 1253
Joined: Sun Mar 17, 2013 6:03 am
Location: NOIDA, India
Contact: Website

1K Ohm resistor in pull down ?

Wed Jul 08, 2015 1:27 pm

I am planning to use pull down input mode for a series of buttons, this helps in keeping the number of wiers low as i will have to just connect a ground rail insted of running a separate 3.3v cable.

Is having a 1k resistor between Gpio and the switch recommended?
I've seen this in just a few demos but most of them directly connect a gpio pin to the button and then the button to the ground.
My apologies for shameless YouTube Plugs...
youtube.com/sahajsarup
twitter @sahajsarup
skype srics1996
e-mail: sahajsarup@gmail.com
Blog: http://www.geektillithertz.com/wordpress
Web: http://www.geektillithertz.com

User avatar
joan
Posts: 14959
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: 1Kh resistor in pull down ?

Wed Jul 08, 2015 1:30 pm

It will be safer. It will limit current to a safe level if the button gpio is mistakenly set as a high output rather than as an input.

User avatar
ric96
Posts: 1253
Joined: Sun Mar 17, 2013 6:03 am
Location: NOIDA, India
Contact: Website

Re: 1Kh resistor in pull down ?

Wed Jul 08, 2015 1:34 pm

joan wrote:It will be safer. It will limit current to a safe level if the button gpio is mistakenly set as a high output rather than as an input.
thnx
My apologies for shameless YouTube Plugs...
youtube.com/sahajsarup
twitter @sahajsarup
skype srics1996
e-mail: sahajsarup@gmail.com
Blog: http://www.geektillithertz.com/wordpress
Web: http://www.geektillithertz.com

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13142
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: 1K Ohm resistor in pull down ?

Wed Jul 08, 2015 1:44 pm

I still recommend adding pullups, you can turn on the software pullup built into the SoC, but these have quite a high ohmic value, and are really only useful to keep unconnected GPIO's at logic high. For a more stable operation replacing them with 4K7 Ohm external ones would be better. In that case I would replace the 1K series resistor to something lower so that the resistor divider you create will still allow the "low" signal it sees well below the minimum "low-treshold" of the GPIO, which I don't know, but assume will be lower than 0.8V. I suppose a 470R resistor should work better.
notice that the two GPIO's used for I2C have 1.8K pullups to 3V3, but that means the 470R series resistor must be lowered even further or the GPIO will not be pulled low enough for these two GPIO's to work reliably.

ciafok
Posts: 8
Joined: Tue Jun 23, 2015 5:11 am

Re: 1K Ohm resistor in pull down ?

Wed Jul 08, 2015 1:50 pm

mahjongg wrote:I still recommend adding pullup.........or these two GPIO's to work reliably.
R U sure you're not missing the point here? The serial 1k is for protection only when GPIO line is set as output, so no matter of 0 and 1 input levels...

When GPIO is an inpit, 1k value is almost transparent because of the very low GPIO input current.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13142
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: 1K Ohm resistor in pull down ?

Fri Jul 10, 2015 1:23 am

No I was not missing the point! it read as: for a button input the OP ONLY wanted to use the 1K series protection resistor, to "keep wiring minimal", implying he did NOT want to add a pullup resistor.

Return to “General discussion”