Abstract
This paper discusses the design and implementation of an infrared temperature measurement system using the Arduino platform, specifically utilizing the MLX90614 infrared temperature sensor and an OLED display. The system is capable of measuring both body and ambient temperatures, providing real-time data for various applications.
Introduction
Temperature measurement is a critical aspect in numerous fields, including healthcare, environmental monitoring, and industrial applications. Infrared temperature sensors offer a non-contact method to measure temperature, which is particularly beneficial in situations where traditional contact methods are impractical. This project aims to develop a simple yet effective temperature measurement system using Arduino.
Materials and Methods
– Arduino Uno: The main microcontroller for processing data.
– MLX90614 Infrared Temperature Sensor: A non-contact sensor for measuring body and ambient temperatures.
– 0.96″ I2C OLED Display: Used for displaying temperature readings.
Circuit Diagram
The following is a description of how the components are connected in the system:
Arduino Uno:
- The central microcontroller to which all other components are connected.
MLX90614 IR Temperature Sensor:
- VIN (or VCC): Connected to the 5V pin of the Arduino.
- GND: Connected to the GND pin of the Arduino.
- SCL: Connected to the A5 pin of the Arduino (I2C clock).
- SDA: Connected to the A4 pin of the Arduino (I2C data).
0.96″ I2C OLED Display:
- VCC: Connected to the 3.3V or 5V pin of the Arduino.
- GND: Connected to the GND pin of the Arduino.
- SCL: Connected to the A5 pin of the Arduino (shared with the MLX90614).
- SDA: Connected to the A4 pin of the Arduino (shared with the MLX90614).
Code Implementation
include <Wire.h>
include <Adafruit_MLX90614.h>
include <Adafruit_SSD1306.h>
// Creating objects for the MLX90614 sensor and OLED display
Adafruit_MLX90614 mlx = Adafruit_MLX90614();
Adafruit_SSD1306 display(128, 64, &Wire); // OLED display size: 128x64
void setup() {
Serial.begin(9600); // Initialize serial communication
// Initialize MLX90614 sensor
if (!mlx.begin()) {
Serial.println("Error initializing MLX90614 sensor!");
while (1);
}
// Initialize OLED display with I2C address (0x3C or 0x3D)
if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
Serial.println("Error initializing OLED display!");
while (1);
}
display.clearDisplay(); // Clear display at startup
display.display();
}
void loop() {
// Read body and ambient temperature
float tempObject = mlx.readObjectTempC();
float tempAmbient = mlx.readAmbientTempC();
// Display results on OLED
display.clearDisplay();
display.setTextSize(1);
display.setTextColor(SSD1306_WHITE);
display.setCursor(0, 0);
display.print("Temp Corp: ");
display.print(tempObject);
display.print(" C");
display.setCursor(0, 16);
display.print("Temp Amb: ");
display.print(tempAmbient);
display.print(" C");
display.display();
// Print results to serial monitor
Serial.print("Body Temperature: "); Serial.print(tempObject); Serial.println(" C");
Serial.print("Ambient Temperature: "); Serial.print(tempAmbient); Serial.println(" C");
delay(1000); // Wait 1 second before repeating
}
Results
The implemented system successfully measures and displays both body and ambient temperatures. When the sensor detects a temperature above a specified threshold (e.g., 30°C), it provides real-time readings on the OLED display.
Discussion
The system’s performance was evaluated under different conditions to assess accuracy and responsiveness. The use of non-contact infrared measurement proved advantageous in providing quick and safe temperature readings, making it suitable for various applications.
Conclusion
This paper demonstrates the feasibility of creating a simple temperature measurement system using Arduino and infrared technology. Future work may involve enhancing the system’s accuracy and expanding its applications.