In today’s world, health monitoring has become more accessible and efficient through smart technology. One of the most essential aspects of health tracking is monitoring body temperature, which can provide early warnings for infections, fevers, or other medical conditions.
This project focuses on developing a body temperature tracker that continuously measures temperature and transmits the data to a smartphone app. By using a temperature sensor, such as the MLX90614 infrared sensor or the DS18B20 digital thermometer, the device accurately records body temperature in real time. The goal is to create a system that allows users to monitor their temperature remotely, providing timely health insights and proactive management of potential illnesses.
Components Required
- Arduino Uno
- MLX90614 Infrared Temperature Sensor / DS18B20 Digital Temperature Sensor
- Bluetooth Module (HC-05 or HM-10)
- 3.7V Li-ion Battery
- Resistors and Capacitors
- Jumper Wires
- Breadboard
- Enclosure for wearable design (optional)
Circuit Diagram
Component Connections
1. Connecting the Temperature Sensor to Arduino
Temperature sensors like the MLX90614 or DS18B20 detect body temperature and send the data to the microcontroller. These sensors communicate with the Arduino using either I2C or One-Wire protocols, depending on the sensor used.
Wiring the MLX90614 to Arduino
- VCC (Power Input) → Connect to 3.3V on the Arduino.
- GND (Ground) → Connect to GND on the Arduino.
- SDA (Serial Data Line) → Connect to A4 on the Arduino (I2C data pin).
- SCL (Serial Clock Line) → Connect to A5 on the Arduino (I2C clock pin).
Wiring the DS18B20 to Arduino
- VCC (Power Input) → Connect to 5V on the Arduino.
- GND (Ground) → Connect to GND on the Arduino.
- Data (Temperature Signal) → Connect to any digital pin (e.g., D2) on the Arduino with a pull-up resistor (4.7kΩ).
2. Connecting the Bluetooth Module to Arduino
A Bluetooth module enables wireless communication between the device and a smartphone app for real-time temperature tracking.
- VCC → Connect to 5V on the Arduino.
- GND → Connect to GND on the Arduino.
- TX (Transmit Data) → Connect to RX on the Arduino (D0).
- RX (Receive Data) → Connect to TX on the Arduino (D1).
3. Powering the System
For portability, a rechargeable 3.7V Li-ion battery can power the system. It connects to a voltage regulator or a battery shield to ensure stable operation.
4. Installing the Components on the Wearable Device
- Secure the temperature sensor on a strap or wristband for consistent contact with the skin.
- Mount the Arduino and Bluetooth module in a compact enclosure.
- Ensure all connections are stable for accurate readings.
5. Uploading the Code to the Arduino
- Open the Arduino IDE on your computer.
- Paste the provided Arduino code into a new sketch.
- Connect the Arduino to your computer using a USB cable.
- Select the correct board and port in the Arduino IDE.
- Click the Upload button to transfer the code to the Arduino.
- Once uploaded, the system will start reading temperature data and transmitting it to the smartphone app.
CODE
#include <Wire.h>
#include <Adafruit_MLX90614.h>
#include <SoftwareSerial.h>
Adafruit_MLX90614 mlx = Adafruit_MLX90614();
SoftwareSerial BTSerial(10, 11); // TX, RX
void setup() {
Serial.begin(9600);
BTSerial.begin(9600);
mlx.begin();
}
void loop() {
float temperature = mlx.readObjectTempC();
Serial.print("Body Temperature: ");
Serial.print(temperature);
Serial.println(" °C");
BTSerial.print("Temperature: ");
BTSerial.print(temperature);
BTSerial.println(" °C");
delay(1000);
}
CODE EXPLANATION
1. Including Necessary Libraries
#include <Wire.h>
#include <Adafruit_MLX90614.h>
#include <SoftwareSerial.h>
- Wire.h: Handles I2C communication for the MLX90614 sensor.
- Adafruit_MLX90614.h: Simplifies reading temperature values from the sensor.
- SoftwareSerial.h: Enables communication with the Bluetooth module.
2. Initializing Components
Adafruit_MLX90614 mlx = Adafruit_MLX90614();
SoftwareSerial BTSerial(10, 11); // TX, RX
- mlx: Creates an instance of the MLX90614 sensor.
- BTSerial(10, 11): Defines pins 10 and 11 for software serial communication with the Bluetooth module.
3. Setting Up the System
void setup() {
Serial.begin(9600);
BTSerial.begin(9600);
mlx.begin();
}
- Serial.begin(9600): Starts serial communication for debugging.
- BTSerial.begin(9600): Initializes Bluetooth communication at 9600 baud rate.
- mlx.begin(): Initializes the temperature sensor.
4. Reading and Transmitting Temperature Data
void loop() {
float temperature = mlx.readObjectTempC();
Serial.print("Body Temperature: ");
Serial.print(temperature);
Serial.println(" °C");
BTSerial.print("Temperature: ");
BTSerial.print(temperature);
BTSerial.println(" °C");
delay(1000);
}
- mlx.readObjectTempC(): Reads the temperature from the sensor.
- Serial.print(): Displays temperature data on the serial monitor.
- BTSerial.print(): Sends the temperature data via Bluetooth to a smartphone.
- delay(1000): Waits 1 second before taking the next reading.
OBSERVING FUNCTIONALITY
- Normal Mode: The tracker continuously sends temperature data to the smartphone app.
- Fever Detected: If the temperature exceeds a threshold (e.g., 38°C), an alert can be triggered in the app.
- Stable Readings: Ensuring proper placement of the sensor leads to accurate and consistent readings.
Common Problems and Solutions
- Incorrect Temperature Readings
- Cause: Poor sensor placement.
- Solution: Ensure the sensor is in direct contact with the skin.
- Bluetooth Not Connecting
- Cause: Incorrect baud rate.
- Solution: Verify the baud rate settings of the Bluetooth module and smartphone app.
- Device Not Powering On
- Cause: Insufficient power supply.
- Solution: Use a fully charged battery and check connections.
Conclusion
This body temperature tracker provides an efficient way to monitor temperature in real time, making it a valuable tool for health tracking. By integrating a temperature sensor with Bluetooth communication, users can receive accurate temperature updates directly on their smartphones, allowing for proactive health management.
Comments