Idea and suggestion for a battery powered system

not yet! the BME280 is scary - i just used the library that i found that works! i use the Tyler Glenn one: https://github.com/finitespace/BME280/blob/master/BME280.h

can it be tweaked?

i am considering a samsung S5 battery (2800mAh) how long would that last with 4 seconds spurts every 12 mins??

We only have DS18B20’s here and I don’t think they have any “sleep” options.

I have read about some BME’s having “sleep” features but not sure which models and how it is done but big G will have the details.

If you haven’t done any BME tweaks then the figure I quoted of 1.75 hours per battery “running time” over 3 weeks is likely to be considerably understated i.e. connected sensors will be drawing power during the ESP deepSleep.

Get back to you on the S5 battery shortly.

Maybe 26 days for a single S5 battery @Dave1829

See the difference between “2600” and the “4000” batteries?

A single 4000 lasts approx. 10 days based on the 3 weeks you quoted for 2 batteries. So if it actually had power of 4000mAh it could in theory run for around 40 days.

When I did the 1.75 hrs calc I used 5 sec duration to allow for time before and after your sketch runs the millis() calc.

On reflection this could be more like 10s and that is what I have used for the super “2600”.
So 10s/(10s +720s) means ON for 1.4% of the time and OFF for 98.6%. 1.4% of 1 hour is 0.014 hours.

During short power up cycles ESP’s can draw 300mA (70mA on longer run cycles). So using 300mA and 0.014 running hours per hour it might draw 4.2mA per hour.

All batteries are different and for example the 18650’s generally fail to run an ESP much below 3V from their initial 4.2V (3.7V nominal).

2600mAh / 4.2mA is a theoretical 619 clock hours or around 26 days.

Notes.

  1. Calcs exclude the power used during deepsleep which should be very small but does have some effect over the longer term.

  2. Assumes no power used by sensors during deepsleep and they can draw quite a bit if they are not themselves in sleep / low power mode.

  3. I was bottom of my class in Physics at college, but top in numeracy, so this might all be wrong :smile:

There are some articles on GitHub where a MCU is used as a power switch to an ESP and this way you can be pretty sure that the power used including connected sensors is virtually zero when the MCU is sleeping.

1 Like

Guys, let me give you some advice:

  1. You should consider using HTTP API for sending data to Blynk cloud, when you only need send data from hardware.
    In this case you can sleep as much as you need, collect data, and than even “bulk data upload” API is available, if you don’t want to connect to network EVERY time!
  2. It you want to control the thing, there are multiple options:
  3. Best of all, use Bluetooth LE for direct connection.
    You’ll have to carefully pick hardware and controller, so it can sleep correctly.
  4. If you still want to use cloud, then use normal Blynk library or HTTP API, but in this scenario:
    Connect
    Use sync API to get values update
    Disconnect and sleep for some time
    Restart from beginning (or restart controller)

In most cases, low power modes are very tricky to get right, and should be considered implementing mostly for commercial applications, or by very experienced hobbyists :wink:

3 Likes

Guys, just a small advice… Very careful when you buy batteries from Ebay or AliExpress, I strongly recommend you not to do it. Please, go to your electronics store at your neighborhood and buy with confidence.

2 Likes

Im in the process of creating a 3.6v battery bank. I need an ESP to run every 2minutes during day hours for just a few seconds, run from multiple 18650’s and charge using a 5v 250mA solar panel.
Im running in to issues with battery capacity.
I also bought cheapo chinese cells which were marked at 4000mAh (but prob more like 900-1100mAh im guessing).

My current solar setup is as follows:

Solar panel array (2x 5v 250mA in parallel = 5v 500mA)
–>
1v-5v booster (to ensure always 5v going to charger even in low light or shade)
–>
TP4056 Lithium charger module (batteries attached here)
–>
1v-5v booster (to boost 3.7v to 5v going to ESP)
–>
ESP8266 NodeMCU Clone

I have run this for 8 hours on 1 battery during daylight hours, but as soon as the sun starts setting, the batteries stop charging and thus runs the battery flat within about 30min.
This is WITHOUT using deep sleep and updating the server every 30 seconds.

If this fails, I might just invest in a larger solar array and lead acid 12v battery system but like the idea of micro solar builds.

@Jamin what have you got connected to the ESP to drain the batteries in 30 minutes?

Literally nothing. I had it reporting the VCC via the ADC back to a widget.

You comment is doubting whether I have it set up correctly. lol

If it’s doing “nothing” then how can it drain a battery in 30 mins?

That’s 2 amps per hour (assuming 1Ah battery capacity) something must be getting a bit warm?

It suggests to me one of two things:

  1. During the day the solar panels are providing only enough power to run the ESP and not top up the batteries. OR

  2. You have it incorrectly wired up.

Have you had a meter on the solar panels?

1 Like

I assumed running the wifi/blynk connection was draining the battery.
OR my battery capacities are FAR lower then expected.

The battery is constantly at 3.9v when the solar panel active even in shade.
It drops slowly over time once the panel is removed. Roughly 30-40 min and it will be down to 2.9v and then the ESP shuts down.

Yup, 5-6v during peak sunlight on the panels. Even the current was running at around 550mA.
Once it goes in to the booster, it comes out regulated at 5v @ 500mA.
The “charge” led on the TP4056 is constantly fully lit (i take that as its charging well).

You should run the esp on just the battery, not connected to all your boosters and chargers and stuff, to establish baseline energy consumption of the nodemcu…

(or reconsider using those batteries!)

Opps, i forgot the nodemcu uses 5V? Maybe the “booster” is eating power?

This is what I got: http://www.banggood.com/5Pcs-DC-DC-1V-5V-To-5V-500mA-Boost-Converter-Step-Up-Power-Module-p-1074546.html

Anything on there that would suggest that?

I’ll run it from the TP4056 to ensure it has over-discharge protection. These units are fairly reliable.

Funnily enough… just watching a few youtube videos testing the same Ultrafire chinese 4000mAh batteries I ahve and they’re coming out between 500-800mAh… so pretty sure I will need to stack these batteries in parallel to get the capacity up!

I might also buy one of those 18650 testers.

10% of quoted capacity is about normal for cheapo batteries.

1 Like

very good advice! Thank you!
Can you tell me some other details on BT LE system? I send the data, but how can manage the “gateway” that have to receive the BT from a lot of things? There is any example?

My project is to have simple IoT sensor on battery, using deep sleep functions of sensors plus esp/arduino

After a lot of searching on the web, I add some usefull workaround for ESP on battery:

  • using an RTC that wake up the ESP (RTC draws ~ 1.2 uA)
  • attiny

both method doesn’t resolve the real problem of ESP on battery that is the time to go on and send data then come back to standby (80ma about for 5-10seconds)

@vshymanskyy

This is exactly what I want to do - batch update a Blynk server.

I want to just wake the ESP to read the sensors, store the data, go back to sleep then maybe every hour update the sever with all the readings taken.

I search for the Blynk HTTP API and if I’m honest I don’t understand how to use it, I am a self taught cut and paste developer that can achieve most of what I need but generally need a snipet of example code to start with.

How do I ‘push’ if that’s the right term the data to the server (my own local server on a Raspbery Pi)

Ric

Actually if you use solar panel without proper charger device, solar panels cant correclty charge battery with TP4056. panel voltages dropping to 0.2v when sun is not enough to charge and its not re-charging battery when sun is high again.

Where do you find the bulk API upload? I’m not seeing it in the Blynk HTTP RESTful documentation or anywhere in the simulator. I also tried to add a new parameter to the API GET and it doesn’t work. Please help.