#149

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ก.ค. 2017
  • In this video, we look into the deep-sleep functionality if the ESP32, and we are interested if and how the deep sleep works, especially because the ESP32 has a so-called ultra-low power coprocessor. This fact promises new possibilities.
    - We will deep-sleep the ESP32 to save lots of power for our battery-operated devices
    - We will use three out of four sources for wake-up:
    o The timer
    o Two possibilities of external wake-ups
    o Touch pads
    - We have a look at the available (and sometimes strangely named) ESP-32 pins of the WROOM-32 module
    - We use RTC memory which survives deep-sleep
    - And we calculate, how long the ESP32 can deep-sleep compared to the ESP8266
    Links:
    Sketches: github.com/SensorsIot/ESP32-D...
    Excel sheet: github.com/SensorsIot/ESP32-D...
    Instructables: www.instructables.com/id/ESP3...
    ESP32 Deep-Sleep Details:
    esp-idf.readthedocs.io/en/late...
    media.readthedocs.org/pdf/esp...
    github.com/espressif/esp-idf/...
    Other ESP32 boards (from video #143):
    TTGO ESP32 Module www.aliexpress.com/item/TTGO-...
    ESP32 (NodeMCU type) Board bit.ly/2sOMR3E
    ESP32 Development Board (Yellow Pins) www.aliexpress.com/item/ESP32...
    ESP32 X-Shield www.aliexpress.com/item/Lolin...
    ESP32 Lolin Board with LiPo www.aliexpress.com/item/WEMOS...
    ESP32 OLED Board bit.ly/2tosirM
    ESP32 Board with 18650 www.aliexpress.com/item/WEMOS...
    D1 mini ESP32 board www.aliexpress.com/item/MH-ET...
    WeMos Arduino like ESP32 Board bit.ly/2tUZVnC
    Cheapest ESP32 board (source not tested by me): www.aliexpress.com/item/Lolin...
    WEMOS Official Store: s.click.aliexpress.com/e/jUzBiIq
    Supporting Material and Blog Page: www.sensorsiot.org
    Github: www.github.com/sensorsiot
    If you want to support the channel and buy from Banggood use this link to start your shopping: bit.ly/2jAQEf4 (no additional charges for you)
    Official Wemos Store: s.click.aliexpress.com/e/jUzBiIq
    / sensorsiot
    / spiessa
    www.instructables.com/member/...
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 347

  • @CrazyA9999
    @CrazyA9999 6 ปีที่แล้ว +24

    And again, a lot of information in a very well structured video. Brilliant! Thank you very much for all the time and effort you put in the videos.

  • @tonyolivieri3497
    @tonyolivieri3497 6 ปีที่แล้ว

    Andreas, I've viewed most of your videos and have not found one yet that I did not like or did not finish. Thank you for the spreadsheet. I use the ESP devices in a manufacturing environment and like you, research their capabilities. The information you provide has helped me many times. Thanks.

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      Thank you for your nice words and your support!

  • @richard_wenner
    @richard_wenner 6 ปีที่แล้ว +23

    You are going to need a spreadsheet to cross reference the videos soon. Nice job again!

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว +6

      Thanks! For the moment, I try with playlists. And I think, TH-cam Search also can help because I try to include good search terms.

    • @richard_wenner
      @richard_wenner 6 ปีที่แล้ว +2

      Yes, effective cross-referencing can become quite difficult - in my case I can't remember what I did last week. My comment was inspired by your use of spreadsheets in this video. Hope you remain well. R

  • @AA3WK
    @AA3WK 6 ปีที่แล้ว +11

    Great jobs as always. Thank you so much for your efforts. YOU ARE THE MAN!!

  • @asiw
    @asiw 6 ปีที่แล้ว +1

    Thank you. Looking forward to getting my ESP32 and I'm sure your spreadsheet will really help and save me a lot of time. Best wishes, Arthur

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว +1

      You are welcome! I think, it is really a step-up compared to the ESP8266, at small additional cost.

  • @mksmurff
    @mksmurff 5 ปีที่แล้ว +1

    This has been the best video on ESP32 and deep sleep I have found. Thank you Andreas

  • @thijsdebont
    @thijsdebont 6 ปีที่แล้ว

    Thanks again for a great video! I really enjoy the ones focussing on the ESP's (8266 and 32) and they're a great help. Keep 'em coming!

  • @alanmcoll101
    @alanmcoll101 6 ปีที่แล้ว +6

    The master tutor does it again. Thanks Andreas.

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      Thank you for your nice words!

  • @Brutaltronics
    @Brutaltronics 6 ปีที่แล้ว +3

    Looking forward to the current measurements in the next video! Hopefully it will run for years and years to come

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว +1

      Depends on the battery size ;-)

  • @six4two1
    @six4two1 6 ปีที่แล้ว +3

    You have become one of my mentors though your videos. The ESP32 ULP processer may hold more capabilities than we think. I've been researching what little information I can find on it which seems to only have an assembler available. Hopefully more information will surface as the community gets a chance to work with it. I'm certain you will discover many of its secrets.Looking forward to more of your videos. Thank you!

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว +1

      I think, the assembler is the "state of the art". I hope, we will get some "snipplets" to start with or to solve typical problems like trigger on a particular analog value, or saving a few values in RTC ram between wake-ups. Already the possibilities used in this video provide some interesting possibilities.

    • @lemonman1
      @lemonman1 6 ปีที่แล้ว

      "is... like that."

  • @deangreenhough3479
    @deangreenhough3479 6 ปีที่แล้ว

    Good afternoon Andreas. I'm away for the weekend, hence the late good morning.
    Your work always makes me happy. As other have stated your our hero and we thank you from the bottom of our hearts

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      I hope, you enjoyed your WE. I was also late this morning. Had to get some sleep after working long last night...

    • @deangreenhough3479
      @deangreenhough3479 6 ปีที่แล้ว

      Andreas Spiess So I see from the comments.
      I hope we are not pushing our mentor too hard?
      I'm very excited with your work on the esp32.
      Be sure to give yourself a pat on the back and maybe you need a little break.
      It was indeed a good weekend and I am now back at my lab and getting my esp out👍👍

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว +1

      No worries. I am old enough to know, that the most valuable word is "NO". ...And the most expensive one is "AND". And if you forget to say NO, often the result is AND.
      Everything here happens without the word "must" ;-)

    • @deangreenhough3479
      @deangreenhough3479 6 ปีที่แล้ว

      Quality reply, I laughed a lot at that

  • @Perspectologist
    @Perspectologist 6 ปีที่แล้ว

    As always, that was a great tutorial. Thanks for taking the time to make such great videos.

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      You are welcome! It is my pleasure.

  • @tomg8817
    @tomg8817 6 ปีที่แล้ว

    Thank you for the great videos on the ESP32! Please keep them coming.

  • @MaxintRD
    @MaxintRD 6 ปีที่แล้ว +2

    Good morning Andreas! Woke up early to see your latest video. Thanks and have a nice day!

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว +3

      It is more "good night"... Just finished the video at 4 am

    • @MaxintRD
      @MaxintRD 6 ปีที่แล้ว

      Andreas Spiess - here it's not even 4am ;-)
      Sleep well then...
      P.S. Touch button wake-up looks quite useful.
      Going to sleep now...

  • @pliniobass
    @pliniobass 6 ปีที่แล้ว +1

    Thank you master! You are very generous sharing your amazing knowhow with us.

  • @Hessijames79
    @Hessijames79 6 ปีที่แล้ว +1

    Großartiger Inhalt, tolle, durchdachte Präsentation.

  • @maao86
    @maao86 6 ปีที่แล้ว

    Very informative. Thank you for making these videos. Greatly appreciated :)

  • @distancelab2010
    @distancelab2010 6 ปีที่แล้ว

    Thank you so much. I have a esp32 on the way to me, and this information is very interesting.

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      So, you can try it right away when it arrives!

  • @Q24H
    @Q24H 6 ปีที่แล้ว

    Excellent work sir, thank you for your research! I have one of those ESP32 with the 18650 holder, last night I started testing a modified sketch, have it waking up every 30 minutes and blink a LED couple of times, started at ~4.15v and 12 hours later my battery is still at 4.05v. A day ago I was only able to get ~24 hours of total "blinky" on a single 18650, but with deep sleep this should last for days/weeks. Looking forward to see your current measurements!

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      These boards usually are not ideal for deep sleep because they have many parts which are not absolutely necessary and which use some current. But weeks should be ok.

  • @hydroUNI
    @hydroUNI 6 ปีที่แล้ว

    0:22 yes, we are very interested! :D
    Thanks for posting this, Andreas!

  • @alanlovett3412
    @alanlovett3412 6 ปีที่แล้ว

    Very informative and a great spreadsheet.

  • @waltsteinchen
    @waltsteinchen 6 ปีที่แล้ว

    Clicked to fast: @Andreas, how can you know that I'm working on a project where I basically need all of the IO pins and I was looking for what you did in the Excel Sheet!!! ..
    Unbelievable ;-) Many Thanks for your phanstatic work all over the place!

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      At the beginning, I was confused with the many possibilities of the chip. Then, I discovered a similar sheet in the data sheet of the ESP chip itself and translated it to the pins of the WROOM---

  • @nomadic_rider42
    @nomadic_rider42 6 ปีที่แล้ว +2

    it's nicely done. in the next video please also compare Current consumption of different ESP32 boards and bare WROOM board.

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว +2

      I probably will not do that extensively, because deep-sleep together with development boards, in my opinion, is not a good idea. Too many parts which just consume current and are not useful during operation...

  • @HansVledder
    @HansVledder 6 ปีที่แล้ว

    Thanks for the insights Andreas!

  • @wojomojo
    @wojomojo 5 ปีที่แล้ว

    Just found your channel. Excellent stuff, thanks and subscribed!

  • @SamuelCarreira
    @SamuelCarreira 6 ปีที่แล้ว +1

    Very interesting video as always. Please on the next video measure the current when the ESP leave sleep mode and connects to internet (like ping to custom website). I think that will be the main use of this uC and it will serve as reference for some people that want to use this device to send periodic data to a server and have to power the uC with batteries.

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว +1

      We will see. I think, I will not be able to use the ULP for quite some time, because it has to be programmed in assembler... I did not do this for years.

    • @Ed19601
      @Ed19601 6 ปีที่แล้ว

      Assembler... now there is a name from the past. Must have been early 90s i did that last. Now i cant even understand my own programs from those days anymore

  • @jix177
    @jix177 6 ปีที่แล้ว

    Great video, you're saving us from having to read through all the documentation, thanks!

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      You are welcome! You are probably right ;-)

  • @MPElectronique
    @MPElectronique 6 ปีที่แล้ว

    Andreas, i have got the rev.1 and the deep sleep works perfect!!! Thank you...

  • @timobilalis1129
    @timobilalis1129 6 ปีที่แล้ว +2

    Bravo Andreas, much more fun and educational in such hot Greek summer. Your ESP32 pinout spreadsheet and deep sleep tips will be of tremendous help after my ouzo session... keep up your excellent work. BTW have you done any work on multicore esp32 programming?

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      1. Please drink an ouzo for me and enjoy life!
      2. No, I did not do any multi-core work. But I only started...

  • @jwracingteam
    @jwracingteam 2 ปีที่แล้ว

    I got caught out with GPIO and RTC_GPIO confusion, thanks for explaining boss

  • @PhG1961
    @PhG1961 6 ปีที่แล้ว

    Interesting to know that it can go into deep sleep for several years and that it hardly consumes any power.
    Great video !

  • @dinakrishnamoharana6494
    @dinakrishnamoharana6494 5 ปีที่แล้ว

    Thanks Andreas, your videos are more informative ,

  • @colinpamplin9976
    @colinpamplin9976 6 ปีที่แล้ว

    Another excellent and very interesting video. By strange coincidence I was testing deep sleep mode yesterday on a NodeMCU ESP-32S board and the best I could get was 2.3mA because of the regulator etc. (battery was connected to 3.3v pin so bypassing the regulator to a certain extent)

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      This is not surprising. The same as with the ESP8266 boards...

  • @MPElectronique
    @MPElectronique 6 ปีที่แล้ว

    Andreas i finally understood why even my esp32 was draining my battery... i powered the module with the vin pin without entering into the micro usb connector. Thank you. Marc.

  • @deangreenhough3479
    @deangreenhough3479 6 ปีที่แล้ว

    My ESP32 is up and running Thank you.

  • @fuzzie4755
    @fuzzie4755 6 ปีที่แล้ว

    Hi Andreas, great again. The 150mA current seems to limit the usage on Battery mode a bit. Also using pull-up resistors must be handled with care because a 100kOhm resistor on 3.3V also draw a current of 33mA. Again I was laughing because I missed the info of the max sleep time of the esp8266 and was wondering about some strange wake-up times. Thanks again.

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      I think, you mixed milli with micro (or I made an error in the video). Then, everything is a factor of thousand smaller...

  • @shubhamadtp
    @shubhamadtp 6 ปีที่แล้ว

    Waiting for ulp
    Great video as always

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      I am not sure how long you have to wait because for the moment, we would have to leave the Arduino IDE. And for the moment, this channel is not ready for that...

  • @cruepprich
    @cruepprich 6 ปีที่แล้ว

    Excellent video! Thanks Andreas!

  • @Kevin192291
    @Kevin192291 3 ปีที่แล้ว

    Your Videos are Gold

  • @johnhoubolt7672
    @johnhoubolt7672 6 ปีที่แล้ว

    Great video of a professional work, well done! Can you give us a hint which ESP32 dev-board is best for deep sleep (ultra low energy consumption near to ESP32 datasheet)?

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      No, not yet. A video should come...

  • @MPElectronique
    @MPElectronique 6 ปีที่แล้ว

    Hi Andrea! I removed the led, the current in deep sleep drops from 16 mA to 4 mA.
    Do you think it would be better with the LM1117 instead of the AMS1117 on the board?
    Tell me what do you think?
    Your opinion is very valuable to my eyes.
    Thanks a lot! :)
    Marc.

  • @MushFarmer
    @MushFarmer 6 ปีที่แล้ว +1

    these videos are gold

  • @roygilby4513
    @roygilby4513 6 ปีที่แล้ว

    Once again, a very good and instructional video. Looking forward to your next episode. Now, go and get some sleep. :-)

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      Back again after breakfast...

  • @dachoeks3
    @dachoeks3 6 ปีที่แล้ว

    Great video again. I have used sprakfun ESP32 Thing and like you said, in one the previous videos, compiling time is much faster. Pricing is coming down as well so I think now is a good time to start working on esp32.

    • @aspuzling
      @aspuzling 6 ปีที่แล้ว

      dachoeks3 Which board is faster to flash? The Sparkfun Thing or another? Which other board are you comparing the Sparkfun to?

    • @dachoeks3
      @dachoeks3 6 ปีที่แล้ว +1

      Compiling for ESP32 Thing is much faster compared to regular esp8266.

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      That is also my impression. This is why I started the coverage now.

  • @JerryEricsson
    @JerryEricsson 6 ปีที่แล้ว +1

    Watching this video made me want to dig out my ESP32 once more and see if I could make it do something. For about an hour, I messed with things trying to get the computer to recognize the blasted thing, and in the end I tossed it in the pile of junk I keep for parts to repair other items. I dug through my drawer and found one of the other ones I ordered at the the same time, (usually buy things in groups of 3) and behold, I have connection to the computer. Now I have spent the last two hours just running example sketches on the device, and giggling like a child when it actually does something. Now if I can figure out how to use the bluetooth to do something and how to use the wifi better then just making an led blink. Should not be hard to do, just have to adjust my mind from using the 8266.

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว +1

      Wi-Fi should be no problem. Bluetooth seems to be harder with the Arduino IDE...

    • @Ed19601
      @Ed19601 6 ปีที่แล้ว

      thats good to know. Was considering a switch from 8266 to 32 especially for bluetooth. Maybe i should wait

  • @paulkirchhof9546
    @paulkirchhof9546 3 ปีที่แล้ว

    Very interesting, but wake up from internal RTC is a very good feature I miss in your video.

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      Thank you. Saying "no" is the most important thing for interesting TH-cam videos. Otherwise they get too long.

  • @ursmii_
    @ursmii_ 6 ปีที่แล้ว

    I tried to measure real current usage, but unfortunately my board (AnalogLamb) and others hve as usual a "power led" on it.
    So I could not realy measure ESP's sleep current without removing it.
    The board uses 15.7mA with a short peak at wakeup (timer sketch) up to 58mA driven by 3V3 bypassing the LDO.
    Waiting for your measurements with the bare board :)

  • @onurson4000
    @onurson4000 6 ปีที่แล้ว

    great video as usual, vielen dank.

  • @AbiChess.tricks
    @AbiChess.tricks 6 ปีที่แล้ว

    Well explanatory

  • @jeremiecuadrado5607
    @jeremiecuadrado5607 6 ปีที่แล้ว +1

    Franchement, toujours aussi passionnant. J'apprend beaucoup grâce à toi. Merci pour tout ce temps passé. Cheers.

  • @AdminTuber
    @AdminTuber 5 ปีที่แล้ว

    Thank you ! very interesting

  • @andrewrowbottom7251
    @andrewrowbottom7251 6 ปีที่แล้ว

    eagerly awaiting the results!
    I have 2 boards and both were disappointing.. After I hacked the cheapest one to remove the UART and LM1117 connection to the 3v3 line I got good results ~20 microAmps

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      Usually I use bare boards for deep sleep experiments.

  • @eddyfontaineyoutu100
    @eddyfontaineyoutu100 6 ปีที่แล้ว

    Thank you Andreas !

  • @Hamal86
    @Hamal86 6 ปีที่แล้ว

    Hi Andreas,
    First of all great video. Been following your content for a couple of months now and it is very helpful.
    I tried to compile the example, however I get "not declared in this scope error for" esp_deep_sleep_wakeup_cause_t.
    Is there a lib I need to include or something. I am a huge nood, so question might be very basic, however I already spent several hours googling around with no success so I thought asking might help.
    Thanks and keep up the nice vdeos

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      I think this command was changed in one of the newer releases. Maybe you look at the deep-sleep example of the IDE. There you should find how it works now if I remember right.

    • @Hamal86
      @Hamal86 6 ปีที่แล้ว

      Thank you for the feedback. I will look at the examples, hopefully I find out how it works.

  • @norberthartmann5075
    @norberthartmann5075 6 ปีที่แล้ว

    top!
    bin auf die fortsetztung gespannt ... ggf gibt es ja ein wenig zum thema WPS.
    einen schönen sonntag

  • @avejst
    @avejst 6 ปีที่แล้ว

    Thanks for sharing.

  • @venkateshe7506
    @venkateshe7506 6 ปีที่แล้ว

    Very very nice. Thank you.

  • @sanjaybhatikar
    @sanjaybhatikar ปีที่แล้ว

    Great, thank you 👍

  • @aspuzling
    @aspuzling 6 ปีที่แล้ว

    Great video. I'm very interested in seeing what kind of power usage you see in deep sleep on your Lolin32 board. On my Sparkfun ESP32 Thing, I could only get around 950uA (after disabling the power led); apparently the SPI Flash chip consumes around 860uA unless you add a pull up resistor to it. I would love to see what figures you get on your board.

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      These boards are never good for deep-sleep because they have many other components like USB to Serial chips and some sort of pull-up or - down resistors and transistors. They are not optimized for that. I will use a "bare" WROOM-32 module on a simple PCB

    • @aspuzling
      @aspuzling 6 ปีที่แล้ว

      Andreas Spiess Then the mystery to me when using a wroom32 without usb-serial how do you flash your program to it? I also understand that without a battery power regulator you are limited to battery sources with a natural ~3.3v supply, correct?

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว +2

      You have to add whatever is necessary to a barebode WROOM-32. For a first flashing a USB to serial converter (later, you can use OTA update), and also a LDO for power supply. But you only add what is necessar for the operation, not more and not less. The development boards usually have "more".

    • @aspuzling
      @aspuzling 6 ปีที่แล้ว

      Andreas Spiess thanks for the helpful information! I look forward to your next video!

  • @henridumonttadja8975
    @henridumonttadja8975 5 ปีที่แล้ว

    your videos are very interresting and I thank you for it. Thank you very much for all. I live in Germany. I would like to deep sleep and wake up my esp 32 through a simple remote control (with a single button) based on Bluetooth. Do you have a video about this?

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว +1

      BLE does not work during deep sleep

    • @henridumonttadja8975
      @henridumonttadja8975 5 ปีที่แล้ว

      @@AndreasSpiess thank you for your reply. If not another question, how to activate a PIN and disable it by Bluetooth. Because I made a device based on ESP 32 and I would like to put the motion detector (connected to the pin 22) in stop and activate it using a remote control (having a single button) through the Bluetooth.

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว +1

      You have to have an external BLE receiver which is capable to listen and switch the pin. Quite complicated, I think.

  • @Passco666
    @Passco666 4 ปีที่แล้ว

    Andreas thank you for video

  • @omaryanas435949
    @omaryanas435949 6 ปีที่แล้ว

    Great video, and am really looking forward for the next one, I have a question, is there any way ,what so ever, to connect two serial devices (for example, a nextion and an A6) to ESP32? any suggestions?

    • @jasonmhite
      @jasonmhite 6 ปีที่แล้ว

      Anas Omary Yes, it has three hardware serial ports and they can be routed to almost any of the pins. You have to look at the docs to see how to use them.

    • @omaryanas435949
      @omaryanas435949 6 ปีที่แล้ว

      nobodybodybody I made a lot of research and the conclusion was that there is one hardware serial(Tx0 and Rx0) , and an additional RX1 only pin. Do u have any link on this subject to get me going in the right direction?

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว +2

      The WifiTelnetToSerial example shows how you can do it (HardwareSerial Serial1(2); // UART1/Serial1 pins 16,17)

    • @jasonmhite
      @jasonmhite 6 ปีที่แล้ว +1

      Anas Omary I believe you are confusing it with the ESP8266, which has one available hardware serial port + one TX only port (you can still use software serial however to get more). The ESP32 has three. The Arduino port has weak documentation at the moment, the link Andreas gave is the best starting point.

    • @omaryanas435949
      @omaryanas435949 6 ปีที่แล้ว

      Thanks alot for the info, I will definitely check that out as I need it for an upcoming project. Cheers!

  • @woodd1000
    @woodd1000 4 ปีที่แล้ว

    This is a particularly useful video tutorial Thank you very much. But were do we find the API definitions for these type of functions? (new guy here) No header files, no library info... Where do I go - I see we can create object Serial call begin, on the 8266 wakeup there is an ESP object that we can call deep sleep on - where are the headers or library definitions for these objects?

    • @woodd1000
      @woodd1000 4 ปีที่แล้ว +1

      There we are - arduino-esp8266.readthedocs.io

  • @JerryEricsson
    @JerryEricsson 6 ปีที่แล้ว

    Oh on a different note, the Rally in Sturgis is warming up, thousands of Harley's are pouring in from all directions. We live 175 miles due North of Sturgis and see a lot of bike traffic through our small town.

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      Great for you. I will go to a smaller event in Austria in September... But one day, I will make it to Sturgis.😀

  • @devonspurway7380
    @devonspurway7380 6 ปีที่แล้ว

    Hi this is a great tutorial is there any documentation on how to get the bitmask for different pins

  • @feliceferri
    @feliceferri 6 ปีที่แล้ว

    Hi, thank you for these videos! they are amazing! I'm facing a challenge with the ESP32 Dev Module, if I don't have the sensors connected to it, I can flash it from Arduino just fine, then I connect the sensors and everything is ok. But If I already soldered the ESP32 Dev Board to the sensor I cannot flash it anymore from Arduino. Is there any way around this behavior? How do people do upgrades after they have soldered their ESP32 to their pcbs? thanks!

  • @widget623
    @widget623 6 ปีที่แล้ว +4

    I'm not sure when it changed but under the newest esp32 code you have to declare "esp_deep_sleep.h" for the sketch to work.
    add "#include " at the begining of the sketch and all will be ok.

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      Thanks for the tip!

    • @MPElectronique
      @MPElectronique 6 ปีที่แล้ว

      still the error: 'esp_deep_sleep_get_ext1_wakeup_status' was not declared in this scope
      :-( thanks

    • @MPElectronique
      @MPElectronique 5 ปีที่แล้ว

      I found the solution: esp_sleep_get_ext1_wakeup_status()
      :-)

    • @MPElectronique
      @MPElectronique 5 ปีที่แล้ว

      I found the solution here actually: www.lucadentella.it/en/2018/01/22/esp32-29-deep-sleep/

  • @trp79
    @trp79 5 ปีที่แล้ว

    Hi, I'm pretty new to micro controllers and electronics, but have been playing a bit around with ESP32 and really enjoys it. Have got great inspiration by all the video posted by Andreas - highly appreciated. I do however not completely understand how the schematics should be for respectively interrupt wake-up with respectively the EXT0 and the EXT1 approach. In my case I would like, if possible, to use a doorbell button (no voltage) to wake it up (then I will use a relay and some arduino logics to trigger the actual doorbell post wake-up). Hope someone can help providing me a bit of input on the schematics for the wake-up part.

    • @trp79
      @trp79 5 ปีที่แล้ว

      I better take a look at this lastminuteengineers.com/esp32-deep-sleep-wakeup-sources/ :-)

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว

      You found the right link!

  • @GabrielSallum
    @GabrielSallum 6 ปีที่แล้ว +1

    Hey, can't find the xls sheet. Actually am evaluating the esp32 for an industrial/iot application, that info seems pretty neat.

    • @RomanPittroff
      @RomanPittroff 6 ปีที่แล้ว

      Go to the GitHub link under Sketches:

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว +3

      I added a direct link to the comments

  • @ricardomariz2941
    @ricardomariz2941 6 ปีที่แล้ว

    Very very good!

  • @Jones12ax7
    @Jones12ax7 6 ปีที่แล้ว

    Nice video! Do you know something about light sleep on ESP32? It seems not available yet. I need that because I'm building a smartwatch with a GPS module, and active mode is too hungry. Deep sleep is too inconvenient, because it doesn't seem a good idea to reset the module every second. Light sleep would be a good compromise.

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      I never worked with light sleep. Not with the ESP8266 and not with the ESP32. Why do you think, it is not good to reset a board every second. Nothing wears out. It is just code.

    • @Jones12ax7
      @Jones12ax7 6 ปีที่แล้ว

      As my application has a user interface and a lot of functionalities, it will take time booting and setting it up, and will take more energy than keeping it active. Maybe if I use RTC mem to keep my variables. Anyway, I dont know if I can wake it up when serial data gets in without loosing data.

    • @Jones12ax7
      @Jones12ax7 6 ปีที่แล้ว

      Update: newer versions of the tools now include light-sleep functions. It works just like deep-sleep, but do not boot the chip and have a faster recovery time.

  • @ribicb
    @ribicb 6 ปีที่แล้ว

    Hey Andreas. Just watching your ESP32 playlist, and I suspect you got ordering of videos wrong :) This episode is listed before the #147 one.

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      I changed the sorting now. Hopefully right this time

    • @ribicb
      @ribicb 6 ปีที่แล้ว

      Now they're in reverse order, #152 listed first and #103 last. Sorry for the nagging :)

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      Changed

    • @ribicb
      @ribicb 6 ปีที่แล้ว

      Thanx

  • @warperone
    @warperone 6 ปีที่แล้ว

    great excel. But a simple question(s). Which pins support OneWire and which pins support Interrupts for Wemos LOLIN32 ? I can't seem to find any info online.

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      Here is the Onewire library for the ESP32: github.com/stickbreaker/OneWire And here the info concerning interrupts: techtutorialsx.com/2017/09/30/esp32-arduino-external-interrupts. Both one google search ;-)

  • @joseguilhermeamuchastegui9970
    @joseguilhermeamuchastegui9970 4 ปีที่แล้ว

    I am developing a vibration sensor where I am using ESP8266.
    My main problem right now is the power consumption, and for that reason I will have to change the communication to BLE.
    I need to read vibration data every 15minutes, and the battery life (1000mAh) has to be more than 1 year.
    From what I read from ESP32 datasheet, power consumption is high and I am not sure if I will be able to achieve my goal.
    I would like to know your opinion about that, and also if there is another microprocessor that is more suitable for this application.

    • @AndreasSpiess
      @AndreasSpiess  4 ปีที่แล้ว +1

      Maybe you watch my deep sleep videos? If you need less power consumption you probably find chips from Nordic (NRF51/52. But they do not have the same community support as the ESPs.

  • @andresceballos4128
    @andresceballos4128 2 ปีที่แล้ว

    hello excellent video
    I have a question about the ESP32 and it is not related to the video
    How can i create new custom memory partitions?
    Greetings from Colombia

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      You should find the answer using Google (eg. iotespresso.com/how-to-set-partitions-in-esp32/ ). Plus: The Arduino IDE supports already many different configurations.

    • @andresceballos4128
      @andresceballos4128 2 ปีที่แล้ว

      @@AndreasSpiess thank you very much for your help

  • @babakhallajian684
    @babakhallajian684 6 ปีที่แล้ว

    Hi Andreas
    would you please guide us about overclocking over esp32 and esp8266 specially in 160Mhz
    Thanks

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      AFAIK the ESP boards run already at 240MHz

  • @chimpofm
    @chimpofm 4 ปีที่แล้ว

    hello its me again, the guy with the welsh accent, another great video, Quick question, what is the best way to wake up and Esp32 from Deep sleep, using an FZR sensor, could i use it as a touch but reverse the threshold?

    • @AndreasSpiess
      @AndreasSpiess  4 ปีที่แล้ว

      I do not know FZR sensors. The ESP32 has many wake-up possibilities. Maybe you google to find the right one for you?

    • @chimpofm
      @chimpofm 4 ปีที่แล้ว

      @@AndreasSpiess thankyou sir. I resolved this issue. I ment ''fsr'' force sensing resistors. It worked with the ext0. Thankyou for your time.

  • @wilianpasternak2010
    @wilianpasternak2010 4 ปีที่แล้ว

    Congrats for tutorial. Do you know how much is current on deep sleep? Sorry my English.

    • @AndreasSpiess
      @AndreasSpiess  4 ปีที่แล้ว

      It depends which board you use. The ESP32 alone needs a few microAmpere in deep sleep.

  • @luissantiagoyaurikacyacuri4160
    @luissantiagoyaurikacyacuri4160 5 ปีที่แล้ว

    Hello! I plan to use this mcu for a project in deep sleep mode, but Im worried if I will be able to use libraries desgined for arduino, is it possible? I want to use max31865,library for sd module and maybe some library to use accelerometers.I wait your answer with hope. Thank you for the information.

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว

      You always have to check if the library also works for the ESPs and sometimes you find one which works.

  • @casualrider9435
    @casualrider9435 ปีที่แล้ว

    I'm a big fan of our projects. I've been trying to incorporate deep sleep into ESP32 to wake, take sensor readings, send them via a webhook to google sheets, then go to sleep, but can't get the code to work. Are there any books/media you could suggest for me to get study to solve the problem? Thanks.

    • @AndreasSpiess
      @AndreasSpiess  ปีที่แล้ว

      I do not know of books. I would first try to understand where in the code the problem occurs and then search for a solution.

  • @ernestorivero9909
    @ernestorivero9909 10 หลายเดือนก่อน

    Hello I made the program to turn on and off an LED by Bluetooth in this case I use the same LED that has the ESP32 in pin2, I added a stretch of code for the ESP32 to enter a state of deep sleep. Well, when I send the 'A' the LED will turn on and off and when I send the 'B' it goes into deep sleep, however, I still consume the same as I could send the program to see where the error is.

    • @AndreasSpiess
      @AndreasSpiess  10 หลายเดือนก่อน

      Unfortunately, I cannot do remote debugging. First, check if your MCU stays in deep sleep for a time. Then you have to check what development board you use. Because many boards consume a lot of energy even if the ESP32 is in deep sleep (I made some videos about it).

  • @BitesandGo
    @BitesandGo ปีที่แล้ว

    Hi I connected an external RTC (That is very low power) to the esp32. I wanna keep the external RTC runnning while ESP is on deep sleep (To save power). Can the RTC via I2C still run while the ESP is on sleep mode? How could I do that? Thank you!!

    • @AndreasSpiess
      @AndreasSpiess  ปีที่แล้ว

      You need to use interrupt pins to wake the ESP. Or you can try to use the ULP (not easy). Google should be able to help you

  • @HemangJoshi
    @HemangJoshi 6 ปีที่แล้ว

    Hello sir,
    can you please do video on "Button cell marathon" video for esp32? I think it will be very interesting.

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      I for sure will cover the current consumption topic also for the ESP32.

    • @HemangJoshi
      @HemangJoshi 6 ปีที่แล้ว

      Andreas Spiess okay thax

  • @botletics
    @botletics 6 ปีที่แล้ว

    Does the ESP32 completely turn off WiFi when you use "WiFi.mode(WIFI_OFF)"? It doesn't compile with "WiFi.forceSleepBegin()" like the ESP8266. Also, how to turn WiFi back on? I used "WiFi.mode(WIFI_OFF)" and since then my WiFi hasn't been able to connect to a network anymore.
    Also, you mentioned that RTC memory only survives deep sleep but not hard reset. Is there a way to make it survive reset like it did on ESP8266?
    Thanks!

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว +1

      1. I would assume you just use WiFi.begin to start WiFi again. But I did not investigate.
      2. RTC does not survive power down. AFAIK it survives a reset.

    • @botletics
      @botletics 6 ปีที่แล้ว

      Hmmmm as far as I can tell the "RTC_DATA_ATTR" variables are not surviving hard reset but they are surviving deep sleep wake up.

  • @eriklaken1025
    @eriklaken1025 6 ปีที่แล้ว

    For that look at Birds work, have a Nice Day.:)

  • @MPElectronique
    @MPElectronique 6 ปีที่แล้ว

    Andreas, i don't quite understand the bitmask, what if i want to wake up the pins 32 & 33 ?
    thank you.
    Marc.

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว +1

      Each pin has its own "mask". If you want 32/33, you have to set bit 32 and 33 in this mask to high (0x600000000 if I did not a miscalculation).

    • @MPElectronique
      @MPElectronique 6 ปีที่แล้ว

      Andreas Spiess thank you Andreas. YOU are my hero :)

    • @MPElectronique
      @MPElectronique 6 ปีที่แล้ว

      Andreas Spiess the bits 0000 0000 (what are gpio from bit 7 to 0) please ?? :) thank you. Marc.

  • @minepro1206
    @minepro1206 4 ปีที่แล้ว

    What does RTC stand for?
    P.S.: Sweet video as always

  • @avtozapuskby
    @avtozapuskby 5 ปีที่แล้ว

    Is there a way to disconnect the radio module from ESP32 today to reduce its consumption to 15-20 mA (sleep modem)?
    I tried using WiFiBlueToothSwitch.ino In fact, but I could not turn off Wi-Fi and lower the consumption below 65 mA while keeping the CPU working.

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว

      Maybe you try this example and measure the current consumption. github.com/espressif/arduino-esp32/blob/master/libraries/WiFi/examples/WiFiBlueToothSwitch/WiFiBlueToothSwitch.ino

    • @avtozapuskby
      @avtozapuskby 5 ปีที่แล้ว

      yes, but unfortunately Wi-Fi is not turned off despite the examples.

  • @windowofwords
    @windowofwords ปีที่แล้ว +1

    I am using esp32 with three pzem004t sensors but when I am writing Serial3 at that time it showsSerial3 is not declared in your scope but I have defined it already so how to solve this problem?

    • @AndreasSpiess
      @AndreasSpiess  ปีที่แล้ว +1

      If I remember right, I made a video about Serial on the ESP32. You have to pay attention if you want to use many Serial connections. Also check the video about the "safe" ESP32 pins. Some pins are forbidden.

  • @axa.axa.
    @axa.axa. 4 ปีที่แล้ว

    Could you expand on why you seem to imply things need to be written "differently". Of course lower power programming has to be adhered to but, stating you wont or can't enter the loop section confuses me. Can't deep sleep be called from out of the setup section?

    • @AndreasSpiess
      @AndreasSpiess  4 ปีที่แล้ว

      After calling deep sleep the ESP goes to sleep. At wake up it boots.

    • @axa.axa.
      @axa.axa. 4 ปีที่แล้ว

      @@AndreasSpiess understood, but aside from your particular example, is there anything preventing moving the deep sleep call from the end of the setup loop to anywhere in the main loop?

  • @das250250
    @das250250 6 ปีที่แล้ว

    I didn't see a current comparison between the deep sleep modes of 8266 Vs ESP32. Does the 32 use less during deep sleep?

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      I will do real measurements in a later video.

  • @Jhinsydney
    @Jhinsydney 6 ปีที่แล้ว

    Brilliant

  • @josecampino7476
    @josecampino7476 6 ปีที่แล้ว

    Grüezi Andreas ! Sorry to bother you, but the thing is locked again ... (Another) Great video !

  • @MPElectronique
    @MPElectronique 6 ปีที่แล้ว

    Andreas, i made some test yesterday. I have notice that on bootup the esp32 gave me the real reason. And if i dont manually reset it it doesnt gave me the real reset reason. So i tried to reset it via a NPN transistor after the first boot with EN pin on the collector and it jammed. Even with a 555 timer, it did the same. Is there a way to reset it manually to get the real wakeup reason ?
    Thank you .
    Marc.
    Ps: thank you for being therev:)

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      I do not exactly understand what you mean. AFAIK it does not give the wakeup reason, but the reset reason, which is something different. If you press the reset button, the reason is always the same...

    • @MPElectronique
      @MPElectronique 6 ปีที่แล้ว

      when i pressed reset it gave me the RIGHT reason, and on the wakeup when i do not press reset, it doesnt give me the good reset reason, i have the version 0 by the way.
      Thank You.
      Marc.

    • @MPElectronique
      @MPElectronique 6 ปีที่แล้ว

      No! That's the point! It is weird! It gives me the REAL reason , once i have press the reset button only!
      thank you.
      Marc.

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      +Marc Paradis Strange. The deep sleep examples gave me the right reason. Maybe you try these.

  • @analyticalsolution
    @analyticalsolution 3 ปีที่แล้ว

    I like most of your videos, but in this one a very important topic is omitted. What about not nominal but real power consumption of ESP32? E.g. DevKit1 consumes much more in deep sleep than it is documented, I was never able to get better than 10mA with it. DevKit1 costs roughly EUR 7.9, but the best one with surely low consumption from DFRobot costs almost EUR 32. There should be other choices in between. Could you please test them?

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      Most boards are not good for deep sleep because they use too much current. I made quite a few videos about that topic and we even started the "Superpower" project because of this fact.

    • @analyticalsolution
      @analyticalsolution 3 ปีที่แล้ว

      @@AndreasSpiess Dear Andreas, I would be grateful if you could share a link to one of those videos, where you test ESP32.

  • @filzli
    @filzli 6 ปีที่แล้ว

    Awesome!

  • @pranaystarkjr
    @pranaystarkjr 6 ปีที่แล้ว

    That's cool! So I can control multiple buttons buy using IFTTT

  • @electrobob
    @electrobob 6 ปีที่แล้ว

    Getting that ULP core to work with 1% DC and burn 25uA would be absolutely great. Might be able to get real world sensors on batteries for more than a year.

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      Many new possibilities with this chip to explore...

  • @benoitd94
    @benoitd94 4 ปีที่แล้ว

    Hi good video ! Just a question , is it possible to use Deep Sleep and wakeup a ESP8266 with Wifi request ?

    • @AndreasSpiess
      @AndreasSpiess  4 ปีที่แล้ว

      No. During deep sleep WiFi is off

  • @botletics
    @botletics 6 ปีที่แล้ว

    Hi there, great video! However, I can't seem to get "esp_deep_sleep_enable_ext1_wakeup(BUTTON_PIN_BITMASK, ESP_EXT1_WAKEUP_ANY_HIGH);" to compile in Arduino IDE. It says "'esp_deep_sleep_enable_ext1_wakeup' was not declared in this scope". The EXT0 line works but EXT1 won't. Any ideas?

    • @botletics
      @botletics 6 ปีที่แล้ว

      Ahhh, I found out I had to use "esp_sleep_enable_ext1_wakeup" instead of "esp_deep_sleep_enable_ext1_wakeup". Note the "deep" part is deleted. They must've changed the function names! Even the built-in deep sleep example is wrong then. :)

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว +1

      Thanks for the info!