Page 1 of 1

A very simple way to find out the exact internal pullup resistance of the ESP32.

Posted: Sat Jan 21, 2023 1:15 am
by FRDM4236
A while ago I came across a message about finding internal pull-up resistance of the ESP32, but I don't remember when.

It is not difficult to do. No calculation is needed.

To enable internal pull-up on an IO pin such as GPIO04, add the following line of code in your setup() function.

pinMode(4, INPUT_PULLUP); // enable internal pull-up resistor on GPIO04.

Usually the pull-up resistance is between 50K-100K. Connect a 100K potentiometer between the GPIO04 pin and GND, adjust it and stop when the voltage at the GPIO04 pin is 1.65V. At that time the adjusted value of the potentiometer is exactly equal to the value of the internal pullup resistance.

If you don't have a potentiometer at hand, just make resistors in series or parallel to get the voltage reading something close to the 1.65V. The value of the combined resistors will be near the internal pull up resistance.

I use the GPIO pin 4 as an example, you can change it to any GPIO pin.

Re: A very simple way to find out the exact internal pullup resistance of the ESP32.

Posted: Sun Jan 22, 2023 5:20 am
by zapta1
Good idea.

Alternatively you can use a fix resistor, measure the voltage and calculate the pull-up (R2) using https://ohmslawcalculator.com/voltage-d ... calculator