How do pull up and pull down resistors remove electrical noise?

In summary: Pull-up resistors (or any resistor for that matter) are often used as a form of low-pass filtering to reduce or eliminate extraneous noise on an input, or to limit the current that can flow during transient events.What input cable? You didn't say anything about distance transmission, antennas, cables, etc.
  • #36
alan123hk said:
the software engineer had forgotten to use a resistor to connect one of the microcontroller’s input ports to power or ground

Sorry, the expression here may be unclear. Of course, software engineers do not need to add real resistors to the circuit. They only need to use software instructions to enable the pull-up or pull-down resistor inside the microcontroller.
 
Engineering news on Phys.org
  • #37
I'm not aware of any pull-up resistors and pull-down resistors inside a microcontroller. Pull-up resistors and pull-down resistors are attached as part of the electronic hardware design. There are no switches to enable / disable them (switches would add cost and consume real estate). See for info about pull-up and pull-down resistors.
 
  • #39
I've designed electronics and written code for microprocessors and microcontroller for more than 40 years (Texas Instruments, 3M, Emerson). I'm curious, which microcontroller has internal pull-ups and pull-downs? Thanks!
 
  • #40
Thinking more about this, when pull-ups and pull-downs are attached to the electronics, they are active immediately when power is applied. Waiting for a micro to enable them is too late.
 
  • #41
bhs67 said:
I've designed electronics and written code for microprocessors and microcontroller for more than 40 years (Texas Instruments, 3M, Emerson). I'm curious, which microcontroller has internal pull-ups and pull-downs? Thanks!
Yep. Some do that. You can look into the PxREN configuration in MSP430s for example (there are others too).
Skip ahead to about 8:20 in this video:
https://training.ti.com/msp430-workshop-series-3-12-using-mspware-gpio
 
  • #42
bhs67 said:
I'm curious, which microcontroller has internal pull-ups and pull-downs?
...
Waiting for a micro to enable them is too late.
It's a common solution when the uC has configurable GPIO pins (which can serve as various type of input or output pins depending on the configuration).
The EE still has to ensure that things does not go haywire while they are not configured (during startup, reset, SW error and so on).
 
  • Like
Likes alan123hk and DaveE
  • #43
I know some PIC ucontrollers have pull-ups. 18F2520 for instance has pull-ups on one set of ports. Download the data for it if you wish to see.
 
  • #44
I like to think of the pull-up and pull-downs as changing the load impedance in a resistor divider. Here is what I mean.

Think of this simple circuit:

Vn 2 0 *something*
Rs 2 1 'Zsrc'
Ri 1 0 'Zin'

Where node 1 is the voltage on the input pin in question. The Vn source is any noise source. Ri is the input impedance of the buffer. Rs is the strength of the coupling between the noise source and node 1.

Without a pull-up the input impedance (Zin) can be quite high. For example I'm looking at a STM32 data sheet that says it can have an input leakage current into a GPIO as high as 350nA at 3.3V for a Zin=3.3V/350nA ~= 10MΩ.

So say Vin was a 2Vpp noise source coupled to this pin, and it didn't even have a trace, if Zsrc (the strength of the coupling) was anything less than (Vil=0.4*3.3)*10M/2=6.6MΩ then this noise source could exceed Vil(max) of this input. If I add a 10K pull down to the pin then it will be in parallel with Ri, lowering the load impedance of this net, and now for my same 2Vpp to trip Vil(max) the coupling needs to be less than 6.6KΩ, which is so strong that it's probably not going to happen by mistake.

Here is another point to consider. GPIOs which are off, or high Z, don't actually source 0A. My same STM32 can source as much as 10uA from the pad even in HiZ (Off transistors also leak, see the Idss line item in a FET spec) and that's enough current to drive our 10MΩ input all the way up to the power rail. If we add the 10K pull down then that same 10uA will only pump the input up to 100mV which is safely below Vil(max).
 
  • #45
I've used lots of MSP430's. I never realized they have internal pull-up / pull-down resistors. I never used them (I used SPI for communication).

When a FET is connected to a micro output pin, I always put a pull-up on the gate of a P Channel FET and a pull-down on the gate of an N Channel FET. This is to ensure the FET is "off" when power is applied.

The pull-up resistor impedance needs to be high enough for the micro output to properly sink the current. The pull-down resistor impedance needs to be high enough for the micro output to properly source the current.
 
  • #46
There will be different considerations for different situations.

For some products, such as smart watches, apart from the battery and LCD, the internal space left for the electronic circuit board is extremely limited, and some electronic sensors may be placed, including heartbeat sensor, accelerometer (pedometer), etc., the last remaining space may be just fit in a microcontroller (wafer/dice form) about 2mm by 2mm, so even the space occupied by a small 0402 resistor will be saved as much as possible. Moreover, when producing such small and dense circuit boards, the number of parts on the circuit board must be minimized to reduce the chance of failure and production costs.
 
  • #47
Good point! At my last project, inadvertently blowing up an oil refinery was not an option!

The 0201 resistor is a tiny size. They may make them smaller now.

A lightning strike can create a voltage pulse, that can misdirect the micro firmware, which could misdirect the micro output. When possible, I prefer a solder joint vs. relying on a micro output.

It seems that these precautions would be implemented for air planes, automobiles, etc.

Striving to have zero failures has always been my highest priority for all products! :-)
 
Back
Top