What is wrong with my project? (battery not lasting as long as expected)

@helpfinder, if you are interested to further reduce power consumption / experiment with the api, for startup you can try this:

Sending data without using timers

and this:

https://blynkapi.docs.apiary.io/#

Every 10 mins
I was wondering also would be way how to prolong the battery lasting even more to increase the measuring interval during night to once per hour, or once per 2 hours. Because I am not storing the data to see temp charts and who needs to watch current temp at 3:00? :slight_smile: So like between 22:00 and 5:00 measure only once per hour would mean 8 measurements instead of 48. But I am sure to identify current time another sensor with clock has to be attached and powered and actually I do not need another battery improvement with such additional work effort :slight_smile:

@wanek - thx, I will look at the API approach. I hope I would be smart enough to get it :slight_smile: btw is it possible to explain why this would be more power effecient than current setup? What is different with this 2 approaches? Just if it is possible to explain in 3 sentences, of course I can study this deeper by myself

no, i think this is actually possible without any additional hw. because blynk has the rtc widget, and esp also has rtc built in. so you can sync the correct date and time once when the esp is awake. than, you can write logic in your code like:

if current time is past 22.00 and before 8.00 than wake frequency = 60 minutes, else wake frequency = 10 minutes

well, first of all, because @vshymanskyy said so! :))

but seriously, when using the standard method, every time the esp wakes up, has to run blynk.begin, has to connect to the server, wait for some stuff to happen, has to execute blynk.run, etc. all these steps can take quite some time

with the api approach, you eliminate the blynk.begin and blynk.run from the routine, and the esp opens a direct http request to the server, updates the values and goes back to sleep. i’m not an expert in http and all, but this can be executed somewhat faster than the standard method.

if you read ALL the the topic i have linked, there are links and better explanations.

I did the fast calculation and if I did not do mistake with 8 hrs measurement each hour and wake time 5s + 16 hrs measurement each 10 mins avg consumotion is 0,5mA what means 4760hrs vs previously calculated 3552 hrs what means +34% so one additional month if using the same metrics as Costas did in his calculation

maybe with api you can further reduce the 5 seconds. you can experiment…

Just another battery status update:
17.10 - 4,11V (22:45)
28.10 - 4,08V (18:50)
5.11 - 4,07V (11:45)
21.11 - 4,04V (20:30)
3.12. - 4,02V (8:10)

Today I connected another piece of ESP + D18 sensor in my basement where temp is not so optimal (currently 12 degrees C) so I am curious what will happen with battery lasting here. Then I would like to create third one for outdoor usage, but that will be battery killer probably :slight_smile:

1 Like

Two months more and E. Musk will call you to ask for your battery… :wink:

I just watched a video on ESP-now… and it sounds like an excellent way to have low current/high endurance, battery powered sensors… 10-20 of them feeding back to a gateway ESP, that can perhaps be Blynkified. Best of both worlds?

1 Like

not necessary to ask me, it´s not my battery. Elon can simply order it from GearBest :wink:

2 Likes

Another battery update for all of you who is interested.
== esp1 ==
17.10 - 4,11V (22:45)
28.10 - 4,08V (18:50)
5.11 - 4,07V (11:45)
21.11 - 4,04V (20:30)
3.12. - 4,02V (8:10)
14.12. - 4,00V (18:55)
24.12. - 3,98V (10:00)
31.12. - 3,97V (12:25)

== esp2 ==
3.12. - 4,11V (21:20)
9.12. - 4,10/4,09 (8:45)
14.12. - 4,08V (18:55)
24.12. - 4,07V (10:00)
31.12. - 4,06V (12:25)

esp1 in room with approx avg temp 21°C
esp2 in room with approx avg temp 13°C

1 Like

Hi guys,
if anybohy here has experience with Dallas DS18B20 I am using in this project, maybe you can answer my question.
I put ESP with sensor into box and moved from basement to my garden to get outside temperature. Box is from wood, has drilled hole above the sensor.

I am using code with deepsleep and I noticed in the Blynk application temp was decreasing in several cycles. So when sensor was in basement I seen in app 10 degrees C, when I put it outside where was around -5 degrees in next cycle ESP wakes up measured temp was not -5, but somethig like 8 degrees, after another wake up 4 degrees, another wake up -1 degree and then finally -5C

Any reason why it did not go directly from 10C to -5C? Should I edit the code to ensure correct temp is measured immediately, not in several wake up cycles?

Thank you