#60 How to use the RTC Memory in ESP8266 and reduce power consumption by factor of 10 (Tutorial)

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 มิ.ย. 2024
  • In episode #58 we built a sensor which uses deep sleep mode. In this video I show you how to use RTC memory which survives deep sleep mode to reduce power consumption even further.
    Code: github.com/SensorsIot/ESP8266...
    SDK Documentation: espressif.com/en/support/down...
    Calculator to calculate running time: battery-life.of-things.de/batt...
    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
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @stefanvolkmer1167
    @stefanvolkmer1167 8 ปีที่แล้ว +10

    Please never stop your ESP8266 series. your videos are the best ones! thank you very much

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

      You are welcome!

    • @Sage125
      @Sage125 8 ปีที่แล้ว +2

      Yup, thanks very much for your work in the ESP8266 community, your video's are one of the best out there!!

  • @dgm1949
    @dgm1949 8 ปีที่แล้ว

    Another great job by Mr. Spiess. I always look forward to you videos.

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

      Next week there will only be a very short one, because I do not have a lot of time

  • @chookaification
    @chookaification 7 ปีที่แล้ว

    Thanks for the example Andreas, I got it working, thanks to you!
    For all the rookies like me, one trap is if your struct size is not divisible by 4, the integer math will cut of the remainder so you have to manually round up.

  • @ernst1024
    @ernst1024 8 ปีที่แล้ว

    an dieser Stelle auch von mir einmal herzlichen Dank für Ihre sehr lehrreichen Videos.

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

      Bitte, gern geschehen. Es freut mich immer, wenn jemand sich die Zeit nimmt, mir Feedback zu geben.

  • @EZtech
    @EZtech 8 ปีที่แล้ว

    Can't wait to try this out, Great video! Thanks for all the hard work you put into these videos, helping out us average Joe's.

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

      Good luck when you try. This is never hard work! Just hobby. Work is when I am payed for and I cannot select what I want to do...

  • @northshorepx
    @northshorepx 8 ปีที่แล้ว

    Wonderful. So simply and patiently explained. Thank for another great tutorial.

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

      Thanks. Good to read that my content is understandable.

    • @northshorepx
      @northshorepx 8 ปีที่แล้ว

      Hey Andreas - have you looked at this :nodemcu.readthedocs.io/en/dev/en/modules/rtcmem/ "Due to the very limited amount of memory available, there is no mechanism for arbitrating use of particular slots. It is up to the end user to be aware of which memory is used for what, and avoid conflicts. Note that some Lua modules lay claim to certain slots."

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

      No. I use the Arduino IDE for programminga and not LUA. So, I think, I cannot use these modules.

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

    I'm glad I subscribed to you, I will actually need this for a project.

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

      +RandomHacks Very good. Maybe it saves you some time

    • @RandomHacks
      @RandomHacks 8 ปีที่แล้ว

      Yes I'm sure it will. Thanks!

  • @rudsomlima
    @rudsomlima 8 ปีที่แล้ว

    Thanks for sharing your knowledge in a very didactic way.

  • @josemanuelcuesta8778
    @josemanuelcuesta8778 8 ปีที่แล้ว +2

    I really hate people like you (in the good way) you are artist in electronics and know how to explain it. Thanks a lot, and never stop.

  • @101criminal
    @101criminal 8 ปีที่แล้ว

    SIr, This is very brilliant, just subscribed very glad i found this might start up some projects again :)

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

      Thanks for subscribing. Welcome in the group! And good luck with your projects

  • @owlsight4499
    @owlsight4499 8 ปีที่แล้ว

    Thanks for another great upload!

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

    Brilliant work👍

  • @cad3175
    @cad3175 8 ปีที่แล้ว

    ..excellent work, thank you very much for sharing :)

  • @SightsToKeepInSight
    @SightsToKeepInSight 7 ปีที่แล้ว

    One of the best videos

  • @non7sens
    @non7sens 8 ปีที่แล้ว +2

    This is gold!

  • @envt
    @envt 8 ปีที่แล้ว

    thanks for another great tutorial! I'm always so happy when you post a new vid. did you manage to figure out how to put the esp to sleep for more than 70 minutes? I'm unable to find info on how to do that.

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

      Yes, I know how to do it. This is not the problem. But I want, that he wakes up at one particular time during the day. And this needs more work. A video will follow.
      In the meanwhile you find the needed info here: github.com/HarringayMakerSpace/ESPDailyTask

  • @glacian79
    @glacian79 2 ปีที่แล้ว +5

    I think something has changed since this video was made. Suggest using
    uint32_t foo = 255;
    ESP.rtcUserMemoryWrite(0, &foo, sizeof(foo));
    ESP.deepSleep(5e6);
    which doesn't need the user_interface.h library and fixed a weird bug where incorrect values were retrieved.

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

      Well possible that things changed since then. Thanks for the info.

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

      Or is that an ESP32 library call?

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

    Thank you! Excellent video.
    I have an idea how to improve battery life several times.
    When we know something about the signals that we measure, we can use data compression.
    For example:
    1) In your example, we measure the battery voltage. If we expected range from 2.0 to 3.6 V with an accuracy of 0.05 V, this voltage can be divided into 32 zones ( with step 0.05V). We do not need to use for voltage 4 * 8 bits (as in your example), but only 4 bits. This would extend the battery life eight times.
    2) For example, we know that the data usually does not change much often. We can send only the first value (a fixed number of bits) and then only the difference Δ between last value. For different value of difference we can use different number of bits. Big difference (not too often in our data) will have a lot of bits and a small difference (very common in our data) a little bits. For example:
    Δ = 0 => 0 (most frequently used)
    Δ = 1 => 10
    Δ = -1 => 110
    Δ = 2 => 1110
    Δ = -2 => 11110
    Δ = 3 => 111110
    Δ = -3 => 1111110
    .... (used less frequently)
    3) Generally, if we know the static parameters, we can design the most appropriate coding for the signal (by the entropy).
    4) And trivially :-). If we want to known whether the battery (or anything else) is in order or not, just one bit per one time is enough :-)

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

      Thanks for your feedback. This is a very good idea if you need to store and transfer "big" amounts of data. However, usually, I do not store a lot of data in the ESP before transmitting, because the advantage of these devices is "real time" and I would lose it if I only transfer data every few days. Please keep also in mind, that the ESP has to connect to the Wi-Fi network and this takes (at low data volumes) the biggest time ( and I also think, the biggest part of the energy).
      Concerning 1 or 4 bit: If you can combine it with something else, this for sure helps, because the smallest number of bits we can transport is 8. So, the easiest way to save space for the battery voltage value is to divide the 10 bit integer value coming from the ADC by 4 and only use an 8 bit variable for the transport.

    • @ivomarvan2879
      @ivomarvan2879 7 ปีที่แล้ว

      Hi Andreas,
      thanks for your quick answer.
      You're right. Especially in the real time aspect.
      I just wanted to compress data in RTC memory and turn on wifi part less frequently. And save battery live by them. With the same amount of data as you have!
      Sorry, but you are wrong in the idea of "smallest number of bits we can transport with 8".
      I can watch the RTC memory as a string of bits. Yes, I can only proceed at once to 8 bits (one byte). But that's no reason why I can not control (read and write) every single bit. Via individual control of bytes. This is simple software task.
      Then I can send all the RTC memory as stream of bytes. On the server I can decode it to the original measurement data.
      If I find some time, I will write library for it :-).

    • @ivomarvan2879
      @ivomarvan2879 7 ปีที่แล้ว

      One more comment: Decoding can be done on ESP8266 side also. After reading from RTC memory and before sending by WiFi to server. It can be useful when server do not support scripting.

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

      +Ivo Marvan this is, what I meant by "combining it with something else "...

  • @tablatronix
    @tablatronix 8 ปีที่แล้ว

    Brilliant!

  • @BilalInamdar
    @BilalInamdar 8 ปีที่แล้ว

    subscribed.. nice work on the boring topic

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

      Thanks for subscribing. Welcome in the group!

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

    I am really glad I found this video and with it your whole channel. That RTC memory info was really hard to find. Your video helped me a lot in understanding how to use it also it's still hard to get into my head that a single integer has the same memory size as a struct with two integers due to memory alignment.
    You could save the battery measurement as millivolts in an unsigned int to save some bytes in the github code (It should be 8 byte because int+float have 6 byte and get padded to 8. 2 ints would fit nicely into 4 byte so the memory can hold twice as much values).
    I don't think the measurements are accurate to the third digit after the comma so it seems like a good compromise :)

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

      Fortunately, the ESP boards have plenty of memory compared with the Arduinos. So we do not need to care too much...

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

      @@AndreasSpiess Thank you for the answer.
      Currently I am playing around with a sensor based on the Wemos D1 Mini similar to yours (they are great for inspiration) and at least the rtc memory feels quite limiting. I am planning to implement some backup method that stores that data in the flash when the server is not reachable after the rtc memory is full and in that case it's probably quite a lot.
      I am not so sure how to treat flash correctly so that it will last for a long time but I think I read somewhere that only the block erase causes issues (limit of about 10000 rewrites) Writing the 127 bytes to different blocks once in a while will probably be ok also I with the flash had some intelligent load leveling like a modern ssd. At least I learned to be carefull when writing a few thousand values to the same memory address otherwise my first esp would probably already be dead.
      It's really exciting to work with this limitations. Coming from desktop development with almost no micro controller experience opens so many new perspectives. I would never have considered the 4Mb flash as plenty of memory (moreso because I thought it's only 4kb) but compared to rtc memory it is : )
      I might be overengineering my sensor but where is the fun when it's to easy...

  • @Valenorious
    @Valenorious 8 ปีที่แล้ว

    I agree with what the others say, your explanations and tutorials in your videos are very thorough and presented calmly. Very pleasant to watch.
    At the end of the video your sentence was cut short. Could you fill in the remainder of what you wanted to say?

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

      Thank you for your nice comment!
      A small part was cut-off during upload and I did not discover it. It was just a remark, that you find the code on github and the usual good-bye

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

    I haven't tested this, but it appears that you should be able to use 'system_get_rst_info()' or 'ESP.getResetInfoPtr()' to find out why the esp woke up. I think it might help you save that additional byte you are storing at location 64, and the few cycles associated with it.
    Very useful video, as usual!

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

      You are right. I just tested:
      rst_info *rsti;
      rsti = ESP.getResetInfoPtr();
      Serial.println("
      Start...");
      Serial.println(String("ResetInfo.reason = ") + rsti->reason);
      prints 6 if the ESP starts from scratch
      and prints 5 if it starts with a reset. Thanks for the hint.

  • @mortenhattesen
    @mortenhattesen 4 ปีที่แล้ว +7

    The algorithm for calculating number of buckets that a struct requires is faulty. Example: a 5, 6 or 7 byte struct will result in buckets == 1, i.e. that the struct will fit in a single 4 byte bucket, which is clearly wrong.
    The following algorithm will correctly round up the number of buckets required, and does therefore not require the additional "if (buckets==0) buckets=1;"...
    buckets = (sizeof(rtcMem)+3)/4;

  • @abogombachatin9939
    @abogombachatin9939 7 ปีที่แล้ว

    From honest view, this couldn't be more exciting. huge thanks for your contribution to ESP community. In order hand, I was wondering if there is any command to clear RTC memory for future data logs or we we just rewrite without problem.

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

      You're welcome!
      RTC is "cleared" as soon as you power the ESP off. This is, why I use a "magic byte". If it is not set, I assume the RTC is cleared. Cleared does not mean, all bytes are "00" of "FF", they just do not contain useful information and can be overwritten.

    • @abogombachatin9939
      @abogombachatin9939 7 ปีที่แล้ว

      Thanks Mr Andreas

    • @abogombachatin9939
      @abogombachatin9939 7 ปีที่แล้ว

      For my project, My idea is send anolog data to a database, however I need to keep the data into database in case the wifi connection goes down, the erase it. My concern is how many time cycle you can read and write from the RTC memory. is there any limit? Also is it possible to use both eeprom and rtc memories?

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

      1. I do not know of a limit for read-write cycles of the RTC memory.
      2. You can use both memories, they are independent.

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

    Thanks a lot. It helped me a lot in setting deepsleep with RTC memory.I am able to take temperature measurements and store as well :). But I have a question if there is a way to decrease booting (startup )time after deepsleep. It is around 270-300ms (taking measurement and going back to sleep again).

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

      I do not know. Maybe you check where the time is used. If it is in your code, you are in charge. If not, I think, you have to accept it. Maybe it is faster with WiFi disabled?

  • @xennelul
    @xennelul 8 ปีที่แล้ว

    Good point about slow internet eating up battery power! Wouldn't be an issue with a fast server on the local subnet collecting the data.

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

      This is exactly what I ment with my comment. But the free services also have their value... And they are free.

    • @xennelul
      @xennelul 8 ปีที่แล้ว

      That is true, at the opposite end there is the (free) Mako server from Realtime Logic, I have used it for a couple of projects.

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

      I bookmarked the page of the Mako server. Maybe I find the time to go deeper into it. There are so many things I could do that I have to choose...

  • @rohanhoppper4499
    @rohanhoppper4499 5 ปีที่แล้ว +2

    Hey Andreas, I have a question.
    Is the name of the structure you used at 3:56 'rtcMem' or 'rtcStore'? because I need to use two structures in the same sketch, and I don't know how to name and declare the second one. If the name is rtcMem. do I need to use
    rtcStore "name of my second structure"; to name my second structure?

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

      I think I found a solution.
      I thought what you were using was something to do specifically with that C file and the rtc memory commands, but I think they're just names you used right?
      I used this for reference: www.norwegiancreations.com/2017/10/getting-started-with-programming-part-8-typedef-and-structs/
      Please correct me if I'm wrong.

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

      You are right

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

      The aim of the code I was using is to log data, sleep, log, sleep, etc. till the memory is full, then it transmits it over telnet(an idea I got from your video #82). However the logger isn't working...
      CODE OVERVIEW:
      I'm using an if statement with the condition i

  •  7 ปีที่แล้ว

    Hi Andreas, thank you for your videos. My question regarding ESP - what is original content of RTC RAM immediatelly after the first power on ? I'm trying to catch the first run of ESP module to differenciate between first power up and RTC driven power up. If I use the trick with toggle bit - I'm not sure, what is initial value...
    Thanks, Ondrej

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

      The RTC memory is always lost during power down. So I assume, it will be zero after power-up

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

    Dear Andreas, thank you for this rally interesting video ! I only need to store a byte in the rtc memory and read it after the deep sleep. Could you suggest a simple code to do that? Thank you in advance !

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

      I think, you should be able to do this yourself if you watched the video. Just try!

  • @TouchWorld3G
    @TouchWorld3G 7 ปีที่แล้ว

    Sehr gutes Video! Aber gibt es da nicht einen Denkfehler? Wenn ich z.B. die Temperatur logge, möchte ich doch auch wissen, wass diese Temperatur gemessen wurde. In dem Beispiel werden alle Daten auf einmal und ohne individuellen Timestamp übertragen. Gibt es da eine Lösung, dass man die Messuhrzeit mit sendet?

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

      +BlablaUser man weiss ja, wie lange der ESP zwischen den Messungen schläft

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

    Nice!!!!

  • @Grrizz84
    @Grrizz84 5 ปีที่แล้ว +3

    What a cliff hanger 😆

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

    I'm about to implement this "hack" now :-)

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

      Hope it worked!

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

      @@AndreasSpiess it does!
      Although I had some problems writing complete structs, but i am just writing all members individually now instead of one memcpy.
      I also added a CRC to make sure the data read at startup is actually mine and not random garble.

  • @mmhhmm2443
    @mmhhmm2443 8 ปีที่แล้ว

    Mir fehlte bisher die Geduld, Videos anzuschauen. Doch hier hat es sich gelohnt. Mittendrin ist die Perle: EEPROM taugt nicht für das Zwischenspeichern von Werten vor dem DeepSleep. Meine Sensoren schlafen 10 Minuten. Was heisst, meine Sensoren überleben mein Programm ein paar Wochen. Andreas Spiess and RTC Memory to the rescue!
    Ganz herzlichen Dank.
    Jetzt muss ich die Sensoren umprogrammieren. Habe sowieso noch Mühe mit der langfristigen Sabilität, der DHT22 Sensor steigt aus nach 2-3 Tagen (passiert offensichtlich anderen auch).
    Anzubieten habe ich ein paar brauchbare Algorithmen, wie man Sensoren und Aktoren einigermassen sicher einbindet, nicht dass Einbrecher von aussen schon überwachen können, wann ich weg bin (gesenkte Temperatur tagsüber) und mit welchem Code sich die Türe öffnen lässt. Solche Negativ-Beispiele hat es leider zu Hauf auf dem Netz.
    Momentan nutze ich ESP-201 RaspPi mit node-red für die Logik und emoncms für die Darstellung. Ich nehme jetzt noch MQTT dazu, damit ich die Übertragung verschlüsseln kann. Bin offen für Ideen-Austausch.

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

      Deshalb öffne ich vielleicht meine Türe noch mit einem Schlüssel ;-) Und die Einbrecher in unserer Gegend verwenden laut Polizeiberichten jeweils keine Wi-Fi Sniffer, sondern wesentlich brachialere Werkzeuge...
      MQTT habe ich auch schon verwendet, allerdings mit Gegenstationen in der Cloud. Und Node-Red ist ein ganz geniales Tool. Ich hatte bis jetzt einfach noch keine (produktive) Verwendung.
      Ich verwende nicht den DHT22, sondern den AM2321, allerdings auch noch nicht produktiv. Er soll genauer sein.
      Zum Flash: Ein Kommentar hat geschrieben, dass die heutigen Flash Speicher nicht mehr so empfindlich sind wie ich im Video sage (zumindest laut Datenblatt). Ich habe es noch nicht ausprobiert.

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

    Hello Andreas, I have a question: The RTC memory is a RAM. Is there also a restriction on the writing cycles as you describe for the EEPROM? I use the RTC memory (ESP-WROOM-32) to store data during deep sleep and wake-up the ESP and store data in the RTC memory every 1 min..

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

      The RTC memory has no such limitations.

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

      Thank you.

  • @jensperstat
    @jensperstat 7 ปีที่แล้ว +4

    Hi Andreas, you could use system_get_rst_info() instead of your own flag in RTC memory. user_interface.h defines the following:
    enum rst_reason {
    REASON_DEFAULT_RST = 0, /* normal startup by power on */
    REASON_WDT_RST = 1, /* hardware watch dog reset */
    REASON_EXCEPTION_RST = 2, /* exception reset, GPIO status won’t change */
    REASON_SOFT_WDT_RST = 3, /* software watch dog reset, GPIO status won’t change */
    REASON_SOFT_RESTART = 4, /* software restart ,system_restart , GPIO status won’t change */
    REASON_DEEP_SLEEP_AWAKE = 5, /* wake up from deep-sleep */
    REASON_EXT_SYS_RST = 6 /* external system reset */
    };
    Note that in older versions of the SDK, reason 6 was returned instead of reason 5. Get an update if necessary.
    Code example follows. Viele Gruesse, J.
    extern "C" {
    #include "user_interface.h"
    }
    int get_rst_reason() {
    rst_info* ri = system_get_rst_info();
    return ri == NULL ? -1 : ri->reason;
    }
    void setup() {
    int resetReason = get_rst_reason();
    // ...
    }

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

      Thanks for the info!

    • @axelmagnusmansson3265
      @axelmagnusmansson3265 7 ปีที่แล้ว

      Can you use this to differentiate between RST button push and timer deep sleep wake up? Been looking all over for this? link?

    • @axelmagnusmansson3265
      @axelmagnusmansson3265 7 ปีที่แล้ว

      @Andreaspiess

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

      I did not try it. But it should be easy for you to try it out. Maybe you post your results here.

    • @axelmagnusmansson3265
      @axelmagnusmansson3265 7 ปีที่แล้ว

      oh, but i think is a perfect challenge for the excellent man with the Swiss accent! :)

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

    Hi all,
    Thanks for your nice tutorials, very usefull and well documented.
    I'm having troubles when i store FLOAT and INT variables in the RTC memory of and ESP8266. The INT value read gives is completely wrong while the FLOAT are OK.
    Can someone help ? I'm stucked and Googling couldn't find a solution..

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

      If I remember right you have to somhow align the bytes before you store them. Maybe you try to use a struct of find a project which uses int

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

    dear Sir
    Today, I have a question about Esp8266 wakeup with the button reset, I have tryed to find the different between GPIO16 and RST button to wakeup ESP, but how to know the button reset is touched. I used the function is "system_get_rst_info();" and then I get the number 5 for the first time reset in deepsleep and I get the number 6 for the second time reset in Esp running. That mean, I need touch reset button two time to get the number 6 in deepsleep and then the ESP know I touched reset button. How can I get the number 6 when i touch reset button first time or another way to help ESP know i touched to wakeup it. I dont want to touched 2 time to wakeup it, because I have a fucntion check time wakeup to sleep early, one day sent one time data to server. If i touch it the first time, it dont know I touched and then it go on sleeping. Tks you so much, please give me some ways. (my english not good, so sorry)

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

      The ESP8266 is waked up if you pull the RST pin. Usually, GPIO16 and RST are connected that the ESP can wake itself. If you want an external trigger, you do not connect the two pins. Then, the ESP sleeps till you reset it. If I remember right I used this mehtod in video #108

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

    Andreas, is it normal that the esp8266 reset reason is always : from RTC-RESET (ResetInfo.reason = 5)
    ?
    thank you.
    Marc.

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

      I do not remember. But I think, you can google the reset reasons.

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

    Doesn't esp have methods to write in chunk boundaries for you ? I thought i read it somewhere

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

    Very interesting. I have no experience with adafruit.io or spakfun, or ubidot cloudservice, but i do with some others. A service like Thingspeak will only allow new updates every 10 secs, making this cloud a bit less suitable for the approach in program. Also one needs to take in consideration that the usual timestamp that cloudservices add is not correct anymore.
    That doesnt change the fact this is a very good approach,but just stimulates me more to store the data locally

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

      It is sometimes not easy to remove them, if the device is not easily reachable. So, both concepts have advantages and disadvantages.
      With adafruit.io you are allowed 2 values per second. With sparkfun I do not know of a limitation.

    • @lho2000
      @lho2000 7 ปีที่แล้ว

      Vielen Dank. Mit "locally" meinte ich doch auf einem lokalen Server, aber der doch immer vom ESP-Gerät hochgeladen wurde.
      Lass mich unterstreichen dass es die IotHosts/Clouds sind, die hier die Möglichkeiten begrenzen,
      Ihre Sketch ist fabelhaft und öffnet die Möglichkeiten, aber verdient eine gute Host zum Hochladen :-)

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

      :-)

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

      Thingspeak indeed very flexible and handy but I think lho2000'spoint was that Thingspeak not so suitable in this case as it has a 10 sec slot between uploads so if You need to upload 20 series of data that would take at least 200 secs in waiting time plus maybe an additional 20 secs of uploading, is almost 4 min.
      Regardles, Thingspeak indeed a very nice service

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

      If I remember correctly, you can upload many values together. So, you just format the thing a little different and put the maximum numbers in one "send". Then, maybe the 20 seconds are less critical.

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

    Hello, Andreas. Is it possible somehow to use RTC memory to store network connection stuff? I mean, after ESP back from deep sleep we need to reconnect to our wifi againt to send/get some data. Would it be possible (and probably faster) if we avoid this step by loading previously saved whole WiFi object from RTC instead of begin new WiFi connection? Does it make sense?

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

      Maybe. I do not know and never saw something like that. Assigning a fixed IP to the ESP seems to reduce the time to connect.

  • @himselfe
    @himselfe 8 ปีที่แล้ว +2

    Nice info. Video seems to cut off mid sentence at the end though?

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

      You are right! Sorry for that.

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

    Hello Andreas, Your videos are very informative. Thank You. I'm a home hobbyist. I'm looking for a circuit design that when it detects water, will bring the 8266 out of Deep Sleep to send a WiFi message. Both this circuit and 8266 are powered with AA batteries (or equivalent) with a desired battery life of months to years. The water sensor and 8266 are not close to any wall outlets. Do any of your videos address this situation? Thank You.

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

      I made some videos on deep sleep and power consumption of the ESP chips.

    • @bendtherules0
      @bendtherules0 11 หลายเดือนก่อน

      If you could use water as a reset/power by using water's resistance to conduct electricity - ex. two wires in a mug which gets filled with rainwater and conducts electricity, then you can remove polling and still keep it fast. Then, use low power esp (usually raw ESP in adapter plate + ldo 3.3v regulator + battery) and use the rain signal to enable/reset the chip.

  • @arduinosynod1571
    @arduinosynod1571 7 ปีที่แล้ว

    Dear Andreas, sorry for offtopic. I have an issue with nodeMCU and WeMos D1 in following: configure as AP and use an example scatch web server. When I connect to ESP with phone/PC all is great but when I disconnect and try to reconnect it is imposible. This is happen after 2-3 connecting operations. I have tried older board configurations, older Arduino IDE but still happens. Any sugestions?

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

      REmote debugging is not easy, and with problems like that, nearly impossible. So, you have to use Serial monitor and separating the code in parts which work and which do not work to track the problem down.

  • @DiyintheGhetto
    @DiyintheGhetto 8 ปีที่แล้ว

    Hello Andreas what about local data saving instead of cloud base. Sense it is local do you think the transmitting time would be better?

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

      You are right. This is possible. But so far, I had no time to set such a device up. I feel, that a Raspberry could be a good target for such a server.

    • @DiyintheGhetto
      @DiyintheGhetto 8 ปีที่แล้ว

      Hey Andreas that be coo. Are you thinking of doing a Raspberry pi in the future?

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

      I do not know if I find the time. I have many other projects in my mind

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

    There doesn't appear to be a closing curly bracket in your init for loop. As the program works I must have just not seen it :)

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

      I do not remember. This video is 3 years old ;-)

  • @user-kr5uj4jf2u
    @user-kr5uj4jf2u 7 ปีที่แล้ว

    Thanks again for great explanation , question please : may we know how long is the life time of the RTC memory AND how long the esp can store our sketch on deep sleep AND without batteries ?

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

      1. RAM should not have any limitations It is ram, not Flash
      2. Deep sleep does not work without VCC.

    • @user-kr5uj4jf2u
      @user-kr5uj4jf2u 7 ปีที่แล้ว

      I know that deep sleep does not work without VCC, the question is where the data saved when no VCC connected ? and how much long ? (the sketch code for example ) if this place is the RTC Ram so as you said it has no limitations like PC hard drive?

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

      You have 3 possibilities:
      1. RAM: No limitation on the number of usages, lost during deep sleep and power down
      2. RTC memory: No limitation on the number of usages, keptduring deep sleep and lost during power down
      3. EEPROM: In ESP8266 emulated in Flash Memory: Can be written a few thousand cycles, not lost during deep sleep and power down. Has to be written in one block
      You chose, which one is convenient. You find videos from me for all three examples

    • @user-kr5uj4jf2u
      @user-kr5uj4jf2u 7 ปีที่แล้ว

      Thanks you very much !

    • @bobblaine1437
      @bobblaine1437 7 ปีที่แล้ว

      You could also attach an FRAM chip via I2C (a.k.a. 2-Wire). It's non-volatile, lasts a huge number of cycles and will save your data up to 10 years.

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

    Hey Andres, in your sketch you dont connect to wifi ??
    thank you.
    marc.

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

      I think, the ESPSensorHourlyEnhanced sketch connects to wifi

  • @tomas-vu1yu
    @tomas-vu1yu 4 ปีที่แล้ว +1

    Is it possible to use also time from RTC that are integrated in ESP8266 ?

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

      There is no RTC in the ESP8266. It loses time when you switch it off.

    • @tomas-vu1yu
      @tomas-vu1yu 4 ปีที่แล้ว +1

      Thanks for reply

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

    Great work.
    Wondering if SD writes would drain the battery very fast, otherwise could fill an entire SD (or maybe just a workable size) and upload that. Nevertheless this RTC use is a very nifty method

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

      With an ESP you do not need an SD card, because it has lots of flash (up to 3 MB) already on board. You can use this to store files similar to an SD card (called SPIFFS). This is a lot for integer or floating point numbers. But if something happens to the device, it is not easy to get it out. And you do not want to wait two years for the first upload. Maybe you want the data "real-time".

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

      and survives a deepsleep? Interesting

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

      Yep. That's the concept. However, not power down!

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

    dear Sir, I have a question need you help. Went esp wakeup then deepsleep, it not connect to wifi and it will read data from ADC to get voltage. But during time not wifi (after wakeup), it will get some power, about 30 ma without wifi. So, with 63times esp wakeup, esp get more power to read and write to RTC memory. How can us reduce this power, thanks so much!

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

      Maybe you have to switch wifi off at the start if you do not need it (WiFi.mode(WIFI_OFF). And you can choose a mode of ESP.deepsleep which does not enable Wifi (ESP.deepSleep(6000000, WAKE_NO_RFCAL); or similar)

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

      tks you so much, i have tried with your way and it's worked. I have another question need you share me you video about esp8266 deepsleep in 1day (1day sent data 1time). I know esp8266 just sleep about 71min because its just 32bit. How can us get this, i have seen your video #60 reduce power with RTC memory, but its alway wakeup and get my energy. If you have some other way please tell me, tks you so much!

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

      I have a video about waking up every day. Of course it has to wake-up every hour, but only for a very short time. If you want to sleep one day you have to use the Esp32

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

      yeah, im trying to watch all your videos. tks you and tks you so much.

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

    Hello Andreas, im trying to understand your ESPSensorHourlyEnhanced Code. Why did you put system_get_rst_info(); at line 64 without assigning the return to a variable? Does it have to be called?

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

      I do no more remember. But I assume it is not needed because it only shows the reset reason.

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

      @@AndreasSpiess Okay thanks, do you still use the RTC to save even more power or do you send each measurement on its own in your current battery projects?

  • @qaah15
    @qaah15 7 ปีที่แล้ว

    I have my esp8266 controlling a relay using an h-bridge but I'm having a problem when the chip goes into deep sleep. Every time it sleeps all the i/o pins go high which is keeping the h bridge on and consuming power. Is there a way to keep these pins low during deep sleep mode?

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

      I think, the pins of the ESP are open when it is in deep sleep. You can test it by just removing the connection from the ESP pin. According my theory, the bridge should also be "high" without this connection.
      So, you have to make sure, your H-bridge is in the state you want i to be with open input. With a resistor to ground, for example. Try a 10k. Go lower if you do not have the desired result.

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

    Nice videos but the end of this episode is cut off.

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

      You are right and I do not know how this happened. But TH-cam does not allow to change the video once it is published. So I had to live with it...

  • @qaah15
    @qaah15 7 ปีที่แล้ว

    Is there anyway i can read the rtc time using the arduino ide? I want to be able to keep time during multiple sleep cycles for about 2 hours max.

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

      Quinton the ESP has no real clock. Watch my two videos about NTP time. You might find a solution.

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

    For me this video consistently stops mid-sentence at the end. I do not know what I'm missing, but anyway - I found what there was very helpful - thank you.

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

      You did not miss a lot. The last seconds with my normal "good bye" was somehow not uploaded.

  • @Beanx10
    @Beanx10 7 ปีที่แล้ว

    Hi andreas...I'm trying to compile the skcetch but it fails as the "credentials.h" is not found...i suposse that these are the keys for the web cloud connections services...but i'm not sure...can you gave me a clue about this "credentials.h"?...grettings from México...nice job....

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

      +Marcos Olivera the credentials.h contains the definitions of password and said. Just delete this line and you will see, which ones.

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

    So our sensor will run again much.

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

      ?..

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

      Hi Andreas, the video stops abruptly at minute 9:00, just when you say: "So our sensor will run again much..."

  • @alnaumi
    @alnaumi 7 ปีที่แล้ว

    Hi , Andreas. In your code, to measure the battery
    rtcValues.battery = ESP.getVcc() * VCC_ADJ ;
    #define VCC_ADJ 1.0 // measure with your voltmeter and calculate that the number mesured from ESP is correct
    In my case I use a Wemos D1 mini . I read A0 pin must me not used. What is the value read by ESP.getVcc() ? 3v3 pin to ground ? Where I have to measure calibration voltage to compensate error?
    Thanks

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

      1. The ESP has only one analog input pin. So, you have to use this one or use an external ADC.
      2. Max volt of the ADC pin is 1 v. So, you have to build a voltage dividor ( 2 resistors or a potentiometer) to make sure, that your voltage does not get above 1v. You can test that by connecting just the voltage divider (or a potentiometer) to the battery without connecting to A0. Watch video # 13 if you do not know, how
      3. If you are sure about point 2, you connect it to A0 and read the value with the ESP. At the same time, you measure the battery voltage. Now, you know, how much the reading should be and how much it is and you can calculate VCC_ADJ.

    • @alnaumi
      @alnaumi 7 ปีที่แล้ว

      My question was, what exactly is measuring the ESP.getVcc() function. I think, it's the voltage at 3.3 pin.
      The Wemos D1 mini has a resistor divider at pin A0, 220 K and 100 K. So the max voltage you can put it, without any extra resistor is 3.3 V, to get 1 V (1024 ADC value) at A0.
      I saw some people put an extra 100K resistor in series with 220K, to expand the input range to 4.2 V (normal max value for LiPo cell).

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

      I digged a little (i never used this function). Here the description:
      Analog inputESP8266 has a single ADC channel available to users. It may be used either to read voltage at ADC pin, or to read module supply voltage (VCC).To read external voltage applied to ADC pin, use analogRead(A0). Input voltage range is 0 - 1.0V.To read VCC voltage, ADC pin must be kept unconnected. Additionally, the following line has to be added to the sketch:
      ADC_MODE(ADC_VCC);
      This line has to appear outside of any functions, for instance right after the #include lines of your sketch.
      Without ADC_MODE(ADC_VCC); you get a constant reading of 64k.
      Concerning Serial resistors: You can add whatever resistor to the voltage divider to extend its range.

  • @vks002
    @vks002 7 ปีที่แล้ว

    Hi Andreas, I have a requirement where I need to store the state of the i/o ports when there is power down. I am currently doing the same using EEPROM but after seeing this video I see that wouldn't last long. My write cycles should be ~20 times per day. Using RTC memory is not going to be useful for me because I need the data to survive power down. Is there anything else you can suggest to me. Using a SD card for such a small thing would be a overkill. I read somewhere that we can write simple text files on ESP too. Can you tell where would that file be written and would that suffer the same limitation of write cycles.

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

      EEPROM survives for years. It is stored, like the program, in flash memory.

    • @vks002
      @vks002 7 ปีที่แล้ว

      Hi, sorry if I was not clear. What I understood from your video is that there is a limited no of write cycles on EEPROM , which is ~10,000. If my program writes ~20 EEPROM writes per day then I will end up using this in a little over a year. So, is there something else that I can do to overcome this , or this is it.
      Also, can you pl share the source of the figure 10,000 writes. I tried getting the specs but unable to do so. In many other forums the figure being quoted is 100,000 with a max of 1M cycles if you're lucky.

    • @vks002
      @vks002 7 ปีที่แล้ว

      I found this specification of Winbond W25Q40BVNIG which is the flash ESP 8266 uses. www.winbond.com/resource-files/w25q40bw%20revf%20101113.pdf . On page 5 It says the no of write cycles supported are 100,000.

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

      +Vijay Sharma These numbers improved over the years. So, with 100000 I think, this is no limitation anymore.

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

    My esp8266 consumes 7 milliamps instead of 20 microamps as written in esp8266 datasheet please tell me wha to do

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

      Maybe you use a development board instead of a ESP8266 alone

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

      You may have some leds on the board, disolder the smd led and the current drops to spec

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

      Probably some other circuitry on your development board, such as LEDs, USB interface IC (CH340, CP2104, ...), battery charger IC etc.

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

      @@AndreasSpiess This answer is what i want to hear. Thanks

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

    How RTC memory can save power ??
    thank you.
    Marc.

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

      Most of the power is used for connecting to Wi-Fi. If you store a few values in RTC before you send them to the cloud, you can save power, because you only have to connect once for many valies.

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

      Andreas Spiess I have to send the ds18b20 to thinkspeak. Can this work ? Thanks.

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

      I have succeeded in sending DS1820 data to Thingspeak and deepsleep the ESP8266

  • @CarlosSanchez-wp2bg
    @CarlosSanchez-wp2bg ปีที่แล้ว +1

    hello, excuse me , how could I get the user_interface.h library?

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

      It should be part of the ESP8266 package for Arduino.

    • @CarlosSanchez-wp2bg
      @CarlosSanchez-wp2bg ปีที่แล้ว

      @@AndreasSpiess Thank you I have other question, do you know how can I stop the fuction timeClient.update(); ? because when I execute this fuction I cant do anything else in my program...

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

      @@CarlosSanchez-wp2bg Call the function less often?

  • @alevi7856
    @alevi7856 7 ปีที่แล้ว

    (edit) : My mistake .... sorry about the disturbance :
    ******** !!!! GPIO16 needs to be tied to RST to wake from deepSleep !!!! ***********
    (end of edit)
    Hi Andreas,
    Looks like I am having a problem with this sketch (RTCmemTest.ino).
    Whenever the ESP goes into deepsleep, it never wakes up again and the red Led lights up (in error, I guess).
    I have tried your sketch with :
    ESP.deepSleep(5000000, WAKE_RFCAL);
    and also with :
    ESP.deepSleep(5000000);
    But to noavail : it never wakes up again.
    I have also tried with 3 different boards (one ESP12E and two NodeMCU).
    Here's the last lines displayed on the serial monitor :
    (...)
    i: 60 Position: 185, battery: 60, other: 660
    i: 61 Position: 187, battery: 61, other: 671
    i: 62 Position: 189, battery: 62, other: 682
    Writing done
    before sleep
    æÌÌ fœ>fÂŒp~òÎ>æÌÌ fœ>æÌÌ fœ>f Œp~fÂŒp~æÌÌ fœ>æ ÌÌ fœ>fÂŒp~fÂŒp~
    I have to press the RESET button to make it reboot and display the RTC memory on the Serial monitor, but then it goes red LED again and no wake-up after the gibberish ...
    Any hint ?
    (edit) : My mistake .... sorry about the disturbance :
    ******** !!!! GPIO16 needs to be tied to RST to wake from deepSleep !!!! ***********
    (end of edit)

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

      You never stop to learn. Happened to me, too...

  • @aneekimtiaz2561
    @aneekimtiaz2561 7 ปีที่แล้ว

    I need some help if I need to store objects of 33 Bytes at a time (uint8_t + uint32_t), the number of buckets will round off to 2 for each object. Right ? Is there any way so I don't waste my 3 bytes for every object. As RTC Memory is 4 Byte Aligned so I am confused, how to do it or if it is not possible?

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

      If you want, you can look at the code of my newest sketch (Sonoff hack). There, I use a structure to store the content into RTC memory. Then, you do not loose bytes

    • @aneekimtiaz2561
      @aneekimtiaz2561 7 ปีที่แล้ว

      Thanks. If you are talking about this file "github.com/SensorsIot/Sonoff-Hack-1-Motion-Detector/blob/master/Sonoff_SenderV3/ESP_Helpers.h". Can you please explain it in some words that what approach are you using?

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

      You find there two functions to read and write a structure from and to RTC RAM. Whatever you define in this structure will be saved. If you dont know structures, just google.

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

    Hello Andreas Spiess it seem the end of the video had a problem can you please check
    Have great holidays

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

      This is an old video. It seems to have lost a part :-(

    • @Sekir80
      @Sekir80 7 หลายเดือนก่อน

      @@AndreasSpiess So, it suddenly ends at 9:00? And youtube is fine with this? Very, very strange.

    • @AndreasSpiess
      @AndreasSpiess  7 หลายเดือนก่อน +1

      @@Sekir80 You are the first complaining about it. So this happened a long time after its release (it has 74k views)

    • @Sekir80
      @Sekir80 7 หลายเดือนก่อน

      @@AndreasSpiess Well, I'm complaining about how youtube let this to be, not you, the creator. Or maybe I just don't understand what happened? This was my thinking: you have uploaded a, say, 10 minute video, and some years later the last minute has been cut by a bug in youtube's side. And youtube doesn't do anything about it.

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

      @@Sekir80If you re-upload a video it is like a new one (with no views).

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

    Hello Sir... Dose RTC memory retain data if ESP8266 power down?

  • @athomasbeck
    @athomasbeck 7 ปีที่แล้ว

    Why not use ESP.deepSleep(SLEEPTIME, WAKE_RF_DISABLED); in "collect mode" ? it saves more power, is there a reason not to use it?

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

      I do not remember exactly why I used the different parameters. But for sure, you can try.

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

      Andreas Spiess Ok, I tried it and it seems to be working. it gets the wemos D1 mini down to about 0.15 mA during sleep. Thanks for the videos, they've been very helpful

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

      :-)

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

      What do you mean with collect mode?

  • @toopoo
    @toopoo 7 ปีที่แล้ว

    How about the life-cycle of the EEPROM? How many times can we write/erase it?

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

      EEPROM should live about 10'000 write cycles. This is, why I use RTC memory for short-term storage. It has no such limitations

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

    Much-

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

      ?

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

      The end was a bit abrupt :-) excellent video otherwise, I love Espressif devices!

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

    There is a mistake about life calculation for spiff, because spiff and littlefs both have wear balance, not each data save count 1 cycle. Actual life should be 10000x more than your calulation!

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

      Thank you for your information. I do not know if these functions were so good when I made this video (AFAIK littleFS did not exist)