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.

CCS/IWR1443: mmWave Demo For Fluid Level Sensing

Part Number: IWR1443

Tool/software: Code Composer Studio

Hi,

I am trying to use the mmWave demo for fluid level sensing of two liquids in a tank. For example, If I have water and oil inside of a tank, I want to detect only the levels of the two liquids. I am trying to search through the data output of the mmWave demo and find the top two distances with the highest relative power. However, I want to make sure that I am picking up the two distances of the liquids, and not the side of the tank. Here is the code I am using to search for the top two distances.

struct TopDistances {
    uint16_t TopDistance1;
    uint16_t TopDistance2;
    uint16_t DistanceIndex1;
    uint16_t DistanceIndex2;
};

struct TopDistances GetTopTwoDistances(MmwDemo_DataPathObj *obj) {

int i,j, Dist1Index, Dist2Index;
int16_t temp1, temp2, Top1, Top2;
struct TopDistances TopDist;

TopDist.TopDistance1 = 0;
TopDist.TopDistance2 = 0;
Top1 = 0;
Top2 = 0;
Dist1Index = 0;
Dist2Index = 0;

//Find first object with greatest relative power
for(i = 0; i <= obj->numObjOut ; i++) {
    temp1 = obj->objOut[i].peakVal;
    if(temp1 > Top1) {
       Top1 = temp1;
       Dist1Index = i;
    }
 }

TopDist.DistanceIndex1 = Dist1Index;
//Set top distance 1
TopDist.TopDistance1 = obj->objOut[Dist1Index].rangeIdx;

//Find second object with greatest relative power
for(j = 0; j <= obj->numObjOut ; j++) {
      temp2 = obj->objOut[i].peakVal;
      if((temp2 > Top2) && (temp2 != Top1)) {
           Top2 = temp2;
           Dist2Index = j;
   }
 }

TopDist.DistanceIndex2 = Dist2Index;
//Set top distance 2
TopDist.TopDistance2 = obj->objOut[Dist2Index].rangeIdx;

return TopDist;
}

These are my Questions:

Would finding the two distances with the highest relative power correspond to the two liquids? Is peakVal the relative power of the object? If not, what is it?

How can I make sure I don't pick up the sides of the tank when searching for the liquid levels? I just want the sensor to look straight down into the tank. Would I need to configure the antennas for this, or set certain parameters in the command line?

Thanks & Regards,

Kyle

  • Hi Kyle,

    First question, you are peakVal is the relative signal strength that is received. The top two peakVal values would correspond to the the two liquids.

    Second question, this one is much trickier. You cannot simply steer the beam from the sensor clear of the walls. If you knew what distance the walls of your tank are being detected then you can program to simply throw these values out. Perhaps an optical lens would help you concentrate the beam of the sensor, although we cannot recommend a lens at this time.


    Cheers,
    Akash
  • Hi Akash,

    Thanks for confirming that peakVal is indeed the relative signal strength.

    I do know the dimensions of the tank. How would I go about programming the board to throw the values out that correspond to the tank walls?

    Thanks,
    Kyle