Weather Station Needs Almost No Batteries

While the ESP8266 has made its way into virtually every situation where a low-cost WiFi solution is needed, it’s not known as being a low-power solution due to the amount of energy it takes to run WiFi. [Alex] took this design constraint as more of a challenge though, and with the help of an ATtiny microcontroller was able to develop a weather station using an ESP8266 that only needs new batteries every 2-4 years.

While the ESP8266 module consumes a bit of power, the ATtiny excels in low-power mode. To take advantage of this, [Alex] designed the weather station using the ATtiny to gather data every two minutes, store the data in a buffer, and upload all of it in bursts every hour using the ESP8266. This means that the power-hungry WiFi chip can stay off most of the time, drastically limiting the power demands of the station. [Alex] mostly details the setup of the ATtiny and the ESP8266 on his project page, so this could be applied anywhere that low power and network connectivity are required.

As for the weather reporting capabilities, the station is equipped to measure temperature, light, and humidity. Presumably more could be added but this might increase the power demands for the weather station as a whole. Still, changing batteries once a year instead of once every two years might be a worthwhile trade-off for anyone else attempting such an ambitious project. Other additions to the weather station that we’ve seen before might include a low-power display, too.

35 thoughts on “Weather Station Needs Almost No Batteries

    1. Depends a lot on the application. If you cannot make the compromise of sending a lot of data at once because you want real time values, then this approach does not help you much. Unfortunately WiFi is power hungry and the ESP processor itself is quite inefficient as well.

  1. Not much use nowadays for 1 hour old weather data… is it?
    If an extra micro is added, why not use some more efficient radio modules between the micro and the esp which can go inside the home?
    Or the classical weather station approach…solar power!

    1. I imagine the goal here is more to have historical data of weather conditions throughout the day, since it’s actually measuring and storing data every 2 minutes, but only pushes it upstream on the hour.

    2. This could be a very interesting but simple use-case for so called edge-computing (or maybe fog-computing if I have understood my IoT buzzwords). If the temperature is normal (within normal bounds for the day of year, time of day), store it and send it later. If the temperature falls outside of the norms, send it now. (or maybe send it n times to get attention).

      The array of “norms” could be pushed to the device, say, weekly. This way you are pushing some degree of autonomy to the edge device, saving battery and still performing as a real time alerter . What do you think?

    1. You can probably just cut out the attiny and use the ULP coprocessor in the ESP32, as long as your sensors are i2c or analog. The ULP can read the i2c bus and ADC and access memory while the two main cores are sleeping.

      1. I was having high hopes for that ULP coproc, but it is very limited and very difficult to program. It would have been cool it if was say…an complete 8 bit core that could do anything slow and low power, like having that attiny inside the esp.

  2. I’m trying out tpl5110 in the adafruit breakouts.
    Little power switch timer you can use between 1.5 and 5V to cut power.
    35nA in standby but you have to set the time to sleep with a resistance. The sleep time varies with the resistance to ground at power up.
    When you want it to sleep you set a pin from low to high , it cuts power and sleeps for the period set.

    1. ESP8266 has a deep sleep mode which works very well – you can set the interval, and have it wake by tying reset pin to D0/wake pin. You can also power up just the processor, excluding the radio modem. It would be interesting to compare such an implementation with the separate tiny even if only on paper.

      1. But you also need to deep sleep any peripherals or sensors as well.
        The attiny method above could cut power to everything.

        The TPL5110 im using does just that, Ive got it set up so that even the voltage regulator has the power cut.
        Also the voltage divider Im using to keep an eye on the batteries. Sensors or peripherals would be using power if I had just used the deep sleep of the ESP8266. Also there seem to be issues with the ESP8266 and DHT22 Im using that can cause the deep sleep to fail and the ESP83266 to lock up. As the TPL5110 cycles the power completely it hasnt been an issue.

        1. My electronic skills are somewhere around “putting something together and hoping that it works”, but shouldn’t you be able to power the peripherals from the GPIO, if they are less than 12/20mA each?

          I have a ESP8266 with 5 x DS18B20’, 1 x light sensor from a garden light, and 1 x DHT-something in my greenhouse which have been sending data to Azure every 30 minutes (15 in the beginning) for +1 years now, on a single set of batteries, where I power them (sink) through the GPIO.

          I’m going to replace it this winter, but only because I’m connecting the greenhouse to the grid, so I can switch to hydroponics.

    2. I think you are optimizing in the wrong place. Sure, the ESP takes 25uA to sleep which is a lot, but the biggest inefficiency is when it is active. If you really want low power, use other radios. I am using RFM69 + micro in my projects, in best case scenarios i can wake up, measure, send and receive ACK within 10ms. In that time the ESP does not even get to open its eyes from sleep mode…

      1. I do wish that the programmable NRF chips would be more popular, the 8051 CPU on the NRF24LU1+ is interesting, evn without that I’m partial to nrf24l01 myself. Though both RFM and NRF chips are mostly used in a setup that’s similar to this ATtiny+ESP way but with an extra radio module somewhere.

        1. I used to want that and started my first deigns with NRF24l01 (actually RFM75). Never managed to get the range reported by others within the house – maybe the >30 WiFi networks i can see has something to do with that. Went to RMF69 and i have no problems now, >99% of packets go through the first attempt over even longer distances.

    1. there are more similar sensors to that one. if you go to mouser for example “Light to Digital Converters” will have plenty.
      There are also analog versions, photo diodes designed to have the same response as a human eye, so you don’t use crappy LDR. I like them more because they come in 3mm LED packages which makes it easier to install in a case.

      1. That’s my usual mode of operation – except I’m more of a digikey guy, sorry Grant Imahara lol. Anyways, I first tried this one because it was texas instruments and they document pretty well

        https://www.digikey.com/product-detail/en/texas-instruments/OPT3001DNPR/296-40474-1-ND/5178351

        but couldn’t get a response, so I tried this one because the datasheet looked more simple:

        https://www.digikey.com/product-detail/en/ams/TSL45315CL/TSL45315-CLCT-ND/3095326

        I get a response but can’t pull data :/

        I’m using an ESP32 so I’m looking for one someone has already tested on that or at least the esp8266.

        I have other I2C sensors on the same board that work great (temp/hum and power). You can check out my project here: https://www.digikey.com/product-detail/en/ams/TSL45315CL/TSL45315-CLCT-ND/3095326

    2. The TSL2561 was the replacement and it has worked great with my ESP8266 projects. Then – last year maybe? – an even newer version came out with significantly improved dynamic range (which allows me to pretty much leave the gain settings alone now), the TSP2591. I think I picked up a breakout for it from Adafruit.

  3. I’ve been using an ESP8266 as MQTT doorbell. It also sends it’s voltage on every press and runs on 2 AAA alkaline batteries. It’s has been pressed 540 times in 7 months of time and the voltage is now around 2.55V, it started at 2.93V. So you can use an ESP alone on batteries. Key is to not use DHCP and use a static IP configuration,

    1. yeah, however even with those measures, when you swap the button for a temperature sensor that updates every minute, the battery life is poor. You can get into more tricks – start without wifi, check if temperature has changed and update only if the difference is high enough. But this might get you 2X improvement.

  4. If I could interface my 1-wire weather station to work with an ESP in realtime, that would be a nice one. 1-wire isn’t power hungry and the extra consumption of the ESP can be obtained from solar panels or even a small wind driven generator.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s