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.

Moderator: leecollings

SweetPants

Cheap Chinese Power Meter made wireless

Post by SweetPants »

Just succeeded in making a cheap Chinese Power meter wireless using ESP-07 and MQTT.
Below picture is the test setup.
IMAG0032_1.jpg
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.
ThinkPad
Posts: 890
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 »

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?
I am not active on this forum anymore.
SweetPants

Re: Cheap Chinese Power Meter made wireless

Post by SweetPants »

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
ThinkPad
Posts: 890
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 »

Can you share your code/schematics?
I am not active on this forum anymore.
SweetPants

Re: Cheap Chinese Power Meter made wireless

Post by SweetPants »

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.
ThinkPad
Posts: 890
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 »

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!
I am not active on this forum anymore.
SweetPants

Re: Cheap Chinese Power Meter made wireless

Post by SweetPants »

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

Re: Cheap Chinese Power Meter made wireless

Post by SweetPants »

Finished my first Wifi ESP8266 MQTT Power Meter:
PM_11.jpg
PM_21.jpg
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"}
ThinkPad
Posts: 890
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 »

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.
I am not active on this forum anymore.
SweetPants

Re: Cheap Chinese Power Meter made wireless

Post by SweetPants »

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 / ODroid
Domoticz version:
Contact:

Re: Cheap Chinese Power Meter made wireless

Post by jaysuk »

Hi SweetPants,

Would you be willing to share your code for this?

Jay
SweetPants

Re: Cheap Chinese Power Meter made wireless

Post by SweetPants »

jaysuk wrote:Would you be willing to share your code for this?
Send you a PM
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Cheap Chinese Power Meter made wireless

Post by Derik »

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

Re: Cheap Chinese Power Meter made wireless

Post by SweetPants »

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 / ODroid
Domoticz version:
Contact:

Re: Cheap Chinese Power Meter made wireless

Post by jaysuk »

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: 17
Joined: Monday 02 February 2015 15:57
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Cheap Chinese Power Meter made wireless

Post by Sine »

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

Re: Cheap Chinese Power Meter made wireless

Post by SweetPants »

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: 28
Joined: Sunday 05 March 2017 11:49
Target OS: Raspberry Pi / ODroid
Domoticz version: latest B
Location: Lo Santiago, Murcia, Spain
Contact:

Re: Cheap Chinese Power Meter made wireless

Post by wvries »

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: 47
Joined: Saturday 14 January 2017 11:29
Target OS: Linux
Domoticz version: 4.11333
Location: Poland
Contact:

Re: Cheap Chinese Power Meter made wireless

Post by mayyam »

Can i also get the code please?

____
may
_______________
- Dell FX-160 / Ubuntu 16.04
- RFLink 433Mhz / NRF 2.4GHz
- 2x Xiaomi Gateway
- different species of ESP8266
josbo12
Posts: 1
Joined: Tuesday 07 March 2017 12:42
Target OS: Windows
Domoticz version:
Contact:

Re: Cheap Chinese Power Meter made wireless

Post by josbo12 »

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 1 guest