Hardware components | ||||||
| × | 1 | ||||
| × | 1 | ||||
| × | 2 | ||||
| × | 1 | ||||
| × | 1 | ||||
| × | 1 | ||||
| × | 1 | ||||
| × | 1 | ||||
| × | 1 | ||||
Software apps and online services | ||||||
|
As you might know, with the new covid-19, everything is about keeping a safe distance.
So this project is taking that precaution word by word by making a contact less thermometer that does not need to be operated by a human (Hence reducing the chance of getting infected), this project uses a infrared thermometer with a LCD and a ultra sound sensor to detect a user and then displaying the read temperature back.
After a temperature is taken, it will emit a short sound via a active buzzer to capture the attention of the user.
/*
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
}
/*
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
}
/*
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
}
Comments