C1 · Lesson 28 · Project
Design a sensor divider for an ADC, and find its resolution
The cheapest accurate thermometer in electronics is a thermistor, a resistor whose resistance falls steeply as it warms, in a divider feeding a microcontroller's analog-to-digital converter. Coffee makers, 3D printers, battery chargers and car engines all use one. The whole design is a DC circuit problem: choose the fixed resistor so the voltage changes as much as possible per degree, check that the converter's smallest step corresponds to a small enough temperature change, and keep the measuring current from warming the sensor. In this project you'll model it in Python and choose the resistor for a given temperature range.
- A 10 kΩ NTC thermistor (B = 3950 K) on top of a fixed resistor , from . The curve is the divider's output against temperature.
- The curve is steepest where the thermistor's resistance equals . Move and watch the steep part slide along the temperature axis.
- The readouts give the slope at the marked temperature and the temperature step one count of a 12-bit converter represents.
Predict
To make the divider most sensitive at 50 °C, what fixed resistor should go with a 10 kΩ (at 25 °C) thermistor that reads 3.59 kΩ at 50 °C?
About 3.6 kΩ. The divider's output changes fastest with the thermistor's resistance when the two are equal, so the fixed resistor should match the thermistor at the temperature you care most about. 10 kΩ would be the right choice for 25 °C.
Name it
The thermistor
An NTC (negative temperature coefficient) thermistor follows, closely enough for most designs,
with in kelvins, its value at 25 °C and a constant of a few thousand kelvins from the datasheet. Its relative slope, , is about −4.4% per °C at room temperature, more than fifty times a silicon sensor's (B9).
The divider
With the thermistor on top and below, from :
which rises with temperature. Its slope is
At a single temperature it's largest for . Over a range, the slope falls off at both ends, so the best is the one whose worst point is best.
The converter
An -bit converter whose reference is the same (a ratiometric design, so supply changes cancel) has a step of . One count then corresponds to
Self-heating
The thermistor dissipates , and its dissipation constant δ (mW/°C) says how much that warms it: . Keep small, with larger resistors or by powering the divider only while measuring.
Worked example
A 10 kΩ thermistor (B = 3950 K) with a 10 kΩ fixed resistor runs from 3.3 V into a 12-bit converter. What does it read at 25 °C, and how fine is its resolution?
Show the solution
- Reading at 25 °C. = 10 kΩ, so = 1.65 V.
- The slope.
- One count.
- Resolution in degrees.
Answer it reads 1.65 V at 25 °C, and one count is 0.022 °C.
Worked example
In that divider, the thermistor has 1.65 V across it and a dissipation constant of 1.5 mW/°C. How much does it heat itself?
Show the solution
- Power.
- Temperature rise. eight times the converter's resolution.
- Reducing it. A larger thermistor, or switching the divider on only to measure, reduces it.
Answer the thermistor heats itself by 0.18 °C.
Check
A 10 kΩ NTC thermistor has B = 3435 K. What is its resistance at 50 °C?
Write units the way you normally would: 1.5 kΩ, 1500 Ω and 0.0015 MΩ are the same answer.
Check
The thermistor reads 33 kΩ on top of a 4.7 kΩ fixed resistor, from 3.3 V. What is the output?
Write units the way you normally would: 1.5 V, 1500 mV and 0.0015 kV are the same answer.
Check
What fixed resistor makes the divider most sensitive at 40 °C, with a 10 kΩ, B = 3950 K thermistor?
Write units the way you normally would: 1.5 kΩ, 1500 Ω and 0.0015 MΩ are the same answer.
Check
A 10-bit converter has a 3.3 V reference. How big is one count?
Write units the way you normally would: 1.5 mV, 1500 µV and 0.0015 V are the same answer.
Check
A divider's output changes by 25 mV/°C, read by a 12-bit converter with a 3.3 V reference. What temperature step does one count represent?
Check
A thermistor of 10 kΩ has 1.65 V across it and a dissipation constant of 2 mW/°C. How much does it heat itself?
Check
Write rt(Tc) for a 10 kΩ, B = 3950 K thermistor (Tc in °C), and vout(Tc, Rf, Vcc=3.3) for the divider with the thermistor on top.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Write resolution(Tc, Rf, bits=12, Vcc=3.3): the temperature (°C) one converter count represents at Tc, using a central-difference slope of vout with a step of 0.01 °C.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Write best_rf(T1, T2, bits=12): from E24 values in 1 kΩ to 91 kΩ (the list is given), return (Rf, worst), the fixed resistor whose worst resolution over 101 evenly spaced temperatures from T1 to T2 °C is smallest, and that worst value.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Explain why
Why is a thermistor divider read by a converter whose reference is the same supply that feeds the divider?
The divider's output is a fixed fraction of its supply, set only by the two resistances. A converter reports its input as a fraction of its reference voltage. If the reference is the same supply, any change in that supply scales the input and the reference together, and the converter's reading, the fraction, stays the same. The supply's tolerance, noise and drift all cancel, so the measurement depends only on the thermistor and the fixed resistor. With a separate reference, every millivolt of supply error would look like a temperature change.
Practice
Keep practicing
9 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.