AnsweredAssumed Answered

why does my linear sensor array not scale/normalize?

Question asked by John Davis on Jun 30, 2017
Latest reply on Jul 9, 2017 by John Davis

I'm using STM Studio to tune my linrot (linear) sensors according to this application note:

"AN4316 Application note Tuning a STMTouch-based application"

 

I did this before and it appeared to work.  However with this new board revision and new code it does not.

 

Here is the complete code

touch screen linear touch does not scale/normalize · GitHub 

 

Here is how I am calculating the coefficients:

linrot scaling - Google Sheets 

 

Here is the relevant portions of the code with some comments:

 

tsl_conf.h has enabled use of the coefficients

#define TSLPRM_LINROT_USE_NORMDELTA (1) // does this need to be set to use coefficients?

 

tsl_user.c has been tested with and without the modified coefficients

// Default
//CONST uint16_t MyLinRot0_DeltaCoeff[5] = {0x0100, 0x0100, 0x0100, 0x0100, 0x0100};
// calculated
//CONST uint16_t MyLinRot0_DeltaCoeff[5] = {0x15c, 0x13b, 0x158, 0x138, 0x100}; // CH0, CH1, CH2, .. CH4
// Tweaked to make coefficent[2] greater than calculated to attempt to raise its level.
CONST uint16_t MyLinRot0_DeltaCoeff[5] = {0x15c, 0x13b, 0x1b8, 0x138, 0x100}; // CH0, CH1, CH2, .. CH4

 

Here are some videos demoing the results

stm32 linrot sensors scaling of sensors - YouTube 

Outcomes