lopy4 RTC
-
Hi
is there any internal RTC on lopy4 ?
under which deep sleep mode the clock is available ?
I am planning to use lopy4 for some battery powered projects which will be in the field for say about 18 months, can the clock keep track of day, months and year also ?
is there any drift after say 1 year of usage ?
-
I was incorrect in my previous posting.
When using a Pysense/Pytrack and the deepsleep functions available in there respective API's.
the main ESP32 processor is powered off and thus the RTC data is lost.Example:
https://docs.pycom.io/pytrackpysense/apireference/sleep.html#from pytrack import Pytrack from pysense import Pysense from LIS2HH12 import LIS2HH12 import time #py = Pytrack() py = Pysense() # display the reset reason code and the sleep remaining in seconds # possible values of wakeup reason are: # WAKE_REASON_ACCELEROMETER = 1 # WAKE_REASON_PUSH_BUTTON = 2 # WAKE_REASON_TIMER = 4 # WAKE_REASON_INT_PIN = 8 print("Wakeup reason: " + str(py.get_wake_reason())) print("Approximate sleep remaining: " + str(py.get_sleep_remaining()) + " sec") time.sleep(0.5) # go to sleep for 5 minutes maximum if no accelerometer interrupt happens this will also lose the RTC data. py.setup_sleep(300) py.go_to_sleep()
When using the API available in the machine library. The RTC data is retained during deepsleep.
import machine machine.deepsleep(5000) # sleep for 5 seconds. and retain the RTC data. this does not power off the esp32 but does put it in a very low power state
-
@paul-thornton AFAIK and tested, LoPy4 RTC isn't wiped during/after deepsleep with machine.deepsleep([time_ms]), as it is maintained powered on.
Unless the "py.go_to_sleep()" of Pysense, PyTrack, etc, is used, which cuts the power off the LoPy4 board.
-
@paul-thornton is this is real time clock or real time counter ? Can this keep track of months and years also ?
-
@paul-thornton I have the impression that many people here are struggling with low power deep sleep designs. It would be great if pycom could provide some reference designs for a device that wakes up every xx minutes/hours, sends some data (like from an analog input) via Lora/Sigfox/LTE NB and runs off a battery (like a LiTCL D size https://ch.rs-online.com/web/p/d-batterien/6684550/ ) for a year or two.
I guess this would cover a lot of applications one could imagine using the new low power long range networks.I would much appreciate it above can be done.
-
This post is deleted!
-
@martinnn
yes that is very much required @Paul-Thornton
-
@paul-thornton
ntp is not an option.
-
@paul-thornton I have the impression that many people here are struggling with low power deep sleep designs. It would be great if pycom could provide some reference designs for a device that wakes up every xx minutes/hours, sends some data (like from an analog input) via Lora/Sigfox/LTE NB and runs off a battery (like a LiTCL D size https://ch.rs-online.com/web/p/d-batterien/6684550/ ) for a year or two.
I guess this would cover a lot of applications one could imagine using the new low power long range networks.
-
Removed: Please see my above post.