With the PiLogger you are also able to measure electric energy consumption - with some restrictions...*

Talking about electricity metering means you want to know how much electric energy a certain device is consuming (or generating) within a certain time. The amount of energy is derived from the product of power times the time difference.

Therefore, to measure the energy you have to integrate up the consumed or delivered power for the respective time interval. If the power is constant within this time span, it is sufficient to perform one measurement of the momentary power for this time span. But normally the power will fluctuate and it is necessary to measure it repeatively within the time span and to calculate an average value.

The transition from direct current (DC) to alternating current (AC) is actually fluent. From the sense of the word directed current is an electric current which does not change its direction. But if the current strength changes, for instance fluctuates around an average value, we will get a hybrid containing a directed current part with constant strength plus a part of alternating current - although the current does not change its direction all the time. For a correct measurement the speed of the change is now the important point. From that the requirements for the frequency of measuring the momentary value derives.

The PiLogger is designed for long term data acquisition. On the other hand it is capable to perform the measurements on all 4 channels including the calculation of the power and the average values within 84 msec. This means it can perform 10 measurements per second. This is good enough for many applications which actually target to constant directed current, but really operate with current which changes more or less. For example charging and discharging a battery. In that case the battery itself acts like a big capacitor - but unfortunately like a very slow one. To avoid too fast and too big current changes it is good practice to add buffer capacitors, for instance electrolytic capacitors. This is healthy for the overall system and also helps to get correct measurements.

For not that sopisticated measurements (more normal) intervals of 2 to 10 seconds are sufficient, which are averaged within time slices of 1 to 10 minutes. For that purpose the Raspberry just counts the interrupts from the PiLogger (measurement interval) and then stores them with that log interval.

The PiLogger can't acquire negative voltages, but instead positive and negative currents. By that the sign of the power values corresponds to actions like charging and discharging a battery, or in other terms energy harvest and energy consumption.

The free of charge and free open source software PiLogger WebMonitor provides a comfortable way to monitor the measurement values including the  energy values and their timeline as charts. You also can download the log data files easily:

PiLogger WebMonitor - Monitoring and Logging via Network - Without Cloud and Foreign Servers.

PiLogger WebMonitor Live ValuesThe base for power measurement of course is measuring voltage and current - on which you can read here: Voltage and current measurement with Raspberry and PiLogger.

Further details you can find in Technical Data PiLogger One and in the detailed manual.

Buy the PiLogger

* Attention: The PiLogger is designed for small DC voltages and therefore must not be connected to public power lines !