How to wake esp8266 from deep sleep without continuous resets

后端 未结 3 1083
遇见更好的自我
遇见更好的自我 2021-02-03 15:54

I\'m building an IR to wifi bridge using an esp8266. Basically I\'m building an IR receiver connected to an esp8266 inside an IR remote control, to forward received IR Remote ke

相关标签:
3条回答
  • 2021-02-03 16:00

    Did you see Espressif doc about sleep ESP8266 modes? It is available here: http://www.espressif.com/sites/default/files/9b-esp8266-low_power_solutions_en_0.pdf

    It says:

    In Deep-sleep mode, the chip can be woken up and initialized by a low-level pulse generated on the EXT_RSTB pin via an external IO.

    So, I'm not sure it is possible to avoid reset (although, maybe some hacky way exists?), but what about another sleep mode? Like light-sleep.

    0 讨论(0)
  • 2021-02-03 16:14

    This is a circuit that I use to allow for one shot interrupt to wake up from deep sleep on ESP8266. It operates by allowing interrupt to reset only after the deep sleep timer activated (D0 is pulled low). Put a short timeout on your deep sleep function to enable interrupt right away.

    After some testing, I find that the circuit above does not save as much power as I thought because it only prevents the chip from start up but internal part of ESP is active and draw around 15ma waiting for reset. This is a lot more than 60ua in deep sleep!

    If you have a signal that stay on for a few seconds after activation (like a PIR motion sensor) then the circuit below may work. It uses a capacitor to allow only edge trigger then running code can check input signal on GPIO4. However, overall power usage is still not good because the ESP8266 max sleep time is about 1 hour. This means the ESP8266 still wakes up and uses 15ma for a few seconds before going back to sleep. At 5 minutes deep sleep cycle, a 1500mah would be good for around 5 days.

    0 讨论(0)
  • 2021-02-03 16:19

    This post on electronics stack describes how to do a one-shot button with a couple extra parts. However space-wise they add up to be larger than using another micro, so the OP decided to go with an MCU. The micro will use the fewest additional parts and claim the lowest amount of space.

    0 讨论(0)
提交回复
热议问题