-
I have a system https://github.com/davefes/ESP-Now-repeater and now would like to also put the repeater into light or deepsleep. I would like suggestions on how to sync the system so that I can put not only the remote but also the repeater into light or deepsleep AND maintain downstream comms, ie every hour. I can only think of sending the time upstream, say once a day and re-sync the repeater and remote to the local (monitoring) end. The ESP32 system clock seems to be within a second or two a day, so I don't see hardware RTCs helping here. Is there some technique out there that I am not aware of? Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 9 replies
-
According to the ESP-IDF docs, you can also use use a 32kHz crystal as source of the RTC clock (see e.g. https://docs.espressif.com/projects/esp-idf/en/v4.4.3/esp32/api-reference/system/system_time.html?highlight=rtc%20clock) Otherwise, I would sync the time every hour - when you already have communication - and (maybe) try to compensate for the known drift of the RTC clock. Also note that you don't need the correct time everywhere - you need only the same time on your repeater and on the nodes. Using one of the MODEM_SLEEP modes during active time (have no idea if this works with ESPNow) might also help to maintain a longer communication window without too much power consumption. |
Beta Was this translation helpful? Give feedback.
-
In my opinion, it's a requirement for serious development in micropython to compile your own firmware. The WLAN powersave option is e.g. in #8993, an alternate take in #6774. |
Beta Was this translation helpful? Give feedback.
-
A bit off topic I know Dave, but curious what you're using for a water level sensor? I've tried a couple of Aliexpress $40 stainless steel submersible depth probes but they invariably fail due water ingress after 6-12 months submerged. |
Beta Was this translation helpful? Give feedback.
According to the ESP-IDF docs, you can also use use a 32kHz crystal as source of the RTC clock (see e.g. https://docs.espressif.com/projects/esp-idf/en/v4.4.3/esp32/api-reference/system/system_time.html?highlight=rtc%20clock)
Otherwise, I would sync the time every hour - when you already have communication - and (maybe) try to compensate for the known drift of the RTC clock. Also note that you don't need the correct time everywhere - you need only the same time on your repeater and on the nodes.
Using one of the MODEM_SLEEP modes during active time (have no idea if this works with ESPNow) might also help to maintain a longer communication window without too much power consumption.