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

  Рет қаралды 12,044

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: kzfaq.info/get/bejne/gbeDktt1qb3KfKs.html
@wjn777
@wjn777 2 жыл бұрын
Great video , very thorough. I am looking forward to your next video on the ULP
@cyo_corner
@cyo_corner 2 жыл бұрын
Thank you atomic! I can use this information for a small project of mine!
@nischal_poudel
@nischal_poudel 9 ай бұрын
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
@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.
@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...
@albertroswell
@albertroswell 2 жыл бұрын
great video I had no idea about tpuch pads, thanks
@nischal_poudel
@nischal_poudel 9 ай бұрын
and the guy with the swiss ascent part was really funny😁
@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.
@Bianchi77
@Bianchi77 2 жыл бұрын
Cool video, thanks :)
@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.
@5VoltChannel
@5VoltChannel 2 жыл бұрын
Great 👍👍
@edgull_tlt
@edgull_tlt 2 жыл бұрын
Спасибо
@localixdots9698
@localixdots9698 2 жыл бұрын
Great
@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
@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?
@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!
@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.
@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 KZfaq 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 2 ай бұрын
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 М.
Китайка и Пчелка 10 серия😂😆
00:19
KITAYKA
Рет қаралды 2,1 МЛН
1 класс vs 11 класс  (игрушка)
00:30
БЕРТ
Рет қаралды 3,7 МЛН
Универ. 13 лет спустя - ВСЕ СЕРИИ ПОДРЯД
9:07:11
Комедии 2023
Рет қаралды 4,5 МЛН
ESP-Now Range Test: Real-World Results for ESP32 Devices!
8:01
I Made A Tiny ESP32
5:40
Paul's Projects
Рет қаралды 102 М.
ESP8266 Deep Sleep with Arduino IDE
5:35
Rui Santos
Рет қаралды 64 М.
ESP32 in a commercial product? - From prototype to production
7:58
Predictable Designs
Рет қаралды 48 М.
Play MP3 Files on ESP32 Without Codec Chip: Easy Guide
8:51
atomic14
Рет қаралды 79 М.
#328 ESP32 Secrets: Interrupts, and Deep-Sleep under the Hood
18:57
Andreas Spiess
Рет қаралды 173 М.
How to Configure the ESP32 for Light and Deep Sleep Modes
20:30
ESP8266 as Window Sensor with years of battery life
17:57
MakerMeik
Рет қаралды 176 М.
ESP32 wake from Deep Sleep | ESPHome and HomeAssistant + MQTT
8:38
OMG The Cloud!
Рет қаралды 11 М.
ESP32 deep sleep and wake up
3:14
winson-DIY
Рет қаралды 2,9 М.
Неразрушаемый смартфон
1:00
Status
Рет қаралды 995 М.
iPhone 12 socket cleaning #fixit
0:30
Tamar DB (mt)
Рет қаралды 40 МЛН
Настоящий детектор , который нужен каждому!
0:16
Ender Пересказы
Рет қаралды 401 М.
One To Three USB Convert
0:42
Edit Zone 1.8M views
Рет қаралды 439 М.