Site Tools


en:tech:powermeter

This is an old revision of the document!


PowerMeter

Motivation

The annual electricity bill can be surprising if, for example, you are a single household with over 3500KWh. Switching providers may also help to reduce costs, but of course it is better to reduce consumption. But how do you get consumption without using an ammeter behind every device?
One method is to build a three-phase energy meter directly into the fuse box. Among other things, you can get here inexpensive versions for less than 50 €,

The trusted electrician will help with the installation in the fuse box if you don't trust yourself to do it.
The one I have selected shows the current and accumulated power consumption summed up for all phases. What many of these electronic electricity meters have in common is that they also output the current consumption via a potential-free S0 interface (not to be confused with an ISDN S0 bus). Wikipedia explains how it works. If you want to record the delivered values and evaluate them later, you need a data logger. In the following I will present my solution.

S0 signal

The first task is to investigate into the S0 interface and then make it available for evaluation in our home WiFi. Let's take a look at the S0 signal, which comes from a three-phase meter:

There are pulses of approx. 44ms and the interval between the pulses reflects the current consumption. In the example it is 19.25 seconds. According to the device specification, we can expect 1000imp / KWh. This is also noted on the front of the meter. This results in the calculation formula for the consumption of:

W [Watt] = 3600 / X [sec]
W = 3600 / 19.25 = 187 watt

To determine the consumption, we therefore need a time measurement with min of tenths of a second resolution.

Structure

If you want to use WiFi with your own projects, it is always advisable to first take a look at the ESP8266 modules.

 ESP-07

One of the simplest approaches is an ESP-07 with the open source firmware ESP Easy. In fact, we can manage to implement the above task without our own programming.
But first let's fix the electrical and mechanical structure. The circuit diagram is very clear and is similar to the bed sensor project here elsewhere. The circuit has three S0 inputs if you want to evaluate the phases individually. I only used one in my installation because you already know that I get the total consumption delivered.

The internal pull-ups supply the optocoupler of the three-phase meter, so the impulse can be recognized at the respective pins. The diodes D1-D3 are only used to protect against polarity reversal and are not absolutely necessary. Of course, the S0 lines can also be connected directly to the module, thus avoiding the PCB with free wiring. For my solution, however, I created a PCB.

The S0 lines are connected using screw terminals. The power supply can also be plugged in with a 5.5 / 2.1mm socket. For this you can find very inexpensive plug-in power supplies with a stabilized 3.3V DC voltage output. The PowerMeter does not need more wired connectivity.

With a 3D printer, an inconspicuous housing can be realized which can easily be attached with double-sided adhesive tape outside the fuse box.

Programmierung

en/tech/powermeter.1611228252.txt.gz · Last modified: 2021/01/21 11:24 by bullar