Author Topic: How to choose pull up/down resistor values?  (Read 1774 times)

0 Members and 1 Guest are viewing this topic.

Offline MarkSTopic starter

  • Supporter
  • ****
  • Posts: 838
  • Country: us
How to choose pull up/down resistor values?
« on: April 11, 2023, 09:50:01 pm »
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.... ??
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6221
  • Country: de
Re: How to choose pull up/down resistor values?
« Reply #1 on: April 11, 2023, 09:54:27 pm »
Far too vague.
Show a couple of situations and we can help.
 

Online thm_w

  • Super Contributor
  • ***
  • Posts: 7117
  • Country: ca
  • Non-expert
Re: How to choose pull up/down resistor values?
« Reply #2 on: April 11, 2023, 10:10:17 pm »
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
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 
The following users thanked this post: MarkS

Offline MarkSTopic starter

  • Supporter
  • ****
  • Posts: 838
  • Country: us
Re: How to choose pull up/down resistor values?
« Reply #3 on: April 11, 2023, 10:28:23 pm »
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.

That's what I was looking for! Thank you!
 

Online John B

  • Frequent Contributor
  • **
  • Posts: 821
  • Country: au
Re: How to choose pull up/down resistor values?
« Reply #4 on: April 11, 2023, 10:55:13 pm »
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.
 
The following users thanked this post: MarkS

Offline ve7xen

  • Super Contributor
  • ***
  • Posts: 1194
  • Country: ca
    • VE7XEN Blog
Re: How to choose pull up/down resistor values?
« Reply #5 on: April 11, 2023, 11:00:06 pm »
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 application https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/6/I2C-Bus-Pullup-Resistor-Calculation.pdf

If 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.

73 de VE7XEN
He/Him
 
The following users thanked this post: MarkS

Offline MarkSTopic starter

  • Supporter
  • ****
  • Posts: 838
  • Country: us
Re: How to choose pull up/down resistor values?
« Reply #6 on: April 12, 2023, 02:39:36 am »
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.  :-//
 

Offline barshatriplee

  • Regular Contributor
  • *
  • !
  • Posts: 130
  • Country: bd
Re: How to choose pull up/down resistor values?
« Reply #7 on: April 12, 2023, 10:13:32 am »
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
 

Offline srb1954

  • Super Contributor
  • ***
  • Posts: 1111
  • Country: nz
  • Retired Electronics Design Engineer
Re: How to choose pull up/down resistor values?
« Reply #8 on: April 12, 2023, 11:26:30 am »
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 application https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/6/I2C-Bus-Pullup-Resistor-Calculation.pdf

If 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.
If 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.
 
The following users thanked this post: MarkS, Ian.M

Offline drvtech

  • Regular Contributor
  • *
  • Posts: 113
  • Country: gb
Re: How to choose pull up/down resistor values?
« Reply #9 on: April 12, 2023, 01:58:29 pm »
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.
 
The following users thanked this post: MarkS

Offline BeBuLamar

  • Super Contributor
  • ***
  • Posts: 1354
  • Country: us
Re: How to choose pull up/down resistor values?
« Reply #10 on: April 17, 2023, 11:33:52 am »
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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf