Showing results for 
Search instead for 
Did you mean: 

Knowledge Base Articles

Using a CapSense Reference Sensor to Compensate Environmental Changes - KBA227366


Using a CapSense Reference Sensor to Compensate Environmental Changes - KBA227366

Author: ShanmathiN_06            Version: **

Translation - Japanese: CapSenseのリファレンスセンサを使用して環境の変化を補正する-KBA227366- Community Translated (JA)

Environmental changes such as temperature and humidity can affect the sensor’s performance. In applications where sensors are exposed to severe environmental conditions, a reference sensor can be used to calibrate the values of an actual sensor.

This is only applicable in situations where the actual sensor and reference sensor are identical and other tuning parameters are the same. That is, the dimensions and hardware properties such as the overlay of the actual and reference sensor must be the same, resulting in similar parasitic capacitance (Cp) and Finger capacitance (Cf). Thus, the hardware tuning parameters such as IDAC code, sense clock frequency, and resolution should be same for the actual and reference sensors.

An example where this could be used is liquid level sensing applications where there are environmental changes such as temperature or humidity that affect the raw counts of the actual sensor. A reference sensor should be placed such that it is not subjected to these environmental variations that may vary the baseline. Therefore, the baseline of the reference sensor can be used to calibrate the fluctuating baseline of the actual sensor.

Here is an example code where the difference between the baselines of a reference sensor (button 0) and an actual sensor (button 1) is calculated and can be used for further processing:

//variable to hold difference between baselines

uint16 baseline_diff;





        //Button 0 is reference sensor and button 1 is actual sensor

        //Calculate difference between baselines

        baseline_diff = CapSense_dsRam.snsList.button1[0u].bsln[0u] - CapSense_dsRam.snsList.button0[0u].bsln[0u];

        //baseline_diff can be used for further processing


        //Process All Widgets



        //To sync with Tuner application



        //Scan all the CapSense widgets




Version history
Revision #:
1 of 1
Last update:
‎Jun 24, 2019 12:37 AM
Updated by: