Board/OPM/OPM1126-dat/2023-10-24-12-20-00.png
... ...
Binary files /dev/null and b/Board/OPM/OPM1126-dat/2023-10-24-12-20-00.png differ
Board/OPM/OPM1126-dat/2023-10-24-13-10-51.png
... ...
Binary files /dev/null and b/Board/OPM/OPM1126-dat/2023-10-24-13-10-51.png differ
Board/OPM/OPM1126-dat/OPM1126-dat.md
... ...
@@ -3,9 +3,43 @@
3 3
4 4
5 5
6
+## Pin Definitions
7
+
8
+![](2023-10-24-12-20-00.png)
9
+
10
+
11
+Input Side
12
+
13
+- N: the AC Mains Supply side of the neutral
14
+- L: the AC Mains Supply side of the Live
15
+- L-Load: the measure side of the load of the AC Mains Live
16
+- N: the measure side of the load of the AC mains neutral
17
+
18
+Output Side
19
+
20
+- 5V
21
+- GND
22
+- Sel - Configure the effective value output pin with pull-down
23
+- CF1
24
+ - SEL = 0, output current, duty 50%
25
+ - SEL = 1, output voltage, duty 50%
26
+ - indicating current or voltage rms
27
+ - using '''SEL''' selection
28
+ - ± 0.5% accuracy in the 500: 1 range
29
+- CF: output the high freqency of the power use, 50% duty
30
+ - indicating active power
31
+ - in the range of 1000: 1
32
+ - ± 0.3% accuracy
33
+
34
+
35
+## SCH
36
+
37
+![](2023-10-24-13-10-51.png)
6 38
7 39
## ref
8 40
9
-- [[HLW8012-dat]]
41
+- [[HLW8012-dat]] - [[HLW8032-dat]] - [[HLW-dat]] - [[ac-mains-dat]] - [[power-meter-dat]]
42
+
43
+Boards - [[OPM1126-dat]]
10 44
11 45
- [[OPM1126]]
... ...
\ No newline at end of file
Tech/Energy-meter-dat/energy-meter-dat.md
... ...
@@ -1,25 +0,0 @@
1
-
2
-# energy-meter-dat
3
-
4
-
5
-
6
-## Code Documentation
7
-
8
-* [HLW Datasheet please find here](https://github.com/Edragon/Datasheet/tree/master/HLW)
9
-* [All demo codes please find here](https://bitbucket.org/e_dragon/hlw)
10
-* Arduino demo code please see our arduino github.
11
-
12
-## Other energy meters Reference
13
-
14
-Other reference, energy monitor ICs:
15
-* ATT7309
16
-* ADE7758
17
-* 锰铜取样电阻
18
-* CS5460
19
-* https://github.com/zerog2k/power_meter_cs5460a
20
-* https://www.solo-labs.com/diy-digital-ac-watt-meter/
21
-
22
-
23
-
24
-
25
-- [[HLW-dat]] - [[HLW8012-dat]] - [[HLW8032-dat]]
... ...
\ No newline at end of file
Tech/power-dat/AC-Mains-dat/ac-mains-dat.md
... ...
@@ -0,0 +1,9 @@
1
+
2
+# ac-mains-dat
3
+
4
+
5
+- The live wire of domestic circuits is usually red and is at high voltage.
6
+- The neutral wire is black and has voltage close to that of the ground.
7
+- The potential difference between these two wires in India is about 220 V.
8
+- The earth or ground wire provides safety against faults and current leaks.
9
+- Earth pin is longer to ensure earth connection happens first while connecting and last while disconnecting any devices.
... ...
\ No newline at end of file
Tech/power-dat/power-meter-dat/power-meter-dat.md
... ...
@@ -0,0 +1,37 @@
1
+
2
+# energy-meter-dat
3
+
4
+
5
+
6
+## Code Documentation
7
+
8
+* [HLW Datasheet please find here](https://github.com/Edragon/Datasheet/tree/master/HLW)
9
+* [All demo codes please find here](https://bitbucket.org/e_dragon/hlw)
10
+* Arduino demo code please see our arduino github.
11
+
12
+## Other energy meters Reference
13
+
14
+Other reference, energy monitor ICs:
15
+* ATT7309
16
+* ADE7758
17
+* 锰铜取样电阻
18
+* CS5460
19
+* https://github.com/zerog2k/power_meter_cs5460a
20
+* https://www.solo-labs.com/diy-digital-ac-watt-meter/
21
+
22
+
23
+## Applications
24
+
25
+* SONOFF POWER SCH - https://wiki.iteadstudio.com/images/5/52/Sonoff_POW_Schematic.pdf
26
+* SONOFF SCH - https://wiki.iteadstudio.com/images/f/ff/Sonoff-Schematic.pdf
27
+* SONOFF S31 / S31 Lite -
28
+Blitzwolf SHP5
29
+* https://www.blitzwolf.com/BlitzWolf-BW-SHP5-3680W-EU-Wifi-Socket-Smart-Charger-with-Dual-USB-Ports-Compatible-with-French-Standard,-Works-with-Alexa,-Scheduled-Control,-Remote-Control,-Monitor-Power-Use-p-326.html
30
+
31
+
32
+Software
33
+* https://tasmota.github.io/docs/Power-Monitoring-Calibration/
34
+
35
+
36
+
37
+- [[HLW-dat]] - [[HLW8012-dat]] - [[HLW8032-dat]]
... ...
\ No newline at end of file
chip-cn/HLW/HLW8012-dat/2023-10-24-12-20-00.png
... ...
Binary files a/chip-cn/HLW/HLW8012-dat/2023-10-24-12-20-00.png and /dev/null differ
chip-cn/HLW/HLW8012-dat/HLW8012-dat.md
... ...
@@ -1,44 +1,47 @@
1 1
2 2
# HLW8012-dat
3 3
4
-![](2023-10-24-12-20-00.png)
4
+### Hardware Design Note
5
+* Board AC Mains is be NOT isolated.
6
+* Better use optical-coupler to send isolated signal to your MCU.
7
+* MCU better use seperated power supply to HLW8012.
5 8
6
-## Pin Definitions
9
+#### other note
10
+* Built-in crystal, 2.43V voltage reference source and power monitoring circuit
11
+* 5V single power supply, operating current less than 3mA
7 12
8
-Input Side
13
+#### Sample resistor
9 14
10
-- N
11
-- L
12
-- L-Load
13
-- N
15
+* Sample Resistor is 0.002R, 2mR (diameter 2.5mm, rate current is 20A. space is 10mm, height 7.5mm, "door" shape).
14 16
15 17
16
-
17
-Output Side
18
-
19
-- 5V
20
-- GND
21
-- Sel - Configure the effective value output pin with pull-down
22
-- CF1
23
- - SEL = 0, output current, duty 50%
24
- - SEL = 1, output voltage, duty 50%
25
-- CF: output the high freqency of the power use, 50% duty
26
-
27 18
## Calculatoin
28 19
29 20
![](2023-10-24-12-28-02.png)
30 21
31
-* F_cf = (V1xV2x48)/(V_ref)^2 x (F_osc/128)
32
-* F_cf1 = (V1x24)/(V_ref) x (F_osc/512)
33
-* F_cfu = (V2x2)/V_ref x (F_osc/512)
34 22
35 23
24
+ F_cf = (V1xV2x48)/(V_ref)^2 x (F_osc/128)
25
+ F_cf1 = (V1x24)/(V_ref) x (F_osc/512)
26
+ F_cfu = (V2x2)/V_ref x (F_osc/512)
27
+
28
+Note
29
+
36 30
* Fcf = Power, Fcf1 = current, Fcfu = voltage
37 31
* V1: Voltage signal on the current channel pin
38 32
* V2: Voltage signal on voltage channel pin
39 33
* Fosc: built-in crystal, the typical frequency of about 3.579MHz;
40 34
* Vref: built-in reference source, the typical voltage is 2.43V
41 35
36
+## Use with ESP8266
37
+
38
+* The demo code will monitoring the power, current, voltage and frequency, you can monitor it via telnet to see remote debug output, same as serial output, but safe when AC main power connected.
39
+* Pin definition to esp8266 please see the comments in sketch
40
+* Also can calibrate the parameters, see the comments in sketch
41
+* Enter SSID and password in the sketch, run the demo code first to see IP address
42
+* Connect to AC main power, login remotely via telnet, in windows for example, command: telnet 192.168.0.100
43
+
44
+* [Demo code here](https://github.com/Edragon/esp8266_arduino/tree/master/HLW8012/remote_debug)
42 45
43 46
44 47
## Demo
... ...
@@ -48,4 +51,14 @@ https://www.youtube.com/watch?v=0aiuwRB8Uic
48 51
49 52
## DS
50 53
51
-- [[HLW8012-HLW-REV1.3.pdf]]
... ...
\ No newline at end of file
0
+- [[HLW8012-HLW-REV1.3.pdf]]
1
+
2
+
3
+
4
+## ref
5
+
6
+- [[HLW8012-dat]] - [[HLW8032-dat]] - [[HLW-dat]] - [[ac-mains-dat]] - [[power-meter-dat]]
7
+
8
+Boards - [[OPM1126-dat]]
9
+
10
+- [[OPM1126]]
... ...
\ No newline at end of file