Multichannel Home Electricity Monitoring System

Started by Christo Radev, January 07, 2023, 04:36:13 PM

Previous topic - Next topic

Christo Radev

Hi to All

This is my first post after loosing my account as chradev. This new topic is about development of Multichannel Home Electricity Monitoring System (MEM System) based on ATMEGA32U4 MCU for real time processing and LIME2-SERVER for all other activities.

The project will be open source as both hardware and software.

Simple alternative of MEM (Multichannel Electricity Monitoring) system was successfully prototyped and tested with modified version of emonLibCM on Leonardo compatible board (AVR-T32U4 by Olimex).



It works fine with all 12 ADC single ended inputs. The test were made with simulation of currents up to 20A and scan period of 1 sec. Typical output in JSON format looks like:

{ Va: 227.90, Hz: 50.016, Sp: 1,
  Ia: [ 16.098, 16.080, 16.074, 16.075, 16.077, 16.076, 16.075, 16.077, 16.077, 16.075, 16.074 ],
  PF: [ 0.9997, 0.9998, 0.9999, 0.9999, 0.9999, 0.9999, 0.9999, 0.9998, 0.9998, 0.9997, 0.9997 ],
  Wr: [  3668,  3664,  3663,  3663,  3664,  3663,  3663,  3663,  3663,  3662,  3662 ],
  Wa: [  3669,  3665,  3663,  3664,  3664,  3664,  3664,  3664,  3664,  3663,  3663 ],
  Wh: [    47,    46,    46,    46,    46,    46,    46,    46,    46,    46,    46 ],
}

More details can be seen in updated version of Multichannel Home Electricity Monitoring System.

The functionality of emonLibCM was achieved by very simple changes in the library tied mainly with ability to access more ADC features of ATMEGA32U4 MCU.

This is the first step to use all ADC features especially differential inputs and the gain control of the internal opp amp.

Regards
Chris

LubOlimex

Welcome back, very interesting project. Everything looking good! Very well described!
Technical support and documentation manager at Olimex

Christo Radev

Quote from: LubOlimex on January 09, 2023, 11:24:13 AMWelcome back, very interesting project. Everything looking good! Very well described!

Thanks Lubomir, I have a problem to put an image but finally it's o.k.

Christo Radev

#3
Hi to All

The prototype of MEM system (simple alternative) was tested with single ended connections to the following sensors:
  • ANG AC-AC adapter 9V/6VA as voltage sensor
  • SCT013 100A 50mA as current sensor for total consumption
  • HWCT-5A/5mA as current sensor for local circuits

Using of a transformer as both voltage sensor and current source for CT calibration was also tested. Special attention was paid to the influence of the distortion of the shape of the signals.  The summary of the history in pictures and graphs is shown on the following picture:



More details can be seen in updated version of Multichannel Home Electricity Monitoring System.

The functionality of emonLibCM was upgraded with simple changes in the library and the sketch to capture and send via USB serial waveform data from voltage and one of the current sensors every second.

The next steps are to modify Olimex AVR-T32U4 board adding following MEM system features:
  • AVCC/2 reference voltage
  • Interconnection to all 11 current and 1 voltage sensors
  • Battery powering and charging options
  • Powering and charging from both USB and AC-AC adapter

Advanced AC-AC adapter with calibration current source is also planed for prototyping and testing with kind help of ANG experts.

I also hope for the kind help from Olimex experts in designing the extended AVR-T32U4 board.


Regards
Chris

Christo Radev

#4
Hi to All,

The next step to connect more current sensors via differential ADC inputs was relatively successful. The summary of the results can be seen on the following picture:

and on the updated version of the file Multichannel_Home_Electricity_Monitoring_System.pdf

Unfortunately, there are some problems in some of the calculations so any help is welcome.

Regards
Chris

Christo Radev

Hi to All,

I am glad to say that the first stage of development of MEM system (simple alternative) is finished. The main hardware details are tested as prototype and software is ready as alpha version. The main results can be seen on the following picture:



More datails can be found on updated version of the file Multichannel_Home_Electricity_Monitoring_System.pdf

Any questions and comments are welcome.

Best regards
Chris

Christo Radev

Hi to All,

While working on advanced variant of MEM system two new test scenarios was tested. The best results was obtained with sinusoidal generator implemented on Olinuxino-Nano tanks to FrequencyGenerator ver. 1.00 2-5-21 written by Rick Groome. 60W audio amplifier and 10VA toroidal transformer was used to produce galvanic isolated and stable 230V/50Hz voltage and currents up to 20A.



More details can be found on updated version of the file Multichannel_Home_Electricity_Monitoring_System.pdf

Any questions and comments are welcome.

Best regards
Chris

Christo Radev

Hi to All,

Implementation of MEM system test bench (Ver. 3) was finished and looks like:



Best regards
Chris

Christo Radev

Hi to All,

These days I have worked on the latest details of MEM-System and its test bench staff:



Unfortunately, I come upon problems to power audio amplifier with 20Vdc using BB-PWR-3608. The power consumption is less than 200mA (away form the limits like 1A@12V and 0.5A@24V).

The first problem I found is heating of BB-PWR-3608 if the input power is 5V (USB) or 3.6V (BAT2) from OLIMEXINO-NANO and OLIMEXINO-NANO-BAT via OLIMEXINO-NANO-BB. I have try with bigger input voltages (12V from external battery) and the heating is normal. I did not find any recommendations (even in MT3608 datasheet) about dissipated power vs Output/Input voltage ratio or other limitations.

Does somebody run on this problem and is there other solution except using higher input voltage?

The other problem is that when enable audio amplifier (mute off) OLIMEXINO-NANO start resetting continuously. The problem comes from bigger startup consumption. Unfortunately, I could not solve this problem neither by adding capacitors before and/or after BB-PWR-3608 nor powering it from BAT2 of OLIMEXINO-NANO-BAT via OLIMEXINO-NANO-BB. The only working scenario is to power it from external battery or stabilized power supply like HY3005D (not acceptable because of requirements for autonomy and complete mains isolation).

Did somebody have an idea how to solve this problem without using separate battery?

While trying to solve above problems I tested solution with 2x BB-PWR-3608 modules - first  stepping up the BAT2 voltage (3.6V) up to 12V and second - stepping it up to 20V (as required). Unfortunately, I could not finish my tests because one of the BB-PWR-3608 modules I have died.

Did somebody gives a try to use cascaded BB-PWR-3608 modules to avoid heating and startup overloading?

Unfortunately, using additional battery is not acceptable in case of having LiPo BAT2 for powering OLIMEXINO-NANO so some ideas how I can solve these problems are welcome.

Best regards
Chris

Christo Radev

#9
Hi to All,

These days I have worked to avoid the problems in MEM system test bench described before. The small changes were done and the things look like:





The main changes were around the power supply of the audio amplifier. Using higher input voltage for the DC-DC convertor and separating it from MCU power supply solve the problems and makes it possible to work autonomously up to 8 hours. Of course using 5V/1A and 12V/2A adapters instead of batteries is also possible but may have some side effects. Even DC-DC convertor is optional if 24V/2A adaptor is used but should be tailored to the requirements of the audio amplifier.

More details can be found on updated version of the file Multichannel_Home_Electricity_Monitoring_System.pdf

Best regards
Chris

Christo Radev

#10
Hi to All,

MEM system test bench was tested and works fine with single adapter (5V/1.5A + 12V/1.5A) instead of batteries. It simulates 50Hz sinusoidal voltage up to 250Vac and current up to 16/64Aac while the total power consumption is only 4.5W (370mA@12V).



Special attention was paid to the common ground to prevent the influence of the high starting current of the audio amplifier on the MCU. The main 12V supply and the common GND are connected to the DC-DC convertor and the audio amplifier boards. Voltage and current measurement device is also connected between the power supply and the other boards. The common GND of the DC-DC convertor and the audio amplifier boards is connected to the MCU board together with its output sinusoidal signal. Only the 5V of the power supply is connected to the MCU board while the common GND is taken via the DC-DC convertor and the audio amplifier boards.



Best regards
Chris

Christo Radev

#11
Hi to All,

After the test bench was finished successfully new tests of MEM system were done and the results are shown on the picture below:




The main conclusion is that the latest variant of the test bench makes it possible to use stable, well-formed and well controlled voltages (up to 250V) and currents (up to 16/64A) at consumption less than 5W. On the other hand the influence of the waveforms distortion over the measured values is relatively small (deviations are less than 1.15%).

More details can be found on updated version of the file Multichannel_Home_Electricity_Monitoring_System.pdf

Best regards
Chris