I'm working with a ESP32 NodeMCU32 dev board.

When I set INPUT_PULLUP on pin 23, and measure its voltage, I get 1.57V. If I do the same for pin 22, I get 3.23V. Both pins are open (not connected to anything) and I've done these measurements on a "pure" platformio build, code below.

As far as I know, pin 23 used to work as I expected (i.e. like pin 22). Is this board faulty or damaged, or could I be setting something up wrongly?

Could be a red herring, but I'm suspicious that 1.57 * 2 is very close to 3.23.

EDIT: Datasheet (section 5.3) says minimum high DC output is 0.8×VDD, which would be about 2.6V (far higher than the 1.57V I'm getting). I assume this is what the pull up is connected to, so perhaps this indicates the chip is not in spec (faulty).

Here's the code I used for the tests.

#include <Arduino.h>

void setup() {

  pinMode(22, INPUT_PULLUP);
  pinMode(23, INPUT_PULLUP);

uint8_t counter;
void loop() {
  Serial.print("Test! ");
  • \$\begingroup\$ Is there anything connected to the pin outside the microcontroller? \$\endgroup\$
    – Hearth
    Mar 21, 2021 at 22:28
  • \$\begingroup\$ No. Both pins are "open": only connected to the header. \$\endgroup\$
    – aaaidan
    Mar 21, 2021 at 22:36

1 Answer 1


I had in the past a similar problem.

In an NXP LPC2388 powered at 3.3 Volt, a couple of input pins programmed as pull-up pins with nothing externally attached, showed 2.4 Volt instead of 3.3 Volt.

I read carefully the datasheet of the microcontroller and realized that the minimum output voltage of input pins programmed as pull-up was 2.4 Volt.

I suggest you to read the datasheet of the ESP32.

  • \$\begingroup\$ Thanks, great idea. Datasheet says minimum out voltage for high is 0.8xVDD, while minimum input voltage for high is 0.75xVDD (which seems very sensible!) Unfortunately, I'm seeing something like 0.5xVDD for the pulled-up high. (I'll update the question) \$\endgroup\$
    – aaaidan
    Mar 22, 2021 at 21:55
  • \$\begingroup\$ 0.5 x VDD is strange. Did you by any chance enable the pull-down resistor too? \$\endgroup\$ Mar 23, 2021 at 5:37
  • \$\begingroup\$ Code posted in answer is the entire program I used. I've actually never knowingly used PULL_DOWN in any program :D Maybe there's some kind of low level chip config (like fuses?) but I have not heard of the ESP32 having such a feature, and I don't know how I would have set it. \$\endgroup\$
    – aaaidan
    Mar 25, 2021 at 5:21
  • \$\begingroup\$ Out of interest - what does your gut say? What is the chance that I've misconfigured the board, vs damaged the board, vs it being a manufacturing fault? It has been running continuously in my garage for 6 months, connected to a 5V power supply and a reed switch... \$\endgroup\$
    – aaaidan
    Mar 25, 2021 at 5:24
  • 1
    \$\begingroup\$ If nothing is attached to that pin, just forget it. It won't burn your board. Just test the chip temperature by a thermometer especially in the nearby if that pin. \$\endgroup\$ Mar 25, 2021 at 6:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.