Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

ESP8266 (esp-07) powered by battary(s) for at least 1 year

Status
Not open for further replies.

StealthRT

Member
Hey all I am trying to see how long I can possibly have a ESP8266 ESP-07 operate with only 1 or 2 of the Lithium Ion Battery 18650 Cell which claims to have 2600mAh.

I am making a window alarm sensor and I'm looking to incorporate a window reed switch in order to check it's status via the ESP8266 and if its opened (meaning the window is not closed) then send something via WIFI to a REST service. Likewise, if the reed switch is not opened (meaning the window is fully shut) then sleep.

The flow with only ESP-07 would look something like this:
1: Power up for the first time.
2: Send Date/Time, window closed or opened, etc.. via ESP-07 WIFI to the REST service.
3: Have the ESP-07 go into deep sleep mode.
4: Wake up from sleep after 1 minute.
5: Check window reed switch.
6: If reed switch is open then send REST service via ESP-07 WIFI.
7: Goes back into deep sleep mode.
8: Loop back to #4.

The flow with ESP-07 & ATTiny85 would look something like this:
1: Power up ESP-07/ATTiny85 for the first time.
2: Send Date/Time, window closed or opened, etc.. via ESP-07 WIFI to the REST service.
3: Have the ESP-07 go into deep sleep mode.
4: Have ATTiny85 check every 30 seconds for window reed switch status.
5: If reed switch is open then send REST service via ESP-07 WIFI.
6: ESP-07 goes back into deep sleep mode.
7: Loop back to #4.

It would seem that using the ESP8266 along side an ATTiny85 would make it last longer since I could check the status of the reed switch via the ATTiny85 and if it see the window closed then pause and check it again in 1 minute. If the ATTiny85 does see the reed switch opened then start up the ESP8266 and send the info via WIFI then go back into deep sleep. However, I am not sure how this would be on the battery side of things - if it would be less or same or more.

I'm looking to see how long 1 and/or 2 of the Lithium Ion Battery's would last (in days) with using just the ESP-07 and also using both the ESP-07 and the ATTiny85 as explained above.

I've done some googling and found a few websites that show how to put the ESP-07 into deep sleep mode but really wouldn't say how long it would take with my setup above. Most were using standard AA or AAA batteries.

The overall goal is: Have the window alarm power last at least 1 year.

The items:

yZhs3.png


The battery ESP-07 consumption chart I found:

CvAzf.jpg

Datasheets:
Lithium Ion Battery 18650 Cell
broken link removed
Window Reed Switch (Generic) or Mouser (Generic)
ESP8266 ESP-07
 
Last edited by a moderator:
Checking every 30 seconds is a waste of power. Do either the radio module or the the ATTiny85 have an interrupt that can wake it up?

EDIT: I just checked the ATTiny85 datasheet. It does have one. See the page 34 of the full datasheet. INT0 and Pin Change.

Then it only ever needs to wake up if the Window is opened. The only reason to send an update then when the window is closed is just to let you know the system is still working which you could do just once every hour (or even once per day). That's 60x-120x less frequent than you had originally planned which means 60x-120x longer endurance...in theory.

Even better if the ESP-07 microcontroller has the same function so you can get rid of the ATTiny. You'll have to hunt through it's manual...which I can't seem to find.

EDIT #2: The Tensilica L106 used in the ESP-07 does have interrupt wake ups.
 
Last edited:
Checking every 30 seconds is a waste of power. Do either the radio module or the the ATTiny85 have an interrupt that can wake it up?

EDIT: I just checked the ATTiny85 datasheet. It does have one. See the page 34 of the full datasheet. INT0 and Pin Change.

Then it only ever needs to wake up if the Window is opened. The only reason to send an update then when the window is closed is just to let you know the system is still working which you could do just once every hour (or even once per day). That's 60x-120x less frequent than you had originally planned which means 60x-120x longer endurance...in theory.

Even better if the ESP-07 microcontroller has the same function so you can get rid of the ATTiny. You'll have to hunt through it's manual...which I can't seem to find.

EDIT #2: The Tensilica L106 used in the ESP-07 does have interrupt wake ups.
Hum that sounds doable. I decided to use the esp-07S since it’s FCC certified. Does that one also have that interrupt?
 
Use the reed switch itself as a wakeup source for the esp8266. I forget the esp8266 deep sleep quirks, but I think you need a timer output pin attached to the reset pin. Attach the timer and the reed switch to the wakeup/reset pin. Set the timer to the longest wakeup timer available and when it wakes up just check if the reed switch was the source. You never need to wakeup and you have an instant alarm.
 
Ah just found this youtube video(s). Seems just what I am looking to do. Thoughts?

Original video:

Feedback (updates) from the above original video:

So if his setup lasts a long time on CR2032 with 240uA batteries then I'm guessing a 1000uA+ would last even longer than that?
 
Last edited:
Hum that sounds doable. I decided to use the esp-07S since it’s FCC certified. Does that one also have that interrupt?
Look up the d
Hum that sounds doable. I decided to use the esp-07S since it’s FCC certified. Does that one also have that interrupt?
I would expect most, if not all, microcontrollers that can go to sleep to have at least one interrupt capable of waking it up from sleep. But you'll have to check the datasheet for the microcontroller on the module to be sure (and make sure it's user accessible).
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top