cancel
Showing results for 
Search instead for 
Did you mean: 

why does my linear sensor array not scale/normalize?

John Davis
Associate III
Posted on June 30, 2017 at 15:57

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

https://gist.github.com/netskink/ec3cc4078d20be0f2fb56a67fa50f10d

 

Here is how I am calculating the coefficients:

https://docs.google.com/spreadsheets/d/1YOwbyMmguZp7F6Dv12cmRwLbypxmPJXVZTNRgd-RVTA/edit?usp=sharing

 

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

https://www.youtube.com/playlist?list=PLisMMQz00ChxAAp2NwkWGzTL_J7hTVne2

 
4 REPLIES 4
John Davis
Associate III
Posted on July 05, 2017 at 15:54

Bump to keep alive.  I still have not resolved this issue.

John Davis
Associate III
Posted on July 09, 2017 at 00:22

bump again to keep active. I still have this problem unresolved.  If you know of additional info I can post to help explain the problem please let me know.

Posted on July 09, 2017 at 01:03

Not sure who covers Touch Sensor stuff here. The sensor forum seems more chip related, some of the FAE's have to have some customer exposure to this area. Perhaps one of the marketing staff can poke an appropriate engineer?

https://community.st.com/community/mems-sensors-community/mems-sensors-forum

 
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on July 09, 2017 at 14:38

Thanks Clive.  I'll repost to that group.