As COVID-19 cases continue to rise around the world, it is more important now than ever before for people to be able to detect if they have a fever. A fever is one of the distinguishing symptoms of COVID-19, and so detection is crucial. The Fever-Detecting Headband allows you to detect if you have a fever -- whether you're at home, the grocery store, or anywhere. It is portable and easy to use.
Most people know that a fever is an elevated body temperature, but exactly how elevated is some thing that people often forget. The CDC defines here that a fever is a body temperature of of 100.4°F or greater [1]. However, with the Fever-Detecting Headband, a user does not have to remember that. It has been programmed so that if the user does not have a fever, the light on the headband will simply turn green. If a fever is detected, the red light will illuminate. In the event of an error, the yellow light will illuminate. This simplifies the user's experience and required knowledge so that they can know on the go if they have a fever!
With the required materials, anyone can make a fever detecting sensor at home! We have provided all of the right instructions and coding in order to create this device! Click here to follow along and create your Fever-Detecting Headband right at home today! The materials that you will need are:
LilyPad (and battery)
Sweatband
Sewing thread and needle
Temperature sensor
Red LED
Green LED
Yellow LED
Glue
The LilyPad is a SparkFun product that is an Arduino programmable microcontroller! The huge benefit of the wearable aspect is its portability. With a battery, the LilyPad can work on the go, where ever you go.
The next item can be the sweatband of your choice. It should be not be loose however, as the temperature sensor will be placed directly on your forehead, as it is put on the inside of the headband. The temperature sensor will be sewn into the headband, hense the need of thread and needle.
Lastly, the LED lights are used as mentioned about to indicate the person's fever status!
If you would prefer to continue building the project by following the Website inststructions, keep scrolling! Otherwise, click the button below to have access to the lab guide!
It should be noted that the two methods are slightly different. The Lab Guide will guide you through how to build the final model. Shown below is the method of building the prototype. The final model and prototype differ in how the prototype features the components on the outside of the headband for ease of understanding, but the final model has everything inside the headband, for a more fashioinable look.
The circuit in the image shows the main LilyPad board, 3 LED lights, the temperature sensor, and the power source. (Note: the temperature sensor will be placed on the opposite side of the headband so it contacts the skin) Each LED is connected to a different output of the LilyPad, green to pin 3, yellow to pin 9, and red to pin 10. All of the LED lights are grounded together to the main ground terminal on the device. The analog temperature sensor, DEV-0877, is connected to the positive and negative pins on the LilyPad, while the analog data travels to pin A5 on the LilyPad. Lastly the battery holder, CR2032, contains a 3V lithium cell battery that powers the LilyPad.
From the design above, one will use conductive thread to directly thread the LED lights onto the LilyPad itself, and then connecting the ground of each light together on its path to the negative pin on the device. Next, using conductive thread, connect the power supply to the LilyPad. It is important to use an excessive amount of thread for this procedure because to run the temperature head band, the maximum voltage output of the battery will be required. Lastly, on the inside of the headband, thread the analog temperature sensor to the analog, positive, and negative pins on the LilyPad. For optimal performance of the headband, the temperature sensor should be in contact with your forehead to achieve the most accurate reading.
Step 1: Connect the micro-usb to the LilyPad and then connect the cord to your computer
Step 2: Go into "Tools" in the Arduino Program and change the "Board Type" to "LilyPad Arduino"
Step 3: Verify your code and fix any issues
Step 4: Upload Code to the LilyPad Arduino
Step 5: Unplug the micro-usb from the LilyPad and turn on the battery pack
Final Step: Put the head band on your head
Your COVID-19 Temperature Sensing Headband should be working!
//Note: The development of this code was aided with the SparkFun Temperature sensor hookup guide [2]
//Include libraries
#include "SoftwareSerial.h"
//RX=pin 10
//TX = pin 11;
const int redPin = 10;
const int greenPin = 11;
const int yellowPin =9 ;
int sensorPin = A3; //Connect S tab of the Temperature Sensor to A3
SoftwareSerial serial_connection(9, 10);
void setup() {
Serial.begin(9600);
pinMode(redPin, OUTPUT); //set Red LED to output
digitalWrite(redPin, LOW); //set voltage to low
pinMode(greenPin, OUTPUT); //set Green LED to output
digitalWrite(greenPin, LOW); //set voltage to low
pinMode(yellowPin, OUTPUT); //set Yellow LED to output
digitalWrite(yellowPin, LOW); //set voltage to low
pinMode(sensorPin, INPUT); // Set the temperature sensor pin as an INPUT:
// NOTE: If using the LilyPad Development Board or the + tab for power, comment out these lines of code
pinMode(A5, OUTPUT); // Set pin A5 to use as a power pin for the light sensor
digitalWrite(A5, HIGH);
}
//loop
void loop() {
//declare variables
long temperature; //variable to store temperature value
long rawTemp; // Variable to store raw temperature
float voltage; // Variable to store voltage calculation
float fahrenheit; // // Variable to store Fahrenheit value
float celsius; // Variable to store Celsius value
rawTemp = analogRead(sensorPin); // Read the raw 0-1023 value of temperature into a variable.
// Calculate the voltage, based on that value.
// Multiply by maximum voltage (3.3V) and divide by maximum ADC value (1023).
// If you plan on using this with a LilyPad Simple Arduino on USB power, change to 4.2
//NOTE: Our battery gave a maximum output of 3.1v
voltage = rawTemp * (3.1/ 1023.0);
celsius = (voltage - 0.5) * 100; // Calculate the celsius temperature, based on that voltage..
fahrenheit = (celsius * 9.0 / 5.0) + 32.0; //Equations to convert from Celcius to Farenheit
fahrenheit = temperature; //Set farenheit value to temperature variable used in logic statements
//conditional statements
//if temperature is between 90.0 and 100.4, the green LED is turned on, indicating no fever
if ((temperature < 100.4 && > 90.0 ){
digitalWrite(redPin, LOW);
digitalWrite(yellowPin, LOW);
digitalWrite(greenPin, HIGH);
}
//if temperature is between 100.4 and 110, then the red LED is turned on, indicating a fever
else if (temperature >= 100.4 && <= 110.0) {
digitalWrite(yellowPin, LOW);
digitalWrite(greenPin, LOW);
digitalWrite(redPin, HIGH);
}
//if the previous two statements were not executed then the yellow LED is turned on
else {
digitalWrite(redPin, LOW);
digitalWrite(greenPin, LOW);
digitalWrite(yellowPin, HIGH);
}
}
}
}
Once the final product is done, try it on and turn the switch on. The image on the left shows the headband functioning and showing a green light on, meaning that no fever is detected.
For optimal performance please make sure hair is clear of the temperature sensor and not blocking the LED lights.
This project does require careful attention to the details of the sewing. If you are struggling with sewing, visit the SparkFun tutorial here [4]. Also, if you would like more support in understanding the connections, click here. That project tutorial is for a “Twinkling Headband.” It does not implement the same code or temperature sensor, but could be very helpful in understanding the basics of sewing all the components [5].
Another issue you might encounter is something related to the code. Make sure that you type in everything exactly as we have provided, because one small error could change everything. The code has defined which pins are connected to which LEDs, but if you mess up and sew your LED to the wrong pin, you can adjust that respectively in the code!
Thirdly, if you are struggling to get readings from your temperature sensor, ensure that it is in very direct contact with the forehead. If it is loose, it might not produce accurate readings, or readings at all.
Lastly, do not hesitate to reach out to Brad, Mia, or Katherine! We are all happy to help if you have any questions!
[1] “Definitions of Symptoms for Reportable Illnesses | Quarantine | CDC,” Apr. 18, 2019. https://www.cdc.gov/quarantine/air/reporting-deaths-illness/definitions-symptoms-reportable-illnesses.html (accessed Dec. 07, 2020).
[2] “LilyPad Temperature Sensor Hookup Guide - learn.sparkfun.com.” https://learn.sparkfun.com/tutorials/lilypad-temperature-sensor-hookup-guide/all (accessed Dec. 07, 2020).
[3] “INTRODUCTION to Arduino Lilypad.” https://microcontrollerslab.com/introduction-arduino-lilypad/ (accessed Dec. 07, 2020).
[4] “LilyPad Basics: E-Sewing - learn.sparkfun.com.” https://learn.sparkfun.com/tutorials/lilypad-basics-e-sewing/sewing-with-conductive-thread (accessed Dec. 07, 2020).
[5] K. A. Knight, “Twinkling Head Band Tutorial,” Fash. Circuits, [Online]. Available: http://kimknight.com/fashioningcircuits/twinkling-headband-tutorial.pdf.