Sensors & Measurement · Study deck

Temperature Sensor Labs: Comparing Sensor Types

Picture a freezer sensor showing 85 C just after power returns.

Physics Phoebe is your guide for this deck.

sensortemperature
iotclass.org

After studying this chapter

Learning objectives

You will be able to:

  • Interface DS18B20 sensors: Configure 1-Wire bus and read multiple temperature sensors on a single pin
  • Analyse thermocouple operation: Explain how thermocouples generate temperature-dependent voltages via the Seebeck effect and calculate output voltages using the Seebeck coefficient
  • Evaluate humidity sensors: Differentiate capacitive, resistive, and thermal conductivity sensing methods based on accuracy, response time, and application suitability
  • Construct temperature monitoring systems: Wire and program robust temperature acquisition circuits with correct pull-up resistors and multi-sensor addressing
Lab checklist view: Before powering on, verify voltage levels (3.3V vs 5V), ground connections, correct GPIO pins, and required pull-up resistors. First test should read raw values and check against known reference (ice water = 0C). Common failures have specific fixes: no response means wiring issue, wrong values indicate voltage/timing problems, unstable readings need filtering, and drift requires calibration.
Lab checklist view: Before powering on, verify voltage levels (3.3V vs 5V), ground connections, correct GPIO pins, and required pull-up resistors. First test should read raw values and check against known reference (ice water = 0C). Common failures have specific fixes: no response means wiring issue, wrong values indicate voltage/timing problems, unstable readings need filtering, and drift requires calibration.
iotclass.org

Major section

Start With the Measurement Story

The number is valid data but not a valid freezer reading.

  • The lab must separate a real temperature from a startup or link fault.
  • A cyclic redundancy check, or CRC, is a short code used to detect changed data.
  • General purpose input output, or GPIO, means a configurable pin on a small computer board.
Real photograph of thermocouple probe (k/j/t/e-type)
Real photograph of thermocouple probe (k/j/t/e-type)
iotclass.org

Major section

Start With the Measurement Story (continued)

This runway does not prove accuracy across every range or mounting condition.

  • The deeper sections compare sensor types, wiring, conversion timing, calibration, error codes, and heat-flow limits.
  • A temperature lab is not just a wiring exercise.
  • The useful story is heat moving through the sensor package, the reading lagging behind reality, and calibration evidence showing when the number can be trusted.
iotclass.org

Major section

Key Concepts

Thermistor: a temperature-sensitive resistor whose resistance changes predictably with temperature, available as NTC (negative temperature coefficient) or PTC (positive temperature coefficient) types.

  • RTD: Resistance Temperature Detector — a precision temperature sensor using pure metal wire (platinum PT100/PT1000) whose resistance increases linearly with temperature.
  • ADC Resolution: the number of discrete output values an analog-to-digital converter can produce; higher resolution (more bits) means finer temperature discrimination.
  • The same current also causes I2RI^2RI2R self-heating: 0.100 mW and 1.00 mW respectively.
iotclass.org

Major section

Temperature Sensors Overview

The workflow supplies the running structure for each device lab below and prevents a plausible first reading from being mistaken for validated evidence.

  • In Figure: Lab checklist view, voltage, ground, GPIO choice, and pull-up presence are acceptance conditions before energising the circuit.
  • The first reading is then compared with a known reference rather than judged by plausibility alone.
  • Those loops matter because firmware cannot compensate for every wiring fault, and calibration cannot legitimise an unstable interface.

Why it matters

Those loops matter because firmware cannot compensate for every wiring fault, and calibration cannot legitimise an unstable interface.

Sensor Implementation Workflow: From Research to Deployment with Debug Loops
Sensor Implementation Workflow: From Research to Deployment with Debug Loops
iotclass.org

Major section

DS18B20 (1-Wire Digital Temperature)

The DS18B20 is one of the most popular digital temperature sensors for IoT projects.

  • It uses the 1-Wire protocol, which means multiple sensors can share a single GPIO pin -- each sensor has a factory-programmed unique 64-bit address that distinguishes it on the bus.
  • That relationship explains how discovery, conversion delay, and per-device reads must be verified before several DS18B20s can share the bus reliably.
  • The DS18B20 stores temperature as a 16-bit signed integer in 12-bit resolution mode, where the lower 4 bits represent the fractional part and each LSB represents 0.0625C.
A small black TO-92 package DS18B20 temperature sensor with three long metal leads lies beside a United States quarter for scale. The coin is round and silver; no cable appears in the photo.
A small black TO-92 package DS18B20 temperature sensor with three long metal leads lies beside a United States quarter for scale. The coin is round and silver; no cable appears in the photo.
iotclass.org

Deck summary

Key takeaways

The number is valid data but not a valid freezer reading.

  • This runway does not prove accuracy across every range or mounting condition.
  • Thermistor: a temperature-sensitive resistor whose resistance changes predictably with temperature, available as NTC (negative temperature coefficient) or PTC (positive temperature coefficient) types.
  • The workflow supplies the running structure for each device lab below and prevents a plausible first reading from being mistaken for validated evidence.
  • The DS18B20 is one of the most popular digital temperature sensors for IoT projects.
iotclass.org

Retrieval practice

Recall check 1 of 2

Physics Phoebe says: answer from memory, then check your reasoning.

Q1A thermocouple has a sensitivity of 40 µV per °C. Its hot junction is 50 °C above its reference junction. What ideal voltage difference is expected?

A40 µV, as if temperature difference were only one degree.
B0.8 µV, from dividing sensitivity by fifty degrees.
C2 V, from treating microvolts as full volts in the product.
D2 mV, from 40 µV/°C multiplied by a 50 °C difference.
Show answer

Answer: D 40 µV/°C × 50 °C = 2000 µV = 2 mV.

iotclass.org

Retrieval practice

Recall check 2 of 2

Physics Phoebe says: answer from memory, then check your reasoning.

Q2Several DS18B20 sensors share one GPIO. What lets the controller distinguish their readings?

AEach sensor’s unique stored address
BThe common supply voltage as an identity code
CThe order in which cable colors appear
DA separate ADC channel for each sensor
Show answer

Answer: A The chapter ties shared-bus discovery and per-device reads to individual digital identities.

Q3The lab sensor reads 85 °C immediately after power-up. What should firmware check first?

AWhether another sensor’s address can replace the result
BWhether conversion time elapsed before reading
CWhether the dashboard assigned a different color
DWhether to treat the value as a confirmed temperature
Show answer

Answer: B Check that conversion completed before reading; 85 °C can also be real, so use timing and context.

iotclass.org

Print reference

Answers

Answer key.

  1. D · 40 µV/°C × 50 °C = 2000 µV = 2 mV.
  2. A · The chapter ties shared-bus discovery and per-device reads to individual digital identities.
  3. B · Check that conversion completed before reading; 85 °C can also be real, so use timing and context.
iotclass.org