taf345
Published © GPL3+

Contactless Thermometer

This simple Arduino project can be used to monitor your own temperature every morning or used in public places as contact less thermometer.

BeginnerWork in progress8,018
Contactless Thermometer

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Alphanumeric LCD, 16 x 2
Alphanumeric LCD, 16 x 2
×1
Resistor 47.5k ohm
Resistor 47.5k ohm
×2
Resistor 220 ohm
Resistor 220 ohm
×1
Rotary Potentiometer, 10 kohm
Rotary Potentiometer, 10 kohm
×1
Buzzer, Piezo
Buzzer, Piezo
Active
×1
Ultrasonic Sensor - HC-SR04 (Generic)
Ultrasonic Sensor - HC-SR04 (Generic)
×1
Infrared Thermometer-MLX90614ESF-BAA
For optimal reading, stay as close as possible to the sensor. Note: this sensor has 90 degree field of view, for every cm away from the sensor,the sensing area grows by 2 cm.
×1
Breadboard (generic)
Breadboard (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

circuit diagram

Code

Untitled file

Arduino
/*
 Name:		StayHome.ino
 Created:	4/15/2020 8:36:19 PM
 Author:	T@f335
*/



/*

This Sketch is for a contactless, automatic temperature reader to avoid human contact,
in a effort to reduce covid-19 contaminations.
This works using the MLX90614 sensor to accurately measure body temperature.

-it also uses a 16x2 LCD display
-a HC-SR04 Ultrasonic Sensor

the project uses a ultra sound sensor to detect the distance between,
the user and the sensor, if this distance is within the specified limits,
the reading will start after a 10 milliseconds delay,the temperature
will then be display in lcd and 3 short sound will be made by a active
buzzer to catch the attention of the reader to lcd screen

*/

/*
LCD Hookup

 * LCD RS pin to digital pin 12
 * LCD Enable pin to digital pin 11
 * LCD D4 pin to digital pin 5
 * LCD D5 pin to digital pin 4
 * LCD D6 pin to digital pin 3
 * LCD D7 pin to digital pin 2
 * LCD R/W pin to ground
 * LCD VSS pin to ground
 * LCD VCC pin to 5V
 * 10K resistor:
 * ends to +5V and ground
 * wiper to LCD VO pin (pin 3)

 HC-SR04 Hookup

 *Pin 8 to "Trig"
 *Pin 9 to Echo
 *VCC 5V
 *Gnd to Ground


 MLX90614 Hookup

  VDD ------------------ 3.3V
  VSS ------------------ GND
  SDA ------------------ A4 
  SCL ------------------ A5

*/


#include <LiquidCrystal.h>
#include <Wire.h>
#include <SparkFunMLX90614.h> 

const int triggerPin = 8; 
const int echoPin = 9;   


// This pin is used by a active buzzer to notify the user that temperature is ready to read
const int buzzerPin1 = 10;



IRTherm Therm;

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);



void setup() {

    pinMode(triggerPin, OUTPUT);
    pinMode(echoPin, INPUT);

    Therm.begin();
    Therm.setUnit(TEMP_C); // set the unit of measurement to celsius

    lcd.begin(16, 2);

    pinMode(buzzerPin1, OUTPUT); //Set the buzzer pin
    digitalWrite(buzzerPin1, LOW); 
}

void loop() {

    if (GetMeasuredDistance() <= 8 && Therm.read()) // the value of 8 cm can be tweacked to adjust the reading distance
    {
        delay(10);
        lcd.print("Your temp is :");
        lcd.setCursor(0,1);
        lcd.print(String(Therm.object(), 2) + "* C");

        for (int i = 0; i < 3; i++);
        {
            digitalWrite(buzzerPin1, HIGH);
            delay(10);
            digitalWrite(buzzerPin1, LOW);
            delay(10);
        }
    }

    else if (GetMeasuredDistance() >= 20)
    {
        lcd.print("Come closer :)");
    }

    else {
        lcd.print("The Ambiant temperature is :");
        lcd.setCursor(0,1);
        lcd.print(String(Therm.ambient(), 2) + "*C");
    }

    delay(500);
}

int GetMeasuredDistance()
{

    long duration;

    digitalWrite(triggerPin, LOW);
    delayMicroseconds(5);

    digitalWrite(triggerPin, HIGH);
    delayMicroseconds(10);
    digitalWrite(triggerPin, LOW);

    duration = pulseIn(echoPin, HIGH);

    return duration * 0.034 / 2; // This return a distance in cm
}

StayHome

Arduino
/*
 Name:		StayHome.ino
 Created:	4/15/2020 8:36:19 PM
 Author:	T@f335
*/



/*

This Sketch is for a contactless, automatic temperature reader to avoid human contact,
in a effort to reduce covid-19 contaminations.
This works using the MLX90614 sensor to accurately measure body temperature.

-it also uses a 16x2 LCD display
-a HC-SR04 Ultrasonic Sensor

the project uses a ultra sound sensor to detect the distance between,
the user and the sensor, if this distance is within the specified limits,
the reading will start after a 10 milliseconds delay,the temperature
will then be display in lcd and 3 short sound will be made by a active
buzzer to catch the attention of the reader to lcd screen

*/

/*
LCD Hookup

 * LCD RS pin to digital pin 12
 * LCD Enable pin to digital pin 11
 * LCD D4 pin to digital pin 5
 * LCD D5 pin to digital pin 4
 * LCD D6 pin to digital pin 3
 * LCD D7 pin to digital pin 2
 * LCD R/W pin to ground
 * LCD VSS pin to ground
 * LCD VCC pin to 5V
 * 10K resistor:
 * ends to +5V and ground
 * wiper to LCD VO pin (pin 3)

 HC-SR04 Hookup

 *Pin 8 to "Trig"
 *Pin 9 to Echo
 *VCC 5V
 *Gnd to Ground


 MLX90614 Hookup

  VDD ------------------ 3.3V
  VSS ------------------ GND
  SDA ------------------ A4 
  SCL ------------------ A5

*/


#include <LiquidCrystal.h>
#include <Wire.h>

//You must have this library installed to use the MLX90614
#include <SparkFunMLX90614.h> 

const int triggerPin = 8; 
const int echoPin = 9;   


// Active Buzzer Pin(Piezo)
const int buzzerPin = 10;



IRTherm Therm;

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);



void setup() {

    pinMode(triggerPin, OUTPUT);
    pinMode(echoPin, INPUT);

    Therm.begin();
    Therm.setUnit(TEMP_C); // set the unit of measurement to celsius

    lcd.begin(16, 2);

    pinMode(buzzerPin, OUTPUT); //Set the buzzer pin
    digitalWrite(buzzerPin, LOW); //clear the buzzer pin
}

void loop() {

    if (GetMeasuredDistance() <= 8 && Therm.read()) // the value of 8 cm can be tweaked to adjust the reading distance
    // the sensor reading field will be 8 cm x 2 = 16 cm
    
    {
        delay(10);
        lcd.print("Your temp is :");
        lcd.setCursor(0,1);
        lcd.print(String(Therm.object(), 2) + "* C");

        for (int i = 0; i < 3; i++);
        {
            digitalWrite(buzzerPin, HIGH);
            delay(10);
            digitalWrite(buzzerPin, LOW);
            delay(10);
        }
    }

    else if (GetMeasuredDistance() >= 20)
    {
        lcd.print("Come closer :)");
    }

    else {
        lcd.print("The Ambiant temperature is :");
        lcd.setCursor(0,1);
        lcd.print(String(Therm.ambient(), 2) + "*C");
    }

    delay(4000);
    lcd.clear();
}

int GetMeasuredDistance()
{

    long duration;

    digitalWrite(triggerPin, LOW);
    delayMicroseconds(5);

    digitalWrite(triggerPin, HIGH);
    delayMicroseconds(10);
    digitalWrite(triggerPin, LOW);

    duration = pulseIn(echoPin, HIGH);

    return duration * 0.034 / 2; // This return a distance in cm
}

StayHome

Arduino
/*
 Name:		StayHome.ino
 Created:	4/15/2020 8:36:19 PM
 Author:	T@f335
*/



/*

This Sketch is for a contactless, automatic temperature reader to avoid human contact,
in a effort to reduce covid-19 contaminations.
This works using the MLX90614 sensor to accurately measure body temperature.

-it also uses a 16x2 LCD display
-a HC-SR04 Ultrasonic Sensor

the project uses a ultra sound sensor to detect the distance between,
the user and the sensor, if this distance is within the specified limits,
the reading will start after a 10 milliseconds delay,the temperature
will then be display in lcd and 3 short sound will be made by a active
buzzer to catch the attention of the reader to lcd screen

*/

/*
LCD Hookup

 * LCD RS pin to digital pin 12
 * LCD Enable pin to digital pin 11
 * LCD D4 pin to digital pin 5
 * LCD D5 pin to digital pin 4
 * LCD D6 pin to digital pin 3
 * LCD D7 pin to digital pin 2
 * LCD R/W pin to ground
 * LCD VSS pin to ground
 * LCD VCC pin to 5V
 * 10K resistor:
 * ends to +5V and ground
 * wiper to LCD VO pin (pin 3)

 HC-SR04 Hookup

 *Pin 8 to "Trig"
 *Pin 9 to Echo
 *VCC 5V
 *Gnd to Ground


 MLX90614 Hookup

  VDD ------------------ 3.3V
  VSS ------------------ GND
  SDA ------------------ A4 
  SCL ------------------ A5

*/


#include <LiquidCrystal.h>
#include <Wire.h>
#include <SparkFunMLX90614.h> 

const int triggerPin = 8; 
const int echoPin = 9;   


// Active Buzzer Pin(Piezo)
const int buzzerPin = 10;



IRTherm Therm;

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);



void setup() {

    pinMode(triggerPin, OUTPUT);
    pinMode(echoPin, INPUT);

    Therm.begin();
    Therm.setUnit(TEMP_C); // set the unit of measurement to celsius

    lcd.begin(16, 2);

    pinMode(buzzerPin, OUTPUT); //Set the buzzer pin
    digitalWrite(buzzerPin, LOW); 
}

void loop() {

    if (GetMeasuredDistance() <= 8 && Therm.read()) // the value of 8 cm can be tweaked to adjust the reading distance
    {
        
        lcd.print("Your temp is :");
        lcd.setCursor(0,1);
        lcd.print(String(Therm.object(), 2) + "* C");

        for (int i = 0; i < 3; i++);
        {
            digitalWrite(buzzerPin, HIGH);
            delay(10);
            digitalWrite(buzzerPin, LOW);
            delay(10);
        }
    }

    else if (GetMeasuredDistance() >= 20)
    {
        lcd.print("Come closer :)");
    }

    else {
        lcd.print("The Ambiant temperature is :");
        lcd.setCursor(0,1);
        lcd.print(String(Therm.ambient(), 2) + "*C");
    }

    delay(5000);
}

int GetMeasuredDistance()
{

    long duration;

    digitalWrite(triggerPin, LOW);
    delayMicroseconds(5);

    digitalWrite(triggerPin, HIGH);
    delayMicroseconds(10);
    digitalWrite(triggerPin, LOW);

    duration = pulseIn(echoPin, HIGH);

    return duration * 0.034 / 2; // This return a distance in cm
}

Credits

taf345

taf345

0 projects • 5 followers

Comments