Main Content

Device to detect if person is wearing mask and having healthy heart rate using M5Stack Core2, ESP32CAM, AWS IoT and Edge Impulse

After the pandemic most of the offices will start for on-site work and schools will start, during this time we also need to take care if any employee or student is having correct body temperature and is wearing mask. Instead of hiring someone and risk their life to check temperature and mask for so much employees and students is tough task.

So to solve this problem we want to create a device which monitors their heart rate and checking are they wearing a mask using Edge Impulse model on AWS IoT Edukit and Embedded Camera.

All the Computer Vision will be completely done over ESP32 Cam using Deep Learning model. The Mask Detection model is trained on Edge Impulse and the generated library is used in ESP32 CAM.

The Data is sent to AWS IoT suing MQTT and major alerts like Person is Not Wearing Mask is sent as email to Admin using AWS SES


- The IR Distance sensor will check when user is standing in front of Device and start camera and heart sensor
- Read the Image and inference it on Mask Model.
- Check whether Employee/Person is wearing Mask using Mask Classification Model trained on Edge Impulse
- Send Predictions to M5Core2 using UART communication.
- Then Check the Pulse Rate using Pulse Sensor and send to M5Core2 to display on screen.
- If results are showing that Person is not healthy then that case will be reported to admin using AWS IoT and SMTP via SES.

Sensors Used:
- KY-039 Heart Sensor: This KY-039 Finger Detection Heartbeat Measuring Sensor Module uses bright infrared (IR) LED and a phototransistor to detect the pulse of the finger, a red LED flashes with each pulse. Works using principle of Plethysmograph.
- IR Proximity Sensor :The IR sensor module consists mainly of the IR Transmitter and Receiver, OPAMP, Variable Resistor (Trimmer pot), output LED in brief. Infrared proximity sensors consist of an IR LED that emits, and a light detector for detection of reflection. It has an in-built signal processing circuit that determines an optical spot on the PSD.”

Link to article