C128 of 30
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

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 Rf, from Vcc. The curve is the divider's output against temperature.
  • The curve is steepest where the thermistor's resistance equals Rf. Move Rf 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?

Name it

The thermistor

An NTC (negative temperature coefficient) thermistor follows, closely enough for most designs,

RT=R25eB(1T−1298.15 K)

with T in kelvins, R25 its value at 25 °C and B a constant of a few thousand kelvins from the datasheet. Its relative slope, −B/T2, 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 Rf below, from Vcc:

Vout=VccRfRf+RT

which rises with temperature. Its slope is

dVdT=VccRfRT(Rf+RT)2⋅BT2

At a single temperature it's largest for Rf=RT(T). Over a range, the slope falls off at both ends, so the best Rf is the one whose worst point is best.

The converter

An N-bit converter whose reference is the same Vcc (a ratiometric design, so supply changes cancel) has a step of Vcc/2N. One count then corresponds to

ΔT=Vcc/2NdV/dT

Self-heating

The thermistor dissipates P=VT2/RT, and its dissipation constant δ (mW/°C) says how much that warms it: ΔT=P/δ. Keep P 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
  1. Reading at 25 °C. RT = 10 kΩ, so Vout = 1.65 V.
  2. The slope. dVdT=3.3×108(2×104)2×3950298.152=36.7mV/°C
  3. One count. 3.34096=0.806mV
  4. Resolution in degrees. 0.80636.7=0.022°C

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
  1. Power. P=1.652104=0.27mW
  2. Temperature rise. ΔT=0.271.5=0.18°C eight times the converter's resolution.
  3. 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?

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.