#410

Ғылым және технология

We all know we send our ESP32s to deep sleep to save energy. But do you know other energy-saving possibilities like light sleep and clock reduction? And what about modem sleep or hibernation?
Links:
ESP32 Adapter board: s.click.aliexpress.com/e/_A1zQa8
Power Profiler Kit II: www.nordicsemi.com/Products/D...
USB-Serial Adapter 3.3V: s.click.aliexpress.com/e/_ANS7Wg or amzn.to/3lBqSqD
The links above are usually affiliate links that support the channel (at no additional cost to you).
Supporting Material and Blog Page: www.sensorsiot.org
Github: www.github.com/sensorsiot
My Patreon Page: / andreasspiess
Discord: / discord
If you want to support the channel, please use the links below to start your shopping. No additional charges for you, but I get a commission of your purchases to buy new stuff for the channel
My Amazon.com shop: www.amazon.com/shop/andreassp...
For Banggood bit.ly/2jAQEf4
For AliExpress: bit.ly/2B0yTLL
For Amazon.de: amzn.to/2r0ZCYI
For Amazon UK: amzn.to/2mxBaJf
For ebay.com: ebay.to/2DuYXBp
profile.php?...
/ spiessa
www.instructables.com/member/...
Please do not try to email me. This communication channel is reserved for my primary job
As an Amazon Associate, I earn from qualifying purchases
#no#midroll#ads

Пікірлер: 247

  • @ytfp
    @ytfp2 жыл бұрын

    I think the low power information is among your most useful videos

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    Thank you for your feedback!

  • @icarossavvides2641
    @icarossavvides26412 жыл бұрын

    Interesting video as usual. If I can mention a couple of things people need to be aware that I2C was never supposed to be used along significant lengths of wire (FYI it was invented by PHILIPS to reduce the number of traces on car radio PCBs I2C thus "Inter IC Communication") so if you hang a couple of metres of wire between your sensor and ESP, for instance, you may start getting strange results. Secondly, there has been some research showing that if you incorporate a small supercapacitor (these come in conveniently small PCB packages at reasonable prices) in your battery powered project it can extend battery life, this is because batteries will release more stored energy with a constant load compared to a 'spikey' load.

  • @koeiekop1973

    @koeiekop1973

    2 жыл бұрын

    A cool & cheap solution for long distace I2C communication might be adding a P82B715P I2C Bus Extender.

  • @ragohy

    @ragohy

    2 жыл бұрын

    My recommendation: LTC4311 I have best results with this chip. Easy to incorporate in PCB Design. ■Improves I2C Bus Rise Time Transition ■Ensures Data Integrity with Multiple Devices on the I2C Bus. ■Wide Supply Voltage Range: 1.6V to 5.5V Regards

  • @dan-nutu

    @dan-nutu

    2 жыл бұрын

    Your suggestions came just at the right time, I have to connect some I2C sensors at about 1.5 meters from the ESP32 and I was really worried about this. I am unsure if using twisted pair or shielded wire is a good idea because of its increased capacitance compared with regular wire. I'll look both these chips up, thank you very much!

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    Thank you for the additional info. Twisted pair can help. Also keep in mind that the last sensor on the line has to have a pull-up resistor.

  • @slavric

    @slavric

    2 жыл бұрын

    I use the trick with super capacitors for more then ten years. Since I use LiSOCl2 battery and GSM module together, they are a must. This way I also drain the battery completely. GSM just works once a day for about 20 seconds and in the mean time the capacitors have enough time to charge. The only problem is determining the remaining capacity of the battery. This system works three days just on capacitors.

  • @DrGreenGiant
    @DrGreenGiant2 жыл бұрын

    It's worth mentioning that it may be better overall to use maximum clock then deep sleep. Maximum clock to get all your processing done as fast as possible, then sleep for the rest of your projects duty cycle. It's not always true, so measuring is recommended.

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    You are right. I should have mentioned it. If no external dependency exist and you use deep sleep, slow clock rates are no good idea.

  • @DrGreenGiant

    @DrGreenGiant

    2 жыл бұрын

    @@AndreasSpiess I think the golden rule is to measure it, and you've done a really good job of showing us how to do that in this video

  • @horrorhotel1999

    @horrorhotel1999

    2 жыл бұрын

    Personally I'd use this mode if I wasn't running on Battery but a very low amperage power supply. It might be very useful for running the esp off of parasitic power etc.

  • @m.sierra5258

    @m.sierra5258

    2 жыл бұрын

    @@DrGreenGiant I agree though, because technically, the amount of energy consumed per clock cycle might even go down on higher frequencies. (if voltage is fixed)

  • @carltone
    @carltone2 жыл бұрын

    Great, thorough, technical instructional Andreas. I loved the pin twist technique for the TO220 flat leads.

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    It is indeed astonishing how big this effect is!

  • @WistrelChianti
    @WistrelChianti2 жыл бұрын

    Thanks so much! A wealth of effort to bring us the results of these experiments and some very handy and concise conclusions. When I get to worrying about power stuff, defo going to consider the clock reduction trick as I don't think my target project has any real need to run at full clock speed.

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    You're very welcome!

  • @orionfields
    @orionfields2 жыл бұрын

    Very timely video while I wait on shipping of my Nordic Power Profiler. Thanks for another helpful video.

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    You are welcome. I hope you will get it soon.

  • @McTroyd
    @McTroyd2 жыл бұрын

    Wow. That must have been quite the research project. Thanks for the effort!

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    Indeed, it took me a while. But know we know what works and what not...

  • @tonysfun
    @tonysfun2 жыл бұрын

    Great video again Andreas! Thank you!

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    You are welcome!

  • @U8uxa8SP
    @U8uxa8SP2 жыл бұрын

    Thanks for another informative video. I always enjoy your lectures.

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    Glad you like the content!

  • @yekutielbenheshel354
    @yekutielbenheshel3542 жыл бұрын

    Interesting video. Thanks Andreas.

  • @PhG1961
    @PhG19612 жыл бұрын

    Indeed usefull ! Something to keep in mind when tinkering with ESP's.

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    Thank you!

  • @miru2583
    @miru25832 жыл бұрын

    finally! I was rummaging about esp32 power saving options for the past few weeks. esp32 runs very warm with wi-fi + ble active even with modem sleep(which btw esp32 do it for you automatically when connected to an AP). deep sleep is too brutal & complicated for a simple project that need minimal down time. with reduced clock rate + ntp, I finally found an easier way to reduce power consumption for my project! thanks for the video, guy with Swiss accent.

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    According my measurements, the modems still use energy also in AP mode. But who knows what "modem-sleep" really means ;-)

  • @aspuzling

    @aspuzling

    3 ай бұрын

    What is NTP?

  • @fadi0802
    @fadi08022 жыл бұрын

    Super Video! Vielen Dank für die interessanten und vielseitigen Themen in allen Videos

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    Bitte, gern geschehen. Meine Interessen sind halt auch vielfaltig ;-)

  • @koeiekop1973
    @koeiekop19732 жыл бұрын

    Thanks again for this informative video. I will for sure experiment with the 80MHz setting in new projects!

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    I hope you will be successful!

  • @dhruvagole7651
    @dhruvagole76512 жыл бұрын

    Was awaiting this one! Will help Alot in my lora battery powered projects

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    LoRa projects can profit, I think.

  • @danp762
    @danp7622 жыл бұрын

    That mosfit breadboard hack was useful. Thanks for sharing.

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    You are welcome. I like it, too!

  • @scome98
    @scome9810 ай бұрын

    Excellent!! Will use these recommendations in an upcoming project where I have a few ESP32 running on batteries.

  • @AndreasSpiess

    @AndreasSpiess

    9 ай бұрын

    Good luck with your project!

  • @ronm6585
    @ronm65852 жыл бұрын

    Thank you Andreas.

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    You are welcome!

  • @o3rMeNs
    @o3rMeNs2 жыл бұрын

    Got to love that pointer stick you use! Your channel is great. Many thanks for your knowledge and greetings from the Netherlands! :)

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    Welcome on the channel!

  • @o3rMeNs

    @o3rMeNs

    2 жыл бұрын

    @@AndreasSpiess I've been lurking here for some time, but thanks! :)

  • @leifclaesson2470
    @leifclaesson24702 жыл бұрын

    Hi Andreas! Thank you for all your excellent videos. I myself used ESP32 lower frequencies just a few days ago. The reason you got gibberish from the serial port is that the clock rate must match the XTAL on your board! Your board crystal is 26 MHz, so if you choose 13 or 26 MHz the serial will work fine also at 115200 bps.

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    Where would I chose these 13 or 26MHz?

  • @AubsUK

    @AubsUK

    2 жыл бұрын

    ​@@AndreasSpiess I posted a comment which partially answers this, but it's not showing, I guess it is either in the spam list, or didn't post properly (it was quite long).

  • @leifclaesson2470

    @leifclaesson2470

    2 жыл бұрын

    Hi @@AndreasSpiess, sorry for late response! With ESP32 Arduino Core 1.0.6 or 2.0.1, when selecting "ESP32 Dev Module", in Arduino 2.0 IDE, my CPU Frequency menu fills with the following options: 240MHz (WiFi/BT) 160MHz (WiFi/BT) 80MHz (WiFi/BT) 40MHz (40MHz XTAL) 26MHz (26MHz XTAL) 20MHz (40MHz XTAL) 13MHz (26MHz XTAL) 10MHz (40MHz XTAL) Is the menu different for you? What ESP development board have you selected?

  • @szabonandi
    @szabonandi2 жыл бұрын

    Very good summary, thanks a lot!

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    You are welcome!

  • @CristiIstrate
    @CristiIstrate2 жыл бұрын

    Very interesting video as usual!

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    Thank you!

  • @oscarpeters1351
    @oscarpeters13512 жыл бұрын

    Very nice comprehensive video

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    Thank you!

  • @venkatyalamati3285
    @venkatyalamati3285 Жыл бұрын

    Excellent video sir

  • @AndreasSpiess

    @AndreasSpiess

    Жыл бұрын

    Thank you!

  • @jomolinare2
    @jomolinare2 Жыл бұрын

    Fantastic videos

  • @AndreasSpiess

    @AndreasSpiess

    Жыл бұрын

    Thank you!

  • @jameszahary
    @jameszahary2 жыл бұрын

    Re: modem sleep or "wifi PowerSave" Did you look at this call? esp_wifi_set_ps(WIFI_PS_NONE) Arduino ide seems to default to WIFI_PS_MIN_MODEM, but can be set to WIFI_PS_MAX_MODEM. I set it to WIFI_PS_NONE to keep the esp32 talking to router at max performance. In the esp32 manual: esp32/api-reference/network/esp_wifi

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    No, I did not look at this command, probably because I wanted to save energy ;-) Which problem would it solve?

  • @jameszahary

    @jameszahary

    2 жыл бұрын

    @@AndreasSpiess esp_wifi_set_ps(WIFI_PS_MAX_MODEM) shuts off the modem receive function, and only turns it on every "listen interval" - it keeps the wifi functioning, but longer latency, and less current. I think this is what they mean by "modem sleep".

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    I am not sure. I read that it disable power saving of the modem. Power saving seems to be the default setting.

  • @michaelbyron9688
    @michaelbyron96882 жыл бұрын

    Andreas, great video I appreciate your efforts into a very useful topic. Waiting for your new video on ESPNow. Thank you.

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    We will see when it will come. I wait for a particular project to be ready

  • @jhonyaristizabal9244
    @jhonyaristizabal9244Ай бұрын

    awesome video!

  • @AndreasSpiess

    @AndreasSpiess

    Ай бұрын

    Glad you enjoyed it

  • @mahudson3547
    @mahudson35472 жыл бұрын

    Very useful video and nice to see the power profiler in use. There was a paper looking at processor speed and energy consumption of a 328P. It showed that during computation, the energy consumption (not power!) is best at higher clock frequencies (inversely proportional to clock speed) due to reduced ‘on’ time while there was something to do. So beware of lowering clock frequencies! Could be an interesting subject with ESP32 doing communications as the energy cost when it is awake is most significant. Using current measurement alone is the wrong approach. Batteries are specified by their energy capacity.

  • @diydsolar

    @diydsolar

    2 жыл бұрын

    I think also that is not only how many mA consumes esp32 at different frecuencies. Please Andreas, you need to multiply mA x seconds to estimate power. That way, i think the best option is still 240mhz Isnt it ?

  • @tommasomorandini1982

    @tommasomorandini1982

    2 жыл бұрын

    I did some quick calculations. At 8:28 is said that "at 240MHz 1 million toggles take 278ms. At 10MHz it takes 7800ms (7.8s)". At 9.42 he mentions that power consumption at 240MHz without WiFi is 69mA". From the same graph we can see that at 10MHz the power consumption seems to be 10-13mA. By doing power x time at 10MHz divided by power x time at 240MHz we should get a rough estimate of how many times more power is consumed. Plugging in the number gives us a ratio between 4 and 5. This means that the same operation at 10MHz consumed 4-5 times more energy than at 240MHz. So it seems that unless one can't put the ESP32 to sleep going with the higher clock rate is the best choice.

  • @mikehudson3620

    @mikehudson3620

    2 жыл бұрын

    @@tommasomorandini1982 Exactly. The tricky part comes when you are waiting for something else to happen, like serial comms or wifi connections. This is where the power profiler is so useful - it provides average current during a selected time - therefore energy used. But lowering clock speed is a bad place to start.

  • @Alacritous

    @Alacritous

    2 жыл бұрын

    @@tommasomorandini1982 What are you going to be doing with your project that needs that kind of computational power? Sure, there's the mathematical best case scenario and then there's reality.

  • @tommasomorandini1982

    @tommasomorandini1982

    2 жыл бұрын

    @@Alacritous @Alacritous I don't think I understand your question, what do you mean when you say "a project that needs that kind of computational power"? As in a project that doesn't allow the ESP to go to sleep? Or that needs 240MHz?

  • @cyberbob4111
    @cyberbob41112 жыл бұрын

    vielen Dank, sehr hilfreich!

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    Gern geschehen!

  • @israelgiron9089
    @israelgiron90892 жыл бұрын

    Useful Useful Use Thank you!

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    You're welcome!

  • @avejst
    @avejst2 жыл бұрын

    Great update Thanks for sharing :-)

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    You are welcome!

  • @miscellaneousHandle
    @miscellaneousHandle2 жыл бұрын

    excellent!

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    Thank you!

  • @rickharold7884
    @rickharold78842 жыл бұрын

    Juicy! Thx!

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    Glad you like it!

  • @yahmk3978
    @yahmk39782 жыл бұрын

    Vielen Dank!

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    Bitte, gern geschehen!

  • @uwezimmermann5427
    @uwezimmermann54272 жыл бұрын

    The commands to set the serial baud rate should take the clock frequency into account. And if you change the clock speed on-the-fly in your code you should be able to restart serial communication at a correct baud rate afterwards. I am not aware how this is implemented in poorly documented Arduino libraries, but from the hardware/low-level side it should be very simple.

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    I just tried it and a Serial.begin(115200); at each frequency did not change anything :-(

  • @uwezimmermann5427

    @uwezimmermann5427

    2 жыл бұрын

    @@AndreasSpiess that's too bad and I would consider this a bug in the Arduino libraries. On AVR chips using e.g. the UART-library by Peter Fleury the adaption works flawlessly. This just adds to my general complaints about the Arduino framework - if you are trying to do anything outside of a quite narrow scope you are likely to run into problems. I assume that also millis() will not be reliable anymore after your clock frequency changes.

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    millis() worked ok. I was also skeptical and tried it. ;-)

  • @NathanSweet

    @NathanSweet

    Жыл бұрын

    ​@@AndreasSpiess Serial is corrupted below 80MHz if Serial.begin is called before setCpuFrequencyMhz. However if begin is called after then serial does work (using 115200).

  • @AndreasSpiess

    @AndreasSpiess

    Жыл бұрын

    @@NathanSweet Thanks for the info!

  • @craiglarson2346
    @craiglarson23462 жыл бұрын

    Andreas, your video about ESPNOW is also worth mentioning for power conservation. I found this to be the case on the ESP8266's when occasional data loss is acceptable. I can only presume that applies to the ESP32 as well.

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    Yes. ESPnow is very efficient. I had a talk to one of my viewers with an interesting ESP-Now project. He has to add some stuff before I can show it. Maybe beginning of next year...

  • @youliantroyanov2941

    @youliantroyanov2941

    2 жыл бұрын

    @@AndreasSpiess can't wait 👍

  • @koeiekop1973

    @koeiekop1973

    2 жыл бұрын

    @@AndreasSpiess thanks again for this insightful video! can’t wait to see the new ESPNOW video, currently experimenting with it as well, but it seems to loose connection after a long time. Keep up the great work!

  • @bluegizmo1983
    @bluegizmo19832 жыл бұрын

    Most people don't know that almost all ESP32 boards use way more power than they should in deep sleep. Most people think "oh the ESP32 will only use like 10ua in deep sleep!" But that's just not true of most ESP32 boards because of power regulation and extra stuff on the dev boards. Most ESP32 boards actually continue drawing around 2-5ma of power which is thousands of times more than expected. There are a few boards that were designed with low power deep sleep in mind and only just a few microamps, but not many.

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    I agree and you find quite a few tests on this channel which support your statement.

  • @franklee663
    @franklee6632 жыл бұрын

    I think I read somewhere that wifi routines run on the second core of the ESP32. Thus when you specify Wifi.mode() command, the compiler actually compiles the code into the second core but put it in busy loop, thus not giving any energy savings. That is my hypothesis and maybe you would want to examine that.

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    AFAIK both cores work with the same clock and also deep-sleep together.

  • @otroblogdemarcelo
    @otroblogdemarcelo2 жыл бұрын

    Nice! Will test 10Mhz in my ESP32 project, to see if I can get more runtime on my 4 AA Nimh batts! Thanks! Cheers from Argentina!

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    Good luck!

  • @wjn777
    @wjn7772 жыл бұрын

    Great video and thanks for sharing. A look at using a bare bones ESP32 with and external RTC would be interesting. I also find that using the ESP32 with LoRa point to point uses less power for battery projects, and for many "simple" projects like weather stations this is a good solution.

  • @craigs5212

    @craigs5212

    2 жыл бұрын

    I did a similar project, used a low power (low clock rate) CPU to do my sensor and control work. To report the results over WiFi I connected up and ESP8266 which is kept if deep sleep. When my main processor needs to report the status over WiFi it wakes up the ESP32 with a GPIO pin, sends the JSON sensor data to the ESP via SIO line. I use a simple 2 wire Request/Acknowledge hand shake protocol . The low power cpu wakes up the ESP with an Req, the ESP wakes up and connects to WiFi and return an Ack. The sensor cpu then sends the sensor data to the ESP. Once the ESP has delivered the dat it drops the Ack and goes back to sleep. I send data about every 5 minutes. Limit timers assure no lockup if WiFi can't be connected.

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    There are a few projects with external timers (usually, not RTCs) like the trigboard or the Microwakeupper. They use very low power chips to wake the ESP. For LoRa sensor projects I do not use the ESP32. Usually, I use other processors (as shown in the Mailbox notifier video). They are even more low-power.

  • @wjn777

    @wjn777

    2 жыл бұрын

    @@AndreasSpiess I only used the ESP32 because I was familiar with it, and it was convenient using deep sleep. Still, using a standard Wemos D32 v1, RFM95 and lithium battery it provides months of battery life

  • @SchmurtzAlex
    @SchmurtzAlex2 жыл бұрын

    As always very interesting ! How do you find interesting subjects so often ? 😄 Esp8266 is able to clock down too? I know that deep sleep is less good but may be it stay interesting for some scenarios… Also with wpa2 may be at lower clock speed the time to etablish the connection is longer so may be it is finally a lower difference than expected to transmit the same thing.

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    I do not know if you can clock the ESP8266 at lower speeds. The Arduino IDE only offers 80 and 160MHz. And I did nto test how long it takes to connect to Wi-Fi. This is not simple because it is not a constant time (at least in my case)

  • @chuxxsss
    @chuxxsss2 жыл бұрын

    Evening Andreas, looking forward to this one. Pin 21 mate sounds like me on a good day. I hate them days.

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    :-)

  • @chuxxsss

    @chuxxsss

    2 жыл бұрын

    @@AndreasSpiess ;-)

  • @enzolombardi9631
    @enzolombardi96312 жыл бұрын

    Superb. My only wish was to have a BLE only based analysis as many of my projects don't need wifi. Grazie!

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    :-)

  • @AllanHjberg
    @AllanHjberg Жыл бұрын

    Hi Andreas I love your videos 😊 Did you have a look at the da16200 SoC?

  • @AndreasSpiess

    @AndreasSpiess

    Жыл бұрын

    No. So far it did not appear on my usual sources...

  • @wilfredosandovaldelgado3690
    @wilfredosandovaldelgado3690 Жыл бұрын

    Hi Andreas, i have try to run the time library by Diageo, and found that in light sleep the counting runs with no problem, so, maybe some one is needing that. Thanks for the vídeo.

  • @AndreasSpiess

    @AndreasSpiess

    Жыл бұрын

    Thanks for the info!

  • @matheokoning4456
    @matheokoning44562 жыл бұрын

    Been watching your videos again lately. Would it be an idea to recreate some of the videos again since a lot has changed and added in terms of sensors, chips, microcontrollers and equipment?

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    I have no such plans. Sometimes it happens if I am again interested like in the TTN V3 update...

  • @pubudumadhushan7305
    @pubudumadhushan73052 жыл бұрын

    Great lecture, can you do some ESP32 ADC noice cancelation(hardware level and software level) tips, tricks and calculations. It's very useful.

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    I do not understand DSP. So the chances are small :-(

  • @pubudumadhushan7305

    @pubudumadhushan7305

    2 жыл бұрын

    @@AndreasSpiess i hope you can do it. 💪🏽💪🏽

  • @defenestrated23
    @defenestrated232 жыл бұрын

    If you wanted a low power remote sensor with periodic broadcasts, I wonder if you could use this pattern: have a flag in non-volatile memory, or even a hardware flipflop, which the mcu checks on boot. If unset, go into low power mode, logging data w/o wifi. Then after X measurements or time, set the flag and reboot. Mcu comes up, reads the flag, goes into wifi mode, sends packets, resets the flag, and reboots. Too bad you can't seem to just turn wifi mode off and get the same effect. Maybe there's some errata buried in the docs.

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    This can easily be done with an ESP32. Just declare a counter variable with the attribute: RTC_DATA_ATTR int counterValue; . It will survive deep-sleep. Then you check its value and only start Wi-Fi every 10th or 100th restart.

  • @NextLevelCode
    @NextLevelCode2 жыл бұрын

    Thanks for your big beautiful Swiss brain dumps :)

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    You are welcome!

  • @axelhertwig8258
    @axelhertwig82582 жыл бұрын

    In your video, I see that you use an adapter board with some pre-soldered(?) R/Cs, most likely as minimum circuitry for the reset, boot and Vdd. Do you have a link to this board as well, maybe even with the ESP pre-soldered?

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    My boards had these components pre-soldered and indeed, they are for the reset and the GPIO0 pins. So far I did not see such boards with soldered modules on it. But this is not too complicated.

  • @afzallent
    @afzallent2 жыл бұрын

    Thank you 👏

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    You are welcome!

  • @ReneKnuvers74rk
    @ReneKnuvers74rk2 жыл бұрын

    Question: at lower clock freq’s wifi will not work. Still you were able to measure its current consumption. Would ESP-NOW still work and would ESP’s with different clock frequencies be able to communicate over ESP-NOW? A use case would be when sensors are throttles down to 10MHz and a grid-powered gateway would be at 240MHz to communicate over wifi with an MQTT server. I guess even an ESP32 would allow for a reasonable battery life at 10MHz. Would these tricks work with ESP8266 too?

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    1. I assume, ESP-Now also does not work below 80MHz. But I did not try. 2. The ESP8266 has no such menu on the Arduino IDE. So I do not know if you could do it. I hardly use it anymore.

  • @peterholst8875
    @peterholst88752 жыл бұрын

    Two weeks ago i sat with just that I2C problem 🤦🏼‍♀️ It took me almost two hours to figure out 🙄

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    So we are already 2. Because it is not a usual problem I had quite some time to discover it...

  • @jamfotografie7724

    @jamfotografie7724

    2 жыл бұрын

    Just to be sure, is due to the used PCB or due to the esp32 model?

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    The PCB

  • @volodyakan5111
    @volodyakan51112 жыл бұрын

    Hi Andreas, is it possible to turn off one of CPU Core in ESP32 and use the second ? Or turn one CPU in deep sleep and use another ?

  • @DanBowkley

    @DanBowkley

    2 жыл бұрын

    By default if you're using the Arduino IDE everything gets executed on core 0. The RTC core is only used if you explicitly put stuff on it, and core 1 works basically the same way: you have to set subroutines up as tasks to put them on a specific core, and you have to move over to full C++ to do that (well to do it so it actually runs, theoretically the Arduino IDE can do it but it's buggy AF). I generally make tasks to run MQTT and wifi connection management stuff on core 1 and then just leave everything else alone so it defaults to core 0. The task assignment stuff can actually automatically assign tasks to whichever core it thinks would be better, however you have to beware of not-quite-thread-safe libraries that don't like talking to other things running on other cores. MQTT is one of those libraries.

  • @ebukaezike9308

    @ebukaezike9308

    2 жыл бұрын

    @@DanBowkley how do you turn off the second one since it not used ?

  • @volodyakan5111

    @volodyakan5111

    2 жыл бұрын

    @@DanBowkley When it's no attached subroutine to the second core, this core is idle. But it's not in deep sleep and continue to use power ?

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    I made a video on how to use the cores in Arduino IDE (using RTOS). As written, both cores are clocked at the same speed and also go to sleep together (I hope this is the politically correct expression)

  • @volodyakan5111

    @volodyakan5111

    2 жыл бұрын

    @@AndreasSpiess Thanks for answer. Yes, it's correct. Because they are friends ;)

  • @daledroesse8279
    @daledroesse82792 жыл бұрын

    I would like your thoughts on WiFi Halo, WiFi Mesh and WiFi 7 and how this might affect LoRa

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    Below 1GHz things become complicated because of the different frequency ranges available in different regions and the legal restrictions. I looked at WiFi Halo and I think it is a niche product, maybe even only for the American market (big bandwith). The bandwith of LoRa is very small compared to standard WiFi. This produces range but limits its usage more or less to sensors

  • @EdFrench_uk
    @EdFrench_uk2 жыл бұрын

    Great video. I finally got to grips with the ULP, I managed to get a simple program working in platformio with arduino as the framework. It is amazing to be able to do useful, if simple, stuff during deepsleep, but the documentation is so poor I'm not sure I'll rush to do it again!

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    One of my viewers stared to write a C compiler for the ULP. Unfortunately, teh project is dead and I never was able to get it running. Would be easier, I think.

  • @EdFrench_uk

    @EdFrench_uk

    2 жыл бұрын

    Yes, but I would be quite content for most purposes with a good assembler that worked with platformio and arduino. I would be tempted to try and write one, but it feels a little pointless as the newer esp32's move to a proper risc core!

  • @axelhertwig8258

    @axelhertwig8258

    2 жыл бұрын

    I have made good experience with ESP deep sleep stub. It can be programmed in C, use some ROM functions and can be more power efficient than ULP if the wake up rate is low enough, e.g 2ms every 2s.

  • @EdFrench_uk

    @EdFrench_uk

    2 жыл бұрын

    @@axelhertwig8258 interesting. I always found the minimum wake time was quite long- longer than 2ms- even without wifi etc. I wonder what I was doing wrong?

  • @axelhertwig8258

    @axelhertwig8258

    2 жыл бұрын

    @@EdFrench_uk Just checked some notes that I made on this. For very simple tasks in the wakeup stub it takes ~8ms with an average of ~25mA (200uAs). Unfortunately the Power Profiler Kit is out of stock, otherwise I would do some more accurate measurements. Wake up stub avoids bringing up the overall system and provides a (very) limited environment (see espressif docu). In comparison waking up into main() takes between 150-250ms.

  • @zyghom
    @zyghom2 жыл бұрын

    super nice Andreas but you did not touch impact of lower frequency on wifi (re)connection time I tried this as well (most of my sensors wake up from DS, measure, send over WiFi and go to sleep for 5-10min accordingly) now, the entire process takes 3-7s depending which sensor is connected but the longest time is always from wake up to "IP assigned". When I tried lower frequency the connection time increased dramatically - 2 seconds from 5 is 40%. So the savings due to lower frequency are diminished by longer connection time. Try and let us know what you found ;-)

  • @dave00011

    @dave00011

    2 жыл бұрын

    I understand assigning static ip address to the esp32 board reduces time to connect/authenticate to wifi network

  • @zyghom

    @zyghom

    2 жыл бұрын

    @@dave00011 it does. But if you have 50+ devices in you wifi you still fight for your time slot. I actually have 80+ in my 2.4GHz (considering all sockets, bulbs etc.) - traffic jam ;-)

  • @dave00011

    @dave00011

    2 жыл бұрын

    @@zyghom add another ap for your iot devices only

  • @zyghom

    @zyghom

    2 жыл бұрын

    @@dave00011 already done (second router) but that lowered from 80 to 50 ;-) - this however decreased the wifi time-to-connect by around 1.5-2s. Problem is however different now: home assistant needs to be in the same network segment (dispite I wanted to separate "home machines" from IoT) - I am not sure how to tackle this issue (both: IoT in separate segment yet home assistant secure)

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    Zygfyd: A good point. Thank you for sharing your experience! BTW: I needed a trick in my router to get a "one way" path from the IOT segment to the general segment. But I do no more remember how we did it (a colleague helped me)

  • @EdFrench_uk
    @EdFrench_uk2 жыл бұрын

    I find I am able to repeatedly sleep wifi providing I do WiFi.disconnect(true) first, then WiFi.mode(WIFI_OFF) afterwards.

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    Thank you for your feedback. In my case, WiFi was also off after the command. But deep-sleep and lower clock rates did no more properly work after issuing this command :-( I do no more remember if the ESP also changed to the higher current consumption curve.

  • @paulgray1318
    @paulgray13182 жыл бұрын

    So are you able to toggle wifi on and off just by lowering the CPU clock below the 80MHz frequency?

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    Somehow. But as we saw, the current consumption does not behave the same way.

  • @wilfredosandovaldelgado3690
    @wilfredosandovaldelgado36902 жыл бұрын

    Ok

  • @myloveisvyvy
    @myloveisvyvy2 жыл бұрын

    Hi Andreas i cant seem to be able to find the video of the ultra low power atmega1284p lora. The module which is sold on Tindie. Can you please link me up? I am a novice and would like to make use of the board and thought that video of yours was an awesome guideline. Thank you

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    it is #402

  • @qvisten999
    @qvisten9992 жыл бұрын

    Curious to hear if you have ever tried the Toit language for your ESP32s?

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    No, I did not (so far).

  • @tenminutetokyo2643
    @tenminutetokyo26432 жыл бұрын

    Can you do one one the ESP32-C3 ESP-C3-01M?

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    Maybe I will cover the -C3 in a future video. I have some ideas...

  • @sirhotpain
    @sirhotpain Жыл бұрын

    Have you been able to test light sleep + wifi on the ESP32-S2 by now? Would be incredible if it enables us to significantly reduce power usage during delay periods.

  • @AndreasSpiess

    @AndreasSpiess

    Жыл бұрын

    Still on the "To-Do" list :-(

  • @sirhotpain

    @sirhotpain

    Жыл бұрын

    @@AndreasSpiess No worries, just wanted to make sure I didn't miss anything. You have so many great videos that it's difficult to keep up. :)

  • @alexbristol5199
    @alexbristol51992 жыл бұрын

    Hi Andreas, to work with WiFi and esp_light_sleep_start() I have found removing all WiFi tasks before going to sleep works, so as a very simplified code example: esp_now_deinit(); WiFi.disconnect(true); WiFi.mode(WIFI_OFF); esp_light_sleep_start(); [And then on ESP32 wakeup] WiFi.mode(WIFI_STA); WiFi.begin(wifiSsid, wifiPassword); esp_now_init(); esp_now_add_peer(peer_info);

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    Thank you for the info!

  • @jmr
    @jmr2 жыл бұрын

    I rate this video "interesting". One day it will also be "useful" when I have the right project.

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    Exactly! Same here.

  • @qzorn4440
    @qzorn44402 жыл бұрын

    i would like to use remotexy, esp32, android smartphone BLE. what is the procedure to set the phone up for a basic app to pair to the esp32? thanks a lot...:)

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    Unfortunately, I do not know this project. Maybe you ask the "inventors" ?

  • @jackflash6377
    @jackflash637711 ай бұрын

    Have you tried I2S with the lower clock rates? Is the CLK freq of I2S derived from the CPU speed?

  • @AndreasSpiess

    @AndreasSpiess

    11 ай бұрын

    I did not try with lower speeds. And I assume the CPU and I2S clock have the same source. Maybe you find the details in the datasheet.

  • @nixon275
    @nixon275Ай бұрын

    Whats the best mode for ESP Rainmaker (Wi-fi based project), i want to read sensor readings/activate actuators every 5ish minutes.

  • @AndreasSpiess

    @AndreasSpiess

    Ай бұрын

    I never used this product, so I do not know :-(

  • @OmarMekkawy
    @OmarMekkawy2 жыл бұрын

    Interesting video as usual, I think that @5:34, the capacitor C18 looks like its misplaced.

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    Possible. I did not do it ;-)

  • @andrewward4419
    @andrewward4419 Жыл бұрын

    Andreas.. Thank you.. Can you please expand "you can use Light Sleep if you do not use WiFi"? If I use ESPNOW to send a message only when an event occurs, but not receive anything other than immediate responses and Acts from the receiver, can I power down Wifi and then go into light sleep for a while, then come back up and power on Wifi and send another message? BTW I also am anxious to see your ESPNOW reviews and techniques. Especially interested in power saving in ESPNOW scenarios. (My App is a small hand held Kayak motor speed controller, remote battery monitor that I must keep working for 9-10 hours with reliability for ocean use.. otherwise I get eaten by sharks or can't get back to shore.

  • @AndreasSpiess

    @AndreasSpiess

    Жыл бұрын

    You have to try. I never used light sleep and WiFi.

  • @TMS5100
    @TMS51002 жыл бұрын

    Are these saving modes good enough for the first row?

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    Of course!

  • @ambroribo6079
    @ambroribo6079 Жыл бұрын

    Good day, I have a question about the sampling rate of the esp32: what is the maximum sampling rate for the ESP32 ? How could I achieve it please ?. Thanks in advance for the kind reply. Regards iw2fvo

  • @AndreasSpiess

    @AndreasSpiess

    Жыл бұрын

    There is no maximum ESP32 sampling rate. It depends on the interface technology as well as your coding.

  • @satria4195
    @satria41952 жыл бұрын

    Hello, is there a video about temperature Sensor on your channel?

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    No, I do not think so. Only about a thermal camera sensor.

  • @satria4195

    @satria4195

    2 жыл бұрын

    @@AndreasSpiess is there gonna be a video about this subject (temperature sensor)?

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    I have no such plans for the moment. What would it show?

  • @satria4195

    @satria4195

    2 жыл бұрын

    @@AndreasSpiess maybe like type of Temperature Sensor like Thermistor (NTC, PTC) Thermocouple, RTD, Thermophile, Semiconductor Based. For Microcontroller DIY that use temperature measurement

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    Ok. Now I understand. Thank you.

  • @rcpoisond
    @rcpoisond2 жыл бұрын

    Any idea where to buy the Nordic PPK2 as a private customer in the EU? I've been trying to get my hands on one but I only found distributors selling exclusively to company's :/

  • @mahudson3547

    @mahudson3547

    2 жыл бұрын

    I bought privately from Farnell

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    I also bought from Mouser if I remember right. But they were in backlog because of the chip shortage.

  • @rcpoisond

    @rcpoisond

    2 жыл бұрын

    Thanks!

  • @thiagotenoriojordao
    @thiagotenoriojordao9 ай бұрын

    Andreas, did you found a way to reduce cpu clock on the ESP8266?

  • @AndreasSpiess

    @AndreasSpiess

    9 ай бұрын

    I am not sure if I ever tried. But Google should know if it can be done

  • @catoom10
    @catoom102 жыл бұрын

    You show the description of CPU clock, but the max. is highlighted. But it tells: "... is adjustable from 80MHz to 240MHz"

  • @nkronert
    @nkronert2 жыл бұрын

    So how about a setup with two ESP32s, where one doesn't use WiFi and therefore can run in light sleep mode (and use both cores for processing without the risk of killing WiFi by hogging core 0). The second one by default is in deep sleep and only wakes up when the other processor needs to send data over WiFi. But what would be the best way to connect the two modules?

  • @defenestrated23

    @defenestrated23

    2 жыл бұрын

    Uart, SPI or I2C is probably best to get the two to talk.

  • @craigs5212

    @craigs5212

    2 жыл бұрын

    That is what I do but the second cpu is not an ESP

  • @nkronert

    @nkronert

    2 жыл бұрын

    Interesting. Would you mind telling us which CPU you are using for the WiFi part and which interface you use to communicate between the two?

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    I would say that UART is the simplest way and works with all processor types. For I2C your processor needs to support I2C slave mode.

  • @nkronert

    @nkronert

    2 жыл бұрын

    I was looking into the slave mode stuff but it seemed complicated. Thanks for your suggestion, Andreas. I guess since most iot devices will not share huge amounts of data, the UART interface should suffice.

  • @lalithkumar9807
    @lalithkumar98072 жыл бұрын

    what is the least current consumption you got in modem sleep mode of esp32?

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    That differs from board to board. I made some comparison videos

  • @lalithkumar9807

    @lalithkumar9807

    2 жыл бұрын

    @@AndreasSpiess ok ill check it out!Thanks

  • @lalithkumar9807

    @lalithkumar9807

    2 жыл бұрын

    @@AndreasSpiess can we achieve current consumption of around 2mA on esp32s3-mini in modem sleep mode?

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    @@lalithkumar9807 I never tried

  • @lalithkumar9807

    @lalithkumar9807

    2 жыл бұрын

    @@AndreasSpiess cool!Thanks...do let me know if u do any such tests!Thanks in advance.

  • @Bigman74066
    @Bigman740662 жыл бұрын

    5:40 what happened to C18?

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    I do mot know. But it seems to be misplaced.

  • @MrAssHolev
    @MrAssHolev2 жыл бұрын

    In short ... If you change to

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    I do not know if this is needed for I2C. I did it to stay on the safe side

  • @MrAssHolev

    @MrAssHolev

    2 жыл бұрын

    Stay on that side with IFD :)

  • @horrorhotel1999
    @horrorhotel19992 жыл бұрын

    3:00 PLEASE PLEASE PLEASE add Chapters to this Video and a caption stating No. 3 will surprise you

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    I decided to not add chapters because my videos are not made for that. I already have plenty of comments where it becomes clear that the commenter did not watch the whole video before commenting...

  • @qsdrfghgujfddyffguff
    @qsdrfghgujfddyffguff10 ай бұрын

    very secret information

  • @AndreasSpiess

    @AndreasSpiess

    10 ай бұрын

    :-)

  • @wiki4001
    @wiki40012 жыл бұрын

    Light sleep not in github?

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    Yes.

  • @wiki4001

    @wiki4001

    2 жыл бұрын

    @@AndreasSpiess can you share a sample light sleep program for me please

  • @andraznovak2139
    @andraznovak21392 жыл бұрын

    Who is deleting my comments?

  • @defenestrated23

    @defenestrated23

    2 жыл бұрын

    Probably youtube lol

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    KZread if they contain links.

  • @AerialWaviator
    @AerialWaviator2 жыл бұрын

    Extremely fascinating and pragmatic content as always. ♥👍👍 This left me wondering the effects of the various energy saving modes as it relates to the cores in the ESP32. You touched on using multiple cores in video #168. It would be insightful to see what impact these various modes have on ability to use cores, and how it impacts energy usage. Maybe there is even a way to hibernate a core, while using the other in different modes? (particularly at lower clock rates)

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    AFAIK both cores use the same clock as well as start the sleeping mode together. So I would not expect anything.

  • @AerialWaviator

    @AerialWaviator

    2 жыл бұрын

    @@AndreasSpiess Thanks. :)

  • @PY1SAN
    @PY1SAN2 жыл бұрын

    Very interesting. 73 de PY1SAN

  • @AndreasSpiess

    @AndreasSpiess

    2 жыл бұрын

    Thank you! 73 de HB9BLA

Келесі