8 ms·
Has anyone had luck with a battery powered ESP8266? I built one of these temperature loggers and gave it 3xAA but it never lasts more than 2 weeks, while "real"
by sprobertson 10y ago
Has anyone had luck with a battery powered ESP8266? I built one of these temperature loggers and gave it 3xAA but it never lasts more than 2 weeks, while "real" things (SmartThings sensors) last months on a single smaller battery. I'm a beginner in EE but I'd like to know what's possible to stretch the juice.
So far I have it sleep between every 15m measurement which brought it up from three days of battery life.
- JeremyMorgan 10y agoI have had the same results as you did. It's a bit of a power hog, but extremely powerful. I think one of the best bets for this device is to embed it into a power supply block and put them into the outlets of your house. Seems kind of limiting but I couldn't find any combination of batteries that would make it last more than a few days.
- emilburzo 10y ago> I built one of these temperature loggers and gave it 3xAA but it never lasts more than 2 weeks For comparison purposes, I just changed the 3 x AA batteries on my outside sensor[1], the batteries lasted for 13 months (again, in outside conditions, including a very harsh winter). I'm planning to write a post one of these days, but the gist of it is: - attiny84 (don't even think about using an Arduino) - DHT22 sensor (looking into SHT7x for better accuracy, but they're expensive as hell) - TX module (I went with 433MHz because of better penetration) I made 4 of these sensors, powered by batteries, so I can put them anywhere (within range, of course). They send the reading every 4..7 x 8 seconds[2], both to keep the frequency clear (as required by law, I think it was 95% of the time) and as a poor man's anti packet collision. They all report to a master RX, which is connected via USB to my server (which is always on anyway). A small parser reads from serial USB and saves it in Mongo. From there I can see the data in a simple webapp[3]. Oh yeah, and as a bonus, I made another thing that intercepts the outside sensor and display it on a 7 segment display[4], which looks really cool (plus I don't have to open the web page to see what's it like outside) [1] https://twitter.com/emilburzo/status/799886284730892288 https://twitter.com/emilburzo/status/799886284730892288 [2] https://github.com/ambient-monitoring/node/blob/master/node.ino#L130 https://github.com/ambient-monitoring/node/blob/master/node.... [3] http://ambient.emilburzo.com/ http://ambient.emilburzo.com/ [4] https://www.flickr.com/photos/eaglex/30242342623/in/dateposted-public/ https://www.flickr.com/photos/eaglex/30242342623/in/datepost...
- andmarios 10y agoThis. Or Attiny85 with external programmer and then read the microcontroller's datasheet to see how you can enable various sleep modes. The attiny85 can get to μA while sleeping.
- cuonic 10y agoThere aren't enough IO pins on an Attiny85 to measure the temperature and send it to another device wirelessly, right ?
- sprobertson 10y agoThere are - two for power, two for the DHT sensor, two for RX TX, and you even have one left over (not counting reset pin) I'm using serial from ATTiny85 to a ESP8266 as my wireless transmitter already: https://i.imgur.com/vZzGGZL.png https://i.imgur.com/vZzGGZL.png but the ESP itself is probably the root of the power problem.
- andmarios 10y agoIt has 6 pins you can use which should be more than enough. Once I had two DS18B20 sensors (temp), one 1602 LCD (over I2C) and a PIR sensor to act as interrupt connected to a attiny85. One temp sensor shared the same pin with the I2C data line. I just had to make sure they weren't used at the same time. This setup let me with two pins free, one of which I used as sink (ground) for the LCD, thus effectively being able to turn it off by pulling up the pin.
- emilburzo 10y agoThere are enough pins, the actual reason I didn't go with the Attiny85 is because of the Arduino libraries I'm using. I think they needed an extra timer that the attiny85 didn't have. Attiny84 wasn't exactly plug and play either, as I had to adapt the Arduino libraries code to it, but at least all the hardware was there.
- joshvm 10y agoDo you really need an SHT7x? The SHT21 has a datasheet accuracy of ±2% RH and ±0.3C compared to the SHT75 which has ±1.8% RH and ±0.3C. The repeatability of both units is the same (±0.1%RH, ±0.1C. The '21 also consumes about 5 times less power in sleep mode and 3 times less in measurement mode. You can pick up an SHT21 for about $3 (breakout included) and Sensirion sell clip on IP-rated membrane covers for outdoor applications - you just need to build it into your housing and provide an o-ring. http://uk.rs-online.com/web/p/temperature-sensor-accessories/8854704/?origin=PSF_421367|acc http://uk.rs-online.com/web/p/temperature-sensor-accessories...
- GeorgeHahn 10y agoThere are three big things to look out for on the software side. Are you using deep sleep? Are you putting your sensors into shutdown mode between measurements? How long does it take to take a measurement, connect, and report? On the hardware side, consider using a switching power supply. Many cheap/small ESP8266 breakouts use inefficient linear regulators. You may also consider adding a big capacitor across the battery +/- lines. This will help smooth out the large current pulses consumed by the device, which can be quite important as the battery voltage starts to drop. The ESP8266 is pretty power hungry, but you should be able to get much more than two weeks on those batteries. Even in the worst case scenario, I'd expect about three months. I'd be happy to take a look at your schematics and code. (email in profile)
- Isamu 10y agoRight, there is sleep and then there is deep sleep. AT+SLEEP has 2 modes, light sleep and modem sleep. AT+GSLP is deep sleep (low-power sleep.) Spec sheet says: " A minor adjustment has to be made before the module enter this deep sleep mode, i.e., connect XPD_DCDC with EXT_RSTB via 0 ohm resistor." If you have a scope, check the current draw when you sleep. Surprises can happen depending on the rest of your circuit.
- sprobertson 10y agoHere's the schematic: https://i.imgur.com/vZzGGZL.png https://i.imgur.com/vZzGGZL.png I have a ATTiny85 on a timer to do the actual readings from the DHT sensor, then turn on the CH_PD pin for the ESP8266, then send the reading over serial. The ESP then turns that into a POST request. (This design is partially because I could never get the ESP to read directly from the DHT.) Could that 3.3v regulator be a problem? Could CH_PD not actually be making it use less power? There are also a bunch of small capacitors to get things working more reliably, but I don't have a good understanding of which ones are useful or how much energy they eat.
- GeorgeHahn 10y agoHave you verified that CH_PD stays low when the ATTiny is asleep? I'd consider putting a 10k pulldown on the CH_PD line so it defaults into powerdown mode. Do you have a multimeter? Insert it between VCC and U1 and between VCC and US1 to verify your sleep currents [1]. The 3.3v regulator could certainly be improved. Once you've verified that your sleep currents are within the expected range (<1mA), consider swapping it for something more efficient. A board like [2] should work reasonably well if you set UVLO to the minimum value of 0.3V [3]. This should get you to a few months of battery life. A large capacitor (500+uF) on VBATT will stretch this a bit further. You want something with low ESR (the batteries should be around 400 milliOhms total; try to stay under 100 milliOhms). Anything here [4] would be pretty reasonable (supercaps are also a good option). If you want to go even further, switch to an ATtiny85V and run it directly from the batteries. (This will work with your ATTiny85 as well, but you'll drop below its operating voltage while there's still a fair bit of usable charge left in the batteries.) Instead of wiring to CH_PD, you can wire it to the enable pin on your regulator (unfortunately not exposed on [2]; it's pin 6 on the TPS61200). You'll need to level shift the ATTiny<->ESP8266+sensor signals. The advantage here is that the ATTiny power doesn't take an efficiency hit from a converter and the ESP8266 and sensors can be 100% powered down when not in use. This is what I'd do if creating this as an original design on a single board. [1]: https://openhomeautomation.net/esp8266-battery/ https://openhomeautomation.net/esp8266-battery/ [2]: https://www.sparkfun.com/products/10255 https://www.sparkfun.com/products/10255 [3]: https://www.circuitsathome.com/dc-dc/tps61200-board-modifications-part-1-changing-undervoltage-lockout/ https://www.circuitsathome.com/dc-dc/tps61200-board-modifica... [4]: http://www.mouser.com/Passive-Components/Capacitors/Aluminum-Electrolytic-Capacitors/_/N-75hqtZscv7?P=1z0z819Z1z0z7l5Z1z0z80l&Rl=75hqtZer3vZ1z0wkcyZ1yftwwfSGT75hqtZergjZ1yx4avtZ1yx4arcSGT75hqtZ173vdZ1ybcj9yZ1z0s5pqSGT&Ns=Pricing|0 http://www.mouser.com/Passive-Components/Capacitors/Aluminum...
- jordz 10y agoThere's a lot of buzz about LoRa WAN networks which use long range lower powered RF chips that can last years on a coin cell. When designing loggers and sensors power consumption of the sensors and networking stack are obviously critical to battery performance.
- fr0sty 10y ago0. Remove/disconnect the power LED. 1. Consider powering the sensor via a GPIO pin that you set high when you want to take a reading rather than connecting it to the positive rail. 2. Research whether your chip can be easily put into deep-sleep mode (the -01 boards require a jumper wire to be soldered to one of the IC legs which is not super-easy to accomplish).
- askvictor 10y agoI got 6 months using 2xAA. If your board has a 5v regulator, either get another board ( pref without one), or make sure it is a low quiescent current type. Rip out the LEDs. Use deep sleep.
- keithnz 10y agoI work doing http://www.outpostcentral.com/english/index.aspx http://www.outpostcentral.com/english/index.aspx and http://www.mywildeye.com/wildeye/ http://www.mywildeye.com/wildeye/ which are battery powered loggers communicating over GSM. We get years of life out of our devices. But they limit their communications and we are super paranoid about current consumption in every part of the design.
- cushychicken 10y agoJack Ganssle wrote this epic post that contains just about every design consideration you would want to know for low-power, long-battery life sensors. Check it out. http://www.ganssle.com/reports/ultra-low-power-design.html http://www.ganssle.com/reports/ultra-low-power-design.html
- lucaspiller 10y agoI built a solar powered one, that worked fine in the UK (even during winter) for a few months until a hardware failure occurred (I think condensation in the enclosure). As others said you need to find a good breakout board. I had good luck with a ESP8266-12 (http://blog.hekkers.net/wp-content/uploads/2015/03/ESP-8266-12.jpg http://blog.hekkers.net/wp-content/uploads/2015/03/ESP-8266-...) which consumes µAs in deep sleep mode. As others said, if you are really serious about this you would be much better to go with a ATTiny or similar, but then you don't get radio out of the box, so need to work with 433mhz modules or similar.