Self-updating OTA firmware for ESP8266

As part of my recent projects, I have started including OTA firmware updates for my ESP8266 devices.  (Also known as FOTA)

Doing so is actually remarkably easy, thanks to the very good support for this exposed by the Arduino board support package.  The hardest thing actually becomes getting the web server side set up, rather than the changes required on the device itself.

Continue reading “Self-updating OTA firmware for ESP8266”

Website accessibility issues

There have been some website availability issues over the last 24 hours due to an issue with DNS records at my hosting provider.

The issue has now been resolved, and the site will be available once the updated DNS records are propagated through the Internet.

I apologise for any 404s users may have received during the outage.

Further reducing power consumption on ESP8266

By carefully rearranging the operations my weather station does each time it wakes up, I have reduced the power consumption even further.

As it wakes up, it needs to make a series of measurements:

  • Read the current battery voltage
  • Read the current temperature from a DHT22
  • Read the current humidity from a DHT22
  • Read the current temperature from a BMP180
  • Read the current air pressure from a BMP180

The battery voltage is read through a resistor voltage divider feeding into the analog input of the ESP8266.  This reading is very sensitive, and a massive power drain from the WiFi function will bring down the measured voltage.  This can be mitigated by using capacitors to buffer the analog readings, but if I have a choice I’d still prefer to have the WiFi function off when reading this.

The rest of the readings, however, are digital and not that sensitive to overall system power drain, and that gives us an opportunity to do things in parallel.

Continue reading “Further reducing power consumption on ESP8266”

Reducing WiFi power consumption on ESP8266, part 3

Welcome to part 3 of this series on reducing WiFi power consumption on ESP8266 chips.

Earlier, I have established the baseline power consumption and shown how to reduce this a bit by disabling the radio when it is not needed.

This time, I’ll take it a step further by showing how to make sure the radio is needed for a shorter period of time.

Continue reading “Reducing WiFi power consumption on ESP8266, part 3”

Reducing WiFi power consumption on ESP8266, part 2

In my previous post I showed the baseline power consumption data for one of my ESP8266-based weather monitors.

The device wakes up from deep sleep, reads some sensors, connects to a WiFi network and transmits the readings over MQTT, it will then go back to sleep for 5 minutes.  One such reporting cycle would consume 0.164 mAh.

This time I’ll show the first steps on the way to reducing this to less than half.

Continue reading “Reducing WiFi power consumption on ESP8266, part 2”