cancel
Showing results for 
Search instead for 
Did you mean: 

Suggest Pull-Up and Pull Down Values for Input Pins

DBhut.1
Senior

We Developing One Product which will use in very noisy environment.

In our product we are using STM32WLE5CC which connected with multiple input switches some are Active high Configured and Some are Active Low Configured.

So our query is which values of resister should we use for Pull-Up/Pull-Down that input pins.

4.7k or 10k or any other value?0693W00000LzHjTQAV.png 

4 REPLIES 4
TDK
Guru

I would do (2), but remove R2 and use the internal pullup instead. Less parts, less routing, less susceptibility to noise. Keep the cap for noise attenuation, possibly with a 0.1uF instead. Possibly add a 10kOhm between the switch and the capacitor. That would give you a low pass filter of ~200Hz, which is low enough to avoid high frequency noise and high enough to be responsive to button presses.

If you feel a post has answered your question, please click "Accept as Solution".
DBhut.1
Senior

I am just curious to know that what can be benefit of using External Pullup instead of Internal Pullup?

External pull-up gives you the choice of pull-up resistor value.

Why might you want this?

Unless you are using gold contacts on the switch, you might choose to pass 5 mA or more through the switch. This can burn off any oxide that otherwise forms on the switch contacts, leading to longer reliable operation.

Or maybe you want a high value resistance so a long press does not burn too much power. (Under these conditions, you could alternatively turn off the built-in pull-up for a period and then turn it back on to check if the switch is still on).

Another point is that when a pin is configured as an analog input, you often can't have built-in pull-up/pull-down resistors at the same time on stm32.

TDK
Guru

The main benefit of an external resistor is that the value is set even when chip is in reset or booting up. That doesn't matter with a button, as the MCU is the one reading it and can activate the pull before it reads.

If you feel a post has answered your question, please click "Accept as Solution".