3

I'm using the Microchip MCP3909 Energy metering IC, How to use the HFOUT in it ?

note:
HFout supplies a frequency output proportional to the average active real power .

This frequency should be sent to the meter on HFOUT pin which access a Timer/Counter in MC and according to number of Pulses I should measure power and use it

The problem is that I couldn't reach the correct relation which determine each pulse represents what amount of watt?

Documents:
MCP3909 datasheet
Reference Design User's Guide

stevenvh
  • 145,832
  • 21
  • 457
  • 668
xsari3x
  • 1,608
  • 5
  • 27
  • 42

2 Answers2

4

From the Reference Design User's Guide, page 42:

"The meter constant is typically given in units of impulses per kilo-watt hour. As an example, the calibration output frequency of CF, METER_CONSTANT = 3200 imp/kWh or 6400 imp/kWh"

Section 5.1.1 on page 41 describes the calibration procedure.

edit
Also had a look at the datasheet, and on the same page 20 Mike refers to there's this equation:

enter image description here

Channel 1 is the voltage sense channel, channel 0 is the current sense. Multiplied, including the current sense amplification you get instantaneous power. Input voltages are converted relative to a reference voltage, so you have to divide both channels by that (the denominator). HFc is a constant you can program by setting F0, F1 and F2, as per the table in Mike's answer (page 20 of the datasheet).

Note that this gives you a frequency proportional to power. Integrating this over time means counting periods of that frequency gives you a measure of consumed energy, and that's where the 3200 imp/kWh from the Reference Design User's Guide comes in.

edit
A concrete example. Let's suppose you want to measure energy of a 230 V/ 10 A device. Maximum input for the voltage channel is 660 mV, so we choose a 1:1000 divider for that. At a gain of 1 for the current channel maximum input voltage is 470 mV, so we can choose a 10 mΩ shunt for that, which gives us 10 mV/A. We use the internal Vref of 2.4 V, and set F0, F1 and F2 to 0. Then for a 230 V/ 10 A input we get

\$ HF_{OUT} = \dfrac{8.06 \times 230 mV \times 100 mV \times 1 \times 109.25 Hz}{(2.4 V)^2} = 3.516 Hz \$

That's for 2300 W, or 1.529 Hz per kW. For 1 kWh we'll have

\$ \text{pulse count} = 3600 s \times 1.529 Hz = 5503 \$

That's 5503 pulses/kWh.

stevenvh
  • 145,832
  • 21
  • 457
  • 668
  • Ok , so in MCU I will count a pulse then count the time till next pulse , this will be the power ??? – xsari3x Jul 11 '12 at 16:24
  • I need to use this HFOUT to get a value from this chip , can you help ?? It's my graduation project ....will be delivered in 2 days & I'm stuck in this – xsari3x Jul 11 '12 at 16:26
  • The energy, not the power. Power is watts, energy is kWh. If it's calibrated at 3600 pulses/kWh, then a 1000 W load will generate these 3600 pulses in 1 hour, or 1 per second. A 500 W load will give 1 pulse per 2 seconds. And so on. – stevenvh Jul 11 '12 at 16:26
  • this is the device data sheet , http://ww1.microchip.com/downloads/en/DeviceDoc/22025a.pdf what u saw was application note , .... sorry Is there something in the datasheet that shows the setting of hfout to imp/kwh ? – xsari3x Jul 11 '12 at 16:41
  • Updated my answer. – stevenvh Jul 11 '12 at 16:45
  • If you could give me an example with number I will be grateful , if I used the above table f0=f1=f2 =0 , then the imp/kwh will be ?? & really really thanks you are saving my graduation !! – xsari3x Jul 11 '12 at 16:59
  • In that case you owe me a beer! :-) The table says a value of 109.25 Hz at a 3.58 MHz MCLK. HFOUT depends on the gain you'll be able to program, let's assume 10x, Vref you'll find in the datasheet, let's assume 1 V, then if both channels give you a hypothetical reading of 1 V you can calculate that HFOUT will be 8806 Hz. – stevenvh Jul 11 '12 at 17:09
  • Ok , I calcuated from datasheet :- f0=f1-f2 =0 >>> HFC = 109.25 HFOUT = ( 8.06 * 111(gain ) 109.25)/(2.42.4) = 152 HZ

    so this will mean 152 imp /kwh :D , I really need this point & thanks from here to tomorrow

    – xsari3x Jul 11 '12 at 17:30
  • No, not 152 imp/kWh!! The value depends on the power the 1V for both input channels represents. If that would be 100 W for instance then 1 kWh = 10 hours x 100 W, and 10 hours = 36000 seconds x 152 imp/s, so 1 kWh = 5472000 pulses. – stevenvh Jul 11 '12 at 17:33
  • I totally lost ..! I don't know the voltage or current , but this chip gives me pulses from the pin Hfout which represents the average power , I can calculate the time interval between each two pulses ,so how to use this time interval to find current consumed power depending on this equation ?? :( – xsari3x Jul 11 '12 at 17:58
  • The values we used for current and voltage are read from the channel 0 and 1 inputs. Your circuitry will determine what their sensitivity is. For instance if you read the current across a 0.1 Ω shunt resistor you'll have 100 mV/A for that input. For the voltage input you'll need a resistor divider. If that divides by 100 you'll have 10 mV/V there. So multiplied you get (100 mV x 10 mV)/(1A x 1V) so per watt. The 100 mV and 10 mV go in your equation, we used 1 V and 1 V there. It's up to you to use that scaling factor to determine HFOUT. Do you understand the 5472000 pulses? – stevenvh Jul 11 '12 at 18:05
  • Yes ,yes :D thank you a lot , I got it so this is what the deferential channel means !
    thanks a lot :))) depending on my hardware I will determine the imp/kwh :)
    – xsari3x Jul 11 '12 at 18:12
  • if you could explain the 5472000 pulses , Till now it's working I get from the equation (digit) imp/instance == the current average power at this instance \ – xsari3x Jul 11 '12 at 21:19
  • 1
    I added a concrete example with realistic values to my answer. – stevenvh Jul 12 '12 at 05:04
1

The datasheet for the MCP3909 device has a table (table 4-3 on page 20) which shows how the HFout pin may be programmed with the F0, F1 & F2 pins for various sensitivities.

enter image description here

MikeJ-UK
  • 5,378
  • 16
  • 20