-->
Page 1 of 1

Power off from code possible? if not, how to from hardware?

PostPosted: Sun Aug 23, 2015 4:32 am
by DaniloFix
Hi

I'm building a sensor that needs to be powered off most of the time. Only when a reset is done from switch, it should run some code and power off again. I want to power off because it uses less power. It only needs to run 2 - 3 times a week for 5-10 seconds.

According to http://bbs.espressif.com/viewtopic.php?f=6&t=133 the ESP uses 20 times less power in "power off" state, than in deep sleep. Running on battery, this is important :-)

But how do I turn if off (while not disconnecting the battery off course) ?
Thanks

Re: Power off from code possible? if not, how to from hardwa

PostPosted: Sun Aug 23, 2015 4:37 am
by DaniloFix
Just found this from another forum by a user called janisalnis (thanks mate)...

Hi!
Thanks for your interest about CH_PD pin.
I have wired it directly to Arduino. Without pulll up resistor. Below are some relevant lines from the code.

Code: Select all#define CH_PD_PIN 4
pinMode(CH_PD_PIN, OUTPUT);
digitalWrite(CH_PD_PIN, 1); // bring up ESP8266 from power-down mode. It resets.
digitalWrite(CH_PD_PIN, 0);  // activate PD power-down pin of ESP8266

Re: Power off from code possible? if not, how to from hardwa

PostPosted: Sun Aug 23, 2015 4:44 am
by Barnabybear
DaniloFix wrote:Hi

I'm building a sensor that needs to be powered off most of the time. Only when a reset is done from switch, it should run some code and power off again. I want to power off because it uses less power. It only needs to run 2 - 3 times a week for 5-10 seconds.

According to http://bbs.espressif.com/viewtopic.php?f=6&t=133 the ESP uses 20 times less power in "power off" state, than in deep sleep. Running on battery, this is important :-)

But how do I turn if off (while not disconnecting the battery off course) ?
Thanks


Hi, this should be a good starting point. http://www.esp8266.com/viewtopic.php?f=11&t=4458

Re: Power off from code possible? if not, how to from hardwa

PostPosted: Mon Aug 24, 2015 3:32 am
by DaniloFix
Thanks - that's a great help