Projects / Talking thermometer

Talking thermometer

Beginner1.5 hGuided buildReviewed

Build it step by step

0 of 7 done
  1. NANODS18B2027.2°C

    Test the probe

    Print the temperature.

  2. NANO

    Record the words

    Fourteen short clips.

  3. NANO

    Test one clip

    Play it from the sketch.

  4. NANO

    Speak a number

    Combine clips in order.

  5. NANO

    Add the button

    Speak on press.

  6. NANO

    Add the high alert

    Another clip above 38 degrees.

  7. NANODS18B2027.2°C

    Make it splash-safe

    Probe lead out of a sealed box.

In short

How do you build a talking thermometer?

A thermometer speaks the temperature for people who cannot see a display. You need Arduino Nano, DS18B20 waterproof probe, Resistor 4.7 kΩ, DFPlayer Mini MP3 module, Speaker 8 Ω 0.5 W, SanDisk microSD card 32 GB (A1, Class 10), Tactile push button 6 mm and Resistor 1 kΩ. It takes 7 steps and about 90 minutes.

Level
Beginner
Time
About 90 min
Parts
8

Parts list

Tick what you already own. It saves to My Garage, so “Build with what I have” knows.

Wiring

FromToWhy
DS18B20 dataNano D2, with 4.7 kΩ to 5VTemperature probe
DFPlayer RXNano D11 through 1 kΩSpeech commands
DFPlayer TXNano D10Status
DFPlayer speaker pins8 Ω speakerSound
Speak buttonNano D3 to groundPress to hear it
SupplyUSB or a 5 V power bankPower

Code

Record the words with your own voice or a text-to-speech tool and save them as 0001.mp3 to 0014.mp3 in an MP3 folder on the microSD card. The sketch reads the probe, splits the number into tens, ones and tenths, and plays the matching clips in order, for example thirty-six point six degrees Celsius. The 1 kΩ in the DFPlayer RX line protects it from the Nano's 5 V signal. Choose a loud, clear speaker, and test with the people who will use it; a waterproof probe suits liquids and baths, but check bath water with a hand or a trusted thermometer as well. This is a convenience aid and not a medical thermometer, so for a fever reading use a proper clinical thermometer. Arduino IDE, board "Arduino Nano" (try the Old Bootloader option if the upload fails).

Runs on a virtual Arduino Nano in your browser, with sliders for the sensors. Happy with it? Verify and upload to your real board from the same page (Chrome or Edge on a computer).

// Talking thermometer: press the button to hear the temperature. Libraries: OneWire, DallasTemperature, DFRobotDFPlayerMini.
// SD card /MP3 folder: 0001 to 0010 = zero to nine, 0011 = point, 0012 = minus, 0013 = degrees Celsius, 0014 = high alert.
#include <OneWire.h>
#include <DallasTemperature.h>
#include <SoftwareSerial.h>
#include <DFRobotDFPlayerMini.h>
OneWire ow(2);
DallasTemperature probe(&ow);
SoftwareSerial sw(10, 11);
DFRobotDFPlayerMini dfp;
const int BTN = 3;
const int WORD_MS = 900;                            // length of each recorded word; set to your longest clip
void say(int n) { dfp.playMp3Folder(n); delay(WORD_MS); }
void speakTemp(float t) {
  if (t < 0) { say(12); t = -t; }
  int whole = (int)t;
  int tenth = (int)((t - whole) * 10 + 0.5);
  if (tenth == 10) { whole++; tenth = 0; }
  if (whole >= 10) say(1 + whole / 10);
  say(1 + whole % 10);
  say(11);
  say(1 + tenth);
  say(13);
}
void setup() {
  pinMode(BTN, INPUT_PULLUP);
  probe.begin();
  sw.begin(9600);
  if (dfp.begin(sw)) dfp.volume(22);
}
void loop() {
  if (digitalRead(BTN) == LOW) {
    probe.requestTemperatures();
    float t = probe.getTempCByIndex(0);
    if (t > -100) {
      speakTemp(t);
      if (t > 38.0) say(14);                        // high alert beep or voice
    }
    delay(500);
  }
}

Test checklist

What you should see at each check. If a reading is far off, stop and use the troubleshooting list.

CheckExpected
Press the buttonSpeaks the temperature
Probe in warm waterNumber rises
High temperatureExtra alert
SoundClear at normal volume

If it does not work

Silent

Check file names and the MP3 folder.

Words overlap

Raise WORD_MS to your longest clip.

Reads minus 127

Check the probe wiring and pull-up.

Wrong number

Check the digit clip numbering.

Still stuck? Find the fault step by step with your multimeter →

Ask Lark AI

Common questions

What parts do I need for the talking thermometer?

Arduino Nano, DS18B20 waterproof probe, Resistor 4.7 kΩ, DFPlayer Mini MP3 module, Speaker 8 Ω 0.5 W, SanDisk microSD card 32 GB (A1, Class 10), Tactile push button 6 mm and Resistor 1 kΩ.

How long does the talking thermometer take to build?

About 90 minutes for a beginner maker, in 7 steps.

How do I know the talking thermometer works?

Press the button: Speaks the temperature. Probe in warm water: Number rises. High temperature: Extra alert.

Silent: what should I check?

Check file names and the MP3 folder.

Words overlap: what should I check?

Raise WORD_MS to your longest clip.

Reads minus 127: what should I check?

Check the probe wiring and pull-up.

Wrong number: what should I check?

Check the digit clip numbering.