capsense baseline custom calibration

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
HeGi_2497906
Level 5
Level 5
100 replies posted 50 replies posted 25 replies posted

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.

image.png

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

Herb

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

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.

pastedImage_5.png

I have shown this in the attached project as well.

Thanks,
Hari

View solution in original post

0 Likes
1 Reply
lock attach
Attachments are accessible only for community members.
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

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.

pastedImage_5.png

I have shown this in the attached project as well.

Thanks,
Hari

0 Likes