-->
Page 1 of 2

Shut off ESP8266 more quickly?

PostPosted: Mon Jun 26, 2017 4:02 am
by wb8wka
I am using SDK 1.3/ arduino 2.0.0 so I can use wifi. I want to optimize power. After the packet is sent, the 6 highest pulses, the ESP8266 stays powered up for 100ms. I have attached current plot at bottom How can I reduce this time?



wifi_set_channel(11);
delay(2); // Delay in MS
wifi_send_pkt_freedom(packet, 68, 0); // (Send 6 times)
ESP.deepSleep(6000000, WAKE_NO_RFCAL); // Sleep for 6 seconds, WAKE_RF_DEFAULT

061517_1Ohm_100mvDiv.png

Re: Shut off ESP8266 more quickly?

PostPosted: Wed Jun 28, 2017 9:56 am
by QuickFix
Never really used it, but maybe you want to give it a try (since you have the equipment to test and I don't). ;)

Have you tried the forceSleepBegin() function yet, which will only put the WiFi-RF portion to sleep?
Code: Select allWiFi.forceSleepBegin(); // turn off ESP8266 RF
delay(1);               // give RF section time to shutdown

I believe you should reset the watchdog timer every once in a while in your loop, to prevent the board to think it's hanging.
Code: Select allwdt_reset();

Re: Shut off ESP8266 more quickly?

PostPosted: Wed Jul 05, 2017 1:38 am
by wb8wka
I found a function that EspressIF told me would work:

system_deep_sleep_instant(x)

But I can't seem to call it from the Arduino. Any thoughts how to make system calls from Arduino?

ExpressIF sent me this, system_deep_sleep_instant is discussed on page 6

http://www.espressif.com/sites/default/ ... ons_en.pdf

Re: Shut off ESP8266 more quickly?

PostPosted: Fri Jul 07, 2017 3:50 am
by wb8wka
OK, so to answer my own question, just including the prototype allowed me to call it, I,e,

void system_deep_sleep_instant(uint32 time_in_us);

However, it would on work in versions after 2.0.0

The problem with that is WAKE_NO_RFCAL doesn't work after 2.0.0 causing a big current spike

either this

ESP.deepSleep(6000000, WAKE_NO_RFCAL);

or this

system_deep_sleep_set_option(2);

won't shut it off

Thoughts?