ADC pin measurements while pins are floating

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Makineci
Level 1
Level 1
First solution authored 10 sign-ins 5 sign-ins

Hello,

I'm working on the TC375 and I've run into a bit of a head-scratcher while testing my ADC measurements. So, here's the deal: when I connect the pins to a voltage source, everything seems to be working just fine. No issues there. But here's where it gets weird.

When I decided to let the ADC pins float (you know, not connected to anything), I ran the sample single scan code and queued group scan code provided by the Aurix Development Studio. To my surprise, I saw around 300 mV on the pin in both my readings and on the oscilloscope. 

But here's the kicker. In my software, I'm seeing a reading of 1.65V, which matches what I'm seeing on the oscilloscope.  How did it jump from 300 mV to 1.65V out of nowhere?

I'm trying to figure out if this is normal behavior or if I've made a mistake somewhere. Any ideas or suggestions would be awesome!

Thanks.

0 Likes
1 Solution
Makineci
Level 1
Level 1
First solution authored 10 sign-ins 5 sign-ins

Hello,

I sincerely appreciate your response! Your insight is indeed valid; observing floating values is not a good practice. In my case, I discovered that the issue stemmed from the Post Calibration setting. By toggling the post calibration register from "on" to "off," I was able to restore consistency in the results.

Once again, I want to express my gratitude for the helpful links and the clear explanation you provided. Thank you!

View solution in original post

0 Likes
2 Replies
Giraffe1492
Level 5
Level 5
25 sign-ins 25 likes received 10 solutions authored

Hello,

It seems like you are experiencing an issue with floating ADC pins on the TC375. When the ADC pins are left floating (not connected to anything), they can pick up noise from the surrounding environment, which can cause unexpected voltage readings. This is likely the reason why you are observing a jump from 300 mV to 1.65V.

To avoid this issue, you can either connect the ADC pins to a known voltage source (e.g., ground) when not in use or use a pull-down resistor to keep the voltage at a known level. This will help to stabilize the voltage readings and prevent unexpected fluctuations.

Additionally, it's essential to ensure that you have properly configured the ADC settings in your code. You can refer to the AURIX™ TC375 documentation for more information on ADC configuration and best practices.

Here's a code snippet for ADC configuration:

 // ADC configuration IfxVadc_Adc_Config adcConfig; IfxVadc_Adc_initModuleConfig(&adcConfig, &MODULE_VADC); IfxVadc_Adc_initModule(&g_vadc, &adcConfig);
// ADC group configuration IfxVadc_Adc_GroupConfig groupConfig; IfxVadc_Adc_initGroupConfig(&groupConfig, &g_vadc); groupConfig.groupId = IfxVadc_GroupId_0; IfxVadc_Adc_initGroup(&g_adcGroup, &groupConfig);
// ADC channel configuration IfxVadc_Adc_ChannelConfig channelConfig; IfxVadc_Adc_initChannelConfig(&channelConfig, &g_adcGroup); channelConfig.channelId = IfxVadc_ChannelId_0; IfxVadc_Adc_initChannel(&g_adcChannel, &channelConfig);

I hope this helps! Let me know if you have any further questions.

https://www.infineon.com/cms/en/product/sensor/current-sensors/tli4971-a050t5-e0001/
https://www.infineon.com/cms/en/product/sensor/current-sensors/tli4971-a025t5-u-e0001/
https://www.infineon.com/cms/en/product/sensor/current-sensors/tli4971-a025t5-e0001/
https://www.infineon.com/cms/en/product/promopages/makeradar/Highlights/S2GL_programming_tutorial/ti...
https://www.infineon.com/cms/en/product/sensor/current-sensors/tli4971-a050t5-u-e0001/

0 Likes
Makineci
Level 1
Level 1
First solution authored 10 sign-ins 5 sign-ins

Hello,

I sincerely appreciate your response! Your insight is indeed valid; observing floating values is not a good practice. In my case, I discovered that the issue stemmed from the Post Calibration setting. By toggling the post calibration register from "on" to "off," I was able to restore consistency in the results.

Once again, I want to express my gratitude for the helpful links and the clear explanation you provided. Thank you!

0 Likes