I’m debating two options to read the voltage from the analog temperature IC LMT70. Over the desired temperature range I need for this application, this IC outputs a nearly linear voltage that is easily read by an ADC. Looking at the datasheet, over the needed temperature range, the LMT70 will output a voltage from 1097mV to 838mV. I need to resolve 0.1C steps. The Boron 12-bit ADC unamplified will not give me the resolution I need. So, I’m considering two options:
Use an external ADC (like the ADS1115, 16-bit resolution with establish Particle library); or
Build an external amplification circuit using Op Amps to cut, amplify and map the LMT70 output voltage to better suit the Boron 12-bit ADC. So, instead of using only 250mV of the Boron ADC, amplify it to 0-3000 mV.
Either could work. There are pros and cons to either approach. I have successfully used the ADS1115 in other designs but it does add cost. The Op Amp circuit has fewer fail states and would likely be less expensive, but it is less flexible and I have never built a circuit like this before. It would be a learning lesson I guess.
I would use the PGA in the ADS1115. If you can guarantee that the temperature will never reach 0deg, then you can use the +/-1.024V range. The input span is still 259mV, but the LSB is now 31uV instead of 700uV. And you only need to resolve about 500uV (LMT70 tempco).
The external amplifier will introduce other errors. You may need to tweak gain and offset. Since you want to shift the voltage to 0V, you may need a voltage reference and an additional opamp. This implementation may be simplified, depending on component tolerances.
The LMT70 has a negative tempco, so I guess you don’t have to worry about over-driving the ADC in case the temperature goes below 0deg. That would require a way to clamp the amplifier output.
After all that, you only get about 63uV resolution over the 259mV.
First off, 0.1C resolution is a pretty tough requirement. I would be asking questions about what happens if you cannot resolve that finely: Does the process you are controlling fail and the soufflé falls? Or does the reactor blow up? Or maybe nothing much happens. Things in the real world with thermal mass are hard to control to that level of precision. It can certainly be done, but for me, the engineering required to achieve 0.1C resolution reliably would depend on what happens when it cannot be achieved.
If this a one-off for a home project, then the op-amp(s) will be cheaper and you can spend the time to tune the gain and offset. Twenty-turn potentiometers and 1% resistors are likely called for. Be prepared to re-calibrate periodically to some other reference standard.
If this is for use in multiple deployed boards as a product etc., I would definitely choose the external ADC/PGA as @Pescatore says above. You will have more flexibility and better ways to apply calibration in the digital world. There will still be analog error sources, of course, they will just be easier to mitigate.