Arduino doorbell with hidden non-contact IR temperature measurement and audible fever alert
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:
- 🔘 Detects the doorbell press.
- 🔊 Emits a short confirmation beep.
- 🌡️ Reads ambient and object temperature.
- ➕ Applies a configurable temperature offset.
- 🔢 Displays the measured value.
- 🔔 Plays the normal doorbell sound.
- 🚨 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.
- 🌡️ 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
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
Everything runs locally on the Arduino.
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:
Arduino library:
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.
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);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
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
);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 0xEFand includes a calculated checksum.
Startup volume:
setVolume(25);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
);A separate buzzer provides immediate tactile/audio feedback when the button is pressed.
#define buzzerPin 4The tone is:
tone(
buzzerPin,
2000
);
delay(100);
noTone(
buzzerPin
);So each press generates a:
2 kHz / 100 ms
confirmation beep.
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.
| 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.
The sketch uses:
#include <Wire.h>
#include <Adafruit_MLX90614.h>
#include <TM1637Display.h>
#include "SoftwareSerial.h"Install:
Included with Arduino.
Included with the AVR Arduino core.
Install:
Arduino AVR Boards
and select:
Arduino Nano
Official documentation:
git clone https://github.com/ronibandini/CoronavirusDoorbell.git
cd CoronavirusDoorbellRepository:
👉 github.com/ronibandini/CoronavirusDoorbell
Create:
/00/01.mp3
/00/02.mp3
on the MP3 player's microSD card.
Open:
Important values:
int adjustTemp = 3;and:
if (
bodyTemperature > 38
)Modify them if reproducing the original experiment with different calibration values.
Compile and upload to the Arduino Nano.
Serial Monitor:
9600 baud
Startup:
Coronavirus doorbell
Roni Bandini @RoniBandini
CoronavirusDoorbell/
│
├── doorbell.ino
├── README.md
└── LICENSE
- ⚙️
doorbell.ino— complete Arduino firmware - 📖
README.md— original documentation - ⚖️
LICENSE— GPL-3.0
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
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
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
Official MLX90614 documentation:
👉 MLX90614 Digital Non-Contact Infrared Thermometer
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
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
A later-generation doorbell using Computer Vision, Edge Impulse, audio transcription and AI.
👉 github.com/ronibandini/aicamdoorbell
ESP32-S3 AI camera experiment combining local Computer Vision, microphone recording and AI processing.
👉 github.com/ronibandini/guampapp
Human-presence detection behind doors and walls using mmWave radar and Telegram.
👉 github.com/ronibandini/mmWaveAlarm
Another 2020 project combining Arduino, physical automation and pandemic-era experimental hardware.
👉 github.com/ronibandini/CleanAlfajor
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
Roni Bandini Maker · AI Developer · Writer Buenos Aires, Argentina
- 🐙 GitHub — @ronibandini
- 🌐 Medium — @ronibandini
- 𝕏 X / Twitter — @RoniBandini
- 📸 Instagram — @ronibandini
▶️ YouTube — @RoniBandini- 💼 LinkedIn — Roni Bandini
Built with 🌡️ + Arduino + infrared sensing + physical computing.