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.
A very simple way to find out the exact internal pullup resistance of the ESP32.
Re: A very simple way to find out the exact internal pullup resistance of the ESP32.
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
Alternatively you can use a fix resistor, measure the voltage and calculate the pull-up (R2) using https://ohmslawcalculator.com/voltage-d ... calculator
Who is online
Users browsing this forum: No registered users and 249 guests