ESPurna Firmware Now Supports Power Meters “Augmented” with ESP8266 Modules/Boards

Sonoff-Tasmota and ESPurna are the two main open source firmware used in home automation devices, such as Sonoff wireless switches, based on Espressif ESP8266 WiSoC. Xose Pérez – aka Tinkerman – has recently purchased “dumb” power meters / kill-a-watt meters, added WiFi to them with ESP-01 module and Wemos D1 mini board, and implemented support in ESPurna firmware leveraging earlier reverse-engineering work by Karl Hagström.

The power meter above looks exactly like the one I’ve been using for review for over two years, and has been more more reliable than other models, such as Broadlink SP2 (with built-in WiFi) that gave up on me after a few months.

Xose actually noticed that old and newer models of the power meters were based on different solutions. Karl’s meter relied on ECH1560, while Xose’s new meter was instead based on Vango V9261F, which has a public datasheet, and was already being worked on by Domoticz community.

While he connect ESP-01 to one of the meter, he found Wemos D1 mini was much easier to connect thanks to a built-in 5V support. He still had to include a Hilink AC to 5V DC power supply module, a baseboard for the Wemos board with an optocoupler and resistor. Finally (not shown in pictures), he hot-glued all cabling to make sure nothing move, and that’s important as you don’t want anything bad happens with AC voltages…

Click to Enlarge

The power meter can then be calibrated and configure in ESPurna user interface, and you can also handle the data through MQTT, Domoticz, a REST API, and/or Home Assistant. Support for V9261F has been implemented and tested, but while the older ECH1560 solutions have been implemented, they have yet to be tested.

The power meter can be purchased for about $12 and up on eBay or Aliexpress, ESPurna firmware on BitBucket.

Share this:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX RK3588 mini-ITX motherboard

15 Replies to “ESPurna Firmware Now Supports Power Meters “Augmented” with ESP8266 Modules/Boards”

  1. This is a plug device, you do not have to be a licensed electrician to work on it. It is definitely possible to kill yourself working on it, but that’s your own choice. If you were to do these modifications and sell the device you would need UL/ETL approval again in order to get product liability insurance.

    One has to wonder why none of our industrious Chinese manufacturers haven’t made a power meter with wifi built in. You just have to add about 50 cents worth of parts to that Sonoff switched power outlet.

  2. Trust me, try that in certain Scandinavian countries and someone finds out… You’re in big trouble. This might be less so than something hardwired, but anything that plugs in to AC Voltage is a big no no to touch unless you’re a certified electrician. You’re in fact not even allowed to put an electrical plug on a device that doesn’t ship with one, without being a certified electrician.

    On the other hand, where I live now, I do a better job than the so called electricians…

  3. Or you can simply buy a ready made Sonoff Pow device for $10 (instead of paying $12 for the power meter alone) and tinker with its firmware instead of high voltage wiring.

  4. @mrshark
    That’s similar, but it’s not easy like a power meter with a plug, you need to cut the wires to install it…
    One power meter with WiFi is Broadlink SP2, but AFAIK it was released in 2015, so unlikely to be based on ESP8266.

  5. cnxsoft :
    That’s similar…

    Do you know the resolution of the Sonoff POW ? I clicked on the POW link but the spec simply states 16 Amps, 3.5KW, accuracy 1%. Unless the ADCs are 12bit or better there is no way it can accurately monitor devices consuming mere watts.

  6. @Paul

    Power monitoring chips use programmable gain amps in front of the ADCs. Almost all of them have 12b ADCs inside. They’ll try and read the signal first with the PGA at 1, then if the signal is too low they set the PGA to 16x or more.

  7. Jon Smirl :
    Power monitoring chips cost under $1. Here’s a random one.

    Thanks for your advice Jon. Your link to the Atmel Energy metering chip, has 60 page Datasheet – very interesting. Your mention of programmable gain chip in front of ADC overcomes the ranging limitation I thought may apply. See it has 5 gain settings from 1 to 24, claims dynamic range 5000:1, error <=/-0.4% in current range from 20mA to 100Amps ! Delving further into the Datasheet, (page48) Line Current rms. 16bit register. Description: Data format XX.XXX, corresponding to 65.535A. <– i.e LSD = 0.001A = 1mA resolution. Mean Active Power also 16bit covering 0 to 32.767kVA i.e 1VA resolution

    Do you know if PGA Gain settings dynamic enough to accurately track realtime fluctuations in current ? All I could find on that is on page50 it states Metering bandwidth 1.1kHz

    Your link at bottom has a useful 'For use with' and points to a WiFi retail product: ATSMARTPLUG-EU. Unfortunately this product has no proper specification that I could find. The so-called Datasheet, is the 'Atmel Smart Plug Getting Started Guide' – which has no spec on current range, or accuracy. Photo just shows 0.0W 2 digits.
    As the 97cent chip is very sophisticated, requiring much host design effort,it is good there is at least 1 retail product using it, to avoid need to develop ones own; but without more info on range, accuracy of the 'Smart Plug, or a flexible means of accessing realtime current/power, I would be reluctant to buy it. Chip itself looks excellent. Do you know of other Energy Monitors using the chip ?

Leave a Reply

Your email address will not be published. Required fields are marked *

Khadas VIM4 SBC
Khadas VIM4 SBC