-->
Page 1 of 10

Power conservation

PostPosted: Mon Jun 06, 2016 9:23 pm
by Joe Job
Hi guys I have a number of devices (breadboard) set up now where the ESP8266-01 acts as an MQTT client and sends data from the broker to an ATMEGA328P-PU and vice versa. I am ready to start creating PCB's for the final prototypes but after testing using a 9v battery the devices do not even last a night before the batteries run out. The two devices I am wanting to optimize at this point are:

ESP8266-01
Reed switch magnetic door sensors

ESP8266-01
ATMEGA328P-PU
2 x LED
PIR sensor
TMP36 temperature sensor

Both the ESP8266-01 and AVR chip are powered from the same 9v battery. I am going to start looking at optimizing the ESP8266 chips first which are flashed with Arduino code using Arduino IDE.Could some let me know if 9V are the best to power these types of devices or if there is a more preferable battery to use and what the best steps are to optimize my codes, I have read some about sleep modes and I am thinking interrupts to wake the devices up when MQTT command is received or serial data received from the ATMEGA but this is a new area for me and too sure what would be best. TIA.

Re: Power conservation

PostPosted: Thu Jun 09, 2016 2:07 am
by Joe Job
Bad question ?

Re: Power conservation

PostPosted: Thu Jun 09, 2016 5:03 am
by trackerj
You can find a possible solution for you in this thread: viewtopic.php?f=13&t=5747&start=40#p34481

I was running a ESP8266 Board as the one presented in the above thread on a standard Li-ion Cell without charging for more than 3 months. Combined with a small Solar panel I have some that have more than a Year already. They are reading at every 10 or 30 or 60 min (depending on specific request) some environmental data and uploading them over WIFI in a remote DB.

Re: Power conservation

PostPosted: Thu Jun 09, 2016 9:43 am
by lethe
9V batteries are a poor choice for most applications, since they have rather poor power density.
See https://cds.linear.com/docs/en/design-note/dn63f.pdf

Apart from that, unless you are using sleep modes (preferably deep-sleep) or disable the ESP (CH_PD pulled low), you won't get decent battery life.