I programmed our ESP32 to deep sleep for 11 minutes, then wake up, record current time, and go back to sleep. What I found was that the sleep duration was severely impacted by motion. In the attached plot, you can see that the sleep duration drops significantly (sometimes as low as 3 mins) when I was moving (walking, driving, etc.) with the device. I had another device doing the same thing but sitting on my desk and that sleep duration was fairly constant.
I'm using the esp-idf default settings for RTC clock. Any thoughts on this?
Sleep timer motion sensitivity
Sleep timer motion sensitivity
- Attachments
-
- Screen Shot 2017-04-27 at 1.44.43 PM.png (67.1 KiB) Viewed 10758 times
Re: Sleep timer motion sensitivity
That's pretty surprising. We'll try to reproduce this.
-
- Posts: 9749
- Joined: Thu Nov 26, 2015 4:08 am
Re: Sleep timer motion sensitivity
What hardware did you use, by the way? The only things I can think of that are sensitive to motion that would be found on a normal PCB are ceramic caps; maybe they do something weird on your PCB triggering something in the ESP32.
Re: Sleep timer motion sensitivity
Do you also record esp_deep_sleep_get_wakeup_cause to make sure it is a timer wakeup each time?
Re: Sleep timer motion sensitivity
We're using Sparkfun's "ESP32 Thing" (https://www.sparkfun.com/products/13907). I haven't looked at reset cause but will give it a try next test.
Re: Sleep timer motion sensitivity
What about the source of the timestamps you are recording? Are you relying on internal timekeeping, or syncing with SNTP?
If it's just the internal timekeeping, and the clock frequency is somehow affected by motion, the timestamps would also be affected. Logging the wakeup cause may indeed shed some light on this issue...
If it's just the internal timekeeping, and the clock frequency is somehow affected by motion, the timestamps would also be affected. Logging the wakeup cause may indeed shed some light on this issue...
Re: Sleep timer motion sensitivity
I'm using settimeofday() to initially set the time from our web backend. After that I'm using gettimeofday() for timestamps. SMTP is not possible because the device is asleep. I would expect that to drift a little but not that much.
Re: Sleep timer motion sensitivity
Hi there,
have you found any solution to this problem? I have been seeing the same issue. esp_clk_slowclk_cal_get() value jumps around all over the place and when the time is greater than 2-3 days the difference in time start appearing in minutes when in fact the time difference is in 1-2 seconds.
rtc_time_slowclk_to_us() = 120157419042
esp_clk_slowclk_cal_get() VAL = 3115584
after one second
esp_clk_slowclk_cal_get() VAL = 3117171
rtc_time_slowclk_to_us() = 120183324654
Our product is in production and and we need to find a solution asap.
Any suggestions?
Regards
have you found any solution to this problem? I have been seeing the same issue. esp_clk_slowclk_cal_get() value jumps around all over the place and when the time is greater than 2-3 days the difference in time start appearing in minutes when in fact the time difference is in 1-2 seconds.
rtc_time_slowclk_to_us() = 120157419042
esp_clk_slowclk_cal_get() VAL = 3115584
after one second
esp_clk_slowclk_cal_get() VAL = 3117171
rtc_time_slowclk_to_us() = 120183324654
Our product is in production and and we need to find a solution asap.
Any suggestions?
Regards
Who is online
Users browsing this forum: Bing [Bot], Usama Masood and 93 guests