Sonoff Pow and Pow R2

Adrian Scillato edited this page Jan 2, 2019 · 13 revisions

⚠️️Special Pow Attention ⚠️️

Do not connect AC power and the serial connection at the same time The Gnd connection of the Pow is connected to the live AC wire. Connecting serial with your PC will fry your PC and will electrocute you.

DO NOT CONNECT ANY SENSOR TO THESE DEVICES. Only use them as designed.

The GPIOs on the Pow are connected to AC power, therefore it is not possible to safely add sensors to the Pow / Pow R2.

The AC connection between Pow and Pow R2 is different, so be careful when you perform an in-place replacement.

  • Pow R2: Lo-E-E-Li-N-N = LineOut-EarthOut-EarthIn-LineIn-NeutralOut-NeutralIn
  • Pow: Lo-E-E-N-N-Li = LineOut-EarthOut-EarthIn-NeutralOut-NeutralIn-LineIn

Serial Connection

picture of the Sonoff Pow PCB, the needed pin header can be seen on the top end

Please see the Hardware Preparation page for general instructions.

As always, you need to access the serial interface.

  • Pow R2: The four serial pins (VDD, E-RX, E-TX, GND) are available at the rear/short end of the PCB. Do not use I04 and I05.
  • Pow: The four serial pins (3V3, Rx, Tx, GND) are available at the rear/short end of the PCB as can be seen in the upper part of the image to the right.

Note - After the module type is changed to "Sonoff Pow" or "Sonoff Pow R2" using the "module" command, the serial port is no longer available for entering configuration commands because the serial port is used to communicate to the power measurement chip. Make sure you have set up your network connection before doing this.

Calibration

Sonoff Pow might need calibration as correct measurements are influenced by hardware and timing differences.

I used the following procedure to calibrate.

  1. Prerequisites
    • Calibrated multimeter :wink:
    • Optional calibrated power meter :wink:
    • 60W light bulb
  2. Connect the Pow to the optional power meter.
  3. Connect the 60W light bulb
  4. Open a webbrowser to Pow showing the main page and another webbrowser showing the Console
  5. Turn power on and wait a few seconds for the pow to settle on a stable power reading
  6. Verify the power reading with the power meter or expected 60W and if needed change the power offset in W with command PowerSet 60.0.
  7. Verify the voltage reading with the multimeter and if needed change the voltage offset in V with command VoltageSet 235.5.
  8. Verify the current reading with the calculated value of P (step 6) / U (step 7)) and if needed change the current offset in mA with command CurrentSet 254.777.
    Example:
    P/U=I
    Volt/Watt=Ampere (A)
    A*1000=mA
    (60.0/235.5)*1000=254.777

Result explanation

The Sonoff Pow can provide Energy, Power, Voltage and Current information in different ways.

Push result using Telemetry

The preffered way is using the periodic telemetry data. Setting teleperiod 300 will send telemetry data every 5 minutes.
Note: If the setting PowerDelta (new since version 5.12.0e) is not 0 (default 80%), telemetry will be send on power change too.

tele/pow1/SENSOR = {"Time":"2018-02-15T17:37:10","ENERGY":{"TotalStartTime":"2018-11-14T18:39:40","Total":6.294,"Yesterday":5.340,"Today":0.954,"Period":217,"Power":2635,"ApparentPower":2650,"ReactivePower":282,"Factor":0.99,"Voltage":227,"Current":11.661}}

Pull result using status message 8

To request information you can use command status 8.

stat/pow1/STATUS8 = {"StatusSNS":{"Time":"2018-11-15T08:54:18","ENERGY":{"TotalStartTime":"2018-11-14T18:39:40","Total":6.404,"Yesterday":5.340,"Today":1.064,"Power":2629,"ApparentPower":2645,"ReactivePower":288,"Factor":0.99,"Voltage":226,"Current":11.677}}}

Meaning

The presented information has the following meaning:

Message        | Unit | Description
---------------|------|-----------------------------------------------------
TotalStartTime | Date | DateTime of calculation for Total
Total          | kWh  | Total Energy usage including Today
Yesterday      | kWh  | Total Energy usage between 00:00 and 24:00 yesterday
Today          | kWh  | Total Energy usage today from 00:00 until now
Period         | Wh   | Energy usage between previous message and now
Power          | W    | Current effective power load
ApparentPower  | W    | Power load on the cable = sqrt(Power^2 + ReactivePower^2)
ReactivePower  | W    | Reactive load
Factor         |      | The ratio of the real power flowing to the load to
               |      |   the apparent power in the circuit 
Voltage        | V    | Current line voltage
Current        | A    | Current line current

Debugging

Debugging the Sonoff Pow is a bit tricky as the serial interface has a direct connection to one of the AC power lines. I designed below schematic using two opto couplers seperating the AC connection on the left from the low voltage connection on the right allowing for serial control at 115200 baud and uploading of firmware up to 57600 baud while AC is connected. OptoSerial

Self Protection for Sonoff Pow

ITEAD published a recall notice for the Sonoff Pow on march 1st 2017. Some units produced in december 2016 and january 2017 are not well suited for 16A. If you have one of these units you can decide to use them anyway by limiting the maximum current in software. It is, in fact, possible to set a Maximum Power Threshold for the Sonoff Pow. If the power measured by the device exceed the threshold set by the MQTT command MaxPower for a number of seconds set by the command MaxPowerHold the device will remain switched off for MaxPowerWindow seconds (to let it cool down, for example).

For all details see Issue #218

Home
Theo's Tasmota Tips
What's New

Getting Started

Upload tools

Usage

Devices - Additional Info

Home Automation Integration

Other Integrations

Further Topics

ESP32

Misc

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.