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.

MSP430FR6047: MSP430FR6047 USS DC offset cancellation

Part Number: MSP430FR6047


Hello,
 I have a question on how DC offset cancellation works in USSLib.

I tried to enable it by define USS_APP_DC_OFFSET_CANCELLATION_ENABLE, and I tried USS_APP_DC_OFFSET_CANCELLATION_INTERVAL in the range from 1 to 10000.

I want to know how I know when is offset cancellation enabled, because when I was checking waveforms in USS Desing center there was offset approx. -1600ps, despite having cancellation enabled.

The first picture is with cancellation enabled (interval 10000), second with disabled, then configuration.

Hardware is the same as described here at the end: https://e2e.ti.com/support/microcontrollers/msp430/f/166/t/893154

Thanks

  • Pictures don't upload properly.

  • Hi Tadeas,

    The DC offset cancellation is performed at the frequency determined by the interval.  You won't see the result of the DC offset cancellation in the captured signal because the cancellation is done inside the algorithm.

    BR,
    Leo

  • Hi Tadeas,

    If you'd like to understand exactly how the offset is estimated, you can find the source code in this function:

    USS_estimateDCoffset

    which is located in the ussSwLibCalibration.c file of the example project.  Please note that the offset is estimated at the frequency given by the interval parameter - but it is applied for every capture. 

    BR,
    Leo

  • Hi,


    I checked for function, and I!m not sure if it is actually used. Is it necessary to call function USS_estimateDCoffset in the main loop?

    ---


    I've done some measurements and I discover that DC offset is changing when I pour some liquid through measuring tube.


    I'm measuring my volume with calculation from values pt_alg_res.iq44DeltaTOF. The first picture is volume calculated from DToF, second is when liquid is going through tube and third is volume after the liquid was poured. You can see that offset is shifted to lower values.

  • Hi,


    I checked for function, and I!m not sure if it is actually used. Is it necessary to call function USS_estimateDCoffset in the main loop?

    ---


    I've done some measurements and I discover that DC offset is changing when I pour some liquid through measuring tube.


    I'm measuring my volume with calculation from values pt_alg_res.iq44DeltaTOF. The first picture is volume calculated from DToF, second is when liquid is going through tube and third is volume after the liquid was poured. You can see that offset is shifted to lower values.

  • Hi Tadeas,

    The ADC capture waveform you showed in your 1st post does not look very clean. I suggest couple of changes/experiments before you optimize on the DC-Offset. Using the "Frequency Sweep" feature, find the optimal excitation frequency in a range from 900 kHz - 1100 kHz. You should also reduce the "Gap between pulse start and ADC capture" from 31 us to maybe 25 us.

    You can look at water flow meter quick start guide at https://www.ti.com/lit/pdf/slau810 for some of these procedures.

    Srinivas

**Attention** This is a public forum