This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TSC2046: ADS7846 ADC value

Part Number: TSC2046
Other Parts Discussed in Thread: ADS7846, , AM3352,

I have two question about ADS7846 ADC value

1) I connect Vcc & Vref pin to +3.3V, and measure the voltage of X+,Y+,X-,Y- without touching screen.

    X+ =2.5V

    Y+ =2.5V

    X- =0V

    Y-=0V

   Is that right? Should X+ and Y+ be 3.3V?

2) I get the ADC value of 4 corners but the value is not expected to be close to 0 or 4096.

    What's wrong with this condition? 

    Does this condition lead to the wrong calibration?

    Now I face the wrong calibration and don't put any capacitor or resistance on the X+,Y+,X-,Y- line.

    Right and top (3205,3148)

    Right and bottom (3081,846)

    Left  and top (763,2960)

    Left and bottom (928,1078)

  • Hi William Hsieh1,

    I got the same issue as you.

    I got the x data error but y data is right.

    (435,110)

    (340,3933)

    (3885,3930)

    (3965,140)

    Have you resolved the problem?

  • Hi

    I haven't resolved this problem and still wait for the response.

    I wonder if I should apply some modification on the driver.

    William.

  • You can set settle_delay_usecs vaue 10 to discards the first sample and use the second one. Maybe it will improve.

  • I don't think the driver needs to be modify, and all we need to do is modify the configuration in struct ads7846_platform_data.

  • Yes, I mean the modification on the parameter setting.

  • Is it supported? @TI's Employee & Engineer.

  • After replace ADS7846 with TSC2046E, I get the voltage 3.3V on X+,X-,Y+,Y- without touching screen.

    So the question 1 is resolved.

    But the second problem is still the same.

    The coordinates of left X & bottom Y are close to 1000 and the coordinates of right X & top Y are close to 3000.

    Should the coordinates close to 0 or 4096?

    Does this condition affect the calibration result?

    After touch screen calibration, the locations  in the middle are close to the pointer but the location on the corners are more far away from the pointer.

  • Hello William,

    I apologize for such a delay in response. 

    Can you please provide a schematic and scope captures of the SPI communications ( DIN, DOUT, CS, and DCLK)?

    Regards,

    Aaron

  • Hi Aaron,

    I upload the scope captures of the SPI communications & schematic.

    I modify the VDD and Vref to +5V and IOVDD to +3V3.

    TSC2046-TOUCH_2020_0710.pdf

    William.

  • Hi Aaron,

    I get the bellow data when touch the point (P1,P2,P3,P4) from the SPI communication. The data is distorted especially in X directions. 

  • William,

    Notice that your data in (2) has similar distortions. 

  • William,

    Thanks for sharing the information. I see the distorted DIN signal and I have not seen anything like this. It will require some more investigation. Just to clarify from your scope shot, it looks like you are sending 10010011 where A2-A0 = 001 which measured Y position, 12-bit mode, Differential measurement and P1-P0 = 11 where reference and ADC are on. Can you confirm this?

    Why have the reference on if you are applying an external reference? Also, when using differential measurement, X+ or Y+ (Depending on measurement) is used for the reference. 


    Regards,

    Aaron

  • Hello User5331662,

    Since you are experiencing similar behavior, I hope that we can resolve this soon. Please feel free to comment on any finding/discoveries you may have upon trying to resolve this. 

    Regards,

    Aaron

  • I keep pressing the touching screen and take a picture on the scope.

    So I think the A2-A0 would keep changing as the description in the data sheet.

    P1 & P0 are the power down mode selection bits. Would it affect the measurement result.

    I use the ADS7846 driver on below and the mode setting depends on the driver.

    Is any modification on the driver?

    https://github.com/torvalds/linux/blob/master/drivers/input/touchscreen/ads7846.c

  • Hi Araon,

    I get the coordinates of the 4 corners on the different size touch screen.

    The result shows the coordinates of 15" touch screen are more far away from 0 or 4096.

    Is the resistance of the touch screen affecting coordinate feedback?

    Is there any modification on the driver?

    4.3" touch screen 7" touch screen 10.2" touch screen 15" touch screen
    Left & top (203,3714) (156,3789) (183,3771) (563,3055)
    Right & top (3796,3655) (3910,3740) (3807,3704) (3386,3364)
    Right & bottom (3736,414) (3844,403) (3883,401) (3288,633)
    Left & bottom (251,487) (324,370) (147,266) (750,1038)
  • Hi William,

    How is the device being calibrated? I saw in an earlier post that after calibration was done, the center coordinates were good but the corner ones still were not. 


    Regards,

    Aaron

  • Hi Aron,

    I follow the method on the below file and the 5 point calibration result is better than 3 point calibration.

    https://www.ti.com/lit/an/slyt277/slyt277.pdf?ts=1594694873871&ref_url=https%253A%252F%252Fwww.google.com%252F

    William.

  • Hi Aron & William,

    I think we just got a problematic raw data from touchscreen controller (TSC2046 & ADS7846). I get the data form the internal touchscreen controller of am3352 is better than tsc2046. It's unexpected.

  • Hi 

    I get the same condition with you.

    I get the better calibration result with the touch controller of AM3352 and pointer is with no shift after calibration.

    With ADS7846 or TSC2046,I found 5 point calibration result is better than 3 point calibration but the pointer is still with shift after calibration.

    William.

  • The cases such as moving, rotation and reverse can be corrected by touchscreen calibration algorithms, but it's distorted like my previously reply.

  • Hello William, and User,

    After some discussion internally, I would also like to point out that the corner coordinates are usually off. We can expect to see at the low end 200 or greater and 3800 or less on at the high end. 

    William,looking at the table you previously provided, it seems like these coordinates closely resemble to what we usually see. As for data being closer in the AM3352, it may be worth it to ask a question in the processors forum to see what calibration is done and how to implement it. 

    Regards,

    Aaron

  • Hi Aaron,

    I use tslib 5 point calibration in AM3352.

    But I  want to understand why I can't get precise calibration with ADS7846 or TSC2046.

    I can get the precise calibration with AM3352 built-in controller with the same calibration method. 

    William.

  • Hi WIlliam,

    Like I mentioned before, we usually don't expect super precise coordinates for the corners. As for why you are getting better results on the AM3352 built in controller, I unfortunately cannot say. I do not have any experience with that device. 

    What voltages are you measuring when touching the corners? Can you provide measurements for each of the corners?

    Regards,

    Aaron

  • Hi Aaron,

    The voltage on the X+/Y+/X-/Y- is still changing when I press the screen, so I upload the pictures on the  oscilloscope. 

    X+ on Right & TOP

     Y+ on Right & TOP

     X- on Right & TOP

    Y- on Right & TOP

     

    X+ on Left & Bottom

     Y+ on  Left & Bottom

     X- on  Left & Bottom

     Y- on  Left & Bottom

  • Hello William,

    The lines seem a bit noisy and in the second image, show a peak at ~5.5V. This is concerning as the absolute maximum of an analog input is VCC + 0.3V and violating this can cause permanent damage to the device. To reduce some of the noise, RC filters can be added on the lines but a draw back is that this will increase the settling time of the touch screen and compensation may be needed to operate correctly. 

    Another question I wanted to ask is what is the resolution of the touch screen being used? I believe there is a resolution configuration section in the driver and I wanted to just confirm that this is configured correctly. 

    Regards,

    Aaron

  • Hi Aaron,

    I would add RC filters to reduce the analog noise.

    But I found out that the voltage on the line doesn't reach 5V or 0V.

    Does it mean that  I have to slow down the SPI clock frequency and add the settling time?

    I set the resolution setting to 12 bit and it's the default setting.

    William.

  • Hi Aaron,

    After set settle-delay to 150u Sec and SPI clock to 1MHz, the calibration is good now.

    William.

  • Hi William,

    Glad to see the calibration is good now. 

    Regards,

    Aaron

  • Hi William,

    Congratulations on solving this problem.

    I want to know what is your final data. Would you share the data?

  • Hi 

    After set settle-delay to 150u Sec and SPI clock to 1MHz, the coordinates on the coroners are 1xx & 38xx and more closer to 0 & 4096.

    William.

  • Hi William,

    Does the data have the distortion I mentioned earlier?

    In X direction, My data always has a deviation of about 60 AD-Value.

  • Hi 

    On my custom board the coordinates on the 4 corners are (104,195) & (3897,233) & (3892,3807) & (122,3830).

    The deviation is a bit smaller than yours.

    I get the better calibration result with 5 point calibration than  that with 3 point calibration,so maybe you could try it.

    William. 

  • Hi William,

    Thank you for your advise.

    I use the tslib to calibrate. I use the driver ads7846.c from linux-3.2.0-psp04.06.00.11.

    What size are you using the panel? 7, 8 or 10 inch?

    Would you share me the improved schematic? 

    Although my data  can be used, but I am more worried about it becoming worse in the future.

  • My schematic link is as below and the touch screen is 15".

    7041.TSC2046-TOUCH_2020_0710.pdf

    William

    • In reply to Aaron Estrada51:

      Hi Aaron,

      I would add RC filters to reduce the analog noise.

      But I found out that the voltage on the line doesn't reach 5V or 0V.

      Does it mean that  I have to slow down the SPI clock frequency and add the settling time?

      I set the resolution setting to 12 bit and it's the default setting.

      William.

    • In reply to William Hsieh1:

      Hi Aaron,

      After set settle-delay to 150u Sec and SPI clock to 1MHz, the calibration is good now.

      William.

      Hi William,

      You said to add RC filters to reduce the analog noise in your reply.  but I found your schematic has not been modified.

      In other words, the calibration is better just depend you set settle-delay to 150u Sec and SPI clock to 1MHz. Is that right?

      Ivan

  • Hi Ivan,

    Yes, it's right.

    I haven't add RC filters yet and the calibration is better just after setting settle-delay to 150u Sec and SPI clock to 1MHz.

    William.

  • Hello William,

    We changed it according  your schematic but no improved. I want to know what version is your driver? what do you think is the reason for my problem?

    Ivan.

  • Hi Ivan,

    We use the built-in ADS7846 driver in Sitara AM3352 SDK and I don't know the version of the driver.

    Maybe you get the coordinates of the 4 corners first and monitor if anything unreasonable.

    If the coordinates seems to be normal , you could check your calibration tool.

    William.

  • Hi William,

    Those abnormal data is adc value, calibration value seems to be no problem.

    As all we know, the calibration program can be correct such as zoom, rotation and translation. but it's not suitable for the adc value I got.

    Now, the data has a small deviation, it's can be regarded as a small angle of rotation, and the calibrated data is acceptable. It's very lucky!

    But if the deviation becomes larger,the rotation algorithm will distort the data. 

    Ivan