Body Temperature Sensor with Thermistor

Introduction

This experiment demonstrates how to use a thermistor to measure body temperature using an Arduino.

Thermistor Sensor

Components Needed

Circuit Setup

  1. Connect the thermistor to a voltage divider circuit to convert resistance to voltage.
  2. Connect the output of the voltage divider to an analog input pin (e.g., A0) on the Arduino.

The thermistor’s resistance changes with temperature, and the Arduino measures this change to determine body temperature.

Thermistor Circuit Setup

Code for Body Temperature Measurement

Upload the following code to your Arduino to measure body temperature:


const int thermistorPin = A0;
float temperature;

void setup() {
  Serial.begin(9600);
}

void loop() {
  int sensorValue = analogRead(thermistorPin);
  temperature = (sensorValue - 500) / 10.0;
  Serial.print("Temperature: ");
  Serial.println(temperature);
  delay(1000);
}
            

Explanation

The thermistor’s resistance varies with temperature, and the Arduino reads this change in resistance, converting it into a temperature value.

Troubleshooting