Go Down

Topic: Smart power meter data collection (Read 252 times) previous topic - next topic

steven6282

Hello everyone,
I have a power meter very similar to the one from this web page:

http://gizmosnack.blogspot.se/2014/10/power-plug-energy-meter-hack.html

I was going to follow along with this persons work to collect data from my power meter as well (except I was planning to use a ESP8266 to make it a IOT device basically.)  He has another page where he does the wireless with an nrf24L01 (http://gizmosnack.blogspot.se/2014/11/power-plug-energy-meter-now-wireless.html).

However, upon opening my meter and inspecting it, mine is a little different from his.  Granted I'm still a complete noob when it comes to things like this, so it might be obvious to some of you out here (which is why I'm here asking).  Where as his has a 7 pin connection going to the display and seems to use a SPI connection with CLK, MISO, and MOSI pins, mine only has a 6 pin connection.  Mine has no CLK, and has RX, and TX.

Now, if I'm understanding some things correctly, I think that means the one I have uses an USART or UART communication instead of SPI.

How would you guys approach trying to get data off the unit like mine?  Would I just connect the RX / TX pins on my arduino to the TX / RX pins on the meter and try to find the right baud rate to get readable information from it?

I don't have nor have I ever even used a logic analyzer to know if that would be of any help here.

Thanks!

Paul_KD7HB

One of the other pins is most likely ground/common. You will need to determine if the meter is using RS-323 to communicate or TTL. You do that by using your digital volt meter to measure the DC voltage between the ground pin and each of the RX/TX pins. IF the voltage on either is greater than 5 volts, the meter is using RS-232 to communicate and you will need an adapter board to convert the RS-232 voltage signal to TTL, 5 volt, signals for the Arduino.

Are any of the other pins marked?

Paul

steven6282

#2
Sep 14, 2017, 04:24 am Last Edit: Sep 14, 2017, 04:25 am by steven6282
Yes, all but one are marked.  The ones marked are SGND (assuming this is ground, not sure what the "s" at the beginning is supposed to mean, VCC, FREQ, TX, and RX.  The way this thing is made, it's going to be difficult for me to power it and get readings from the pins.  The solder points are on the bottom of circuit board and unless I extend the wires I can't put the board in upside down hehe.

I'll play around with it and see if I can find a way to read the voltage off the pins.  Hopefully the voltage is lower than 5 volts so that I don't have to get an additional adapter.

Paul_KD7HB

Yes, all but one are marked.  The ones marked are SGND (assuming this is ground, not sure what the "s" at the beginning is supposed to mean, VCC, FREQ, TX, and RX.  The way this thing is made, it's going to be difficult for me to power it and get readings from the pins.  The solder points are on the bottom of circuit board and unless I extend the wires I can't put the board in upside down hehe.

I'll play around with it and see if I can find a way to read the voltage off the pins.  Hopefully the voltage is lower than 5 volts so that I don't have to get an additional adapter.
Sgnd is signal ground. In some cases that would be different from electrical ground, but rare.

Paul

steven6282

#4
Sep 14, 2017, 04:36 am Last Edit: Sep 14, 2017, 04:37 am by steven6282
Ok, was able to get to the pins from the top side.  Pilled off some glue around the cable and there was just enough bare wire for me to get my probes on.  The VCC reads at 3.725 volts, the TX 3.18 volts and the RX 2.22 volts.

So guess that means it's a TTL signal since they are less than 5 volts?

Paul_KD7HB

Ok, was able to get to the pins from the top side.  Pilled off some glue around the cable and there was just enough bare wire for me to get my probes on.  The VCC reads at 3.725 volts, the TX 3.18 volts and the RX 2.22 volts.

So guess that means it's a TTL signal since they are less than 5 volts?
Not really. TTL is 5.0 and 0.0 volts. How is this thing powered? Assume the other meter pin is on SGND? The TX voltage should be the voltage when no data is being sent, so I wonder if the whole device operates on 3.3 volts.

Some of the Arduinos operate on 3.3 volts and their serial in/out might accept that signal.

Perhaps someone else has ideas. I am out right now!

Paul

steven6282

It's powered through the wall outlet.  It has a built in 3.6v rechargable backup battery as well.

Based on the web page I linked in my first post, the circuit is 3.6v.  I know the arduino uno's and such run 5v, but the atmega328 chip itself can be ran on 3.3v.  It's been a while since I did it, but I had them running on a coin cell batteries in an alarm system project I worked on one time before.

Anyway, that said, what I plan on using in the end is a NodeMCU ESP8266 module instead of an actual arduino.  It can be programmed just like an arduino from the arduino ide, and for the most part works the same.  It is a 3.3v logic chip, so should work pretty well with the internal voltages of the power meter.  I was just going to use an arduino uno or something in the beginning to make it easier for debugging and experimenting with the thing.

I'm currently working on finishing up another project before I work on this so I'll see if anyone else has any ideas over the next day or two.  If not, when I finish up the other project I'll just try hooking into the rx and tx and see what happens.  If the magic smoke escapes then I'll have learned what not to do at least :)

Go Up