Skip to content

About

Arduino Doorbell with hidden IR temperature sensor to detect high fever

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

🌡️ Coronavirus Doorbell

Arduino doorbell with hidden non-contact IR temperature measurement and audible fever alert

Arduino MLX90614 C++ License: GPL-3.0

Roni Bandini — Buenos Aires, Argentina — March 2020

Coronavirus Doorbell is an experimental Arduino doorbell created during the first weeks of the COVID-19 pandemic.

When a visitor presses the button, an MLX90614 non-contact infrared sensor measures surface temperature. The result is shown on a four-digit display and compared with a configurable threshold.

The machine then:

  1. 🔘 Detects the doorbell press.
  2. 🔊 Emits a short confirmation beep.
  3. 🌡️ Reads ambient and object temperature.
  4. ➕ Applies a configurable temperature offset.
  5. 🔢 Displays the measured value.
  6. 🔔 Plays the normal doorbell sound.
  7. 🚨 Plays a second alert sound if the adjusted value exceeds 38°C.

The project was designed as a 2020 experimental fever-screening prototype, not as a diagnostic instrument.


✨ Features

  • 🌡️ Non-contact infrared temperature measurement
  • ♾️ Arduino Nano controller
  • 🔘 Physical doorbell button
  • 🔢 Four-digit TM1637 display
  • 🔊 MP3 doorbell and alert sounds
  • 🚨 High-temperature threshold
  • 🔔 Piezo buzzer feedback
  • 🎚️ Configurable temperature offset
  • 🧱 Custom 3D-printed enclosure
  • 💾 microSD-based audio files
  • 🔌 Completely standalone operation

🏗️ Architecture

flowchart LR
    VISITOR["👤 Visitor"]
    BUTTON["🔘 Doorbell Button"]
    NANO["♾️ Arduino Nano"]
    IR["🌡️ MLX90614"]
    TEMP["Adjusted Temperature"]
    DISP["🔢 4-Digit Display"]
    MP3["🔊 Serial MP3 Player"]
    BELL["🔔 Doorbell Sound"]
    ALERT["🚨 Alert Sound"]

    VISITOR --> BUTTON
    BUTTON --> NANO

    NANO --> IR
    IR --> TEMP

    TEMP --> DISP
    TEMP --> MP3

    MP3 --> BELL
    TEMP -->|" > 38 °C"| ALERT
Loading

Everything runs locally on the Arduino.


🌡️ MLX90614 Infrared Sensor

The project uses the Melexis MLX90614 infrared thermometer.

The sensor combines:

  • IR-sensitive thermopile
  • Signal-conditioning ASIC
  • 17-bit ADC
  • DSP
  • Factory calibration
  • SMBus / I²C-compatible digital interface

Melexis specifies:

Parameter Value
Object-temperature range -70 to 380°C
Sensor-temperature range -40 to 125°C
Resolution 0.02°C
Typical accuracy over 0–50°C 0.5°C

Official documentation:

👉 MLX90614 — Melexis

Arduino library:

👉 Adafruit MLX90614 Library


🔄 Measurement Sequence

The main program waits for:

buttonValue = digitalRead(buttonPin);

When the active-low button is pressed:

if (buttonValue == LOW) {

the device first emits a short beep:

beep();

and reads both temperatures:

mlx.readAmbientTempC();
mlx.readObjectTempC();

The object reading is stored as:

bodyTemperature = mlx.readObjectTempC();

and then corrected using:

bodyTemperature =
    bodyTemperature + adjustTemp;

Default:

int adjustTemp = 3;

So the original experiment adds 3°C to the raw object reading.


🚨 High-Temperature Detection

The firmware compares the adjusted reading against:

if (bodyTemperature > 38) {

When this condition is true:

Serial.println("High fever");

execute_CMD(
    0x0F,
    0x01,
    0x02
);

The second MP3 file is played.

Default logic:

Adjusted temperature ≤ 38°C
        ↓
Normal doorbell sound

Adjusted temperature > 38°C
        ↓
Normal doorbell sound
        ↓
Alert sound

The code waits five seconds before accepting another press:

delay(5000);

🔄 Runtime Flow

flowchart TD
    WAIT["Wait for Button"]
    PRESS{"Pressed?"}
    BEEP["🔔 100 ms Beep"]
    READ["🌡️ Read MLX90614"]
    OFFSET["+ 3°C Offset"]
    DISPLAY["🔢 Display Temperature"]
    BELL["🔊 Play 01.mp3"]
    CHECK{"Temperature > 38°C?"}
    ALERT["🚨 Play 02.mp3"]
    DELAY["Wait 5 seconds"]

    WAIT --> PRESS
    PRESS -->|"No"| WAIT
    PRESS -->|"Yes"| BEEP
    BEEP --> READ
    READ --> OFFSET
    OFFSET --> DISPLAY
    DISPLAY --> BELL
    BELL --> CHECK

    CHECK -->|"No"| DELAY
    CHECK -->|"Yes"| ALERT
    ALERT --> DELAY

    DELAY --> WAIT
Loading

🔢 Four-Digit Display

The display uses the:

👉 TM1637Display Arduino Library

Firmware:

#include <TM1637Display.h>

#define CLK 12
#define DIO 9

TM1637Display display(
    CLK,
    DIO
);

Connections:

Display Arduino Nano
CLK D12
DIO D9
VCC 5 V
GND GND

At startup the display shows:

----

using:

display.setSegments(
    SEG_START
);

After measurement:

display.showNumberDec(
    bodyTemperature,
    false,
    4
);

🔊 Audio System

The project uses a serial MP3 player connected through SoftwareSerial.

#include "SoftwareSerial.h"

SoftwareSerial mySerial(
    10,
    11
);
MP3 Module Arduino
RX/TX D10 / D11
VCC 5 V
GND GND

Serial speed:

mySerial.begin(9600);

The command protocol uses packets beginning with:

#define Start_Byte 0x7E
#define Version_Byte 0xFF
#define End_Byte 0xEF

and includes a calculated checksum.

Startup volume:

setVolume(25);

💾 Audio Files

The repository documentation specifies two MP3 files on the player's microSD card:

/00/
├── 01.mp3
└── 02.mp3

Use:

01.mp3 → Normal doorbell
02.mp3 → High-temperature alert

Track 1 is triggered with:

execute_CMD(
    0x0F,
    0x01,
    0x01
);

Track 2:

execute_CMD(
    0x0F,
    0x01,
    0x02
);

🔔 Buzzer

A separate buzzer provides immediate tactile/audio feedback when the button is pressed.

#define buzzerPin 4

The tone is:

tone(
    buzzerPin,
    2000
);

delay(100);

noTone(
    buzzerPin
);

So each press generates a:

2 kHz / 100 ms

confirmation beep.


🔌 Connections

The wiring documented in the source is:

Component Arduino Nano
MLX90614 SDA A4
MLX90614 SCL A5
Display CLK D12
Display DIO D9
MP3 serial D10 / D11
Buzzer D4
Button D3

The button is configured as:

pinMode(
    buttonPin,
    INPUT_PULLUP
);

so it connects directly between D3 and GND.


🛠️ Hardware

Component Quantity
Arduino Nano 1
MLX90614 IR temperature sensor 1
TM1637 4-digit display 1
Serial MP3 module 1
microSD card 1
3 W speaker 1
Buzzer 1
Push button 1
5 V supply 1
3D-printed enclosure 1

The Arduino Nano is based on the ATmega328P and provides enough I/O for the temperature sensor, display, button, buzzer and serial audio module.


📚 Arduino Libraries

The sketch uses:

#include <Wire.h>
#include <Adafruit_MLX90614.h>
#include <TM1637Display.h>
#include "SoftwareSerial.h"

Install:

Adafruit MLX90614

👉 Adafruit MLX90614 Library

TM1637Display

👉 TM1637Display

Wire

Included with Arduino.

SoftwareSerial

Included with the AVR Arduino core.


🚀 Installation

1. Install Arduino IDE

👉 Download Arduino IDE

2. Install Arduino Nano Support

Install:

Arduino AVR Boards

and select:

Arduino Nano

Official documentation:

👉 Arduino Nano


3. Clone the Repository

git clone https://github.com/ronibandini/CoronavirusDoorbell.git
cd CoronavirusDoorbell

Repository:

👉 github.com/ronibandini/CoronavirusDoorbell


4. Prepare the Audio

Create:

/00/01.mp3
/00/02.mp3

on the MP3 player's microSD card.


5. Configure

Open:

👉 doorbell.ino

Important values:

int adjustTemp = 3;

and:

if (
    bodyTemperature > 38
)

Modify them if reproducing the original experiment with different calibration values.


6. Upload

Compile and upload to the Arduino Nano.

Serial Monitor:

9600 baud

Startup:

Coronavirus doorbell
Roni Bandini @RoniBandini

📁 Repository Structure

CoronavirusDoorbell/
│
├── doorbell.ino
├── README.md
└── LICENSE

🧱 3D-Printed Enclosure

The enclosure was modeled in Autodesk Fusion.

The design integrates:

  • temperature-sensor opening
  • four-digit display
  • doorbell button
  • speaker/electronics
  • Arduino Nano

Printable model:

👉 Coronavirus Doorbell with Arduino — Thingiverse


🌐 External References

🛠️ Hackster.io

The original project was published on March 15, 2020 and documents the hardware, circuit, code, thermal measurement and Fusion enclosure.

👉 Covid-19 Coronavirus Doorbell — Hackster.io


🏆 COVID-19 Detect & Protect Challenge

The project was submitted to Hackster's COVID-19 challenge, organized around hardware projects addressing the early pandemic.

👉 COVID-19 Detect & Protect Challenge — Hackster.io


🌡️ Melexis

Official MLX90614 documentation:

👉 MLX90614 Digital Non-Contact Infrared Thermometer


📚 Academic References

PeerJ Computer Science

A later study analyzing how IoT developers responded to the COVID-19 pandemic explicitly uses the Coronavirus Doorbell as an example of a project combining temperature screening and alerting.

👉 How Internet of Things responds to the COVID-19 pandemic — PeerJ Computer Science


Solid State Technology

A 2020 survey of emerging technologies developed during the pandemic also cites the project in its literature review.

👉 A Study on Evolving Technologies for Covid-19 Contact Tracking — ResearchGate


🔗 Related GitHub Projects

🔔 AI Bell

A later-generation doorbell using Computer Vision, Edge Impulse, audio transcription and AI.

👉 github.com/ronibandini/aicamdoorbell

👁️ GuampApp

ESP32-S3 AI camera experiment combining local Computer Vision, microphone recording and AI processing.

👉 github.com/ronibandini/guampapp

📡 mmWave Alarm

Human-presence detection behind doors and walls using mmWave radar and Telegram.

👉 github.com/ronibandini/mmWaveAlarm

🍫 Clean Alfajor

Another 2020 project combining Arduino, physical automation and pandemic-era experimental hardware.

👉 github.com/ronibandini/CleanAlfajor


📕 Contracultura Maker

Contracultura Maker is a book by Roni Bandini about maker culture, experimental electronics, AI, physical computing and technological autonomy.

📂 Contracultura Maker — GitHub repository

📕 Download Contracultura Maker PDF


📬 Contact

Roni Bandini Maker · AI Developer · Writer Buenos Aires, Argentina


Built with 🌡️ + Arduino + infrared sensing + physical computing.

About

Arduino Doorbell with hidden IR temperature sensor to detect high fever

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages