Let's talk a little about the sensing circuits. I've made a small decision to lay out a board which can be populated with parts for either RTD or NTC thermistor options, which will lead to an interesting difference and at different cost points.
The RTD circuit was ... shamelessly copied from a TI reference design. They're much better at analog design since they're not a CS person who pretends to be an EE and a ME on alternating weeks, which means I'm going to mention a few things from it but leave the details to this excellent description:
Here is a directly transliterated version I am using:
You'll note the note says to recalculate values - I haven't made a pass to update component values in this to pick a smaller temperature range of interesting (not -50 to 125C), maybe 10-40C?
This is a design for a three wire sensor. It uses a dual 100uA current source driver (handy in one little package) called the REF200 which will excite the sensor wires with a fixed current, and then measure the difference + a fixed value (the 78.7 ohm R1) into an extremely low noise and sensitive instrumentation amplifier (INA326), which sets gain to amplify the small difference into a full swing output voltage.
I realize I'm getting a bit ahead of myself here, since there are a few other notes:
- I'm starting the design by using an STM32F103 microcontroller. It has two 12-bit ADCs which can be run continuously, as well as trigger support for those A/Ds if interrupts should be established as a first effort software control.
- The STM32F103 is very well supported by open source tools, has a ton of useful perhipherals (CAN, USB, multiple serial, good A/D) but has a weak point in its analog chain: the smaller (non 100pin) versions of the chip do not support an external reference voltage.
- 3v3A is a separate analog regulated voltage from the board input, and since its used as the reference voltage for measurements, is also used as the reference voltage for everything on the board. The exact value therefore is not critical, as long as its stable and quiet, as all gains and measurements will be ratios from this voltage where possible.
The 3V3A source is either a stock LM1117 regulator, or a very low noise and high power supply rejection ratio (a measure of how much noise passes through the unit from the source power supply) unit (ADP7118,
https://www.analog.com/en/products/adp7118.html#):
Now, I mentioned thermistors! We can instead populate a thermistor amplifier in the mix:
Since thermistors have a much higher value (10k is a usual nominal choice), they are easier to measure in some regards and don't require a current source to avoid driving too much current through them and heating them. In this case, I am using a a simple resistor divider formed by the thermistor and R21 (of a yet to be calculated value). This is then low-passed through C24/R27. This also protects the op-amp input from any wiring goofs.
The Opamp is a OPA2376, which is a precision rail to rail (full input to output swing) type. R23 and R24 set a fixed gain and offset, along with the source labeled 2V5Ref, which is a 2.5V voltage reference. This reference is designed to make sure the offset is
fixed and do not vary as 3V3A varies - this is the only value which is not a ratio in the design. Since the measurement of the thermistor and the actual ratio formed by the thermistor are formed by the same value (3V3A), this design is more immune to supply changes and noise.
Note that you can only load one or the other type of sensor circuit on the board, but there is little reason to not put the wiring and part footprints on the board and simply not load the relevant parts as a test vehicle.
I'll share some other design notes on the hardware comparison circuit before software gets involved next.