No announcement yet.

When I execute the ESP8266 ESP.deepSleep() function, the Backlight turns on.

  • Filter
  • Time
  • Show
Clear All
new posts

  • When I execute the ESP8266 ESP.deepSleep() function, the Backlight turns on.

    I'm trying to use the ESP8266 ESP.deepSleep() function on a Gen4-IoD. I'm trying to turn off virtually everything (including the CPU and clocks) and leaving the RTC on. The goal is to create a simple NTP application that once it receives a valid NTP packet with UTC datestamp, I load the RTC and go to sleep until a wake event occurs. This may allow me to run for days (weeks or hopefully years) on a battery.

    However, when I enter the deepSleep function, the Backlight always turns on even though the Backlight is explicitly turned off just prior to entering the function. This Backlight on nullifies the power savings I'm trying to achieve.

    Is there a way to default the Backlight to OFF when in the deepSleep mode?

    Note: For those familiar with the ESP.deepSleep(), I connect GPIO16 to RESET AFTER I program the IoD.

    Thanks for your help in advance.

  • #2

    I have tested it and I can confirm I get the same result.

    The Backlight control of the IoD is connected to GPIO0 which doesn't keep it's set behaviour on deepSleep and as a result the backlight will come back on although a bit dimmer than normal.

    I wil look into it and see if there is a workaround.

    Best regards



    • #3
      Thank you Paul.

      From the IoD schematics, it appears that the Backlight LEDs are driven low (Kathode) through the Q1 N-Channel FET. The FET gate signal is connected to GPIO0 which has a pullup of 10K with a Active HIGH signal.

      I'm assuming when the CPU is effectively shutdown, GPIO0 becomes an input. This causes the 10K pullup to dominate with an active high signal thereby turning on the LEDs.

      If I am correct about the CPU disabled in deepSleep() causes GPIO0 to float active high, then the ONLY practical workaround is to use a 1K or less resistor to GND on GPIO0. This should prevent the LED to be turned on (at least hardly turned on). However, the 10K pullup with a 1K pulldown will result in 300uA of current flow in this condition. Well it least its' better than the LED current draw (>100mA?)