3 Phase powermeter, early results - Page 1
Forum section: electronics / projects

author: Stove
author_rank: Contributor
timestamp: September 23, 2013, 07:43:55 am
content: Greetings,We're building an energy meter that logs, processes and displays energy readings. It's still very early and basic but interesting for a beginner like me.Currently the voltage channel is isolated using a transformer, this is not ideal and we will switch to an opto-isolater in the future thanks to theadvicewe got.The current channel is going to come fromcheap Chinese current sensors. We have not received them yet, so can't show the waveforms.Once the prototype is complete I can look into ordering more serious PCBs. Instead of an android app we have decided to use a normal browser. The results of running it for a couple of hours are below. The current channel here is also the voltage, so what is measured is the voltage squared. We use aMCP3909for this. It multiplies the voltage and current AC waveform and outputs active power as pulses (0-6kHz or slower is desired). There is also a serial data channel available but we didn't use this yet. A measurement is taken every 3 seconds and stored in an sqlite3 database in the Raspberry Pi. This data is then offered as a webapp in the form of the graph by browsing to the IP of the device. The graph updates every 3 seconds by requesting the latest value.You could argue that a beagleboard would be better suited for this and you may be right. The Raspberry Pi can handle the 6k interrupts per second by using just 25% CPU and this is fine for testing until the design has advanced further.If anybody is interested in early test code or schematics I will gladly share them. I'm interested in advice or warnings about pitfalls for these kinds of projects.

author: itais
author_rank: Newbie
timestamp: October 31, 2013, 05:22:09 pm
content: Hello, I've just discovered your message in this Forum.I'm beginning to work in something very similar to your work . In my case I only need to measure single phase power, but I need to send the data to a database server through a 3G/GPRS connection. I'll use a BeagleBone Black instead of a Raspberry (more powerful but I specially like no needing a SD-Card). I was studying the possibility of using a MCP3909 but I haven't seen it clear (Beaglebone has 8 ADC input and I'm still thinking of using them instead of the MCP3909).I'd like to take a look, if possible, to see how you connect I & V to the MCP3909 (are you still using the transformer or have you moved to a optocoupler), and howdo you interface with the Raspberry PI (I2C, SPI? )Best RegardsJosé L.

author: PA4TIM
author_rank: Super Contributor
timestamp: November 01, 2013, 12:28:22 am
content: I'm working 0n something similair. I allmost finnished the analog part. It measures V (0-500 VAC+DC), I(0-10A with 1 mA resolution), P and PF. From DC upto 1 MHz is the goal but the gain of the backend is to high so slewrate spoils things, so I'm stuck at 500 kHz at the moment. The frontend goes allready to > 1 MHz. The backend will be too. I use OP37 opamps as front. One measures V through a resistive devider, the other the voltdrop over a 0.1 Ohm shunt. Then precision optos with feedback through phototransistors and the backend are LT1028's because the OP37Z started to oscillate at higher levels. Phase detection by two LM311 and a 74LS86. Next step will be TRMS converters an a 24bit ADC (LT2400) to uP for readout. I'm not zo digital so that will be the hard part. It will get outputs for a scope too. Vrefs from a uA723 for offset, the ADC wil probably get a LT1027 or LM399By the way, Bob Pease desinged a very good TRMS powermeter with only two transistors. Works great:http://www.pa4tim.nl/?p=4751

author: Stove
author_rank: Contributor
timestamp: November 02, 2013, 07:41:19 am
content: itais, I counted the pulses it gives out, configurable to give quite a lot of pulses so it's accurate. I counted them with the raspberry pi at a rate of 5kHz and higher. This worked pretty well but I'll do the counting with a PIC and then interface the results every second or so to the Raspberry. I'm slacking on this project because the raspberry pi seems to be very sensitive to SD card corruption. Would not advice.

author: itais
author_rank: Newbie
timestamp: November 02, 2013, 05:05:00 pm
content: Hello Stove,Quote from: Stove on November 02, 2013, 07:41:19 amI don't think I can use a pulses counter, because I want to get aparent and reactive power measurements, not only active.On the other hand, I'm using Beaglebone to avoid SD card corruption issues, so, yes I don't think Raspberry is a good solution if you're going to save data continously, even if it's a small amount of data. 2 Gbytes of embeded MMC beaglebone disk should be enough to save the OS and some data logging.

author: Stove
author_rank: Contributor
timestamp: November 04, 2013, 09:48:37 pm
content: Just be careful though, you need many samples ever cycle to get accurate results. This IC gives instantaneous power readings, not averaged. Perhaps 20 samples per cycle = 1kHz is enough if you don't have too many higher order harmonics. I don't have enough experience to say whether or not a beagle board can achieve this. Perhaps you need a MCU to do the integration for you.

author: skipjackrc4
author_rank: Regular Contributor
timestamp: November 04, 2013, 09:59:33 pm
content: Quote from: PA4TIM on November 01, 2013, 12:28:22 amWhat optos did you use that give 1MHz analog bandwidth? That is very impressive.Also, are you really getting 24 bits worth of precision through the optos? I'm not doubting you, just curious. I designed something similar using some Avago linear optos (don't remember the exact part) and I'm sitting at about 14 bits equivalent accuracy. The RMS converters have around 0.3% accuracy at a crest factor of 10, so I plan on using a 12-14 bit ADC. If you are getting better than that, then I am very interested in how you are achieving it.

author: PA4TIM
author_rank: Super Contributor
timestamp: November 05, 2013, 09:26:14 am
content: I use a HCNR200 also from avago. But it seems to be not fast enough. I can get 1 MHz but then the respons peaks over 10% around 320 kHz. Tried all sort of networks to level it but that did not work. I must change everything or settle for less bandwidth. I did the latter and feed it a square wave and optimized the respons for high as possible frequency. I now can get a nice shaped 150 kHz squarewave without ringing, over or undershoot and no phase differens between both channels. For Sinewave respons the 3 dB is around 500 kHz. Not what I wanted but still more then usable for my need.I am now going to build a TRMS to DC converter. just for fun. I have no clue about digital stuff so I have no clue about the number of bits I can get or I need. The digital part is just "neccecary evil"