Cheap Chinese Power Meter made wireless

In this subforum you can show projects you have made, or you are busy with. Please create your own topic.
SweetPants
Posts: 1517
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V3.8590
Location: The Netherlands
Contact:

Cheap Chinese Power Meter made wireless

Post by SweetPants » Saturday 18 July 2015 15:46

Just succeeded in making a cheap Chinese Power meter wireless using ESP-07 and MQTT.
Below picture is the test setup.
IMAG0032_1.jpg
IMAG0032_1.jpg (198.34 KiB) Viewed 8448 times
The output on my ESP device topic looks like
/Domoticz/MQTT/Device ESP_009D5CDF,247.3,17.7
/Domoticz/MQTT/Device ESP_00A1B476,1
/Domoticz/MQTT/Device ESP_009D5CDF,247.3,17.7
/Domoticz/MQTT/Device ESP_009E69A1,1
/Domoticz/MQTT/Device ESP_009E6AC0,1
The one with a single digit are MQTT switches (1 = off, 0 = on)
The dual digit one is the MQTT power meter Volt/Watt which updates every second for now

PS: Voltage looks high but that is due to the 1:1 safety transformer I used during testing.
The PowerMeter PSU is not suitable to drive the ESP and is directly connected to the mains so I will add a cheap $2 PSU in there too.

User avatar
ThinkPad
Posts: 1754
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: Cheap Chinese Power Meter made wireless

Post by ThinkPad » Saturday 18 July 2015 22:24

This is so cool!

I guess you based this project upon reading this:
http://gizmosnack.blogspot.nl/2014/10/p ... -hack.html
http://gizmosnack.blogspot.nl/2014/11/p ... eless.html

?

I was also busy doing that (i am the 'Frank' from the reactions on the first article) and had it even working in Domoticz (Arduino reading the meter, ESP8266 transmitting the values to virtual sensors in Domoticz). But like you said: the powersupply in the wattmeter isn't capable enough of powering all those 'parasite' modules that you/we connected. So therefore i never finished it. I was also thinking about popping in a cheap power supply, but after reading this, i don't trust these cheapo chargers from China for a single bit. Really dangerous designs being made there :shock:

Can you share your code? Maybe i will pick it up when i am bored and have some spare time :mrgreen:

P.S. Be careful when testing, the author of those articles alerted that the datalines could carry 230V! When i was fiddling with the wattmeter being powered, i had it powered through an UPS running on batteries. Otherwise you could fry your PC because 230V could be blasted through your USB-port. Or is the 'MURR' device in your picture a isolation transformer?
ThinkTheme - theme for Domoticz
My (Dutch) blog: http://thinkpad.tweakblogs.net - My Domoticz scripts: Bitbucket
I'm not (very) active anymore on this forum as i don't use Domoticz anymore.

SweetPants
Posts: 1517
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V3.8590
Location: The Netherlands
Contact:

Re: Cheap Chinese Power Meter made wireless

Post by SweetPants » Saturday 18 July 2015 22:35

Yes, this is based on the articles you mentioned, but now with ESP only, so no Arduino in between the meter and the ESP. The ESP is sending MQTT data directly to my broker. From there I pick it up using NodeRed and do what I want it to do.

I'm using these PSU's http://www.ebay.com/itm/AC-DC-5V-700mA- ... 487ffca15f
Working great for several months now in my (5) MQTT switches.

Yes, the Murr is an isolating transformer just for testing

User avatar
ThinkPad
Posts: 1754
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: Cheap Chinese Power Meter made wireless

Post by ThinkPad » Monday 20 July 2015 14:25

Can you share your code/schematics?
ThinkTheme - theme for Domoticz
My (Dutch) blog: http://thinkpad.tweakblogs.net - My Domoticz scripts: Bitbucket
I'm not (very) active anymore on this forum as i don't use Domoticz anymore.

SweetPants
Posts: 1517
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V3.8590
Location: The Netherlands
Contact:

Re: Cheap Chinese Power Meter made wireless

Post by SweetPants » Monday 20 July 2015 15:03

I'm still in the prototype phase, just ordered the first PCB v1.0. Also need to figure out how to use JSON with the ESP instead of CSV separated values. If you send me a PM, i will share the first info with you.

User avatar
ThinkPad
Posts: 1754
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: Cheap Chinese Power Meter made wireless

Post by ThinkPad » Monday 20 July 2015 15:06

Nah, don't need it directly. But like i said: maybe i will pick this up again when i am bored on a Sunday afternoon or so ;) Having the info available would be nice then.

But if i understand correctly you send out a PCB-design (made by yourself) to the producer? Interesting!
ThinkTheme - theme for Domoticz
My (Dutch) blog: http://thinkpad.tweakblogs.net - My Domoticz scripts: Bitbucket
I'm not (very) active anymore on this forum as i don't use Domoticz anymore.

SweetPants
Posts: 1517
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V3.8590
Location: The Netherlands
Contact:

Re: Cheap Chinese Power Meter made wireless

Post by SweetPants » Monday 20 July 2015 15:40

Yep, see below for ESP-7. ESP-12 will work also I think.
v1.0.png
JP1 connects to separate 5V PSU
JP2 connects to meter (CLOCK, MISO, MOSI, GND)
JP3 used to load new software (disconnect meter, hook up serial port with 5V to power the ESP (through 3.3 v regulator.
The rest of the components is to level shift 5v -> 3.3v and buffer the ESP from the outside.

SweetPants
Posts: 1517
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V3.8590
Location: The Netherlands
Contact:

Re: Cheap Chinese Power Meter made wireless

Post by SweetPants » Saturday 26 September 2015 18:11

Finished my first Wifi ESP8266 MQTT Power Meter:
PM_11.jpg
Inside
PM_11.jpg (175.56 KiB) Viewed 7667 times
PM_21.jpg
outside
PM_21.jpg (107.25 KiB) Viewed 7667 times
output:
/Domoticz/MQTT {"device":"ESP_00022BCD","type":"energy","voltage":"229.3","power":"454.6","kwh":"0.0039"}
/Domoticz/MQTT {"device":"ESP_00022BCD","type":"energy","voltage":"229.3","power":"454.4","kwh":"0.0040"}
/Domoticz/MQTT {"device":"ESP_00022BCD","type":"energy","voltage":"229.3","power":"454.0","kwh":"0.0042"}
/Domoticz/MQTT {"device":"ESP_00022BCD","type":"energy","voltage":"229.2","power":"453.6","kwh":"0.0043"}
/Domoticz/MQTT {"device":"ESP_00022BCD","type":"energy","voltage":"229.2","power":"453.6","kwh":"0.0044"}

User avatar
ThinkPad
Posts: 1754
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: Cheap Chinese Power Meter made wireless

Post by ThinkPad » Saturday 26 September 2015 18:15

Looking good! Still have that meter lying around here, but since i got a few Z-Wave plugs i didn't do anything with it.
ThinkTheme - theme for Domoticz
My (Dutch) blog: http://thinkpad.tweakblogs.net - My Domoticz scripts: Bitbucket
I'm not (very) active anymore on this forum as i don't use Domoticz anymore.

SweetPants
Posts: 1517
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V3.8590
Location: The Netherlands
Contact:

Re: Cheap Chinese Power Meter made wireless

Post by SweetPants » Saturday 26 September 2015 18:28

Next project will be an old AP housing holding:
- Motion sensor (sensing people in the room)
- LUX meter (for turning on lights automatically)
- Smoke detector
- Temp + Hum + Baro
- Piezo alarm (alarm)
- and maybe more
ESP8266 based and of course all MQTT enabled

jaysuk
Posts: 2
Joined: Tuesday 09 August 2016 22:52
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Cheap Chinese Power Meter made wireless

Post by jaysuk » Tuesday 09 August 2016 22:54

Hi SweetPants,

Would you be willing to share your code for this?

Jay

SweetPants
Posts: 1517
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V3.8590
Location: The Netherlands
Contact:

Re: Cheap Chinese Power Meter made wireless

Post by SweetPants » Thursday 11 August 2016 20:18

jaysuk wrote:Would you be willing to share your code for this?
Send you a PM

User avatar
Derik
Posts: 1833
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Cheap Chinese Power Meter made wireless

Post by Derik » Thursday 11 August 2016 21:15

SweetPants wrote: ESP8266 based and of course all MQTT enabled
I do not get a F&%^*ck of that mqtt...

Is there a simple explanation how this works...
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups

SweetPants
Posts: 1517
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V3.8590
Location: The Netherlands
Contact:

Re: Cheap Chinese Power Meter made wireless

Post by SweetPants » Thursday 11 August 2016 21:27

Derik wrote:I do not get a F&%^*ck of that mqtt...

Is there a simple explanation how this works...
Whoooo, hold your horses (I see you like riding them). It's not my fault you don't understand how this works. First off all start reading about MQTT (Google is your friend), build your own MQTT broker like mosquitto (already on the SD image for RPI) and play with the mosquitto_pub/sub commands. Then come back with questions, maybe I can help you.

jaysuk
Posts: 2
Joined: Tuesday 09 August 2016 22:52
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Cheap Chinese Power Meter made wireless

Post by jaysuk » Friday 12 August 2016 15:22

SweetPants wrote:
jaysuk wrote:Would you be willing to share your code for this?
Send you a PM
I'm not allowed to reply to your PM yet.
Would you be willing to PM me your email so I can contact you that way?

User avatar
Sine
Posts: 49
Joined: Monday 02 February 2015 16:57
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: Cheap Chinese Power Meter made wireless

Post by Sine » Sunday 21 August 2016 2:33

Since you join the ground of your board and the ground of the meter ... I would not touch that nice shiny and very conductive WiFi connector.

That could be a shocking experience ;)

SweetPants
Posts: 1517
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V3.8590
Location: The Netherlands
Contact:

Re: Cheap Chinese Power Meter made wireless

Post by SweetPants » Sunday 21 August 2016 13:39

Sine wrote:Since you join the ground of your board and the ground of the meter ... I would not touch that nice shiny and very conductive WiFi connector
.
Yes you are right, the ESP-7 internal antenna is not so good, so I used an external one on my prototype. My other meters use the ESP-12(E) this has a better anntena so I could remove the external one.

wvries
Posts: 5
Joined: Sunday 05 March 2017 12:49
Target OS: Raspberry Pi
Domoticz version: 3.587
Location: Veldhoven
Contact:

Re: Cheap Chinese Power Meter made wireless

Post by wvries » Sunday 05 March 2017 14:24

Hi SweetPants

Would you be so kind to also send me a mesage with your code ?

Got all stuff in and ready to do some work on it.

mayyam
Posts: 36
Joined: Saturday 14 January 2017 12:29
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Poland
Contact:

Re: Cheap Chinese Power Meter made wireless

Post by mayyam » Sunday 05 March 2017 14:55

Can i also get the code please?

____
may
_______________
- Raspberry Pi 2
- RFLink 433Mhz / NRF 2.4GHz
- different species of ESP

josbo12
Posts: 1
Joined: Tuesday 07 March 2017 13:42
Target OS: Windows
Domoticz version:
Contact:

Re: Cheap Chinese Power Meter made wireless

Post by josbo12 » Tuesday 07 March 2017 13:48

Hi SweetPants,


I am working on the same project, but it does not work very well, you could publish the code?

Thanks

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests