ESP8266 Lullaby
The ESP8266 is certainly a versatile device. It does, however, draw a bit of power. That isn’t really surprising, though, since you would expect beaming out WiFi signals to take a little juice. The trick is to not keep the device on all the time and spend the rest of the time in deep sleep mode. [Marco Schwartz] has a good tutorial about how to use this mode to run for “years” on a battery.
[Marco] notes that even using a 2500 mAh LiPo battery, he only gets about 30 hours of operation without sleep. By putting the chip in sleep mode, the current consumption drops from about 88 mA to just over 8 mA. That’s still high, though, because the board has a power LED! By removing a jumper or cutting a trace (depending on the board), you can drop the current draw to about 0.08 mA (80 uA) when it’s not doing anything.
The code for the example is on GitHub. Of course, the real trick is to come up with a strategy that you can keep the device in sleep mode more often than not. That’s not always easy. You might need to rethink a few things. For example, if you serve out a configuration web page, you might need to add a button to wake the device up and serve the web page (be sure it times out after a certain amount of inactivity). So deep sleep mode isn’t a panacea, but with the right design, you can get a lot of battery life.
Some ESP boards require a little modification to use this trick. If you are looking for a good example of how a design might change to accommodate sleep mode, you can find one in this mailbox indicator.
Filed under: wireless hacks
from Hackaday http://ift.tt/2fK6I9s
via IFTTT