Skip to content
MakerBuddy

Week 11 · Term 2 · 45 to 60 minutes

Precision Temperature (DS18B20)

Compare sensor accuracy and application

Try it first, no kit needed

Learning Objective

Compare sensor accuracy and understand waterproof sensors.

Precision Temperature (DS18B20)

Week 11 Term 2 45-60 minutes
DS18B20 waterproof temperature probe connected to port 26 of the green MakerBuddy IoT Kit V1.0 boardDS18B20 waterproof temperature probe connected to port 26 of the green MakerBuddy IoT Kit V1.0 board

Hardware: DS18B20 Waterproof Temperature Probe

The DS18B20 temperature card in the MakerBuddy web app, browser extension and mobile appThe DS18B20 temperature card in the MakerBuddy web app, browser extension and mobile app

Dashboard: DS18B20 Probe Reading Card

See How the DS18B20 Temperature Probe Works

Read the picture from left to right: the change in the world → the sensor signal → a useful action.

Diagram showing a waterproof metal temperature probe in cool and warm water, a digital reading, and aquarium, tank and cold-storage uses

1 · What it notices

The temperature at its sealed metal tip, even in liquids.

2 · How it works

It sends the temperature at its tip as a digital value along one data wire.

3 · Why it matters

It can go where an air sensor should not, like inside water, and track the temperature of one container.

Where might we use it?

  • Aquariums
  • Water systems
  • Cold storage and food projects

Student sentence: A DS18B20 measures temperature at its metal tip and sends the result digitally.

Teacher/parent prompt: Ask, “What changes on the left, what does the sensor turn it into, and what could happen next?”

Theory: Waterproof Temperature Sensors

Specialized Sensors for Specialized Jobs

Last week, you learned about the DHT11 sensor. It is great for air, but water would destroy it. To measure the temperature of a liquid, like the water in a swimming pool, you need the DS18B20: a waterproof, high-precision temperature sensor.

How the DS18B20 Works

The DS18B20 sits inside a stainless steel tip on a waterproof cable, so the tip and the cable can go under water. The plug at the other end and the MakerBuddy board must always stay dry. The sensor turns temperature into digital data inside the tip. It sends it to the ESP32 with the One-Wire protocol: rules for sending data over one data wire (plus power and ground). Like the DHT11, it sends digital data, so a little electrical noise on the wire can't change the reading. What makes the DS18B20 more accurate than the DHT11 is the sensor itself.

Technical Details: Precision and Range

The DS18B20 measures from -55°C to +125°C. It is accurate to ±0.5°C from -10°C to +85°C (the DHT11: ±2°C). Its resolution, the smallest step it can measure, can be set from 9-bit to 12-bit. At the highest, it measures in steps of 0.0625°C and each reading takes up to 750 ms. MakerBuddy starts a new reading every second and shows it at the next update. So the card updates about every 2 seconds, like the other cards.

Real-World Applications

Aquarium and pool monitors, HVAC systems (heating and cooling) and solar hot water systems all use it.

For Teachers

Compare DHT11 and DS18B20 readings side by side. Show waterproofing by dipping only the probe tip in water (never the DHT11!). Discuss accuracy vs. precision.

For Parents

Your child learns to pick the right sensor for the job, a skill for any career. The DS18B20 is waterproof and more precise than last week's DHT11.

Try It: Probe vs Air Sensor

Interactive demo · no kit needed

Play with a pretend MakerBuddy board and its web page, right here.

Follow the steps one at a time. Got the kit? You can switch to the real board inside.

Hands-On Activity: Sensor Comparison

Activity Duration: 25-30 minutes

Connect the DS18B20 and compare it with the DHT11.

Step-by-Step Instructions:

  1. Connect the DS18B20: Find the steel probe on a waterproof cable. Unplug the USB cable. Plug the DS18B20 into the 3-pin connector marked 26 on the right edge of the board. It only fits one way, so never force it. Plug the USB cable back in.
  2. Verify DHT11 Connection: Keep the DHT11 plugged in from Week 10.
  3. Open Dashboard: Find the Temperature (DHT) and Temperature (DS18B20) cards. If Temperature (DS18B20) shows 0.0, the board can't find the probe. Unplug the USB cable and check the plug in 26.
  4. Baseline Comparison: Note both readings at room temperature. Do they differ?
  5. Stability Test: Watch both for 2-3 minutes without touching. Which one jumps around more?
  6. Heat Test: Hold the probe gently in your closed fist for 60 seconds. How high does it go?
  7. Cooling Observation: Let go. How long until it settles back at room temperature?
  8. Comparison Table: Make a table: first reading, stability (± degrees), warm-up time and recovery time.

What Students Should Observe:

  • DS18B20 readings are usually steadier than the DHT11's
  • Both read similar temperatures, but the DS18B20 is usually more accurate
  • The probe warms up in your fist, then cools back down more slowly in the air
  • The DS18B20 itself can measure from -55 °C to 125 °C, far hotter than is safe to touch. In class, use only cool or lukewarm water.

Safety Note

For liquids, use only cool tap water or lukewarm water (no warmer than a comfortable bath). Never use boiling water, a kettle or ice baths. Only the metal tip goes in the water. Never put the DHT11 or any other sensor in water.

Challenge

Your Mission: Temperature Detective

Use the DS18B20 to find the hottest and coldest spots in your classroom.

Challenge 1: Temperature Mapping

Measure and note the temperature in five places. Carry the board on a USB power bank, or reach each spot with the probe's cable. Wait each time until the number stops changing:

  1. Near a window (especially if sunny)
  2. Under your desk in the shade
  3. Near a computer or electronic device
  4. Center of the classroom
  5. Near a door or air vent

What is the temperature difference between the warmest and coolest spots? Why?

Challenge 2: Sensor Accuracy Test

If your classroom has a thermometer, compare it with both sensors. Which is closer? Work out each sensor's error (the difference).

Discussion Questions:

  • Why choose a DS18B20 over a DHT11, even with no humidity reading?
  • Which jobs need waterproof sensors? List at least three.
  • The DS18B20 measures in tiny steps of 0.0625 °C. Say it reads 22.3125 °C and the DHT11 reads 22 °C. The dashboard rounds every temperature to one decimal place, so you would see 22.3 and 22.0. Which sensor is more precise? Does that make it more accurate?

Bonus Challenge: Research the One-Wire protocol. Why is it "one-wire" when the sensor has three wires? (Hint: only one carries data. The others are power and ground.)

Key Takeaways

✓ Waterproof Sensors

The DS18B20's stainless steel probe and sealed cable let it measure liquids without damage.

✓ One-Wire Protocol

One-Wire sends data over a single wire (plus power and ground). Many DS18B20s can share it, each with its own 64-bit address.

✓ Sensor Accuracy

The DS18B20 is accurate to ±0.5°C; the DHT11 to ±2°C. Both send digital data, so the difference comes from the sensor itself.

✓ Temperature Comparison

Precision is the number of decimal places. Accuracy is how close the reading is to the true value. Pick the sensor that fits the job.

Coming Up Next Week:

Week 12: Distance & Echolocation (HC-SR04)

Learning Support

Use this quick guide to help every learner understand, practice and explain Precision Temperature (DS18B20).

For students

Try it in three steps

  1. Say it: explain the main idea in one simple sentence.
  2. Show it: Connect the DS18B20 to connector 26. Record its readings next to the DHT11's and plot both on paper.
  3. Stretch it: Measure the temperature difference between cool tap water and lukewarm water, then map the warmest and coolest spots in your classroom.

Checkpoint: What was your input, what decision or process happened, and what was the output?

For teachers & parents

Coach without taking over

  • Before: ask the learner to predict what will happen and why.
  • During: use prompts such as “What changed?” and “What could you test next?” instead of giving the answer.
  • After: ask for a 30-second explanation, one piece of evidence and one improvement.

Look for: safe handling, correct vocabulary, a result the learner can demonstrate, and an explanation in their own words.

Safety reminder: Unplug the USB cable before plugging the probe in or out. Use only cool tap water or lukewarm water, never boiling water, a kettle or an ice bath. Only the probe's metal tip and cable go in the water: keep the plug end, the board and the USB supply dry, and never put the DHT11 in water.

Did you get it?

Three quick questions. Pick an answer to see whether it is right, and why.

  1. 1Why is the DS18B20 probe used for water instead of the DHT11?

  2. 2Which part of the DS18B20 must always stay dry?

  3. 3The lesson says the DS18B20 is more accurate than the DHT11. What does accurate mean?