sensor-experiments

Introduction

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

Components Needed

No Ads Available.

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.

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

Contact Us

If you have any questions or inquiries, feel free to reach out to us at Microautomation.no@icloud.com .

Follow our Socials for the newest updates!