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.

EVM430-FR6047: USS_EXAMPLE Single TOF Level Sensing Readings

Part Number: EVM430-FR6047


Hello,

I am currently using a EVM430-FR6047 board to take TOF Level Sensing readings with a single transducer (SMD20TF1000R) which is glued onto a Graduated cylinder as depicted below. The goal is to have the program print out the TOF as I add more water. I have confirmed that the program is able to successfully take TOF readings when the level is around 55 mm or ~69 uS TOF. After I continue adding water to increase the level the readings time out  due to error 126, to which I increase the gain and then get max sample shift errors (code 135). I am trying to readings at a larger distance but am not sure what values to adjust in the USS_Config.H file to stop these errors from continuing to pop up. I have attached my code below and if I could get any feedback on how to adjust my code so I can just get a simple TOF reading as I continue to add water without algorithm errors I would greatly appreciate it. I do understand that a certain point it will not receive an echo due to the receive signal being weak but I want to resolve the issue of getting errors due to algorithms and setup my code to achieve this.

   USSSWLib_template_example-master 2.zip

  • I would like to add that at 400mL of water in the graduated cylinder I can see a reflection pulse at 174.8 uS but the code maxes out at 51mm or 69uS UPS and DOWNSTREAM

  • Hi,

    For the error code 135, you can try to set USS_ALG_MAX_SAMPLE_SHIFT with a much higher value. Such as 1000.

    However, can you show the ADC capture result when you get these errors? It should not causing the error code 135 in level sensing in general.

    Best regards,

    Cash Hao

  • Good Afternoon, 
    The code that I am using is using the UART peripheral and does not give ADC captures (Unless I am mistaken)

  • Hi,

    First, it is recommended to use demo code not the template code to start with. The demo code can connect to the USS GUI and makes it easy to tune the parameters. 

    Second, for the template project, you can still find the ADC capture data in the RAM. You can use USS_getUPSPtr() and USS_getDNSPtr to get the start address of ADC data. You can observe the ADC data in debug mode after calling USS_startUltrasonicMeasurement() function. 

    And for your current configuration, the ADC start sampling at 50us and the ADC capture window is 40us. So, you can only get the absTOF result range from 50us to 90us. You can try set a larger capture window with a lower ADC sampling rate like 3.4MHz. 

    Best regards,

    Cash Hao

  • Thank you, that seemed to resolve my issue.

    Regards,

    Sahaj

**Attention** This is a public forum