It's economically prohibitive for most people and small businesses to screen people for one of the main measurable symptoms of physical illness: temperature. The current IR Temperature scanners on the market are neither network nor hardwire-power-connectable and are not calibrated to measure human body temperature. I developed this project as a way to use commercially available materials and Cisco's IoT platform to develop a solution. You can review my entire project at this repo.
Our hope is that people will be motivated to deploy this project on a Cisco Edge Device, such as the IR829 Router, and then update and contribute to this repository, or fork their own version and share theor results with us.
The code for this project is also hosted at Cisco DevNet Code Exchange: https://developer.cisco.com/codeexchange/github/repo/xanderstevenson/skin-temperature-scanner
Animation | Device |
---|---|
For this prototype, the following hardware has been used:
- Raspberry Pi 2, 3 or 4 (I'm using 4B)
- MLX90640 IR Thermal Camera, with a 24x32 array of IR thermal sensors, Wide Angle (100 degrees)
- Any decent monitor with HDMI cable to the Pi
- Wired mouse and keyboard
- 5V 2.4A power adapter (2x)
- microSD card 8Gb or larger
The MLX90640 is a thermal camera made by Melexis N.V. It has a I2C interface, which is perfect for the Raspberry Pi and other embedded devices. You can find the C++ API, driver and documentation on their Github page. The company Pimoroni has made a breakout board around this sensor, for easy integration with a Raspberry Pi.
Setting | Value | Reference |
---|---|---|
Emisitivity of human skin | 0.99 | [1] |
Average human skin temperature | 32-34 degrees Celsius | [2] |
The software is made and tested on Raspbian (Buster). Open /boot/config.txt
and make the following changes:
## Display settings
max_usb_current=1
hdmi_group=2
hdmi_mode=87
hdmi_cvt 800 480 60 6 0 0 0
# Rotate the screen to portrait mode
display_rotate=3
## Settings for the thermal sensor
dtparam=i2c_arm=on
dtparam=spi=on
# Add support for FPS > 16
dtparam=i2c1_baudrate=1000000
If you don't want to make these settings by hand, you can also copy the resources/boot/config.txt
from this project:
cp ./resources/boot/config.txt /boot/config.txt
Reboot the computer after changing the config.txt file.
In the bin
directory is a script, called install_dependencies.sh
.
Download the latest release and unpack the application in your preferred location:
tar zxvf ThermalCamera_1.0.1_raspbian_buster_armv7l.tar.gz
cd ThermalCamera/bin
./install_dependencies.sh
Check the settings in /boot/config.txt
like described above. There is an example file in resources/boot/config.txt
in
this bundle. After changing the config.txt file, reboot the Raspberry Pi.
To run the application:
cd ThermalCamera/bin
./ThermalCamera
Instead of downloading the precompiled binary, you can download the source files and compile it yourself by following the steps below:
git clone https://github.com/gilbertfrancois/skin-temperature-scanner.git
cd skin-temperature-scanner
./bin/install_dependencies.sh
mkdir build
cd build
cmake ..
make
./ThermalCamera
balenaOS is a simple, stable Linux operating system tailored for reliably running Docker containers.
Deploying an app to a balena powered device is easy. Take a look at this guide for a detailed step by step on how to deploy this project.
If you are having trouble drop by our forums and let us know!
After deploying your application, you'll need to add the following:
- Device variable:
RESIN_HOST_CONFIG_display_rotate = 3
- DT parameter:
"i2c1_baudrate=1000000"
[1] Table of emissivity values in the Infrared
[2] Temperature of a Healthy Human (Skin Temperature)