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.

TIDM-1019: Calibration Table

Part Number: TIDM-1019

Hi,

I've a problem with the adv. calibration Table, when enable, i don't have correct results. I'll explain all the steps i've done so far.

I've Flash my card with your default program (clean install), the only change in your code is the following one :

alg_results_float.volumeFlowRate *= 10.0;   //10x multiply

There is the result of our testing bench with adv. calibration table disable :

As you can see, the error is "correct" from Q4 (4741.19L/h) to 420.08L/h ( volume error of water going through the water meter).

Then I'm doing the calibration with USS (adv. calibration table disable) . I will use 3 ranges

Then, I disconnect the card, enable Adv. Calibration Table, generate headers, rebuild the program and flash the card.

I connect the card to USS, looking at the waveforms and check Adv. Calibration Table

Mean value stay at 0, it's perfect because no water is going through the water meter, but I've the following error :

1 ) I've an error 134 (The minimum volume flow rate falls outside the lowest alpha min calibration point), I guess it's linked to the second problem. How to fix this error ? By editing the "Flow minimum" of the first range ? Which value then ?

2) Volume on the card (LCD) stay at 0 and do not change when water is going through the water meter

I do a test at Q1 (26.361 L/h) with Adv. calibration Table disable, seems correct same result for the mean value when i was doing the calibration

Then i check Adv. calibration Table

Mean value is at 7.29 L/h and really far from Q1 (26.361 L/h), why ?

I've the same behavior for other flow rates

Best Regards,

Maxime

  • Hi Maxime,

    In order for this to work, you need to set the flow minimum(from the main calibration tab) to a negative value that handles the most negative value you will see.  

    I need to get back to you on the LCD issue and the strange results you are seeing after doing some more testing here.

    BR,
    Leo

  • Hi Leo,

    I connect the card with Adv. Calibration Table disable. I read the waveform of the flow rate (at 0L/h), after 5 minutes, min value is -0.75 L/h

    I set my minimum flow to -0.8 L/h

    Again, disconnect the card, enable Adv. Calibration Table, generate headers, rebuild, flash the card.

    Now, when i enable Adv. Calibration Table, no more error 134, and volume on LCD is working now.

    But always strange results :

    When Adv. Calibration Table is disabled, mean value = 0L/h  ==> OK

    When Adv. Calibration Table is enabled, mean value = -20 L/h ==> NOK

    I've also upload my headers as attached files.

    Regards,

    Maxime

    USS_Config.zip

  • Hi Leo,

    From what i see, i think the problem is with the Offset.

    For example :

    at 26.361 L/h -> mean value with Adv. Calibration Table disable = 31.4705 L/h

    For this range : slope = 0.908 ; Offset = -2.1241

    Expected value with the calibration table enable will be : (31.4705*0.908) - 2.1241 = 28.4384 L/h

    Value on USS : 7.29 L/h , I think there is a *10 on the offset

    (31.4705*0.908) - 10*2.1241 = 7.3342 L/h

    Same example at 0 L/h :

    at 0 L/h -> mean value with Adv. Calibration Table disable = -0.8L/h

    For this range : slope = 0.908 ; Offset = -2.1241

    Expected value with the calibration table enable will be : (-0.8*0.908) - 2.1241 = -2.85 L/h

    Value on USS : -21.87 L/h

    (-0.8*0.908) - 10*2.1241 = -21.9674 L/h

     

    Regards,

    Maxime

  • Hi Leo,

    I've done more tests.

    So, from my previous reply, it seems that the Offset is not correct (error of *10).

    I've changed the values directly in USS_meterVFRCalib.h and rebuild then flash the card.

    Good news, now mean flow rate on USS is the correct value.

    But I've a "constant" error on the volume from the LCD as you can see on my test.

    On our test bench, when we are doing the test for example on Q1, before the test start, we encode the initial volume (from the LCD), then the test will start, a calibrated piston will push a volume of water through the water meter at a constant flow rate, at the end of the test, we encode the final volume (from the LCD). Then the error is calculated (-6.42%).

    I'm pretty happy with the global curve on my screenshot. The easiest way to fix this problem will be to "lift up" all the curve by changing the Meter constant in USS.

    It will fix the problem of the error on the volume, but then the flow rate in USS and on the LCD will not be the right one.

    I hope these informations will help you to fix this problem.

    Regards,

    Maxime

  • Hi Maxime,

    Can you ensure you have averaging disabled for the results you are seeing on the LCD screen? Turning averaging off for the LCD is described in section 3.1.2.3.2 of the TIDM-1019 document.

    BR,
    Leo

  • Hi Leo,

    Can you provide the name of this document ? I was not able to find anything about "Turning averaging off"

    Regards,

    Maxime.

  • Hi Maxime,

    You can scroll through different modes on the LCD by pushing the buttons on the EVM. The up button turns the LCD on and if you push the right button 5 times this should put you into the non-averaging mode.(you need to wait until the message finishes scrolling on the LCD between each button press)

    Here is the link to the document:

    http://www.ti.com/lit/ug/tidudn0/tidudn0.pdf

    BR,
    Leo

  • Hi Leo,

    I don't understand how to disable the averaging. I guess the averaging is enabled because when i go through the menu the value is always changing.

    Regards,

    Maxime

  • Hi Maxime,

    You need to push the right button, wait until the text scrolls, push the button, wait until the text scrolls, etc. You'll see the text changes to describe what is being reported each time you push the button.  You should repeat the process of pushing the button and waiting for the text to scroll before pushing it again 5 times. The scrolling text should then say "Flow Rate in LPH".  In this mode, the individual flow rate measurement results are being reported.

    BR,
    Leo

  • Hi Leo,

    I think there is a misunderstanding. On the LCD, avg flow rate and Flow Rate in LPH are correct, I've done a test again with our calibrated piston at 42l/h, the mean value on USS match the value of the LCD and the value on our testing bench.

    But, to be able to calculate the error of the water meter, i need to use the volume. And the problem i encounter is with the volume from the LCD, not the flow rate.

    cc from my previous post :

    On our test bench, when we are doing the test for example on Q1, before the test start, we encode the initial volume (from the LCD), then the test will start, a calibrated piston will push a volume of water through the water meter at a constant flow rate, at the end of the test, we encode the final volume (from the LCD).

    ((Final volume (LCD) - Initial volume (LCD))  - (volume of our piston)) / (volume of our piston) = % error

    The easiest way to fix this problem will be to "lift up" all the curve by changing the Meter constant in USS.

    It will fix the problem of the error on the volume, but then the flow rate in USS and on the LCD will not be the right one.

    I think there is a problem with the volume on the LCD

    Regards,

    Maxime

  • Hello Maxime,

    When you are running this test are you also connected to the GUI?  On the volume calculation that is output to the LCD, it uses .gap_ups_ups to determine the measurement rate.  Typically, this is sent when the request update button is sent from the GUI.  If you are not connecting to the GUI, I recommend setting this manually in ussDCCommandHandlers.c so it is set at power up.  You could add the 2 lines of code below to set for 1sec measurement interval and LPH units. I tested under flow in our lab and the volume seen on the LCD is accurate.  Let me know if this fixes your issue.     

    COMAND_HANDLER gCommandHandler =
    {
            .appReqUpdate = false,
            .appReqData = false,
            .appReqCaptures = false,
            .updateValid = false,
            .updateCalib = false,
            // Add the following lines
            .gap_ups_ups = 1000, // milliseconds
            .flowrate_unit = true, // lph - true, gpm - false
    };
    

  • Hello Eddie,

    When you are running this test are you also connected to the GUI?

    Yes, I'm always connected to USS. Why ? Because i need to be connected to USS to enable adv. calibration Table.

    If you are not connecting to the GUI, I recommend setting this manually in ussDCCommandHandlers.c so it is set at power up.  You could add the 2 lines of code below to set for 1sec measurement interval and LPH units. I tested under flow in our lab and the volume seen on the LCD is accurate.  Let me know if this fixes your issue.     

    I've updated my code but I can't do the test because i need to be connected to USS to enable adv. calibration Table.

    I've made 3 other tests :

              - @105.05L/h - volume expected 3L - LCD Volume (final - initial) : 2.83L

    Error : -5.64%

    -@105.05L/h - volume expected 10L - LCD Volume : 9.47L

    Error : -5.21%

    -@105.05L/h - volume expected 10L - LCD Volume : 9.46L

    Error : -5.33%

    For these 3 tests : mean value for the flow rate in USS are the same =  106.1L/h (expected 105.05L/h)

    It's strange, I've a mean value for the flow rate above the real one, but the error is negative.

    I've made another test to see if there is any difference between the LCD and USS.

    At 0L/h for 10 minutes :

    - Mean flow rate in USS : -2.20L/h

    - Average flow rate LCD : -2.19L/h

    "Flow rate" and "Mean flow rate" seem OK. I've still a problem with the volume.

    Regards,

    Maxime

     

     

     

     

  • Hi Maxime,

    I think the latest version (2.20.00.18) on ti.com addresses the issue you mention about "Advanced Calibration Table". Could you please download that latest version and retest?

    Srinivas

  • Srinivas Lingam said:

    Hi Maxime,

    I think the latest version (2.20.00.18) on ti.com addresses the issue you mention about "Advanced Calibration Table". Could you please download that latest version and retest?

    Srinivas

    Hi Srinivas,

    I'm already on version 2.20.00.18 "Ultrasonic Sensing Design Center version 02_20_00_18"

    Regards,

    Maxime

  • Maxime,

    I did another test for a longer period of time(10mins) and I see similar results on the volume shown in the LCD(~5% error).  This is due to the gap_ups_ups time being based on a non deterministic timer, so it is not exactly 1sec which throws off the results the longer you test for.  The more functions that are enabled(GUI, LCD, etc), the longer this time will be.  We will be fixing this in the next software release using a deterministic timer implementation.  In the mean time, you could implement a work around to get the proper volume calculated. 

    I recommend setting all your parameters in the same method as you will run your test(enable GUI, start measurements in GUI, enable calibration table, etc), then benchmark the actual time it takes for the full measurement.  You may want to measure this a few times and take an average if the time is varying some from measurement to measurement.  Once you have this benchmarked, replace the gap_ups_ups with the value in milliseconds that you have measured.  I have provided a code snippet below from hmi.c where this can be replaced.  Let me know if this works for you.  As mentioned above, this will not be an issue in the next SW release.

    #ifdef ENABLE_LCD
    	if( true != lcd_statemachine_isSleep())
    	{
    		results_Update(alg_results_float.deltaTOF,
    		               alg_results_float.volumeFlowRate,
    					   DC_User_Params->gap_ups_ups);  //replace gap_ups_ups by measured value(in milliseconds)

  • Hello Eddie,

    #1 Test @105.05L/h ; volume : 10L ;  Time : 05:59sec => 359000ms

    gap_ups_ups is a uint16_t

    359 000 >65 535 => i've a warning in CCS but i'm able to rebuild and flash the card

    Volume at the end of the test was not correct, expected 10L, on LCD (final - initial) : 293.8L

    #2  Test @105.05L/h ; volume : 1.7L ; Time : 01:01sec => 61000ms

    61 000 < 65 535 => no warning in CCS

    Volume at the end of the test was not correct, expected 1.7L, on LCD : 96.03L

    Still an error on the volume.

    Also, can you provide the release date of the next SW release ?

    Regards,

    Maxime

  • Maxime,

    Your implementation of the code is not correct.  Please replace the gap_ups_ups value with a fixed value as shown below.  

    #ifdef ENABLE_LCD
    	if( true != lcd_statemachine_isSleep())
    	{
    		results_Update(alg_results_float.deltaTOF,
    		               alg_results_float.volumeFlowRate,
    					   DC_User_Params->1000);  //1000ms example

    The next software release is expected Late October/Early November.

  • Hello Eddie,

    i've exactly the same code as you but i've a build error.

    Regards,

  • Maxime,

    Sorry, my code snippet was not correct.  Please use it as shown below.  If you are continuing to have issues, let me know.  I think it could be good to have a conference call to work through this or any other challenges you see.

    #ifdef ENABLE_LCD
    	if( true != lcd_statemachine_isSleep())
    	{
    		results_Update(alg_results_float.deltaTOF,
    		               alg_results_float.volumeFlowRate,
    					   1000);  //replace gap_ups_ups by measured value(in milliseconds)
    	}

  • Hello Eddie,

    Test on calibrated piston @ 420.08l/h , test take exactly 51 secondes for a volume of 6 liters

    #ifdef ENABLE_LCD
    	if( true != lcd_statemachine_isSleep())
    	{
    		results_Update(alg_results_float.deltaTOF,
    		               alg_results_float.volumeFlowRate,
    					   51000);  //replace gap_ups_ups by measured value(in milliseconds)
    	}

    The result is not good at all for the volume

    Initial volume (LCD) = 63.30L

    Final volume (LCD) = 350.30L

    Final - initial = 287L

    Expected volume (PISTON) = 6.03806L

    Error = +4653.18%

    On USS :

    adv. calibrated table was enable during the test, and the flowrate was correct, mean value : 419L/h, expected 420.08L/h

    So, still a problem with the volume,

    Regards,

    Maxime

  • Maxime,

    Sorry for the delay.  The value needs to be the time for 1 measurement.  You could measure this by adding some GPIO signal to the start and end of measurement.  Be sure this test is done with LCD enabled since this is causing some extra time. 

  • Hello Eddie,

    I don't have time to work on this for the moment, I will wait for the new software release.

    Regards,

    Maxime

  • Hello Eddie,

    Do you have any news concerning the software update/release ?

    Regards,

    Maxime

  • Hi Maxime,

    The software release should be in around 2-3 weeks.  The software will be available at the link below.

    http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/USSSWLib/USSSWLibWater/latest/

**Attention** This is a public forum