Author Topic: 3 Phase powermeter, early results  (Read 4228 times)

0 Members and 1 Guest are viewing this topic.

Offline StoveTopic starter

  • Contributor
  • Posts: 14
3 Phase powermeter, early results
« on: September 23, 2013, 07:43:55 am »
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 the advice we got.
The current channel is going to come from cheap 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 a MCP3909 for 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.



 

Offline itais

  • Newbie
  • Posts: 2
Re: 3 Phase powermeter, early results
« Reply #1 on: October 31, 2013, 05:22:09 pm »
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 Regards
José L.
 

Offline PA4TIM

  • Super Contributor
  • ***
  • Posts: 1164
  • Country: nl
  • instruments are like rabbits, they multiply fast
    • PA4TIMs shelter for orphan measurement stuff
Re: 3 Phase powermeter, early results
« Reply #2 on: November 01, 2013, 12:28:22 am »
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 LM399

By the way, Bob Pease desinged a very good TRMS powermeter with only two  transistors. Works great: http://www.pa4tim.nl/?p=4751
www.pa4tim.nl my collection measurement gear and experiments Also lots of info about network analyse
www.schneiderelectronicsrepair.nl  repair of test and calibration equipment
https://www.youtube.com/user/pa4tim my youtube channel
 

Offline StoveTopic starter

  • Contributor
  • Posts: 14
Re: 3 Phase powermeter, early results
« Reply #3 on: November 02, 2013, 07:41:19 am »
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.
 

Offline itais

  • Newbie
  • Posts: 2
Re: 3 Phase powermeter, early results
« Reply #4 on: November 02, 2013, 05:05:00 pm »
Hello Stove,

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.

I 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.
 

Offline StoveTopic starter

  • Contributor
  • Posts: 14
Re: 3 Phase powermeter, early results
« Reply #5 on: November 04, 2013, 09:48:37 pm »
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.
 

Offline skipjackrc4

  • Regular Contributor
  • *
  • Posts: 239
  • Country: us
Re: 3 Phase powermeter, early results
« Reply #6 on: November 04, 2013, 09:59:33 pm »
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.

What 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. 
 

Offline PA4TIM

  • Super Contributor
  • ***
  • Posts: 1164
  • Country: nl
  • instruments are like rabbits, they multiply fast
    • PA4TIMs shelter for orphan measurement stuff
Re: 3 Phase powermeter, early results
« Reply #7 on: November 05, 2013, 09:26:14 am »
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"   :-\
www.pa4tim.nl my collection measurement gear and experiments Also lots of info about network analyse
www.schneiderelectronicsrepair.nl  repair of test and calibration equipment
https://www.youtube.com/user/pa4tim my youtube channel
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf