Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By rgviva
#36258 Hi,

According to HUZZAH schematics, the red led on the HUZZAH pcb (NOT the leds on the mounted esp module) is connected to a 1K resistor and is also pulling up GPIO0. GPIO0 is also connected through a switch button to ground - so GPIO0 is configured as multi purpose - both able to trigger the red led (e.g turn on by setting GPIO0 low) and also allows entering flash program mode by pressing the button during power on. GPIO0 is essentially pulled up via the led using the 1K resistor.

see full schematics here https://github.com/adafruit/Adafruit-Huzzah-ESP8266-Basic-Breakout-PCB

Everything behaves as expected, however, when i put my HUZZAH board into deep sleep (yes GPIO16 has to be connected to RST for this to work) - something funny going on with that red led - It is powered, but very dimmed. See picture of board under deep sleep and notice the led:

Image

This happens only in deep sleep mode! Because when the board is fully powered, that led is completely off. I also measured current during deep sleep and it shows ~97uA which is roughly 10 times the advertised current consumption under deep sleep (~10uA) - so that led is sucking power.

Does this happen because GPIO0 is special and doesn't have internal pullup/down? Will replacing the 1K with 10k resolve the issue?
User avatar
By tve
#36342 I suspect what's happening is the following. The led is connected to 3.3v. The power rail inside the esp8266 is shut down. The gpio0 pin has an esd protection diode which shunts voltage above the internal power rail. So what you're observing is the current flowing through the LED and resistor and protection diode into the chip. Basically you're attempting to power the esp8266 through LED, resistor and input pin...
User avatar
By rgviva
#75691 When i add a dedicated pullup resistor attached to GPIO0 it eliminates this problem - and the led is completely shut down during deep sleep.

Another good reason to add a dedicated pullup to GPIO0 is this: in the HUZZAH design, GPIO0 is "pulled up through" the red led. This is not very good design because the led has a forward voltage drop, and so the actual voltage GPIO0 is seeing is not 3.3V but a reduced voltage - after the led. Now if you are battery powered the voltage might drop enough for GPIO0 to be considered pulled down by esp, and it will boot into serial flash mode - very annoying :)