Energy Meter HLW8012 Breakout Board voltage issue

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
asuz
Normal user
Posts: 175
Joined: 31 Oct 2018, 18:22

Energy Meter HLW8012 Breakout Board voltage issue

#1 Post by asuz » 18 Apr 2019, 16:42

Hi to all,
Recently I bought HLW8012 Breakout Board for using 8266 (mega-20190416). As I attach picture Voltage show only 2v value. The board connected to the city ​​electricity so it must be show at least 220 v. Is there any idea about that issue. Here is the settings and board. https://www.aliexpress.com/item/Energy- ... 4c4dGaYTFy
Attachments
hlw.jpg
hlw.jpg (55.18 KiB) Viewed 6347 times
2.png
2.png (57.22 KiB) Viewed 6347 times
1.png
1.png (35.85 KiB) Viewed 6347 times

rayE
Normal user
Posts: 144
Joined: 12 Oct 2017, 12:53
Location: Philippines

Re: Energy Meter HLW8012 Breakout Board voltage issue

#2 Post by rayE » 21 Apr 2019, 02:22

Hi,
1. Does ESPeasy read current and power correctly?
2. Do you need to set up the GPIO pins as input/output under the "Hardware" tab in the GUI?
3. Also try setting "pre defind pin settings" in the device to "SonOff POW (R1)"
4. Calibration? https://espeasy.readthedocs.io/en/lates ... /P076.html

Ray

asuz
Normal user
Posts: 175
Joined: 31 Oct 2018, 18:22

Re: Energy Meter HLW8012 Breakout Board voltage issue

#3 Post by asuz » 22 Apr 2019, 17:17

rayE wrote: 21 Apr 2019, 02:22 Hi,
1. Does ESPeasy read current and power correctly?
2. Do you need to set up the GPIO pins as input/output under the "Hardware" tab in the GUI?
3. Also try setting "pre defind pin settings" in the device to "SonOff POW (R1)"
4. Calibration? https://espeasy.readthedocs.io/en/lates ... /P076.html

Ray
What do you suggest about state of GPIO's? (input,default,output low,output high)
GPIO → SEL:
GPIO ← CF1:
GPIO ← CF:

rayE
Normal user
Posts: 144
Joined: 12 Oct 2017, 12:53
Location: Philippines

Re: Energy Meter HLW8012 Breakout Board voltage issue

#4 Post by rayE » 22 Apr 2019, 20:58

Hi,
You did not answer point 1+4? Here is my setup using Mega 20190202. If this still does not work TRIPLE check the connections from breakout PCB to your esp8266, are they connected to the right pins?
Attachments
Devices.jpg
Devices.jpg (153.56 KiB) Viewed 6278 times
Hardware.jpg
Hardware.jpg (140.7 KiB) Viewed 6278 times

asuz
Normal user
Posts: 175
Joined: 31 Oct 2018, 18:22

Re: Energy Meter HLW8012 Breakout Board voltage issue

#5 Post by asuz » 23 Apr 2019, 14:19

rayE wrote: 21 Apr 2019, 02:22 Hi,
1. Does ESPeasy read current and power correctly?
2. Do you need to set up the GPIO pins as input/output under the "Hardware" tab in the GUI?
3. Also try setting "pre defind pin settings" in the device to "SonOff POW (R1)"
4. Calibration? https://espeasy.readthedocs.io/en/lates ... /P076.html

Ray
Thanks for the responce, I use a 18 watt twisted bulb to test the board, so here is the picture and answer of your questions;
4-a.jpg
4-a.jpg (2.66 MiB) Viewed 6252 times

1. Does ESPeasy read current and power correctly? >No, not read correctly
2-a.png
2-a.png (47.96 KiB) Viewed 6252 times
2. Do you need to set up the GPIO pins as input/output under the "Hardware" tab in the GUI? > Yes, I test with all possibilities and left them default
1.png
1.png (59.75 KiB) Viewed 6252 times
3. Also try setting "pre defind pin settings" in the device to "SonOff POW (R1)" > I try it with pre defined settings but no succeed
3.png
3.png (57.39 KiB) Viewed 6252 times
4. Calibration? https://espeasy.readthedocs.io/en/lates ... /P076.html > I haven't calibrate yet but I think it will not a solution because values are very diffret to calibrate see board show that 5 V voltage but actually it must be around 220 V

I noticed that, when I choose pre defined setting for pow there is nothing at the page of "Show Pin state buffer".
5b.png
5b.png (48.46 KiB) Viewed 6252 times
Is not it strange? I think there is something related p076 plugin?

rayE
Normal user
Posts: 144
Joined: 12 Oct 2017, 12:53
Location: Philippines

Re: Energy Meter HLW8012 Breakout Board voltage issue

#6 Post by rayE » 23 Apr 2019, 14:38

Try Mega 20190202 Sonoff build, this works for me then do a calibration. Below is my pin state buffer.
Attachments
pinstate.png
pinstate.png (68.08 KiB) Viewed 6247 times

rayE
Normal user
Posts: 144
Joined: 12 Oct 2017, 12:53
Location: Philippines

Re: Energy Meter HLW8012 Breakout Board voltage issue

#7 Post by rayE » 23 Apr 2019, 15:26

I haven't calibrate yet but I think it will not a solution because values are very diffret to calibrate see board show that 5 V voltage but actually it must be around 220 V
You need to calibrate the thing before ANYTHING else! Do this first before wasting time chasing your tail :-)

asuz
Normal user
Posts: 175
Joined: 31 Oct 2018, 18:22

Re: Energy Meter HLW8012 Breakout Board voltage issue

#8 Post by asuz » 16 Jul 2019, 15:03

rayE wrote: 23 Apr 2019, 15:26
I haven't calibrate yet but I think it will not a solution because values are very diffret to calibrate see board show that 5 V voltage but actually it must be around 220 V
You need to calibrate the thing before ANYTHING else! Do this first before wasting time chasing your tail :-)
Thanks for your suggestion, yes the calibration works. But i think there is an issue about reporting the different device property (V,A,W). It always needs new calibration for new devices. Anyways your suggestion solve my big question mark :)

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Energy Meter HLW8012 Breakout Board voltage issue

#9 Post by TD-er » 16 Jul 2019, 19:36

For testing such power monitoring parts like these, you can better test with other consumers first.
A light like you showed has a very bad power factor.
It is better to first test it with no load connected (just measuring voltage) and then using some truly Ohm load like a old fashioned light bulb or a heating element.
Those have a cos phi of 1 or very close to 1.
Testing with LED lights or those you showed do introduce all kinds of unknowns since the current they draw is hardly related to the AC voltage and thus the reported current or power may be off quite a bit.

Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests