Nash Ali
Published © GPL3+

Body Temp Checker

ESP32 with a OLED SSD1306 and a MLX90614 ir sensor put together makes a great body temperature checker.

BeginnerProtip30 minutes123
Body Temp Checker

Things used in this project

Hardware components

ESP32S
Espressif ESP32S
×1
MLX90614
×1
0.96" OLED 64x128 Display Module
ElectroPeak 0.96" OLED 64x128 Display Module
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Breadboard, 830 Tie Points
Breadboard, 830 Tie Points
10 Pc. Jumper Wire Kit, 5 cm Long
10 Pc. Jumper Wire Kit, 5 cm Long

Story

Read more

Schematics

Ir Sensor

MLX90614

Code

MLX90614

C/C++
Arduino Code
#include <Wire.h>
#include <Adafruit_MLX90614.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
Adafruit_MLX90614 mlx = Adafruit_MLX90614();
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
#define OLED_RESET    -1 // Reset pin # (or -1 if sharing Arduino reset pin)
double ATC,OTC,ATF,OTF;
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET); //Declaring the display name (display)

void init_display(){
  Wire.setClock(400000);
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C); //Start the OLED display
  display.display();
  display.clearDisplay();                                   //Clear the display
  display.setTextSize(2);                                   //Near it display the average BPM you can display the BPM if you want
  display.setTextColor(WHITE); 
  } 
void init_ir_sensor(){
  Wire.setClock(100000);
  mlx.begin();
}
void read_ir_sensor(){
  Wire.setClock(100000);  
  OTC = mlx.readObjectTempC();
  OTF = mlx.readObjectTempF();
  ATC = mlx.readAmbientTempC();
  ATF = mlx.readAmbientTempF();
  } 
void show_result(){
  Wire.setClock(400000);
  display.clearDisplay();         //Clear the display
  display.setTextSize(1);         
  display.setTextColor(WHITE); 
  display.setCursor(35,5);                
  display.println("Body Temp:");      
  display.setTextSize(2);  
  display.setCursor(20,23);    
  display.print(OTC);
  display.print((char)247);
  display.println("C");
   if (OTC > 37.8){
    display.setTextSize(1);  
    display.setCursor(32,45);                
    display.println("FAIL - Fever!");    
    }
  if (OTC < 36.1){
    display.setTextSize(1);  
    display.setCursor(0,45);                
    display.println("Ready - Place Sensor!");    
    }
   if (OTC < 37.8 & OTC > 36.1){
    display.setTextSize(1);  
    display.setCursor(32,45);                
    display.println("PASS - Normal");    
    }
  display.display();
  } 

void setup(){
  init_display();
  init_ir_sensor();
  }
 
void loop(){
  read_ir_sensor();
  show_result();
  delay(1000);
}

Credits

Nash Ali

Nash Ali

3 projects • 1 follower
Put together a transistor radio by "Heathkit" when I was around 10, fell in love with electronics ever since. Been a hobby of mine since.

Comments