The Sonoff POW

Some months ago I wrote about a hack I did to one of my Sonoff devices to be able to use a simple current sensor to monitor my washer machine process and alert me whenever my laundry was done.

A few weeks ago Itead Studio released two new models for their Sonoff line, the POW and the DUAL. And the POW is Itead’s answer to my hack. I’m not saying they copied me, just that the Sonoff POW makes my hack utterly unnecessary. Do you want to remotely monitor your devices energy consumption? Buy a POW.

What’s new?

Actually, the Sonoff POW layout shows some very significant differences to that of the Sonoff TH16, for instance.

The Sonoff TH16 (left) and the Sonoff POW (right), spot the differences...

The Sonoff TH16 (left) and the Sonoff POW (right), spot the differences…

Again, the Sonoff TH16 (left) and the Sonoff POW (right)

Again, the Sonoff TH16 (left) and the Sonoff POW (right)

Obviously the POW has some circuitry for the power monitoring. The main component of this is the HLW8012 (the SOP8 packaged IC in the picture above). I wrote about the HLW8012 a few days ago, so I will not talk a lot about it here.  The schema of the POW around the HLW8012 is almost the same as in the datasheet. You can see the 1 milliOhm manganese-copper resistor in the center of the board. The IC reads the difference in voltage at the edges of the resistor to calculate the current flowing through. Also, the 5 0603 470kOhm resistors left of the manganese one are the upstream side of the voltage divider that feeds the voltage monitor pin of the HLW8012.

Detail of the HLW8012 in the Sonoff POW

Detail of the HLW8012

A lot of components have been moved to new positions or removed. The HLW8012 [Aliexpress] sits exactly where the header for the RF module is in the TH16. So no chance for an RF+POW version. The diode bridge has been moved closer to the edge of the board and the creepage slots run deeper into the DC side of the board.  The relay is almost exactly the same as in the TH16, a Honfa HF152F-005-1HST, also rated [email protected] or [email protected] And the programming header sits in the same place.

The relay in the Sonoff POW is rated 16A

The relay is rated [email protected]

Detail of the AC/DC components in the Sonoff POW

Detail of the AC/DC components

Like the TH16 it has two LEDs, a red attached to GPIO12 like the relay (so it will be on whenever the realy is closed) and a green one on GPIO15. The button is, of course, tied to GPIO0 so you can use it to enter flash mode on boot.

But the most important difference from my point of view is that the Sonoff POW lacks the sensor interface I talked about in my post about the Sonoff TH10 and TH16. This is actually a pity. It’s like if Itead was teasing us with different options but forcing us to choose between a nice interface for external sensors or the power monitor feature. I will even add a third option to the list and it will make my perfect device, and hopefully next Itead release:

  • Power monitoring
  • External sensors
  • Socket enclosure (like the S20)

If they can sell that for under 15€ it’s a winner.

Quality of the new Sonoff line (TH10, TH16, POW and DUAL) is pretty good and that’s why they recently got the CE mark from the EU. The device looks solid, albeit a bit to big. The enclosure is the same as in the TH10 and 16. I still love how the button peeks out of the box. It almost looks like part of the enclosure.


You can use the POW with the official eWeLink app. But if you have read me before you might already know I’m not going that way. Instead I soldered a 4 pin header and flashed my own firmware to the device. For the last days I’ve been mostly playing with the HLW8012. Check my post about the HLW8012 a few days ago for a deeper look into it and a library for ESP8266 and Arduino to use it.

Today I’ve been updating my ESPurna firmware with the HLW8012 library to support the Sonoff POW. It’s still under development but you can give it a try.

The ESPurna firmware is released as free open software and can be checked out at my Espurna repository on Bitbucket.

CC BY-SA 4.0 The Sonoff POW by Tinkerman is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

35 thoughts on “The Sonoff POW

  1. Harley

    Would love to see a review of Domoticz home automation software used with ESPurna flashed Sonoff devices.

    I currently use ESP Easy firmware on other ESP8266 devices because Domoticz have native support for the it.

    Normally I recommed ESPEasy firmware and Domoticz so everyone I know because of its ease of use.

  2. Nuno

    I attempted to flash a sonoff pow with an ftdi adapter at 5v. Only noticed my mistake when platformio couldn’t find the device when uploading.

    Now even after switching to 3.3v, platform io never finds the device. I just get a generic espcomm failed to sync error when I try to upload the firmware.

    Curiously, it still works with the firmware it came with (and the ewelink app), I just can’t seem to flash any other firmware on it.

    Is this it fried?

    1. Xose Pérez Post author

      I very much doubt it’s fried since you say it still works with the original firmware. My experience is that these IC are quite tolerant to 5V, never fried one by mistake and I have done that mistake more than once. Try resetting your programmer before trying again (disconnect it from you PC), then hold the button down while plugging in the programmer again and keep it down while flashing the device. Sometimes that helps. I suspect that a bad contact might bounce the button signal and the ESP8266 won’t get into flash mode.

  3. Pingback: Smartphone und Arduino | wer bastelt mit?

  4. Zerosub

    Hi Xose,

    i managed to flash espurna on my sonoff pow. I’m using version 1.4.4 with domoticz support.
    I like it alot and the webinterface is very nice.

    But i can’t find the right way to integrate it. Do i have to use mqtt to make it work or does it communicate directly with domoticz?

    I installed a mqtt broker, and i can see the Pow sending messages:
    domoticz/in, Message: {“idx”: 4, “nvalue”: 1, “svalue”: “”}

    Will i be able to use the powermeter in domoticz?

  5. ron lambkin

    Hello Xose,

    Thank you kindly for sharing this information.

    Would you be able to tell me if the HLW8012 is limited to 3500 watts or is it just the circuit trace & relay? I would like to measure up to 5000 watts if possible on a custom designed board. I understand you have played around with that (HLW8012) chip, so I thought I would ask. I searched on the chinese data sheet, but couldn’t find anything

    Thanks again,

    Ron (from Canada)

    1. Xose Pérez Post author

      The chinese datasheet is also my only source of information so I don’t really know. My experiments have never gone further than 1kW. 5kW would mean ~2.5ms pulse width which should be easy for the ESP8266 but you are way beyond the limits of the relay in the POW which is rated 20A (you use 120V mains in Canada, right?)…

      1. Kike

        Hola Xose,
        From what I can tell V1P-V1N is 43.75mV from the datasheet. And if the resistor is 0.001 ohms… Not taking into account relay and tracks in the board… that is like 43.74 Amps, right?

        1. Xose Pérez Post author

          You should also take into account other values like the resistor max power rate. A 1W shunt should handle up to ~31A peak.

  6. Dave

    Xose, not sure if these are available in Spain, but i recently got my hands on one of the ecoplugs from walmart, you can search for item# 554470210. It has an enclosure similar to sonoff s20, it has built in power monitoring with the HLW8012 ic and it has esp8266 built in. So far I am using Tasmota firmware and I have gotten most of the features working, i am still trying to find out which gpio pins are going to the HLW8012ic and will see if tasmota firmware will be able to give me power meter readings. Also, I will be in Barcelona at the end of April, I am very excited about the trip!

    1. Xose Pérez Post author

      Yes, I know about the ecoplug and my ESPurna firmware has support for them except for the power monitoring. Problem is that it’s not available here and importing it costs an abusive quantity of money. Besides it’s only 120V and here we work at 230V so I will need further equipment. Anyway I think the HLW8012 in the Ecoplug is accessed via a secondary controller with an I2C interface. Not sure about it. A user here has sent me logs of the readings he’s getting but so far no one I know of has been able to reverse engineered it.

  7. Albert

    Hola Xose,

    En pregunte si ESPurna (amb un Sonoff Pow) pot mesurar factors de potència negatius, es a dir, diferenciar entre quan es consumeix i quan s’injecta a la red.

    Si fora així, m’acabes de d’estalviar molts mals de cap!



    1. Xose Pérez Post author

      Hola Albert
      Doncs no sabria dir-te. No tinc gaire experiència en mesurar energia “injectada” a la xarxa elèctrica… l’únic que et puc dir és que el HLW8012 (el chip que porta el POW) mesura per separat corrent instantani (mesurant la diferència de potencial a ambdós costats d’una resistència de 0.001Ohm) i voltatge amb un divisor de potencial de 2570 a 1. Amb aquestes dos mesures fa sampling de potència instantània i retorna potència activa, voltatge i corrent RMS.

  8. Jordi

    Buenas, habría posibilidad de volver al firmware original una vez cambiado por el ESPurna?

    1. Xose Pérez Post author


      Solo si antes has hecho una copia del mismo usando esptool, por ejemplo. Aunque he de reconocer que yo no lo he probado.

  9. Leonel

    Hi, From the ITEAD website I get the impression that the POW provides both ‘total power used’ and actual power (‘now’) usage values.
    Accurate measuring of ‘power used’ is a continuous function of ‘actual power’. I therefore assume that ‘total power used’ is calculated and maintained by the Sonoff POW device (like smart power meters which provide both total power used and current power values). Is that assumption correct?
    Does ESPurna also provide both these values?
    If so, is ‘total used’ a standard feature of the HLW8012 chip or is it constantly calculated and maintained in the software?
    What when the Sonoff POW loses power, is ‘total power used’ value locally retained in non-volatile memory or is it lost?

    1. Xose Pérez Post author

      I guess that by “total power” you mean “total energy” since the power over time is energy. ESPurna does report total energy as well as current power. I don’t know about the original firmware but ESPurna will reset the total energy to zero upon reboot. My suggestion is to use whatever database you are using to store the values to calculate the energy consumption per day/week/…

  10. Gra

    Hi Xose,

    Nice review. I just received my Sonoff POW today (ordered from banggood) and I wonder if it’s a knock-off or whether Itead are changing the design. The reason I say this is that the relay in mine is an HKE V6-S-DC5V and the contacts are only rated to 10A for 250V.

    I’ll have to be careful not to overload it!


    1. Xose Pérez Post author

      I would stay in the safe zone with these boards. Wouldn’t load it with more than (say) 5A continuously.

      1. Tod

        Hi Xose,

        Thanks for the firmware!

        My Sonoff POW also comes with that V6-S-DC5V rated at 10A for 250W, and even worse, its datasheet mentions a max switching power of 450W ! (http://www.hankukrelay.co.kr/img/product/hke/pdf/V6.pdf) … So much for the advertised 16A …

        I really need this to be able to handle up to 3000W though.
        You guys know of any equivalent alternative (i.e. ESP with power consumption and real 16A/3500W) ?

  11. GP

    Thanks for taking the time to review this product, very useful.

    Do you know if the POW provides readings of both Voltage and Current or just Current? And does it calculate Watts as simply Volts x Amps (Actually VA, not W) or does it take into account Power Factor too?

    Thanks again

    1. Xose Pérez Post author

      It calculates voltage and current (both RMS) and true (or active) power so it takes the power factor into account.

  12. Izhar Marinov

    Hi Xose,

    I would like start with saying thanks, I have quite a few sonoff devices running espurna and controlled by openhab and it is working great. Your work and effort are appreciated.

    As mentioned in your review a sonoff POW with temperature sensor interface would be a great combination, looking at the POW schematics, it seems GPIO2, labeled SDA, is not used and has a pull-up (R9) connected to it. Can you think of any reason not to use this GPIO to connect to d DS1820 ? this is assuming I can actually locate the tiny resistor…


    1. Xose Pérez Post author

      Hi Izhar. Thanks for your support.
      GPIO2 must be pulled high for the chip to start up correctly, but once running you can use it as any other GPIO. No reason you could not use it for a DS18B20.

      1. Alberto

        Hola Xose.
        ¿Es posible localizar mas GPIO’s para conectar más sensores?
        Estoy evaluando si me compro el sonoff POW para accionar una bomba de agua y necesito un par de GPIO’s extra para verificar niveles.

        1. Xose Pérez Post author

          El POW utiliza muchos de los GPIOs disponibles: 0 (botón), 12 (relay), 15(led) y 5, 13 y 14 (comunicaciones con el HLW8012). De los que quedan (1, 2, 3, 4 y 16) el que tienes más fácil es el GPIO2 porque hay un pull-up necesario para que el ESP8266 arranque y podría soldarse un cable a uno de los pads de la resistencia relativamente fácil. El resto deberías soldar un cable fino directamente a las patas del controlador…

  13. wan hui

    Hi Xose,

    Thank you very much, I bought a few sonoff pow before,and I have flashed the espurna into my sonoff pow,I tested a few times,after the flashing , when I put it into my 220V circuit, I find it the circuit is open, I have tried to set the relay mode to “on”, or double click the main bottom of the device ,it doesn’t work.
    I doubt if the firmware supports the Connection to the 220V circuit

    1. Xose Pérez Post author

      I have a couple of sonoff pow working at home and we use 230V here… could it be something else?

  14. guille

    Hola, antes que nada felicitaciones por tu projecto!
    Despues de ver minuciosamente el esquematico hay algo que no entiendo. la medición de tension se hace poniendo un divisor resistivo entre vivo y neutro tomando una pequeña fraccion de la tension total. Ahora bien, he visto que en algunos circuitos toman como referencia el neutro y otros la tension de linea. Pero en tu esquematico la referencia es flotante! mide la tension de neutro pero no usa como referencia la tensión de línea. Podrias explicarme?

  15. Ruben Tavares

    Is there any way to hack the POW so that it can measure the power usage in a hole house?
    The power breakers im my house are rated at 16A max, but from what i have been reading no one recomends using the POW for its rated power (16A).
    The relay could be taken off the board, i just need the power measurement part.

    1. Xose Pérez Post author

      I do not recommend that. I don’t think it’s safe to use it with a 10A load or more. Traces are not so thick and contacts might not support higher currents.

      Having said that, the theoretical limit for the HLW8012 power measuring chip is 30.94mV RMS in the VIP/VIN inputs. Those inputs monitor both sides of a milliohm shunt resistor. That means there is a limit of 30.94A RMS. Depending on the appliances at your home that could be enough or not.


Leave a Reply (all comments are moderated, be patient)