Low ADC Readings

HI @carlvon

Because of the way the ARM processor chip on the Spark core implements the ADC, the input impedance of analog input depends on how fast you run the ADC. More samples per seconds means a lower input impedance so there is a trade-off. At the default settings in the current master branch, the input impedance is a bit tricky to calculate because the core uses a special interleaved mode with two ADCs to try to raise the input impedance, but at 220K ohm, your thermistor is too large a resistance for this input impedance of the core and so the core changes the reading. When you think about, an input impedance of around 800K ohm to ground would give the readings you are seeing.

You have a bunch of options here:

  • You can live with it and use math in the core to rescale the answers to good values. With a thermistor, there is typically a Z-shaped curve that you need to fit anyway to get good answers so this might not be a big deal.
  • You can change to a lower resistance thermistor like a 10K ohm.
  • You can add circuitry to lower the impedance that the core input sees, probably using an op-amp or a specialized op-amp called an instrumentation amplifier. You can read about this here or here.
  • You can use a specialized IC that converts thermistor resistances to digital values like the ones described here.

It is really difficult to design a circuit to linearize the thermistor resistance (that z-shaped curve) over a large temperature range, but doing that in software is usually much easier, so figuring out which things to fix in hardware and which in software is key.

4 Likes