Thursday 4 August 2016

You have mail, power usage.

After a less than 24 hours my mail sensors died. Batteries where around 1 volt, so it had drained them pretty quickly, something had to be done.

First I started to measure how many mA my circuit uses. But I was faced with a continually resetting Esp8266. At first I thought it had somehow messed the program in it's flash because of low voltage situation, but after a while of debugging I got the idea to measure the voltage, and it turns out that when measuring mA my multimeter drops the voltage from 3.3 to 3.1, and that makes the Esp8266 go crazy. Then I moved amperage measuring before the dc-dc converter. After that the circuit worked fine. There is a nice article about this issue here http://www.eevblog.com/files/uCurrentArticle.pdf

The following amperage readings are before the dc to dc converter when I powered the circuit from usb at 5 volts. When Esp8266 was active the circuit drawed around 40 - 100 mA of current. In deep sleep it took about 8 mA, which was quite high. After a bit of googling I found that the power led was using significant amount of power, so I took it out. Power went down to 3.4 mA, which is still quite high. After some thinking I started looking at how much TSL257 draws current, and it was typical 1.9 mA and max 3.5 mA according to datasheet. After moving TSL257 power to gpio, so it's only on during mail check, deep sleep current is 0.5mA, which is pretty much all taken by the dc-dc converter. Which I can't do anything about, without buying a new converter, so I'll settle for this now. If aaa batteries are about 1000 mAh then they should last about 1000/0.5/24=83 days, so over two months. Which at least gives me some time to think what I will do.

No comments:

Post a Comment