From ESP32 datasheet:

Got from ESP32 datasheet

In my case:
VDD = 3.3V

Vil (max) = 0.25 * 3.3 = 0.825V
Vih (min) = 0.75 * 3.3 = 2.475V


LOW LEVEL range is -0.3V to 0.825V
HIGH LEVEL range is 2.475V to 3.6V

But when I tested practically:

LOW LEVEL range is 0V to 1.67V
HIGH LEVEL range is 1.67V to 3.3V

Question : Why is my practical range far different from the theoretical range and what does theoretical range from 0.825V to 2.475V mean?

  • 1
    \$\begingroup\$ What exactly were you expecting to obtain with inputs between 0.825 to 2.475V? \$\endgroup\$ Nov 11, 2018 at 15:58
  • \$\begingroup\$ when i increase the voltage from 0V to 3.3V. Doesn't the pin read HIGH when it crosses 2.475V ?? , But i get HIGH once the voltage crosses 1.67V. Why is this happening ? \$\endgroup\$ Nov 11, 2018 at 16:26
  • \$\begingroup\$ the datasheet doesn't guarantee the result outside the ranges. \$\endgroup\$
    – Juraj
    Nov 11, 2018 at 16:36

3 Answers 3


The spec says that the input is guaranteed to be read as a Low below 0.25 Vdd, and as a High above 0.75 Vdd.

It does not specify where the actual switching threshold is - from the spec, we only know that the switching threshold is somewhere between 0.25 Vdd and 0.75 Vdd. The actual threshold may vary between parts or between pins on a given part. Possibly, the switching threshold will be higher for a Low to High transition, than for a High to Low transistion.


(0.825 V + 2.475 V)/2 = 1.65 V. Seems your observed value (1.67 V) is almost exactly in the middle between the theoretical values.

I want to use an ESP8266-S01 to indirectly measure a variable resistor using this method: charging a capacitor over a GPIO and measuring the time of discharge until the voltage threshold is reached (this method works with an Arduino at 5 V VCC and switching threshold at around 2.5 V). Hopefully the ESP8266-S01 will do.


In addition to the other answers, it should be noted that the input logic pins (if with no Schmitt trigger) rely on fast transitions between the two valid logic voltage levels. If an input is used close to the threshold, an anomalous power dissipation condition might occur.

For a general reference see: Low Power Principles, Agatino Pennisi (ST), Par. 2.3.

Also, from ATMega328P datasheet - 9.10.6 Port Pins:

... If the input buffer is enabled and the input signal is left floating or have an analog signal level close to VCC/2, the input buffer will use excessive power...

Unfortunately, the ESP8266 datasheet lacks that information but the situation should be the same.


Your Answer

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

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