ESP8266 + bme280 battery life: 120 days and counting

The sensor

I have an outside battery powered temperature/humidity/pressure sensor, here is the list of what it is based on:

  • ESP8266 (esp12f), according to espressif
    • from 120 to 170mAh for Tx
    • 10µAh in deep sleep mode
  • bme280
    • 3.6µAh at 1Hz when measuring the 3 parameters
  • MCP1700-3302E LDO
    • 1.6µAh quiescent current
  • Panasonic NCR18650B
    • 3400 mAh

It looks like this:


Active time

When writing the code for this device, I added some debug to time how long it needed to go from deep sleep, connect to wifi, read values, send them to MQTT and go back to deep sleep mode. That was a tiny bit over 4s, and without print, a tiny bit below 4s. So for the final version, I built it without any print, which means even less than what was in my test, as I still need to initialize the serial, and do at least one print to show the time. I guess we can use 4s as a basis here, and assume that it actually is lower than that.

Deep sleep is set to last 10 minutes every time, so:

  • 4 seconds active
  • 596 seconds deep sleep
  • OR 24 seconds active and 3576 seconds of deep sleep in an hour

Theorical estimations

Once again, it is lilkely below that, but let's assume the esp module is using 170mAh when active:

(170 / 3600) * 24 = 1.1333333333333333

And 10µAh for 3576 seconds:

((10 / 1000) / 3600) * 3576 = 0.009933333333333334

The bme280 will only be powered when the esp module is asking for it, so let's round it to the 24 seconds an hour, which is probably a bit more than real world usage as it will likely only be active when doing the reading

((3.6 / 1000) / 3600) * 24 = 2.4e-05

And finally, 0.0016mAh for the LDO:

1.1333333333333333 + 0.009933333333333334 + 2.4e-05 + 0.0016 = 1.1448906666666667

So in a day:

1.1448906666666667 * 24 = 27.477376

Which sums up to 27.477376mA a day.

The Panasonic batteries are apparently measured pretty often around 3280mAh, so

3280 / 27.477376 = 119.37093265383129

We can round that down to 119 days.

If considering 120mAh this figure goes up to 168.4 days.

Also note the actual code goes:

  • wake up
  • connect to wifi
  • connect to MQTT broker
  • read sensor values
  • send values to MQTT broker
  • go back to sleep

I would venture that this probaly mean we are not in Tx mode all the time, so the actual esp module consumption during these ~4 seconds is likely shorter, therefore we can hope for even longer battery life.

Dream mode on: If Tx is at about 120mAh and is actually half the awake time, and the rest is Rx, at about 56mAh, that would bring us to 228 days!

Trying to be more serious, it seems likely that Tx is not using the higher current, and that it only is using part of the awake time, so I would be pretty happy with 6 months battery life.

Real life

At first I wanted to write this once I had depleted an 18650 cell completely.

Knowing I estimated it at first with about the same as today, so 119 days. That being theorical, I was actually expecting 90 days, maybe a 100. Espcially as there was quite some time below freezing point since it was put up, and that this has bad impact on batteries as far as I know.

It now has been 4 months, since november 25th, or 120days and it still is running, Vcc measurement doesn't seem to get any lower, but the only measures I hava is from the ESP.getVcc(), which is what the ESP gets, and not what the battery actually deliver.

The readings jittters between 3.14 and 3.33v knowing the MCP1700-3302E has a dropout voltage of 0.178v, we can assume that at worst, the battery still delivers 3.318v. I got an alarm set when this goes below 3.1v, so if the real battery gets below 3.278v, so the battery is safe.

I'll likely do a new post when the battery is finally depleted.

25 mars 2017 10:53:22 -- tags [ esp28266 , bme280 , 18650 , battery , temperature , sensor ]

8 avril 2017 22:24:18 - lắp điều hòa hay sử dụng máy làm mát

Do you mind if I quote a few of your posts as long as I provide credit and sources back to your webpage? My website is in the exact same area of interest as yours and my visitors would truly benefit from some of the information you present here. Please let me know if this okay with you. Thank you!

30 avril 2017 07:40:40 - Charlotte

First of all I would like to say great blog! I had a quick question which I'd like to ask if you do not mind. I was curious to find out how you center yourself and clear your head prior to writing. I have had trouble clearing my mind in getting my thoughts out. I truly do take pleasure in writing however it just seems like the first 10 to 15 minutes are usually wasted just trying to figure out how to begin. Any recommendations or hints? Thank you!

8 juin 2017 13:16:01 - expensive wine

We look for some eclectic and affordable glassware at thrift stores and yard sales.

23 juin 2017 14:26:35 - vinhomes vincity

phân phối сhung cư vinhomes vincity

7 janvier 2018 04:59:45 - JustLolo

Buy 5mg Daily Cialis Cheap [url=]cialis[/url] Cialis Prices Canada Viagra Rezeptpflichtig Apotheke isotretinoin worldwide no rx by money order Propecia Buy Cheap Kamagra Erfahrungsberichte <a href=>cialis online</a> Viagra Naturale Cialis Plus Efficace Que Viagra Cialis Generico 5mg Prix Viagra Belgique - buy cialis Buying Online Cialis

7 janvier 2018 17:00:54 - JustLolo

Misoprostol 200 Mg Buy [url=]generic cialis[/url] Kamagra Soft Chews Non Prescription Viagra Reviews Dosage Dog Uti Keflex Cephalexin And Depression <a href=>cialis</a> Depression Pills Online Tadalis Sx Acheter Where To Buy Levitra Online - generic cialis On Line Direct Doryx Cheapeast Internet Cialis Pfizer Levitra

31 janvier 2018 18:32:00 - Ivanbef

7 février 2018 04:09:31 - WinnerAmeks

If you’re interested in winning millions, then I’m here to help! At []Casino[/url] you can play over 450 world-class games and I’m giving you an exclusive Welcome Bonus to get you stuck into winning. Use it today to increase your chances of hitting our jackpots. All you have to do is []sign up today[/url] and watch the rewards come rolling in. []Prepare to hit the big time[/url] []Hacer giros para ganar millones[/url] []Holen Sie sich spinnen, um Millionen zu gewinnen[/url] [IMG][/IMG]

12 mars 2018 18:02:55 - Josephmub

Amazing many of beneficial information. levitra and cialis comparison <a href="">cialis generic</a> se necesita receta medica para el cialis [url=]cialis generic[/url]

13 mars 2018 11:32:11 - Josephmub

Terrific tips. Appreciate it! costo confezioni cialis <a href="">cialis low cost</a> cuanto dura una cialis [url=]buy cialis online[/url]

29 mars 2018 14:42:10 - Hydebrstdum

cialis samples for healthcare providers follow link buy now cialis vente medicament cialis google cialis cialis baratos uk se comparan can 40mg of cialis be taken buy cheap generic cialis 50mg us pharmacy 20 mg cialis <a href="">$200 cialis coupon</a> low dose cialis and bph <a href="">coupon for cialis by manufacturer</a> acquista cialis cialis erfahrungsberichte the best choice cialis pfizer cialis kaufen online in kanada acheter cialis bretagn cialis generico e originale cialis uk approved generic cialis canada cheapest cialis soft tabs review acheter cialis sur paris cialis and buy discount cialis 20 mg cialis generic tabs <a href="">goodrx cialis coupon</a> cialis dosagem minima <a href="">what is the cost of cialis</a> achat cialis original franc cialis super aktiv uk cialis price india cialis 20 mg 8 compresse cialis y otros medicamentos generisches cialis en ligne

1 avril 2018 21:36:33 - mezo

І havе read sߋ many cοntent гegarding the blogger lovers h᧐wever thіs post is genuinely a gⲟod paragraph, keеp іt սp.

19 avril 2018 15:19:23 - JugeCed

cialis 20 mgpurchasing cialis on the internetcialis genericcialis for sale <a href=>viagra vs cialis vs levitra</a> cialis purchasingside effects for cialis

22 avril 2018 03:38:36 - IkdrgeTat

fast cialis online buy cialis cheap 10 mg <a href="">cialis coupons printable</a> buy cialis online legal cialis 20 mg cost cialis daily dose generic acquistare cialis internet <a href="">cialis generique</a> generico cialis mexico enter site 20 mg cialis cost cialis prezzo al pubblico does cialis cause gout <a href="">cialis pills</a> generic cialis pill online venta cialis en espaa

1 mai 2018 11:00:11 - IktrdrgeTat

<a href="">Cialis Without Prescription</a> cialis baratos compran uk cialis kamagra levitra cialis professional yohimbe 40 mg cialis what if i take cialis prices in england enter site natural cialis <a href="">Buy Cialis Without Prescription</a>

23 juillet 2018 20:47:10 - Thorstein

WOW just what I was looking for. Came here by searching for n

25 juillet 2018 22:44:28 - Gustaf

Hey there! I realize this is kind of off-topic but I needed to ask. Does operating a well-established website like yours take a lot of work? I'm completely new to writing a blog however I do write in my journal everyday. I'd like to start a blog so I can share my own experience and views online. Please let me know if you have any suggestions or tips for brand new aspiring blog owners. Appreciate it!

6 septembre 2018 02:55:38 - K SA

I jսst cοuld not leave ү᧐ur site beffore suggesting tһat І extremely loved tһe usual іnformation a person supply fоr yоur visitors? Ιs goіng to be Ьack ߋften to check ᧐ut new posts

7 septembre 2018 22:42:29 - KSA

I visited multipke sites butt thе audio quality for audio songs existing aat thgis website іѕ in fаct marvelous.

25 septembre 2018 04:40:39 - JazesDuata

levitra tadalafil reviews add.asp [url=]levitra 20 mg price [/url] how big an erection with levitra 5mg <a href="">levitra 20mg </a> - the drug levitra levitra coupon online memberlist

26 septembre 2018 02:52:35 - OlizerTIB

comparison viagra viagra levitra [url=]viagra without prescription [/url] viagra buy knowledge base <a href="">viagra no prescription </a> - viagra gtgt the best known men39s pill ltlt buy now from $1 53 per viagra 10 mg 4 tablet total posts

10 octobre 2018 13:51:03 - MezfinEvime

canadian levitra [url=]levitra 20mg [/url] order levitra <a href="">levitra 20 mg </a> - levitra and alcohol side effects you cannot reply to topics in this forum levitra trackback kommentera

10 octobre 2018 14:37:49 - TezrymuP

help writing an essay [url=]write my paper [/url] online proofreading services <a href="">write my essay </a> - order essays online pay for freelance writers

11 octobre 2018 11:44:32 - Bruzetog

viagra for daily use free trial queries [url=]viagra without prescription [/url] viagra vs viagra <a href="">viagra without prescription </a> - viagra for women dosage registered users viagra generic 5mg if this is your first visit be sure to check out the faq by clicking the link a

13 octobre 2018 06:01:59 - WalzaceMum

coursework support [url=]write my paper [/url] paraphrasing help <a href="">write my paper for me </a> - writing a dissertation buy college research papers online

14 octobre 2018 17:44:24 - Tzomasmycle

liquid levitra [url=]levitra for sale [/url] levitra buy uk past 6 months <a href="">levitra 20mg </a> - buy cheap levitra levitra 5mg dosage jump to

17 octobre 2018 15:01:54 - SazuelleX

skipping doses viagra 2.5 [url=]viagra without doctor prescription [/url] viagra tablet <a href="">viagra without doctor </a> - viagra 20mg canada display topics from previous new ed treatments

19 octobre 2018 04:15:26 - Olizerdaulp

doctoral dissertation defense [url=]write my essay [/url] buy research paper online <a href="">write my essay </a> - thesis writers buy essay

21 octobre 2018 22:24:16 - Gabzielcepsy

cialis 10mg how long does it last board index [url=]cialis over the counter at walmart [/url] cialis 20mg side effects posts per day <a href="">cialis over the counter walmart </a> - cialis and ecstasy cialis coupon cvs password

23 octobre 2018 04:46:43 - Zalterser

sls cialis [url=]cialis over the counter at walmart [/url] cialis from canada pharmacy log out <a href="">cialis over the counter walmart </a> - 20 mg cialis erection problems cialis

29 octobre 2018 15:57:07 - viagra

Howdy! This is my first visit to your blog! We are a group of volunteers and starting a new project in a community in the same niche. Your blog provided us beneficial information to work on. You have done a outstanding job!

8 novembre 2018 07:28:27 - gxucbu

cialis generic levitra viagra php <a href=>viagra to buy</a>

11 novembre 2018 15:51:14 - hack koin kwai

You can even save on video production suites and related hardware in a few cases. More recent motherboards may even have two such slots to aid dual video cards. Since the database has got the settings, keys and options that the computer uses to perform its operations, a lot in the errors can be tracked there.