Mastering ESP32 Deep Sleep: Timers, GPIOs & Touch Sensors Explained

  Переглядів 11,601

atomic14

atomic14

День тому

We're doing a deep dive into deep sleep! Thanks to PCB Way for sponsoring the videos - www.PCBWay.com/?from=atomic
The ESP32 e-Paper weather display lasted exactly 2 months on its 1000mAh battery. It achieves this by spending most of its time in deep sleep, only waking up every 30 minutes to get a fresh forecast and update the display.
We're going to look at:
[0:00] Intro
[1:33] How to get into deep sleep
[1:42] Waking up by using a timer
[2:56] Waking up by GPIO pins (single and multiple)
[5:26] Waking up with the touch sensors
[6:13] How to know why you were woken up?
[7:37] How to persist state during deep sleep?
[8:24] How much current do we use in deep sleep?
It's pretty interesting stuff and opens up some great possibilities.
Sample code for this video is here: github.com/atomic14/esp32_dee...
Here's a link to one of @AndreasSpiess videos (the guy with the Swiss accent) • #387 Test of Battery o... he's got a bunch more videos measuring different ESP32 boards - definitely worth having a watch.
----
Patreon: / atomic14
ko-fi: ko-fi.com/atomic14

КОМЕНТАРІ: 43
@atomic14
@atomic14 2 роки тому
Follow up video on the ULP is here: ukposts.info/have/v-deo/g4GEk657e42Xras.html
@nischal_poudel
@nischal_poudel 7 місяців тому
wow, this video turned out to be super super useful. especially the part to configure multiple buttons to wake up the Esp 32. That info was super rate to find but you explained it soo simply
@nischal_poudel
@nischal_poudel 7 місяців тому
and the guy with the swiss ascent part was really funny😁
@wjn777
@wjn777 2 роки тому
Great video , very thorough. I am looking forward to your next video on the ULP
@NotMarkKnopfler
@NotMarkKnopfler 2 роки тому
This is brilliant - so concise. Thank you very much - this has inspired me to resurrect an ESP32 project that I have allowed to languish. I'm very grateful to you.
@atomic14
@atomic14 2 роки тому
That's great - though if you're anything like me you'll have boxes full of half finished projects...
@cyo_corner
@cyo_corner 2 роки тому
Thank you atomic! I can use this information for a small project of mine!
@bendtherules0
@bendtherules0 Рік тому
Wow, great video. To the point and detailed.
@purplePR0DUCTI0NS
@purplePR0DUCTI0NS 2 роки тому
Another awesome video about the ESP32! Thank you so much. Looking forward to the video on the ULP co-processor!
@atomic14
@atomic14 2 роки тому
I'm pretty excited about it - you can do some really clever things.
@albertroswell
@albertroswell Рік тому
great video I had no idea about tpuch pads, thanks
@Bianchi77
@Bianchi77 2 роки тому
Cool video, thanks :)
@cabletie
@cabletie 2 роки тому
This is great and very timely thanks! I'm looking for a way to speed up the connection to wifi after a deep sleep - I hope you cover something like that in the next vid...
@atomic14
@atomic14 2 роки тому
That's a great one to investigate as I'm having problems myself in this area. I do know that giving your device a fixed IP so you don't need to do DHCP speeds things up.
@edgull_tlt
@edgull_tlt 2 роки тому
Спасибо
@5VoltChannel
@5VoltChannel 2 роки тому
Great 👍👍
@darlanrocha6726
@darlanrocha6726 2 роки тому
Thank you very much for this precious video. Can u show us how to configure multiple touchpins to wakeup? Tks in adv.
@atomic14
@atomic14 2 роки тому
Hi Darlan, just repeat this code: touchAttachInterrupt(T9, touch_isr_handler, 50); changing the T9 to the other touch pins you want to monitor.
@darlanrocha6726
@darlanrocha6726 2 роки тому
@@atomic14 thank you very much. You realy saved one of my projects. Chears from Brazil.
@nicecode6408
@nicecode6408 2 роки тому
Hello I need use the deep sleep mode with a sensor, but it is run just one time for the void loop in each wake up, i need to stay almost 1 minute in the void loop to take a good measure, can you help me?
@localixdots9698
@localixdots9698 2 роки тому
Great
@dhavalshukla6615
@dhavalshukla6615 2 роки тому
Hi, in a project of mine, I am trying to get my ESP32 to wake up from deep sleep mode and to wake it up I have assigned several GPIOs, the issue is I am trying to connect the bluetooth through a function which I do it by assigning it to a GPIO pin 36 that if HIGH it should go inside and execute the Bluetooth function, but it just simply brushes past it and rather without connecting tries to again go into the deep sleep. What would be the best way for me to utilise the digitalRead HIGH to go into Bluetooth or any other function which then should only execute after they have been completed? Or is it not my fault? I have tried to look at good examples but can't seem to find a solid rock.
@syaduinotech3681
@syaduinotech3681 2 роки тому
Good sharing sir. Mind if I ask the link to the complete sketch for timer example that update every certain time. Really appreciate the sharing..if already being shared, let me know, will browse it accordingly. One quick question, is the project/ ideas can work with all type of esp32?
@atomic14
@atomic14 2 роки тому
Definitely, I'll push the code up later today. And yes, it should work on all devices.
@atomic14
@atomic14 2 роки тому
Here you go: github.com/atomic14/esp32_deep_sleep
@syaduinotech3681
@syaduinotech3681 2 роки тому
@@atomic14 thanks for the sharing sir
@andymouse
@andymouse 2 роки тому
Showing your age with those Eighties tracks ! when you continue on your Kicad journey I hope you record them....cheers.
@TheEmbeddedHobbyist
@TheEmbeddedHobbyist 2 роки тому
Eighties, seventies does it for me ;-(
@atomic14
@atomic14 2 роки тому
I definitely will, I'll probably give KiCad version 6 a go to see what's new. Somewhat embarrassingly, The Lion Sleeps tonight was the first single I bought...
@atomic14
@atomic14 2 роки тому
No one knows how old you are on the internet - until you type something :)
@andymouse
@andymouse 2 роки тому
@@atomic14 We will keep that between us ! and I'm sure you mean 82 not the original in 1939 !!...great video...cheers.
@atomic14
@atomic14 2 роки тому
@andymouse123 1939 would be pushing it :) though 82 feels like a long time ago!
@saikalyanmishra21
@saikalyanmishra21 2 роки тому
Is there any way to control ac appliances through 16 relays modules. Esp 32 / 8266 has 9 pins available & with mega2560 no wifi available through. How to combine 16 relays+ arduino + wifi control/ web server. A detailed information would be appreciated. Lots of UKposts videos explaining upto 8 relays. If 16 there is no switch option. And so on. No videos with code are available for this simple project. Please make a video. Thanks
@leeqa02
@leeqa02 Місяць тому
Use shift register.
@TheEmbeddedHobbyist
@TheEmbeddedHobbyist 2 роки тому
What! Sorry must have fallen into a deep sleep, but a digit wake up from the wife got me going again, with a middle finger reset to the side of the head. ;-)
@atomic14
@atomic14 2 роки тому
The question is, did you store what you were doing in RTC memory, or have you forgotten what you were doing before you went to sleep :)
@TheEmbeddedHobbyist
@TheEmbeddedHobbyist 2 роки тому
@@atomic14 RTC memory wear limit was passed years ago ;-)
ESP32 Deep Sleep: Ultra-Low Power Coprocessor
15:27
atomic14
Переглядів 28 тис.
Beyond the Zzz's: ESP32's External Wake-Up in Deep Sleep Explored
14:05
Programming Electronics Academy
Переглядів 6 тис.
Дурнєв дивиться сторіс ZОМБІ #47
53:48
Aleksey Durnev
Переглядів 335 тис.
ДРУГА РЕПЕТИЦІЯ alyona alyona та Jerry Heil на сцені Євробачення-2024
00:34
Євробачення Україна | Eurovision Ukraine official
Переглядів 258 тис.
ОДИН ДОМА #shorts
00:34
Паша Осадчий
Переглядів 2,8 млн
ESP-Now Range Test: Real-World Results for ESP32 Devices!
8:01
atomic14
Переглядів 102 тис.
I Made A Tiny ESP32
5:40
Paul's Projects
Переглядів 99 тис.
#328 ESP32 Secrets: Interrupts, and Deep-Sleep under the Hood
18:57
Andreas Spiess
Переглядів 171 тис.
#58 ESP8266 Sensor runs 17 days on a coin cell/transmits data (deep-sleep)
14:11
#149 ESP32 Deep Sleep, RTC Memory, "Secret" LoLin Pins
13:28
Andreas Spiess
Переглядів 145 тис.
ESP32 wake from Deep Sleep | ESPHome and HomeAssistant + MQTT
8:38
OMG The Cloud!
Переглядів 10 тис.
ESP32 in a commercial product? - From prototype to production
7:58
Predictable Designs
Переглядів 44 тис.
#266 ESP32 Deep Sleep Project - Door Open/Closed Detection with ESP-NOW
25:18
Samsung or iPhone
0:19
rishton_vines😇
Переглядів 2,2 млн
Рекламная уловка Apple 😏
0:59
Яблык
Переглядів 578 тис.