TFT Capacitive Screen interfering with sensors

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
nclaire
 
Posts: 12
Joined: Sat Jan 29, 2022 3:15 pm

TFT Capacitive Screen interfering with sensors

Post by nclaire »

I have a TFT 2.8" Capacitive Touchscreen connected to an Arduino MEGA along with 12 temperature sensors.
I use the display to change the set temperature of an aluminum bar that changes temperature. The sensors read the temperature.
However, it seems like the screen is interfering with the sensors. When I press the up/down arrows to change the temperature, I frequently get a voltage drop across my sensors.
I have no idea how to fix this, as I have tried many things.
Any thoughts or advice would be greatly appreciated.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: TFT Capacitive Screen interfering with sensors

Post by mikeysklar »

How are the temperature sensor connected to your controller? Are you going through analog pins or using another type of sensor?

User avatar
nclaire
 
Posts: 12
Joined: Sat Jan 29, 2022 3:15 pm

Re: TFT Capacitive Screen interfering with sensors

Post by nclaire »

There are 12 LM35 temperature sensors connected to analog A0-A11.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: TFT Capacitive Screen interfering with sensors

Post by mikeysklar »

Are you using opamps between your LM35s and the ADC pins? I find that critical to get stable readings with multiple devices on the ADC and other interactions with the controller.

https://www.adafruit.com/product/808

User avatar
nclaire
 
Posts: 12
Joined: Sat Jan 29, 2022 3:15 pm

Re: TFT Capacitive Screen interfering with sensors

Post by nclaire »

I am not. But what I have noticed is that the 5 V on my MCU drops by about 50 mV at the same time that I am seeing the drop in my sensors, corresponding to a similar 40-50 mV drop. I do not know why touching my screen sometimes causes this drop though.
Do you know anything about this?

User avatar
nclaire
 
Posts: 12
Joined: Sat Jan 29, 2022 3:15 pm

Re: TFT Capacitive Screen interfering with sensors

Post by nclaire »

I have confirmed that it happens due to the touch. I unplugged the I2C pins from the screen to MCU, and when I touch the screen, nothing happens (as expected) and nothing changes on my sensors. When I plug the I2C pins back in and touch the screen, the sensor reading drops in voltage.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: TFT Capacitive Screen interfering with sensors

Post by mikeysklar »

Does the brightness change as well when you touch the screen?

What are you using for a power supply? How much current is being drawn normally versus when the display is touched?

User avatar
nclaire
 
Posts: 12
Joined: Sat Jan 29, 2022 3:15 pm

Re: TFT Capacitive Screen interfering with sensors

Post by nclaire »

Thank you for your help. I believe I identified the issue. I had a line in my code that declared the x and y coordinate points as outputs after reading the touch. I had included this because I had experienced other issues in the past with the screen, and upon research, I found that this might help. It did not, but I guess I left it without realizing it was causing other problems. However, since removing that line of code, I have not seen the sensor problem. I have executed it about 20-30 times, so I feel confident I have resolved the problem.

Thank you again!

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: TFT Capacitive Screen interfering with sensors

Post by mikeysklar »

Thank you for summarizing the resolution. Good find.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Arduino products from Adafruit”