Page 2 of 4
Re: Cheap Chinese Power Meter made wireless
Posted: Tuesday 07 March 2017 15:50
by SweetPants
wvries wrote: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.
send you a PM
Re: Cheap Chinese Power Meter made wireless
Posted: Tuesday 07 March 2017 15:51
by SweetPants
josbo12 wrote:Hi SweetPants,
I am working on the same project, but it does not work very well, you could publish the code?
Thanks
send you a PM
Re: Cheap Chinese Power Meter made wireless
Posted: Monday 27 March 2017 21:00
by Ningaloo
Hi SweetPants,
guess what. I like to receive your code too.
I use this power meter on a solar microinverter. It seems to measure power in both directions.
It would be nice to send the data to domoticz
Re: Cheap Chinese Power Meter made wireless
Posted: Sunday 09 April 2017 11:44
by SweetPants
Ningaloo wrote:guess what. I like to receive your code too.
send you a PM
Re: Cheap Chinese Power Meter made wireless
Posted: Sunday 09 April 2017 21:15
by Kapee
I also want to make this power meter wireless.
The ESP8266 version that I want to use is the Wemos D1 mini.
Hope I also can get the code.
I will send a pm to Sweetpants (edit: not succeeded)
Re: Cheap Chinese Power Meter made wireless
Posted: Tuesday 02 May 2017 13:14
by Kapee
Still no reaction from Sweetpants, hope he will come back to this topic once more.
Not possible to send a pm to Sweetpants by myself . . .
edit: after this post reply, I can

Re: Cheap Chinese Power Meter made wireless
Posted: Friday 12 May 2017 10:54
by Kapee
Unfortunately I am not familiar with the C compiler for the software, so I could not use the software from Sweetpants, sorry for that.
Normally I work with Arduino ide and the last couple of month I use the wemos D1 mini.
I wanted this wemos D1 mini build in in the cheap Chinese power meter and flashed with the Arduino ide.
As level shifter for the signals from the power meter print to the wemos, I used two resistors as a devider (5V -> 3.3V)
So back to the Blogspot of Kalle Hagström and make use of his routines for the power meter.
I succeededd and after all it was not a hugh problem to implement the routines.
A big advantage the solution with the wemos is 'Over The Air' (OTA) flashing and no push button(s) for flashing.
As I said before I don't use Domoticz, but I make a dashboard with Node-red.

- 20170512 nodered.JPG (34.69 KiB) Viewed 5594 times

- 20170512 pwrmtr.JPG (36.29 KiB) Viewed 5594 times
Re: Cheap Chinese Power Meter made wireless
Posted: Friday 12 May 2017 14:13
by pj-r
How accurate this is with inductive loads like motors?
Re: Cheap Chinese Power Meter made wireless
Posted: Friday 12 May 2017 14:17
by SweetPants
pj-r wrote:How accurate this is with inductive loads like motors?
Don't know, but what do you expect from a 11 euro device

Re: Cheap Chinese Power Meter made wireless
Posted: Wednesday 17 May 2017 14:57
by littlewouter
I got exited by this threat and ordered this KWH meter. However, the model I received is different inside:

- IMG_20170515_175131.jpg (207.33 KiB) Viewed 5529 times

- IMG_20170515_175107.jpg (143.34 KiB) Viewed 5529 times
As the pictures show, the pins SGND, VCC and FREQ still exist, however now there is TX, RX and an unlabeled pin. I measured the pins and the FREQ pin still outputs a 50Hz frequency, TX does outputs something and the unlabeled pin outputs 12V when the socket is connected to the grid.
The TX and RX pins indicate that it's a serial connection and therefore I connected it to a serial program. However, no commonly known baudrate outputted something useful unfortunately. I will now order a logic analyzer to understand the signal.
The PCB seems different than the older KWH-meters. I'm not sure if the IC is changed, my IC was somehow damaged so I couldn't read the text on it.
Re: Cheap Chinese Power Meter made wireless
Posted: Wednesday 17 May 2017 18:40
by SweetPants
Rx/Tx are not regular serial ports using a specific baudrate, you have to sample the data against the clock (see original articles
http://www.domoticz.com/forum/viewtopic ... 325#p49060)
Re: Cheap Chinese Power Meter made wireless
Posted: Thursday 18 May 2017 9:25
by littlewouter
Yeah I read the other posts about this KWH meter, but the thing is that my KWH meter does not seem to have a clock pin. If there is no clock pin, the only other possibility to communicate data is with a set baudrate. In this way both communicating devices know at which times the 0's and 1's are valid data on the Tx and Rx lines.
Re: Cheap Chinese Power Meter made wireless
Posted: Saturday 20 May 2017 9:53
by SweetPants
What model did you order?
Re: Cheap Chinese Power Meter made wireless
Posted: Sunday 21 May 2017 12:25
by Kapee
I ordered a second power meter, because I wanted to do some more tests.
I received the same as littlewouter.
It looks like that there is a redesign of the pcb of the power meter. The pcb is much more simple.
But for me it is unclear which chip is used.
Tomorrow I get a separation transformer and will do some measerements on Tx end Rx
Re: Cheap Chinese Power Meter made wireless
Posted: Thursday 08 June 2017 12:12
by Kapee
Well, after a couple of days working on this second power meter, I have it working.
The first thing I did, was to find out which chip was used.
With the help from circuitsonline
https://www.circuitsonline.net/forum/vi ... 40#1914040 it turned out that it was a V9261F chip from Vango.
After that I found a soft serial library on Github that could be used
https://github.com/plerup/espsoftwareserial
Then I did some measurements with a separation transformer and a logic analyzer.

- Pwrmtr2 LA.JPG (19.96 KiB) Viewed 5255 times
What you see is the RX and TX signal every second. TX is the signal from the V9261F chip. The second burst contains the value for volt and watt.
Then I made the software with Arduino ide including mqtt for the Node-Red dashboard.

- Pwrmtr2 (Small).jpg (36.05 KiB) Viewed 5255 times

- Pwrmtr2 nodered.jpg (37.23 KiB) Viewed 5255 times
As a bonus I also made code for the frequency, but here in the Netherlands it is always 50.0 Hz.
Re: Cheap Chinese Power Meter made wireless
Posted: Friday 09 June 2017 8:41
by SweetPants
Great job, well done. Are you sharing the code somewhere?
Re: Cheap Chinese Power Meter made wireless
Posted: Friday 09 June 2017 9:36
by Kapee
Thanks, it was nice to do.
I will share the code here.
Re: Cheap Chinese Power Meter made wireless
Posted: Monday 12 June 2017 0:34
by MaxwellHatcher
Kapee wrote:...I will share the code here.
Hi. Wanted to thank you all for this post. Just got a couple more of these and they are the new design. You saved me a lot of work!
I have a dumb question though. Why don't you take power directly off VCC of the PCB?
Re: Cheap Chinese Power Meter made wireless
Posted: Tuesday 13 June 2017 12:53
by SweetPants
MaxwellHatcher wrote:I have a dumb question though. Why don't you take power directly off VCC of the PCB?
As said in teh first post, the on-board PSU does not deliver enough power. When transmitting, the ESP can use 200mA, way too much for this PSU
Re: Cheap Chinese Power Meter made wireless
Posted: Wednesday 05 July 2017 19:14
by littlewouter
Great work! Thank you.
I got it working and via node-red I translate the MQTT to a domoticz electricity meter.
I understand that the V9261F chip only measures watt and volts and that these are communicated to the LCD unit which keeps track of the kwh's.
So unfortunately it is probably not possible to read-out the stored kwh's in the meter. However, there must be a way to calculate this from the obtained watt measurements, just as the meter itself is doing.
This can be done in the arduino/ESP8266 or domoticz itself. In my opinion it is more useful to do this in domoticz, since then this can keep track of the total, daily and monthly kwh-values. There are probably some scripts already available for this, any suggestions?
The provided code from Kapee sends the average watt value each minutes via MQTT, this could be easily recalculated to kwh consumed in the last minute.