Projects / Contactless thermometer kiosk

Contactless thermometer kiosk

Intermediate2 hGuided buildReviewed

Build it step by step

0 of 6 done
  1. NANO68 cmVL53L0X68 cmSSD1306

    Wire the three I2C devices

    Connect the MLX90614, VL53L0X and OLED to A4 and A5.

  2. NANO

    Test each

    Use the library examples to confirm each device on its own.

  3. NANOVL53L0X68 cm

    Set the distance window

    Check the VL53L0X reads 30 to 50 mm when a card is held at 3 to 5 cm.

  4. NANO4.98V

    Compare with a thermometer

    Measure several people with this and a clinical thermometer.

  5. NANO

    Set the offset

    Put the average difference in OFFSET_C.

  6. NANO

    Mount

    Fit a bracket so the head always lands in the same spot, with a tissue-friendly guard.

In short

How do you build a contactless thermometer kiosk?

An MLX90614 sensor reads forehead temperature at 3 cm when a time-of-flight sensor sees a head in place. A screening aid, not a diagnosis. You need Arduino Nano, MLX90614 infrared thermometer, VL53L0X time-of-flight distance sensor, SSD1306 OLED Display and Active buzzer 5 V. It takes 6 steps and about 120 minutes.

Level
Intermediate
Time
About 120 min
Parts
5

Parts list

Tick what you already own. It saves to My Garage, so “Build with what I have” knows.

Wiring

FromToWhy
MLX90614 VCC, GNDNano 5V, GNDPower (use a 3 to 5 V board such as the GY-906)
MLX90614 SDA, SCLNano A4, A5I2C
VL53L0X VCC, GNDNano 5V, GNDPower (board with regulator)
VL53L0X SDA, SCLNano A4, A5I2C, same bus
OLED SDA, SCLNano A4, A5I2C
OLED VCC, GNDNano 5V, GNDPower
Active buzzer +Nano D6Beeps when a reading is done
Active buzzer -Nano GNDReturn

Code

Arduino IDE, board "Arduino Nano" (processor ATmega328P, or ATmega328P (Old Bootloader) for clones). Install "Adafruit MLX90614 Library", "VL53L0X" by Pololu and "U8g2". Infrared forehead readings depend on distance, sweat, room temperature and the person's skin, and are not core body temperature. Compare with a clinical thermometer on several people and set OFFSET_C from the average difference. The kiosk screens only; it cannot diagnose illness, so anyone with symptoms should be checked by a clinician.

Runs on a virtual Arduino Nano in your browser, with sliders for the sensors. Happy with it? Verify and upload to your real board from the same page (Chrome or Edge on a computer).

#include <Wire.h>
#include <Adafruit_MLX90614.h>
#include <VL53L0X.h>
#include <U8x8lib.h>

Adafruit_MLX90614 mlx;
VL53L0X tof;
U8X8_SSD1306_128X64_NONAME_HW_I2C oled(U8X8_PIN_NONE);
const byte BUZZER = 6;
const int NEAR_MM = 30, FAR_MM = 50;       // forehead 3 to 5 cm from the sensor
const float OFFSET_C = 0.0;                // add the skin-to-reference offset you measure against a good thermometer
const float WARN_C = 37.5;
unsigned long inPlaceSince = 0;

void setup() {
  pinMode(BUZZER, OUTPUT);
  Wire.begin();
  mlx.begin();
  tof.init(); tof.setTimeout(500);
  oled.begin();
  oled.setFont(u8x8_font_chroma48medium8_r);
  oled.drawString(0, 2, "Hold 3 to 5 cm");
  oled.drawString(0, 4, "from forehead");
}

void loop() {
  int d = tof.readRangeSingleMillimeters();
  if (!tof.timeoutOccurred() && d >= NEAR_MM && d <= FAR_MM) {
    if (inPlaceSince == 0) inPlaceSince = millis();
    if (millis() - inPlaceSince > 700) {                 // steady for 0.7 s
      float sum = 0;
      for (byte i = 0; i < 10; i++) { sum += mlx.readObjectTempC(); delay(20); }
      float t = sum / 10.0 + OFFSET_C;
      oled.clear();
      char v[8]; dtostrf(t, 4, 1, v);
      char b[17]; snprintf(b, sizeof b, "%s C", v);
      oled.drawString(0, 2, b);
      oled.drawString(0, 5, t >= WARN_C ? "High - recheck" : "Normal range");
      oled.drawString(0, 7, "Screening only");
      digitalWrite(BUZZER, HIGH); delay(150); digitalWrite(BUZZER, LOW);
      delay(4000);
      oled.clear();
      oled.drawString(0, 2, "Hold 3 to 5 cm");
      oled.drawString(0, 4, "from forehead");
      inPlaceSince = 0;
    }
  } else {
    inPlaceSince = 0;
  }
  delay(100);
}

Test checklist

What you should see at each check. If a reading is far off, stop and use the troubleshooting list.

CheckExpected
Nothing in frontPrompt on the screen
Forehead at 4 cmA temperature appears with a beep after a moment
Hand at 10 cmNo reading
Reading above the warningAsks for a recheck

If it does not work

Always reads about room temperature

The sensor is pointing at the wrong place or too far away.

Readings vary

Keep the distance the same and wait for a steady position.

Nothing triggers

Print the VL53L0X distance and adjust NEAR_MM and FAR_MM.

Device not found

Check I2C wiring and each module's supply voltage.

Still stuck? Find the fault step by step with your multimeter →

Ask Lark AI

Common questions

What parts do I need for the contactless thermometer kiosk?

Arduino Nano, MLX90614 infrared thermometer, VL53L0X time-of-flight distance sensor, SSD1306 OLED Display and Active buzzer 5 V.

How long does the contactless thermometer kiosk take to build?

About 120 minutes for a intermediate maker, in 6 steps.

How do I know the contactless thermometer kiosk works?

Nothing in front: Prompt on the screen. Forehead at 4 cm: A temperature appears with a beep after a moment. Hand at 10 cm: No reading.

Always reads about room temperature: what should I check?

The sensor is pointing at the wrong place or too far away.

Readings vary: what should I check?

Keep the distance the same and wait for a steady position.

Nothing triggers: what should I check?

Print the VL53L0X distance and adjust NEAR_MM and FAR_MM.

Device not found: what should I check?

Check I2C wiring and each module's supply voltage.