ADC values if connected circuit has no measurement object

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ADC values if connected circuit has no measurement object

1,289 Views
yixinwu
Contributor I

Hello community,

I am using MPC5744P and have currently an issue about the ADC module.

One of our applications of ADC is measuring PT100 resistor values to determine the temperature. I have found out, if there is no PT100 sensor connected, the measured values are random. They can be any values:

pastedImage_1.png

If a sensor is connected, the values are stable and correct. Is this normal behavier of ADC?

Here is the schematic of connection:

pastedImage_2.png

Cause we take like 60 samples and calculate the average, then apply a formular to get the temperature value. If the values are really random, the average of them is most likely still beyond the maximum possible value for temperature calculation. However, we have detected, it happens twice per day, that the average of these random samples is possible for temperature calculation, which means we have measurement even there is no sensor connected. Every time it could last 60 minutes, then back to the situation that the average is again high enough to be filtered out. This sounds for me like a periodical influence from the evironment. Is there maybe any issue known familiar?

Thanks for any reply in advance.

Tags (2)
0 Kudos
7 Replies

1,147 Views
TomE
Specialist II

I just replied to this post, and this new forum lost the lot.

Repeating what I just entered...

If you enable pullups or pulldowns it will affect the reading. Since those internal resistors aren't precise, you can't correct for them.

You could enable the resistors, but only to TEST to see if the PT100 is there. Then you'd have to disable them.

But you've already got R724 there anyway. If that input reads close to 3.3V then the PT100 isn't there. Problem solved.

Tom\

0 Kudos

1,172 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

If ADC input is not connected, it'll be Hi-Z - it means some random value coming from inducted noise will be converted.

To prevent this you should enable internal pull up/down resistor (PCRn.WPE and PCRn.WPS). Then you will read high/low value.

0 Kudos

1,172 Views
yixinwu
Contributor I

Hello,

Thank you for your reply.

Which PCR register do you mean here? I can't find ADC_PCRn.

0 Kudos

1,172 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Sorry, I used terminology of predecessor device by mistake. On this device the register is called SIUL2_MSCR. And bits PUE, PUS.

0 Kudos

1,172 Views
yixinwu
Contributor I

I could not write the PUE or PUS bit for these MSCR registers, for example B[7]:

pastedImage_1.png

After configuration only the APC bit has changed.

I have configured like this:

if(l_ulchmask & CH0Smask)
  SIUL2.MSCR[SIUL_PB7].R = SIUL_ANALOG | SIUL_PULL_DOWN | SIUL_HYS; // 0x00450000

Other MSCR register of digital input can be configured with pull up or pull down, e.g.: E[14]:

pastedImage_2.png

0 Kudos

1,172 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Sorry, it seems analog pads does not have this option on this device.

pastedImage_2.png

I suppose you need to prevent incorrect measurements in case the pad is open

In this case you have several other options:

1) You can add external pull resistor

2) To implement ADC self test as depicted in the device's safety manual. Pay attention to section 5.7.2.3.2.1.4 ADC_SWTEST_TEST1 (open detection)

0 Kudos

1,172 Views
yixinwu
Contributor I

Thank you. I will check the detail of ADC self test.

0 Kudos