This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

High Accuracy Three-Phase Electricity Meter with Tamper Detection

Other Parts Discussed in Thread: MSP430F6779

Hello everyone,

IAR Embedded Workbench for MSP, MCU - MSP430F6779

I am currently working on this project.

I ma not using the kit provided by TI, instead our hardware department have made a pseudo copy of the schematic with the only components we need. For example we don have/use display on our board. So I am struggling to understand the project code with partial success. Here are some of the  things I must understand:

What  readings.active_power stands for (As far as I understand it holds the active power in W/100 (10mW)resolution  sampled each second?)

Another thing that I don't understand is the following code that resides at emeter-background.c:

        if ((phase->active_power_counter += phase->readings.active_power) >= PHASE_ENERGY_PULSE_THRESHOLD)
        {
            phase->active_power_counter -= PHASE_ENERGY_PULSE_THRESHOLD;
            ++phase->consumed_active_energy;

How many times  consumed_active_energy  will be incremented per kW/h? I evaluated  PHASE_ENERGY_PULSE_THRESHOLD = 912 600 000. So when readings.active_power become greater than 912600000 consumed_active_energy will increment by 1.

Please help me to understand what human readable information hold the above variables. By human readable I  mean W, kW, mW etc.

Any help would be much appreciated. Excuse my bad English.

What

  • Hi,

    Are you using the software included in this Three Phase Meter TI Design?  If not, please use this software.

    To address your other question, readings.active_power corresponds to the average current power that was calculated for the previous frame of data.  If you are using the code from the above TI Design, the variable is in units of 10mW.  The reading of the active power from the previous frame of data is accumulated during the current frame in order to accumulate energy and output pulses at a steady rate that is proportional to the energy consumption.

    In the code snippet, phase->consumed_active_energy is incremented every time an active energy pulse is output.  Therefore, this variable would be determined based on the pulses/kWh macro value (usually set at either 1600 or 6400 in software by default).  As an example, if the pulses/kWh macro is set to a value of 6400, then a value of 6400 for phase->consumed_active_energy would correspond to 1kWh.

    Mike

**Attention** This is a public forum