1 Reply Latest reply on Aug 23, 2020 11:15 PM by AH_96

    capsense baseline custom calibration


      I have a tank sensor system and am trying to use the tuner to understand all the values I am seeing.  I have the tuner active and can see 50% increase in counts or more from baseline from a finger touch on the back of the sensor, but so far the liquid is not triggering a response.




      Here is the question I have, I have been through all capsense examples, and read all the documents again.  The only examples I can find of a custom baseline involve describe resetting the baseline for a STUCK sensor or tuning units, but none address what I am l looking for which is a way to calibrate what is seen when the tank in empty, and reset the baseline to that calibration on startup, and not auto tune the sensors to a new baseline on power up, I just cannot seem to find an example of that?


      Can you point me in the right direction, or do you know how to accomplish this?  If not each time the units starts up, any existing liquid is calibrated out.



      Attempting to resolve this myself I found several command about baselines, but no instructions on how to use them.  Also, many low level  APIs are not present, such as the ones to return the capacitance of a widget, why?  I thought you had to define a VAR, but there is no c




        • 1. Re: capsense baseline custom calibration

          Hello HeGi_2497906


          For liquid level sensing applications, you need to calibrate the container when empty and store the baseline in flash. This can be done during production and a user button or any other input method can be added to calibrate it on field. Upon every subsequent powerup, you can read the calibrated value from flash and then compare the raw count against the data that was stored to process the amount of liquid present.


          If the baseline is not stored in flash, then on power-up you will lose the liquid level reading since, CapSense sets the baseline = raw count on power up.


          I am attaching a project that shows the same with this response.


          To measure the Cp, you can enable the self-test library in the component and use the CapSense_GetSensorCapacitance API to read the sensor's Cp.

          I have shown this in the attached project as well.