Some people say that ESP8266 tolerates 5V logic level in its GPIO, others strongly disagree, pointing to datasheet-mentioned maximum 3.6V. Datasheets are not source code for chip compiling, nor are they universally accurate and complete. [Avian] Decided to dig deeper into the claims, conduct a test with an actual ESP8266 chip, then share the results for all of us.
For the test, he used a curve tracer – an instrument capable of generating a wide range of voltages and measuring electricity, then planning the current relationship from voltage. It helps to identify all types of variables from diode breakdown voltage to transistor properties. The curve tracer he uses is his efficient and professional-looking DIY build, and arguably, a worthy writing!
The reasoning behind it [Avian]The test is simple – if a pin set at an input starts receiving a large amount of current at a certain voltage threshold, there must be some chip-internal structure, intentional or unintentional, which will be damaged at this voltage. With the curve tracer in hand, he set up an ESP-01 module to set a GPIO for input and began to increase the voltage.
Experiments have shown that while there is a reverse bias ESD diode from the GPIO pin to the ground, there does not appear to be a VCC relay diode from the GPIO pin – and this is the primary concern for 5V tolerance. Internally there seems to be something functional like a 6 V zener diode, which should hold the voltage before it is too high to handle the chip. None of this should be a problem for 5V compatibility and it seems fair to interpret it as a confirmation of 5V tolerance unless someone else shows up.
[Avian] One did not want to destroy the ESP8266, so the test was conducted with a 1K series resistor between the curved tracer and the input – which could make the results somewhat biased. On the other hand, adding a series resistor to the front of your inputs is an overall less costly exercise, 5V or otherwise. He further noted that although the pins do not appear to be adversely affected by higher input voltages, bootloader boot-up may set some of them to 3.3 V output, shortening your 5 V source to your 3.3 V relay – worth remembering!
[Avian]Its fun to follow the research journey, and we suggest you check out her blog; Last time, we covered his research by hiding a flawless 3.5mm jack with a misleading audio compensation circuit. Since we first covered ESP8266 in 2014, we’ve been researching all the things it’s really capable of, and we’ve come up with the GPIO 5 V compatibility issue in 2016 – finally this question is sure to rest!