2
\$\begingroup\$

I'm attempting to read an air temp. sensor made by Amphenol (Datasheet). The sensor outputs is pulse density modulated (PDM) and is filtered to DC using a simple LPF as suggested by the manufactorer. Testing the output after the filter using a scope looks great with neglectible ripple for my need.

My ADC input circuit is loading the output, probably because the impedance is too low, so the voltages I see are skewed. I've managed to correct them using a 2nd order equation and now I am usually withinin 1 degree of the theoretical (expected) temp. reading.

Here is the strange part - in a certain range in the middle of the sensor's range I get a "hump" where readings will stop responding linearily and act like a parabole with max. point. After the edges of this area, the behaviour goes back to linear again.

I am puzzled what is skewing the readings exactly in that range. I can undertand that due to capacitors and loading the ADC input circuit is affecting the whole range, but what affects just a part of it?

Here is a circuit of the sensor + fitler + ADC input. R1 + C1 make up the LPF. R2 + R3 + C2 make up a voltage divider at the ADC's input. The ADC's input resistance is now shows but according to the MCU datasheet it is max 50kOhm.

The sensor's output after the filter is expected to be perfectly linear. Just thught to make that clear.

Worth mentioning that I have repeated this experiment 3 times using different sensors, different filters and different input channels of the MCU's ADC (although they are multiplexed, but still to rule out a damaged MUX). I have seen the exact same thing each time with minimal diff. between the sensors.

There might be additional information missing here, so please let me know and I will add as requested.

Update #1 X axis are ADC raw readings (basically mV at R2 & R3 junction), Y axis is the expected mV reading from the sensor at the temp. that was meassured using an external thermomether. According to the equation from Amphenol / Telaire this should be linear.

Here is the equation from Amphenol: PDM_T [mV] = ((T[degC] / 165) + 0.2424) * VDD [mV]

enter image description here

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
3
  • 1
    \$\begingroup\$ This sensor has I2C output, you could use this instead of using ADC. Now, its PDM has a fixed frequency output which could create a beat frequency with the ADC sampling frequency, so you could change the ADC sampling frequency, see if it gives better results. \$\endgroup\$
    – bobflux
    Feb 13, 2021 at 10:50
  • 5
    \$\begingroup\$ How far away from ideal is the uncorrected measurement numerically? Numbers and graphs matter here. So do data sheets. But before you do that, you should review several of your earlier questions and accept answers that are the most appropriate. Play the game. \$\endgroup\$
    – Andy aka
    Feb 13, 2021 at 10:53
  • \$\begingroup\$ @Andyaka OK, did that. Also added the readings from the ADC vs. expected mV output (post-filter). \$\endgroup\$
    – user733606
    Feb 13, 2021 at 17:08

2 Answers 2

2
\$\begingroup\$

Unbuffered SAR ADCs present a loading that is dependent on sample rate (to somewhere mid-scale typically, rather than to ground as is usually shown in simplified diagrams), and your high impedance source affects the acquisition time. It's easiest to have a simple op-amp buffer, but sometimes you can get away without it.

This brief TI "technote" describes some of the considerations in connecting a sensor directly without a driver. Your ADC and circuit may or may not have the flexibility to implement their suggestions.

enter image description here

In general, decrease your sample rate and sample clock frequency to the minimum acceptable to both reduce the average loading and increase the acquisition time for the internal ADC capacitor to charge to close to the input voltage.

Or use the I2C and avoid touching all the analog stuff entirely, as others have suggested.

\$\endgroup\$
5
  • \$\begingroup\$ The low impedance in the samlping cycle can explain the lower reading by the ADC. What about the strange "hill" in the graph? Any thought regarding that? Thanks! \$\endgroup\$
    – user733606
    Feb 13, 2021 at 22:14
  • 1
    \$\begingroup\$ I'm thinking because you're partially charging the Csh from a voltage near mid-scale you get a nonlinear behavior that attenuates voltages on either side of around mid-scale. Just a guess. \$\endgroup\$ Feb 13, 2021 at 22:19
  • \$\begingroup\$ So you are saying the "hill" region is actually closer to ideal than the edges? \$\endgroup\$
    – user733606
    Feb 13, 2021 at 22:23
  • 1
    \$\begingroup\$ That's my thought. \$\endgroup\$ Feb 13, 2021 at 22:24
  • \$\begingroup\$ As an experiment, I took a power supply set on 5V and a resistor decade box between and the ADC input circuit. I inserted resistors from 100 Ohms to 40k Ohms and the ADC error I was getting is roughly about 0.5% from expected reading according to a simple voltage divider equation. It does not seem like the added resistors changed anything for accuracy of the samples. Perhaps this is not the right experiment because it lacks the filter? Perhaps inputting a 250KHz sine into the filter and repeating the at different voltages would be better? \$\endgroup\$
    – user733606
    Feb 15, 2021 at 14:48
1
\$\begingroup\$

First of all, commenters rightly suggested to use I2C; if it's available it should the best way to read that sensor.

Let's assume you want to use the PDM output:

  • Check if bypass capacitors are correct on the sensor. The datasheet calls for a 220nF and it could be critical; the Vcore capacitor is important too;
  • The PDM frequency is quite high (230kHz) and shouldn't be difficult to filter. From the datasheet a 100nF capacitor should give you 8 bit of effective resolution;
  • With a scope check for suitable ripple on your node 2 and on the R1/C1 node, just to be sure.

Now, for the biggest thing: ADC input impedance is one thing, but the circuit ouput impedance matters, too, especially with these pulsed circuits.

First of all 50kOhm of input is not really a great thing. From the transducer output impedance you have (assuming and ideal PDM transmitter) about 20kOhm on the high side paralleled to 10kOhm on the low side.

It seems to me that you are trying to match a 5V signal to a 2.5V ADC, is it right?

This is an effective output impedance of less than 5kOhm that propably will influence your reading.

You didn't specify the kind of ADC you are using but, assuming the usual charge redistribution SAR inside the chip you will have some multiplex switching resistor, some leakage and at the end about 10pF (usually less) of sampling capacitor. You will find the equivalent schematic in your datasheet.

Now the idea is that your signal will have to flow from you output (in this case C2, supplemented by the current trickling from the sensor), thru the multiplexer inside the ADC and charge the sampling capacitor exactly to the same voltage.

The required time is called input settling time and depends on how much bits you need: you are transferring charge between capacitors so initially it will be fast and then it will slow down.

This has to happen during the sampling time of your converter; if output impedance isn't low enough the sampling capacitor will not match the signal level and you'll see mismatches.

If your converter has an adjustable sampling time try to raise it and see if it goes better. The usual solution in this time would be simply a buffer amplifier before the converter (but be wary of offset errors).

MCU integrated converter are often susceptible to these issue because they are simply… cheap converters:P

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.