ESP8266 ESP12S - Cant Power Down
Posted: Sat Nov 25, 2017 12:58 pm
Team, i cant seem to get my ESP turned off. I did some research and i believe followed the principles of other users.
What I do is use of GPIO0 connected to EN pin and simple scetch that sets LOW to GPIO0 after 10s of program running.
Here is my schematics:
And the code:
How does it work now:
1. I program it easily
2. WIFI off, current consumption is about 17mA
3. After 10s GPIO0 goes LOW and now Current is 9mA (miliAmps!)
4. Nothing else happen here, i need to restart ESP
I expected in point 3 about 5uA. Is there anything wrong with my wiring or code maybe?
Any thoughts highly appreciated...
What I do is use of GPIO0 connected to EN pin and simple scetch that sets LOW to GPIO0 after 10s of program running.
Here is my schematics:
And the code:
Code: Select all
#define EN_PIN 0
#include <ESP8266WiFi.h>
void setup() {
WiFi.forceSleepBegin();
}
void loop() {
pinMode(EN_PIN, OUTPUT); //set GPIO0 as output
digitalWrite(EN_PIN, 1); //Set HIGH
delay(10000); // wait 10s just for multimetr measurements purposes
digitalWrite(EN_PIN, 0); //Set LOW activate EN power-down pin of ESP8266
delay(100); // added just in case - here ESP should PowerDown
}
How does it work now:
1. I program it easily
2. WIFI off, current consumption is about 17mA
3. After 10s GPIO0 goes LOW and now Current is 9mA (miliAmps!)
4. Nothing else happen here, i need to restart ESP
I expected in point 3 about 5uA. Is there anything wrong with my wiring or code maybe?
Any thoughts highly appreciated...