Electricity meter using ZUNO_METER

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Post Reply
commonswift
Posts: 4
Joined: 28 Nov 2017 16:06

Electricity meter using ZUNO_METER

Post by commonswift » 28 Nov 2017 16:18

Hi,

I am new to this forum and to Z-uno, but I can sure see a lot of interesting uses for the Z-uno. I have done some webprogramming but I am also new to Arduino. As my first "real" project I would like to create a device to put in the cabinet where my electricity meter is residing. I plan to install relays/contactors to control electric heating (2-phase -> difficult to switch with ordinary Z-wave switch devices) and some other utilities, but the main reason for putting a Z-uno in the cabinet is to measure the overall electricity consumption of my house.

On my electricity meter is a LED that flashes 1000 times for a consumed kWh and I want to use the LED as an inobtrusive way to measure energy usage. From what I've seen, the meterLED in my house seems to flash with ca 0.2 - 5 Hz (but sure I havent watched it a lot :-). Ideally one could get the momentary power use too by measuring the pulse intervals, but that would be a next step. I would hook up a LDR or photodiode close to the LED indicator. This has already been one by others using arduinos.

I assume that I could more or less copy the "Water meter" example (which also has EEPROM backup) for the meter part, but just use one meter channel and change meter type from WATER to electric. Hardware will be crammed into a 2-unit wide DIN container to make it look nice & safe. If I get it to work I'll post the design.

When I study the "Water meter" example, there are some things I dont really get. What is the TICK_VALUE constant doing? Is it scaling the count values to m3 values? Does this mean that the water meter get one tick every 100 litres? So if I want to scale my electricity meter to kWh then I would instead divide the ticks by 1000. The very last line in the "loop" states a delay of 100ms, is this necessary? The LED in my electricity meter flashes very briefly, I guess shorter than 100ms so I cant keep this delay I assume. Can I just delete it?

If the resetter is run, does it actually zero also the EEPROM content?

If someone has an answer or two or any comment I'd appreciate it, otherwise I'll just try out and learn. I'm of course happy to share the code I've put together so far.

Johan

knst08
Posts: 28
Joined: 15 Oct 2017 20:14

Re: Electricity meter using ZUNO_METER

Post by knst08 » 04 Dec 2017 19:07

Just solved quite similar problem - device is on din rail in boiler room controls 8 energy consumers (5 circulation pumps, well pump, filtering system etc). 8 relay controlled loads in total. I used acs712 (http://henrysbench.capnfatz.com/henrys- ... er-manual/ ) for measuring power consumption. Why do not you like use couple of these (one for each phase) instead of optical reading?
In this case you will need once per 30 seconds (minimum allowed report interval in z-wave for sensors) run series of current measures i.e. get samples within 500ms (10 periods of 50Hz sin ) , get RMS, multiply by volts in network and get power consumed then report sum of power collected on 2 acs712 as your consumption.

commonswift
Posts: 4
Joined: 28 Nov 2017 16:06

Re: Electricity meter using ZUNO_METER

Post by commonswift » 05 Dec 2017 23:47

Many thanks for the suggestions! I have actually looked into using ACS712 for a 2-phase heater, for all the 1-phase devices it is simpler to just use a wall plug with energy meter. But there are some reasons why I would like to try using the blinking LED on the meter, which would tell me total consumption of the entire home; 1) Hardware is simpler (just a resistor + LDR), safer and less intrusive than wiring in 3x ACS712 in the main feed. 2) I assume that the coding would be simpler too; no need to measure and calculate RMS values etc., the "calibration" is already done in the electricity meter and I am trying to reuse some code from the water meter example.

I have made a first attempt and controlling relays/door tamper was of course very straightforward. Although it took a surprisingly long time, an energy meter finally appeared in the UI7 web interface of my Vera Plus. Less surprisingly, the energy consumption meter does not update at all, but I will keep testing.

kartono
Posts: 5
Joined: 09 Mar 2018 08:59

Re: Electricity meter using ZUNO_METER

Post by kartono » 21 Mar 2018 14:53

Hi knst08,

im trying to setup acs712, would be be able to post the sketch for me to look at how you did it?.

thanks

perjar
Posts: 29
Joined: 08 Apr 2018 18:02

Re: Electricity meter using ZUNO_METER

Post by perjar » 25 Sep 2018 13:40

Hi,

I am in the process of building an electricity meter which reads the light pulses on the "official meter".
I am not completely done yet. I have the HW and the program logic ready and tested. It is stable and has been running for a while. BUT, I have not yet connected the z-uno to the z-wave controller. Up until now it runs stand alone just so I can verify that the sketch is stable etc.

I purchased a pulse sensor from Open Energy Monitor and it works really well.
https://openenergymonitor.com/optical-u ... se-sensor/

I have recently come across some issues though so right now I am a bit stuck.
https://forum.z-wave.me/viewtopic.php?f ... rom#p78948

Update:
The hang/unhang issue referred to above somehow sorted itself out. I have no idea how but I am grateful that it works now.

I have taken the next step now and included the device in the z-wave network which is controlled by a Fibaro HC2 controller.

The next challange that has presented itself is how to get the data properly accepted into the controller.
I have defined two channels: One that reports the current power consumption (watts) and one for energy consumption (kWh).
These two channels pop up as two devices in the HC2 and are identified as devices reporting in W and kWh respectively. So far so go good.
However, the HC2 shows 0 W and 0 kWh in the user interface. But if I look at the attributes of the power meter device, it reports the correct number of watts in the "power" attribute, but "0" in the "value" attribute which I think is that the user interface is showing.

This is what it looks like in the user interface:
Electricity meter in HC2.PNG
Electricity meter in HC2.PNG (19.27 KiB) Viewed 123 times
The values in the footers are correct and are coming from the z-uno. But as you can see, the main values displayed are just zero.

Further to this, the energy panel in HC2 does not include my z-uno reports in the data it presents.

Has anyone successfully integrated the ZUNO_METER_TYPE_ELECTRIC channel into a HC2?

Post Reply