cancel
Showing results for 
Search instead for 
Did you mean: 

STMtouch libary expanding to 8 channel rotary

demmons
Associate
Posted on October 21, 2015 at 20:26

Attempting to port an existing 8 pad rotary touch sensor application which currently uses an external IC for touch sensing. Existing tsl_linrot.c from STMTouch library only supports to 6 channel rotary. Specifically I need to know how to compute TSL_tsignPosition_T for 8 channel rotary application. i.e TSL_POSOFF_8CH_ROT_M[8][8]  =

#tsi-stmtouch
3 REPLIES 3
Thierry GUILHOT
ST Employee
Posted on November 02, 2015 at 11:53

Hi,

As you've certainly understood, the calculation and thus the table TSL_POSOFF_8CH_ROT_M[8][8] depend on the topology of the rotary you are working with.

Could you please detail the type of the rotary: standard mono or dual?

Best Regards,

Thierry,

demmons
Associate
Posted on November 02, 2015 at 18:21

Thierry,

8 Pads, Standard mono. The current touch pad IC is a Freescale MPR083

The current software only needs to the detect touch and release of each pad.

I've attached a photo of the PCB pads

0690X0000060358QAA.jpg

Thanks for your help

Darren Emmons

OutBack Power Technologies

Thierry GUILHOT
ST Employee
Posted on November 04, 2015 at 12:20

Hi Darren,

Please find below the correponding table and declarations:

1. tsl_linrot.c file

//==============================================================================

// 8 CHANNELS - ROTARY - MONO

// i.e. CH1 CH2 CH3 CH4 CH5 CH6 CH7 CH8

//==============================================================================

#if TSLPRM_USE_8CH_ROT_M > 0

CONST TSL_tsignPosition_T TSL_POSOFF_8CH_ROT_M[8][8] =

{

// sec = 1     2     3     4     5     6     7     8

//   j = 0     1     2     3     4     5     6     7

     {   0,  -24,    0,    0,    0,    0,    0,  120 }, // maj = 1; i = 0

     {   8,    0,  -40,    0,    0,    0,    0,    0 }, // maj = 2; i = 1

     {   0,   24,    0,  -56,    0,    0,    0,    0 }, // maj = 3; i = 2

     {   0,    0,   40,    0,  -72,    0,    0,    0 }, // maj = 4; i = 3

     {   0,    0,    0,   56,    0,  -88,    0,    0 }, // maj = 5; i = 4

     {   0,    0,    0,    0,   72,    0, -104,    0 }, // maj = 6; i = 5

  {   0,    0,    0,    0,    0,   88,    0, -120 }, // maj = 7; i = 6

  {-136,    0,    0,    0,    0,    0,  104,    0 }  // maj = 8; i = 7

};

#endif

2. tsl_linrot.h file

#define TSL_SCTCOMP_6CH_ROT_M  ((TSL_tNb_T)( 32))

Note that for optimum performances, all the channels must be acquired simultaneously. This implies that 8 analog I/O groups should be used. If not, this can introduce some side effects as the result of acquisition will be not extracted at once but in several phases. Between each phase, the touch can move slightly. This can thus introduce a wrong reporting of the touch position.

Best Regards,

Thierry,