How to choose pull up/down resistor values? - Page 1
Forum section: electronics / beginners

author: MarkS
author_rank: Unknown
timestamp: April 11, 2023, 09:50:01 pm
content: I know that the values will be application specific, but what, in general, am I looking for when calculating the values? Why should I choose a 10K over a 4k7 over a 2k2.... ??

author: Benta
author_rank: Super Contributor
timestamp: April 11, 2023, 09:54:27 pm
content: Far too vague.Show a couple of situations and we can help.

author: thm_w
author_rank: Super Contributor
timestamp: April 11, 2023, 10:10:17 pm
content: One thing you are looking for is current draw when calculating the value.If you have a 5V rail and a 1k pullup, then whatever is being pulled up has to handle that 5mA maximum current.https://www.seeedstudio.com/blog/2020/09/22/resistors-pull-up-and-pull-down-resistors/https://learn.sparkfun.com/tutorials/pull-up-resistors/all

author: MarkS
author_rank: Unknown
timestamp: April 11, 2023, 10:28:23 pm
content: Quote from: thm_w on April 11, 2023, 10:10:17 pmThat's what I was looking for! Thank you!

author: John B
author_rank: Frequent Contributor
timestamp: April 11, 2023, 10:55:13 pm
content: The best value will depend on the type of circuit and desired baud rate / bit rate and/or rise time.Some examples include an I2C bus, where more devices on the bus present a larger capacitive load, and so more devices on the bus require a lower value pull up. Another example is the output of an optocoupler or bipolar transistor, where quite low values are required to quickly deplete the charge carriers in the transistor to provide a fast rise/fall time between states.In these examples the correct pull up value may be hundreds to a few thousand ohms, whereas for a simple digital input that occasionally changes state, 100k ohms is fine.

author: ve7xen
author_rank: Super Contributor
timestamp: April 11, 2023, 11:00:06 pm
content: Generally you want to use the largest value practical, to reduce power consumption and the required drive strength of whatever is working against the resistor's load.If it is a dynamic pull-up, such as on a bus like I2C for example, then you need to balance the RC time constant against this, as increasing the resistor value also means slowing down the rise time when the resistor is pulling the line. TI has an app note on this specific applicationhttps://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/6/I2C-Bus-Pullup-Resistor-Calculation.pdfIf it's static or mostly-static (a reset button or the like), you can probably get away with a very high value like 1M or more, but typical values (~10k-100k) will be 'stronger' to give plenty of headroom against induced voltages and so on.

author: MarkS
author_rank: Unknown
timestamp: April 12, 2023, 02:39:36 am
content: The replies so far have focused on pull up resistors. With the given replies, I can make sense of it quite well. Thank you. However, are pull down resistors calculated differently? Pulling up a positive voltage makes sense. Pulling down a 0 volt reference doesn't.

author: barshatriplee
author_rank: Regular Contributor
timestamp: April 12, 2023, 10:13:32 am
content: The formula is derived from Ohm's law. V=IR. So, if you know your supply voltage V, and the maximum allowable current I through your circuit, you can calculate R from the formula. Somebody has already shared a good write-up by seeedstudio. You can see this video too:https://youtu.be/V0GeJPqzqsI

author: srb1954
author_rank: Super Contributor
timestamp: April 12, 2023, 11:26:30 am
content: Quote from: ve7xen on April 11, 2023, 11:00:06 pmIf you using a pull-resistor for a switch it is generally advisable to use a somewhat lower value resistor to ensure that there is sufficient "wetting current" for the switch. The wetting current helps to remove any surface films of oxides or organic contaminants that build up on the switch contacts over time and degrade the contact resistance. This is necessary even for gold-plated contacts which, although they don't oxidise, can still build surface films due to environmental contaminants.Depending on the type of switch it is normal to run between 100uA and 5mA of wetting current to ensure reliable long-term operation of the switch. The switch datasheet may give some recommendations on the recommended wetting current.

author: drvtech
author_rank: Regular Contributor
timestamp: April 12, 2023, 01:58:29 pm
content: For pulldowns you want a value which will guarantee to get the voltage below the minimum required to define a logic low. Again it's ohm's law. You check the maximum input current required Iil(max) and the maximum allowable voltage for a 'low' Vil(max) and this gives you the highest possible resistance that will 'just' work. You then reduce that to ensure that your 'low' will be a good one.

author: BeBuLamar
author_rank: Super Contributor
timestamp: April 17, 2023, 11:33:52 am
content: It's a balancing act. Two high a resistor then the pull up resistor doesn't pull the voltage high enough for the high signal state (or not low enough in case of pull down) when the switch is open. Too low a resistance value would pull exessive current when the switch is on and could overheat the resistor. To choose a good value you need to know the switch allowable current and the input impdedance of the device.