-->
Page 1 of 2

Battery monitor and power saving

PostPosted: Tue Mar 20, 2018 6:49 pm
by Marco Gallinari
Hi all!

First of all, let me apologise as I'm a rookie at electronics, so please forgive me for my lack of knowledge and practice.

I'm trying to build a sensor box to register ambient temperature, humifity and luminosity on thingspeak.
I need to run the box on battery most of time, preferably rechargeable, and I wanted to be able to charge it easily.

At the time of writing, I managed to create a working prototype starting from examples I found on the forum.

Now the problem is, when running on battery, it runs out of charge after 12 hours, while I was expecting it to last a few days at least.

The firmware is uploaded via Arduino IDE.
The sketch is self-updatable OTA, and runs with 3 minutes deep sleep interval between measures. Booting, checking for updates and sending measures to thingspeak takes 4 to 6 seconds.

The prototype is built with the components drawn here:

20180320_231704.jpg


The prototype has a microusb battery charger / protection circuit and a switching voltage regulator to provide stable 3.3v from a 18650 battery with 3500 mah capacity.

Sensors are mounted on their own breakout boards.
esp8266 12f is soldered to a breakout board like the one in the picture:

download.jpeg


The switching regulator, TFS2561 and HDC1080 have very low quiescent current, so I suppose they would not use that much battery when esp is in deep sleep.
Did I get it wrong? I'll check current values with a multimeter as soon as I'll get a working one, but I'm not sure of what I should be looking at.

Another thing is, I'd like to record battery level on thingspeak.
I understand I can read battery voltage using ADC input and a voltage divider, but I'm quite confused about how to calculate resistor values. Is it correct if I use 100k and 420k values?

Thanks a lot for your time and patience

Marco

Re: Battery monitor and power saving

PostPosted: Wed Mar 21, 2018 12:44 am
by trackerj

Re: Battery monitor and power saving

PostPosted: Wed Mar 21, 2018 3:13 am
by btidey
As you say the multimeter is the key here to understanding what is going on with consumption / battery life.

It is also worth checking the real battery capacity by fully charging it and then discharging through a known resistive load. Some 18650 batteries can be fake and have much lower capacity than the normal 2500mAh capacity.

Re: Battery monitor and power saving

PostPosted: Wed Mar 21, 2018 7:26 am
by QuickFix
btidey wrote:Some 18650 batteries can be fake

That's an understatement: I would say most cheap 18650's (at present) are exaggerating their actual mAh capacity. ;)