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:
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:
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