logo elektroda
logo elektroda
X
logo elektroda

[ESP32] Sonoff POWR316D energy meter with display - firmware change

p.kaczmarek2 
Sonoff energy meter with connected lamp and multimeter.
Today I am presenting a rather unusual Sonoff energy meter, which is distinguished by the fact that in addition to sharing measurements via a mobile application, it also displays them on an LCD display. This allows you to quickly check how much electricity and energy the connected device consumes without reaching for your phone. Here, of course, I will also focus on changing its firmware, I will upload Tasmota so that it can be connected to Home Assistant, and at the same time I will analyze its structure.

Purchase Sonoff POWR316D
A friend of mine gave me the Sonoff set so I could upload the firmware. My friend simply doesn't know anything about electronics and doesn't even have soldering equipment, but for me the equipment was included in the review. However, I know that it was bought in a Polish mail order store, you can search for it by name Sonoff POWR316D Elite16A WiFi smart POWER MEASUREMENT R3 : :
Sonoff Pow Elite switch and product packaging on an online store page.
Let's quote the product description:
Advertisement for the Sonoff POW Elite smart power meter with feature descriptions and an LCD display.
By default, the device uses the eWeLink application:
Sonoff POWR316D with LCD display and eWeLink packaging.
Specifications and dimensions:
Technical specifications of Sonoff POWR316D
Let's see what we get in practice:
Sonoff POWR316D box on a wooden table Sonoff POWR316D energy meter packaging on a wooden surface. Side of Sonoff box with QR code and eWeLink app information. Blue packaging of Sonoff POWR316D energy meter on a wooden surface. Sonoff POWR316D Elite16A boxes on a wooden surface.
The set does not include screws, but includes the module itself and a plastic hook/mounting mat:
Back of Sonoff POWR316D module with technical details on a wooden background. Sonoff POWR316D with LCD display in packaging
Instruction:
Sonoff POWR316D user manual in various languages. User manual for Sonoff POWR316D energy meter with multilingual text.
Sonoff POWR316D user manual in various languages. Sonoff device manual with illustrations and information on Bluetooth pairing. User manual for Sonoff device with multiple languages. Sonoff POWR316D user manual spread out on a desk. User manual for the Sonoff POWR316D device with text in multiple languages. Sonoff energy meter user manual unfolded on a table.

A short test without changing the firmware
To test, I connected an old lamp:
Sonoff POWR316D energy meter connected to a lamp Sonoff POWR316D energy meter with LCD display. Sonoff POWR316D with an LCD display showing energy consumption.
The display is not very readable, but it does its job. It alternately shows voltage, power, current and also the sum of consumed electricity, the counter of which can be reset in the application. Quite comfortable!

We look inside
Let's unscrew the screws. You can already see the transformer inside, there is probably a small impulse converter there, as well as some poor filters at the power input, this time there is probably even a varistor and a capacitor:
View of the interior of the Sonoff POWR316D module with electronic components on the PCB. Interior of the Sonoff POWR316D module showing electronic components. Interior of Sonoff energy meter with visible PCB and electronic components.
After unscrewing the screws, you can remove the board:
Interior of Sonoff POWR316D enclosure and PCB. Sonoff POWR316D circuit board with visible electronic components.
The display is controlled by TM1621:
Close-up of a circuit board with integrated circuits and TM1621 marking.
The heart of the device is ESP32, on the PCB right next to it you can also see SPI Flash memory with the program and a programming connector with RX and TX, I will mention IO0 later.
Close-up of the Sonoff POWR316D PCB with visible electronic components.
The integrated circuit at L4 looks like a step down converter to me, it probably provides 3.3V for ESP:
Close-up of the Sonoff POWR316D circuit board with visible components.
The CSE7759B is responsible for energy measurement:
Close-up of a circuit board with electronic components.
The main power supply is based on LP3667:
Circuit board inside Sonoff meter with visible electronic components
The high-current paths are additionally tinned, the photo also shows a resistor with a tolerance of 1% - shunt:
Sonoff POWR316D circuit board with visible electronic components.

POWR316D firmware change
The device is based on ESP32, you can upload Tasmota, either via esptool.py or via the online installer:
How to easily install Tasmota - online installer tasmota.github.io/install via a web browser
This time we solder four wires, power supply (3.3V), ground, RX and TX:
Sonoff PCB board with connected wiring and a breadboard.
IO0 is output to the button, so to enter the bootloader mode we must first press this button and then connect the power supply (3.3V power supply)
Of course, we perform all flashing operations away from the 230V network, everything must be completely disconnected, but this is rather obvious, as always.
I decided to use esptool.py because I always backup the firmware:
Screenshot of CMD program during the flashing of Sonoff POWR316D.
Then I loaded Tasmota:
Tasmota interface on ESP32-DevKit with configuration buttons
I found the template ready on the Blakadder website:

{"NAME":"Sonoff POWR316D","GPIO":[32,0,0,0,0,576,0,0,0,224,9280,0,3104,0,320,0,0,0,0,0,0,9184,9248,9216,0,0,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":1}

Uploading:
Tasmota configuration interface on ESP32-DevKit.
After activation:
Sonoff POWR316D user interface with Tasmota User interface of Sonoff POWR316D with Tasmota firmware showing energy consumption data.
The display also works:
White Sonoff energy meter with an LCD display showing measurements. White Sonoff energy meter on a wooden background Sonoff POWR316D connected to a lamp and a multimeter Sonoff POWR316D with a connected lamp and LCD display showing energy consumption.
After changing the firmware, the device requires calibration:
https://tasmota.github.io/docs/Power-Monitoring-Calibration/

Summary
A very cool gadget. The price is slightly higher than in the case of regular smart sockets with energy measurement, but in exchange we get a display, which in my opinion is more convenient than constantly reaching for the phone or web browser to check the measurements in Home Assistant. In general, it's hard for me to get used to the phone and I much prefer gadgets that also work without WiFi, such as this energy meter from the topic or, for example, an LED strip controller with a button (as opposed to LED strip controllers without buttons - yes, such are on sale, and then the WiFi runs out and you can't turn on the lights...). To sum up, for me this gadget is worth attention.
Does anyone use these types of Sonoff products? I invite you to share your impressions.

About Author
p.kaczmarek2
p.kaczmarek2 wrote 11876 posts with rating 9953 , helped 569 times. Been with us since 2014 year.

Comments

krzbor 22 Nov 2023 19:21

A very interesting device due to its display. The price is also quite decent. I found something similar: Link . I wonder if it's not even the same display. [Read more]

mfac 23 Nov 2023 09:21

It is tempting to check the measurement accuracy, especially for non-linear loads and PF [Read more]

szczukot 20 Apr 2024 10:11

Does anyone know how to control it themselves - without Tasmota ? Any API etc ? Because I'm struggling for the second day and it's lame. [Read more]

szczukot 20 May 2024 18:31

What exactly is the ESP32 chip in this device? [Read more]