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.

MSP430F67791A: TIDM-THDREADING measurements fluctuating too much

Part Number: MSP430F67791A
Other Parts Discussed in Thread: TIDM-THDREADING, EVM430-F6779

Hi

I was testing the e-meter app code in MSP430F67791A based design and found voltage rms was reading proper but Fundmental RMS and Voltage THD measurement is fluctuating too much and not getting stable value(erratic readings)(Applied input was 240 V and 10% 3rd Harmonic). What could be the reason for non-consistence reading?Please resolve my query.

Thanks,
Santhosh

  • Hello Santhosh,
    I have reached out to one of our metering experts familiar with this device.
    We will get you an answer shortly.
  • Hello,

    Are you using our EVM430-F6779 or your own custom board? Have you modified the TIDM-THDREADING source code at all?

    Regards,

    James

  • Hi James,

     I am using our own custom board. I didn't modified any part of the code except metrology-template.h & metrology-calibration-template.h.

    Rgds,

    Santhosh

  • Hello,

    I would highly recommend that you use our EVM430-F6779 and the original code to see if the behavior goes away. I suspect that custom board doesn't match our EVM430-F6779 or whatever was changed in these two files is causing the issue. What specific changes were made to these two files?

    Regards,

    James
  • metrology-calibration-template.txt
    /*******************************************************************************
     *  metrology-calibration-template.h - MSP430F6779 distribution version
     *
     *  Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
     *  ALL RIGHTS RESERVED
     *
    */
    
    /*! This defines the default offset for the temperature diode, in ADC units */
    #define DEFAULT_TEMPERATURE_INTERCEPT               -9830
    
    /*! This defines the default scaling factor for the temperature diode, in ADC units */
    #define DEFAULT_TEMPERATURE_SLOPE                   82
    
    #define DEFAULT_ROOM_TEMPERATURE                    250
    
    #define DEFAULT_V_RMS_SCALE_FACTOR_A                25690//15448
    #define DEFAULT_V_DC_ESTIMATE_A                     0xFFCA
    #define DEFAULT_V_AC_OFFSET_A                       -2126
    
    #define DEFAULT_V_RMS_SCALE_FACTOR_B                25690//15520
    #define DEFAULT_V_DC_ESTIMATE_B                     0xFFCA
    #define DEFAULT_V_AC_OFFSET_B                       -2126
    
    #define DEFAULT_V_RMS_SCALE_FACTOR_C                25690//15506
    #define DEFAULT_V_DC_ESTIMATE_C                     0xFFCA
    #define DEFAULT_V_AC_OFFSET_C                       -2126
    
    //#define DEFAULT_V_RMS_SCALE_FACTOR_D                15450
    //#define DEFAULT_V_DC_ESTIMATE_D                     0xFFCA
    //#define DEFAULT_V_AC_OFFSET_D                       9
    //
    //#define DEFAULT_V_RMS_SCALE_FACTOR_E                15448
    //#define DEFAULT_V_DC_ESTIMATE_E                     0xFFCA
    //#define DEFAULT_V_AC_OFFSET_E                       9
    //
    //#define DEFAULT_V_RMS_SCALE_FACTOR_F                15448
    //#define DEFAULT_V_DC_ESTIMATE_F                     0xFFCA
    //#define DEFAULT_V_AC_OFFSET_F                       9
    //
    //#define DEFAULT_V_RMS_SCALE_FACTOR_G                15448
    //#define DEFAULT_V_DC_ESTIMATE_G                     0xFFCB
    //#define DEFAULT_V_AC_OFFSET_G                       10
    
    #define DEFAULT_I_RMS_SCALE_FACTOR_A                6999//22074
    #define DEFAULT_I_DC_ESTIMATE_A                     0xFFDF
    #define DEFAULT_I_AC_OFFSET_A                       (long)10000
    
    #define DEFAULT_I_RMS_SCALE_FACTOR_B                6999//21981
    #define DEFAULT_I_DC_ESTIMATE_B                     0xFFC0
    #define DEFAULT_I_AC_OFFSET_B                      (long)10000
    
    #define DEFAULT_I_RMS_SCALE_FACTOR_C                6999//22044
    #define DEFAULT_I_DC_ESTIMATE_C                     0xFFC2
    #define DEFAULT_I_AC_OFFSET_C                       (long) 10000
    
    //#define DEFAULT_I_RMS_SCALE_FACTOR_D                21932
    //#define DEFAULT_I_DC_ESTIMATE_D                     0xFFC2
    //#define DEFAULT_I_AC_OFFSET_D                       1
    //
    //#define DEFAULT_I_RMS_SCALE_FACTOR_E                21976
    //#define DEFAULT_I_DC_ESTIMATE_E                     0xFFC2
    //#define DEFAULT_I_AC_OFFSET_E                       29000
    //
    //#define DEFAULT_I_RMS_SCALE_FACTOR_F                22031
    //#define DEFAULT_I_DC_ESTIMATE_F                     0xFFC2
    //#define DEFAULT_I_AC_OFFSET_F                       29000
    //
    //#define DEFAULT_I_RMS_SCALE_FACTOR_G                21943
    //#define DEFAULT_I_DC_ESTIMATE_G                     0xFFC3
    //#define DEFAULT_I_AC_OFFSET_G                       29001
    
    
    #define DEFAULT_I_DC_ESTIMATE_NEUTRAL               0xFFDF
    #define DEFAULT_I_AC_OFFSET_NEUTRAL                  -2126
    #define DEFAULT_I_RMS_SCALE_FACTOR_NEUTRAL          6999//8941
    #define DEFAULT_I_RELATIVE_SCALE_FACTOR_NEUTRAL     1//8941
    
    
    /* The following will be assigned automatically if they are not set here */
    //#define DEFAULT_P_SCALE_FACTOR_A                    10909
    //#define DEFAULT_P_SCALE_FACTOR_B                    10909
    //#define DEFAULT_P_SCALE_FACTOR_C                    10872
    //#define DEFAULT_P_SCALE_FACTOR_D                    10842
    //#define DEFAULT_P_SCALE_FACTOR_E                    10864
    //#define DEFAULT_P_SCALE_FACTOR_F                    10890
    //#define DEFAULT_P_SCALE_FACTOR_G                    10845
    
    
    #define DEFAULT_P_SCALE_FACTOR_TA  ((long long) DEFAULT_V_RMS_SCALE_FACTOR_A*DEFAULT_I_RMS_SCALE_FACTOR_A*32/1000000)
    #define DEFAULT_P_SCALE_FACTOR_TB  ((long long) DEFAULT_V_RMS_SCALE_FACTOR_B*DEFAULT_I_RMS_SCALE_FACTOR_B*32/1000000)
    #define DEFAULT_P_SCALE_FACTOR_TC  ((long long) DEFAULT_V_RMS_SCALE_FACTOR_C*DEFAULT_I_RMS_SCALE_FACTOR_C*32/1000000)
    
    
    #define DEFAULT_FREQUENCY_PHASE_FACTOR              500
    #define DEFAULT_FREQUENCY_GAIN_FACTOR               0
    
    /* Value is phase angle in 1/256th of a sample increments. */
    #define DEFAULT_BASE_PHASE_A_CORRECTION             37
    #define DEFAULT_BASE_PHASE_B_CORRECTION             38
    #define DEFAULT_BASE_PHASE_C_CORRECTION             38
    #define DEFAULT_BASE_PHASE_D_CORRECTION             -203
    #define DEFAULT_BASE_PHASE_E_CORRECTION             -203
    #define DEFAULT_BASE_PHASE_F_CORRECTION             -202
    #define DEFAULT_BASE_PHASE_G_CORRECTION             -202
    
    #define DEFAULT_BASE_NEUTRAL_PHASE_CORRECTION       0
    
    
    
    
    /* CT frequency related corrections, for CTs which need this */
    #define DEFAULT_FREQUENCY_PHASE_FACTOR_A            0
    #define DEFAULT_FREQUENCY_GAIN_FACTOR_A             0
    #define DEFAULT_FREQUENCY_PHASE_FACTOR_B            0
    #define DEFAULT_FREQUENCY_GAIN_FACTOR_B             0
    #define DEFAULT_FREQUENCY_PHASE_FACTOR_C            0
    #define DEFAULT_FREQUENCY_GAIN_FACTOR_C             0
    #define DEFAULT_FREQUENCY_PHASE_FACTOR_D            0
    #define DEFAULT_FREQUENCY_GAIN_FACTOR_D             0
    #define DEFAULT_FREQUENCY_PHASE_FACTOR_E            0
    #define DEFAULT_FREQUENCY_GAIN_FACTOR_E             0
    #define DEFAULT_FREQUENCY_PHASE_FACTOR_F            0
    #define DEFAULT_FREQUENCY_GAIN_FACTOR_F             0
    #define DEFAULT_FREQUENCY_PHASE_FACTOR_G            0
    #define DEFAULT_FREQUENCY_GAIN_FACTOR_G             0
    

    metrology-template.txt
    /*******************************************************************************
     *  metrology-template.h - MSP430F6779 distribution version
     *
     *  Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
     *  ALL RIGHTS RESERVED
     *
    */
    
    
    //#define CONFIGURATION_BCM
    //#define CONFIGURATION_BCPM
    
    
    
    
    
    
    //#if defined(CONFIGURATION_BCM)
    ///*! This selects the number of phases. */
    //    #define SELECTED_STRUCT_CONFIGURATION                                       0xA8
    //    #define NUM_PHASES                                                          3//7
    //    #define VOLTAGE_CHANNELS 							3//0
    //    #define CURRENT_CHANNELS							3//7
    //    //#define VOLTAGE_SIGNAL_IS_COMMON
    //    /*! This switch enables mains frequency measurement. This may be used as a
    //        meter feature. It may be a requirement, if non-linear CT sensors are used. */
    //    #undef MAINS_FREQUENCY_SUPPORT
    //
    //    /*! This selects support for RMS voltage measurement. */
    //    #undef VRMS_SUPPORT
    //
    //    /*! This selects support for sag and swell detection. */
    //    #undef SAG_SWELL_SUPPORT
    //    /*! This selects the number of mains cycles over which sag and swell detection works. */
    //    #define SAG_SWELL_WINDOW_LEN                        5
    //    /*! This selects the percentage fall from the nominal voltage for sag detection. */
    //    #define SAG_THRESHOLD                               20
    //    /*! This selects the percentage rise above the nominal voltage for swell detection. */
    //    #define SWELL_THRESHOLD                             20
    //
    //    /*! This selects support for simple sag detection, to provide an early warning of power
    //        failure. */
    //    #undef SAG_POWER_DOWN_SUPPORT
    //    /*! This selects the percentage fall from the nominal voltage for sag power down detection. */
    //    #define SAG_POWER_DOWN_THRESHOLD                    20
    //    /*! This selects the time, in milliseconds, for which the voltage signal must be below the
    //        sag power down threshold, before the power down condition is declared. */
    //    #define SAG_POWER_DOWN_DURATION                     50
    //    #undef ACTIVE_POWER_SUPPORT
    //
    //    /*! This selects support for reactive power measurement. */
    //    #undef REACTIVE_POWER_SUPPORT
    //
    //    /*! This selects support for reactive power measurement through quadrature processing.
    //        This is only effective when REACTIVE_POWER_SUPPORT is enabled. */
    //    #undef REACTIVE_POWER_BY_QUADRATURE_SUPPORT
    //
    //    /*! The selects support for apparent or VA power measurement. */
    //    #undef APPARENT_POWER_SUPPORT
    //
    //    #undef POWER_FACTOR_SUPPORT
    //
    //    #undef REACTIVE_ENERGY_SUPPORT
    //
    //    #undef APPARENT_ENERGY_SUPPORT
    //
    //    /*! This switch selects support for measuring the total active energy consumption. */
    //    #undef TOTAL_ACTIVE_ENERGY_SUPPORT
    //
    //    #undef TOTAL_REACTIVE_ENERGY_SUPPORT
    //
    //    #undef TOTAL_APPARENT_ENERGY_SUPPORT
    //#elif defined(CONFIGURATION_BCPM)
        /*! This selects the number of phases. */
        #define SELECTED_STRUCT_CONFIGURATION                                       0xA9
        #define NUM_PHASES                                                  3       //7
        #define VOLTAGE_CHANNELS 						3	//1
        #define CURRENT_CHANNELS						4	//7
        //#define PHASE_1_VOLTAGE_ADC10_CHANNEL
        //#define VOLTAGE_SIGNAL_IS_COMMON
        //#define PHASE_1_VOLTAGE_ADC_CHANNEL                                         4 //ADC10
        /*! This switch enables mains frequency measurement. This may be used as a
            meter feature. It may be a requirement, if non-linear CT sensors are used. */
        #define MAINS_FREQUENCY_SUPPORT
    
        /*! This selects support for RMS voltage measurement. */
        #define VRMS_SUPPORT
    
        /*! This selects support for sag and swell detection. */
        #undef SAG_SWELL_SUPPORT
        /*! This selects the number of mains cycles over which sag and swell detection works. */
        #define SAG_SWELL_WINDOW_LEN                        5
        /*! This selects the percentage fall from the nominal voltage for sag detection. */
        #define SAG_THRESHOLD                               20
        /*! This selects the percentage rise above the nominal voltage for swell detection. */
        #define SWELL_THRESHOLD                             20
    
        /*! This selects support for simple sag detection, to provide an early warning of power
            failure. */
        #undef SAG_POWER_DOWN_SUPPORT
        /*! This selects the percentage fall from the nominal voltage for sag power down detection. */
        #define SAG_POWER_DOWN_THRESHOLD                    20
        /*! This selects the time, in milliseconds, for which the voltage signal must be below the
            sag power down threshold, before the power down condition is declared. */
        #define SAG_POWER_DOWN_DURATION                     50
    
        #define ACTIVE_POWER_SUPPORT
    
        /*! This selects support for reactive power measurement. */
        #define REACTIVE_POWER_SUPPORT
    
        /*! This selects support for reactive power measurement through quadrature processing.
            This is only effective when REACTIVE_POWER_SUPPORT is enabled. */
        #define REACTIVE_POWER_BY_QUADRATURE_SUPPORT
    
    
        /*! The selects support for apparent or VA power measurement. */
        #define APPARENT_POWER_SUPPORT
    
        #define POWER_FACTOR_SUPPORT
    
        #define REACTIVE_ENERGY_SUPPORT
    
        #undef APPARENT_ENERGY_SUPPORT
    
        /*! This switch selects support for measuring the total active energy consumption. */
        #undef TOTAL_ACTIVE_ENERGY_SUPPORT
    
        #undef TOTAL_REACTIVE_ENERGY_SUPPORT
    
        #undef TOTAL_APPARENT_ENERGY_SUPPORT
    //#endif
    
    /*! This switch selects the use of 24 bit values for the current signal, where the
        ADC supports this. If this symbol is not defined, 16 bit values are used.
        There is nothing to be gained by using more than 16 bits for the the voltage
        signal, so we don't. */
    #define TWENTYFOUR_BIT
    
    /*! ADC channel allocation */
    #define PHASE_1_VOLTAGE_ADC_CHANNEL                 6
    #define PHASE_1_CURRENT_ADC_CHANNEL                 4
    #define PHASE_2_VOLTAGE_ADC_CHANNEL                 5
    #define PHASE_2_CURRENT_ADC_CHANNEL                 3
    #define PHASE_3_VOLTAGE_ADC_CHANNEL                 2
    #define PHASE_3_CURRENT_ADC_CHANNEL                 1
    #define NEUTRAL_CURRENT_ADC_CHANNEL                 0
    
    /*! The gain setting for the voltage channel of the SD16, for devices using the
        SD16 sigma-delta ADC. This is usually GAIN_1 (i.e. x1 gain). */
    #define SD_VOLTAGE_GAIN                             SD24GAIN_1
    
    /*! The gain setting for the first current channel channel of the SD16,
        for devices using the SD16 sigma-delta ADC.
        This must be set to suit the shunt or CT in use. Typical values for a
        shunt are GAIN_16 (x16 gain) or GAIN_32 (x32 gain). Typical values for a
        CT are GAIN_1 (x1 gain) or GAIN_2 (x2 gain). */
    #define SD_LIVE_CURRENT_GAIN                        SD24GAIN_1
    
    /*! The gain setting for the second current channel channel of the SD16,
        for devices using the SD16 sigma-delta ADC.
        This must be set to suit the shunt or CT in use. Typical values for a
        shunt are GAIN_16 (x16 gain) or GAIN_32 (x32 gain). Typical values for a
        CT are GAIN_1 (x1 gain) or GAIN_2 (x2 gain). */
    #define SD_NEUTRAL_CURRENT_GAIN                     SD24GAIN_1
    
    #define SD_CLOCK_DIVISION                           24
    
    #undef TRNG_SUPPORT
    
    #undef LIMP_MODE_SUPPORT
    
    /*! This switch enables use of the MSP430's internal temperature diode to
        measure the meter's temperature. */
    #undef TEMPERATURE_SUPPORT
    
    #undef VCC_MEASURE_SUPPORT
    
    /*! This switch enables temperature correction of the metrology. */
    #undef TEMPERATURE_CORRECTION_SUPPORT
    
    /*! This switch enables monitoring of the neutral lead for anti-fraud purposes, in
        either single phase or 3-phase meters. */
    #define NEUTRAL_MONITOR_SUPPORT
    
    /*! The nominal mains frequency, in Hz. This is used to prime the mains frequency
        measurement, and make its initial value settle quickly. It is not currently used after
        reset. */
    #define MAINS_NOMINAL_FREQUENCY                     50
    
    /*! This selects the nominal voltage used for sag/swell detection, and power calculations
        in limp mode, in volts */
    #define MAINS_NOMINAL_VOLTAGE                       240//120
    
    /*! This selects the basis current */
    #define MAINS_BASIS_CURRENT                         40//15
    
    /*! This selects the maximum operating current */
    #define MAINS_MAXIMUM_CURRENT                       300//100
    
    /*! This selects support for IEC style THD readings. If this is not defined, IEEE style
        readings will be produced for any THD measurements. */
    //#define IEC_THD_F_SUPPORT
    #define IEC_THD_R_SUPPORT
    
    /*! This selects support for fundamental RMS voltage measurement. */
    #define FUNDAMENTAL_VRMS_SUPPORT
    
    /*! This selects support for measuring the THD in the voltage waveform. */
    #define VOLTAGE_THD_SUPPORT
    
    /*! If defined, this selects a voltage below which voltage THD will not be
        measured. This prevents silly values for THD calculated from nothing but
        noise. It is measured in millivolts. */
    #define VOLTAGE_THD_MEASUREMENT_CUTOFF              10000
    
    /*! This selects support for RMS current measurement. */
    #define IRMS_SUPPORT
    
    /*! This selects support for fundamental RMS current measurement. */
    #define FUNDAMENTAL_IRMS_SUPPORT
    
    /*! This selects support for measuring the THD in the current waveform. */
    #define CURRENT_THD_SUPPORT
    
    /*! If defined, this selects a voltage below which voltage THD will not be
        measured. This prevents silly values for THD calculated from nothing but
        noise. It is measured in microamps. */
    #define CURRENT_THD_MEASUREMENT_CUTOFF              100000
    
    /*! This selects support for fundamental active power measurement. */
    #define FUNDAMENTAL_ACTIVE_POWER_SUPPORT
    
    #define FUNDAMENTAL_REACTIVE_POWER_SUPPORT
    
    /*! This selects support for measuring the residual RMS current in 3-phase applications. */
    #define RESIDUAL_IRMS_SUPPORT
    
    /*! Tiny power levels should not record energy at all, as they may just be rounding
        errors, noise, or the consumption of the meter itself. This value is the cutoff level,
        in milliwatts. */
    #define RESIDUAL_POWER_CUTOFF                       2500
    
    /*! The duration of the LED on time for an energy pulse. This is measured in
        ADC samples (i.e. increments 1/3276.8s). The maximum allowed is 255, giving a
        pulse of about 78ms. 163 gives a 50ms pulse. */
    #define ENERGY_PULSE_DURATION                       20
    
    /*! Tiny power levels should not record at all, as they may just be rounding errors,
        noise, or the consumption of the meter itself. This value is the cutoff level,
        in milliwatts. */
    #define TOTAL_RESIDUAL_POWER_CUTOFF                 2500
    
    /*! This switch selects support for measuring the active energy consumption on a phase
        by phase basis. */
    #undef ACTIVE_ENERGY_SUPPORT
    
    /*! This sets the number of pulses per kilo-watt hour the meter will produce at
        each phase's energy pulse LED. It does not affect the energy accumulation
        process. */
    //#undef ACTIVE_ENERGY_PULSES_PER_KW_HOUR            6400
    
    /*! This switch selects support for measuring the reactive energy consumption on a phase
        by phase basis. */
    
    
    //#undef INTEGRATED_I2_SUPPORT
    //#undef INTEGRATED_V2_SUPPORT
    
    
    /*! This sets the number of pulses per kilo-watt hour the meter will produce at
        its total active energy pulse LED/opto-coupler/LCD segment. It does not affect the
        energy accumulation process. */
    //#undef TOTAL_ACTIVE_ENERGY_PULSES_PER_KW_HOUR      6400
    //#undef TOTAL_REACTIVE_ENERGY_PULSES_PER_KVAR_HOUR  6400
    
    /*! This switch selects support for measuring the total reactive energy consumption. */
    
    //#undef TOTAL_INTEGRATED_I2_SUPPORT
    //#undef TOTAL_INTEGRATED_V2_SUPPORT
    
    /*! Normally the meter software only calculates the properly scaled values
        for voltage, current, etc. as these values are needed. This define
        enables additional global parameters, which are regularly updated with
        all the metrics gathered by the meter. This is generally less efficient,
        as it means calculating things more often than necessary. However, some
        may find this easier to use, so it is offered as a choice for the meter
        designer. */
    #define PRECALCULATED_PARAMETER_SUPPORT
    
    #undef PER_SENSOR_PRECALCULATED_PARAMETER_SUPPORT
    
    #undef PHASE_UNBALANCED_DETECTION_SUPPORT
    #undef ON_UNBALANCED_SELECT_HIGHER_READING
    #undef PHASE_REVERSED_DETECTION_SUPPORT
    #undef ON_REVERSED_SELECT_POSITIVE_READING
    
    /*! This is called every ADC interrupt, after the main DSP work has finished.
        It can be used for things like custom keypad operations. It is important
        this is a very short routine, as it is called from the main ADC interrupt. */
    #define custom_adc_interrupt()                      /**/
    
    #undef DYNAMIC_CURRENT_RELATED_CORRECTION_SUPPORT
    #undef DYNAMIC_FREQUENCY_RELATED_CORRECTION_SUPPORT
    

    Hi,

    I have modified only default constants and ADC input. Files are attached, please have a look.

    Rgds,

    Santhosh 

  • Hello,

    Thanks for sharing the files. Your modifications are most likely what's causing the issue. I'll look through them, but in the meantime, it would be helpful if you start with the original versions and make incremental changes to these files and then note when the fluctuations start to happen.

    Can you duplicate the issue using our EVM430-F6779? Perhaps this is a hardware issue, not a software issue. Do you observe any issues with the frequency readings when the fluctuations occur? Is the frequency relatively stable? Most importantly, what is the range of fluctuation that you observe? Please be specific.

    Regards,

    James
  • Also, do you still see the fluctuations with VRMS lowered to 200V or lower?

    Regards,

    James
  • Hi, 

    Vrms is proper, we face problem only with THD.

    Rgds,

    Santhosh

  • Hi Santosh,

    So VRMS improves when it's below 200V, correct? What about the frequency measurement? Is it stable? How much is the THD fluctuating. Please be specific.

    Regards,

    James
  • Hi,

    I have attached 2 files that contains measurement results with below inputs:

    1. All three phases 240V, 10A, UPF, 50Hz, 10% 3rd harmonic in all three voltages.

    Watch1-240V.log
    Expression	Value	Location	Type	
    voltage	<array>	Memory:0x1c0c	long[3]	
    [0]	241398	Memory:0x1c0c	long	
    [1]	241364	Memory:0x1c10	long	
    [2]	241044	Memory:0x1c14	long	
    current	<array>	Memory:0x1c18	long[3]	
    [0]	998649	Memory:0x1c18	long	
    [1]	998843	Memory:0x1c1c	long	
    [2]	1001316	Memory:0x1c20	long	
    frequency	<array>	Memory:0x1c30	long[3]	
    [0]	4998	Memory:0x1c30	long	
    [1]	4998	Memory:0x1c34	long	
    [2]	5026	Memory:0x1c38	long	
    powerKW	<array>	Memory:0x1c00	long[3]	
    [0]	239859	Memory:0x1c00	long	
    [1]	239850	Memory:0x1c04	long	
    [2]	240144	Memory:0x1c08	long	
    vthd	<array>	Memory:0x1c24	long[3]	
    [0]	6041	Memory:0x1c24	long	
    [1]	4851	Memory:0x1c28	long	
    [2]	9612	Memory:0x1c2c	long	
    fundaV	<array>	Memory:0x1c3c	long[3]	
    [0]	192356	Memory:0x1c3c	long	
    [1]	211059	Memory:0x1c40	long	
    [2]	66446	Memory:0x1c44	long	
    

    2. All three phases 195V, 10A, UPF, 50Hz, No harmonic.

    Watch2-195V.log
    Expression	Value	Location	Type	
    voltage	<array>	Memory:0x1c0c	long[3]	
    [0]	195399	Memory:0x1c0c	long	
    [1]	194958	Memory:0x1c10	long	
    [2]	194918	Memory:0x1c14	long	
    current	<array>	Memory:0x1c18	long[3]	
    [0]	1000069	Memory:0x1c18	long	
    [1]	997555	Memory:0x1c1c	long	
    [2]	1001538	Memory:0x1c20	long	
    frequency	<array>	Memory:0x1c30	long[3]	
    [0]	5000	Memory:0x1c30	long	
    [1]	4999	Memory:0x1c34	long	
    [2]	4997	Memory:0x1c38	long	
    powerKW	<array>	Memory:0x1c00	long[3]	
    [0]	195325	Memory:0x1c00	long	
    [1]	194424	Memory:0x1c04	long	
    [2]	195188	Memory:0x1c08	long	
    vthd	<array>	Memory:0x1c24	long[3]	
    [0]	9633	Memory:0x1c24	long	
    [1]	7904	Memory:0x1c28	long	
    [2]	8304	Memory:0x1c2c	long	
    fundaV	<array>	Memory:0x1c3c	long[3]	
    [0]	52434	Memory:0x1c3c	long	
    [1]	119406	Memory:0x1c40	long	
    [2]	108573	Memory:0x1c44	long	
    

    Rgds,

    Santhosh

  • Hi Santhosh,

    Thanks much for sharing the test results. For Test 1, I see the VTHD results for the 3 phases were 6041 (phase 1), 4851 (phase 2) and 9612 (phase 3).

    A few follow-up questions.

    • Could you try applying harmonics at 195 V and share those results too?
    • What values are used for the voltage divider resistors?
    • Can you try using the metrology-template.h file from our TI design and then only change the ADC mappings to match your board?

    Thanks again.

    Regards,

    James

  • Hi James,

    1. Results are attached with 195V and Harmonics

    Watch3-195V-Harmonic.log
    Expression	Value	Location	Type	
    voltage	<array>	Memory:0x1c0c	long[3]	
    [0]	196007	Memory:0x1c0c	long	
    [1]	196052	Memory:0x1c10	long	
    [2]	195948	Memory:0x1c14	long	
    current	<array>	Memory:0x1c18	long[3]	
    [0]	997805	Memory:0x1c18	long	
    [1]	998965	Memory:0x1c1c	long	
    [2]	1001949	Memory:0x1c20	long	
    frequency	<array>	Memory:0x1c30	long[3]	
    [0]	4998	Memory:0x1c30	long	
    [1]	4998	Memory:0x1c34	long	
    [2]	4998	Memory:0x1c38	long	
    powerKW	<array>	Memory:0x1c00	long[3]	
    [0]	194580	Memory:0x1c00	long	
    [1]	194840	Memory:0x1c04	long	
    [2]	195324	Memory:0x1c08	long	
    vthd	<array>	Memory:0x1c24	long[3]	
    [0]	4828	Memory:0x1c24	long	
    [1]	9412	Memory:0x1c28	long	
    [2]	4840	Memory:0x1c2c	long	
    fundaV	<array>	Memory:0x1c3c	long[3]	
    [0]	171648	Memory:0x1c3c	long	
    [1]	66192	Memory:0x1c40	long	
    [2]	171465	Memory:0x1c44	long	
    

    2. We are using 5  127kOhm  series voltage divider resistor and  910Ohm burden

    3. I tried using the metrology-template.h with only ADC map change, then also found no improvement.

    Rgds,

    Santhosh

  • Santhosh,

    Can you also answer the following questions:

    • How are you viewing these readings?  Are you using the PC GUI or placing breakpoints in the code?
    • Can you tell me the final voltage calibration factors that you are using?  You should be able to view this by clicking the "Meter calibration factors" button on the PC GUI.

    Thank you,

    Mekre

  • Hi Mekre,

    1. I am placing the break point and viewing the result. The break point will hit only after (phase_state & PHASE_STATUS_NEW_LOG) is true and values are read using vthd[ph] = voltage_thd(ph). The break point is placed after measuring vthd.

    2. Voltage Calibration factor is 25690 for all phases.

    Rgds,

    Santhos

  • Santhos,

    Instead of using a breakpoint in the code, could you try using the PC GUI so that you don't interrupt the execution of the code while the meter is starting up?  After applying the voltage waveforms to the meter, please allow a few seconds for the fundamental readings to stabilize. It may take the fundamental readings longer to stabilize compared to the other readings. After doing this, can you tell me if you still see the same issues?

    Thank you,

    Mekre

  • Hi Santhos– I haven’t heard back from you, I’m assuming you were able to resolve your issue. If not, just post a reply below (or create a new thread if the thread has locked due to time-out) – thanks, Mekre
  • Hi Mekre,

    We are checking at our this, we will post here for any updates.

    Thanks,

    Santhosh

**Attention** This is a public forum