-->
Page 1 of 1

SLEEP Performance ?

PostPosted: Wed Aug 31, 2016 2:57 pm
by Greg_ESP
First, Thank you for all your hard work in porting so much of the Arduino functionality in to such a low cost hardware device !

I would like to use the ESP8266 to monitor temperature, humidity, light level, and motion detection. I will be using about 50 units to capture this data from sensors every 10 minutes or so, but would only need to upload this data via Wifi every 4 hours or so.

I read elsewhere on your Basic forum that following the completion of a SLEEP instruction, the ESP8266 will require about 30 seconds before execution of the default program begins. I have also read of a recent 5x speed up in general basic code execution.

Questions:

1) Is is STILL true that about 30 seconds is required before the default program begins executing following a SLEEP instruction expiration ? Perhaps the speed up of code has improved the start up time ?

2) How low can the power consumption be reduced during this 30 seconds ? I'm concerned that 0.5 minute ON, then 9 minutes+30 seconds OFF, which only reduces power consumption to 5% of the continuous-operation mode will still drain the batteries much too fast.

3) Are there any 'tricks' or 'work-arounds' that might vastly improve power consumption when only very infrequent WiFi use and data acquisition is required ?

Thanks,
Greg :D

Re: SLEEP Performance ?

PostPosted: Thu Sep 01, 2016 4:42 am
by Oldbod
Historically at least the 30 sec delay is intentionally coded in. I have the same general thoughts as you. The esp supports several sleep modes, but i thinknthe only one currently available to basic is a deep sleep/reboot.

Will be looking a bit more when i have more time...

Re: SLEEP Performance ?

PostPosted: Thu Sep 01, 2016 7:19 am
by Orcanbull
Hi Greg,

Well for the connection to Wifi, it generaly takes about 5 - 30 seconds by experience depending on the signal strength and router.

What you want to do is close you Wifi completely by using the

WiFi.disconnect() function
you can use deepsleep, for 10 minutes then wake up,
increment a counter in EEPROM
if the counter = 24 (4 hours) you connect to wifi send the data.
using the Deepsleep function all saved data in flash will be gone so you want to store your data in EEPROM.
generally the ESP takes 4 microApms when in deepsleep,

what will be your power source?
and voltage regulator ?

for continuous power saving and connection to WiFi you can use this : viewtopic.php?f=29&t=11132