Project tutorial
Test the Effectiveness of Your DIY Face Mask

Test the Effectiveness of Your DIY Face Mask © GPL3+

Build an affordable device that tests how well a face mask can protect from particulates. Record quantitative data (PM 1.0, 2.5 and 10.0).

  • 3,985 views
  • 1 comment
  • 7 respects

Components and supplies

Ph a000066 iso (1) ztbmubhmho
Arduino UNO
Arduino Due or Arduino Mega are preferable because they have multiple serial ports.
×1
Plantower PMS5003 Particulate Sensor (With Breakout Board)
×1
Plastic Mannequin Head
×1
Plastic Tupperware Container
×1
Caulk/Sealant
×1
Duct Tape
×1
Epoxy or Super Glue
×1
Large Plastic Bin
×1
Candle
×1
Small Zip-ties
×6
Fairchild semiconductor pn2222abu. image
General Purpose Transistor NPN
×2
Fairchild semiconductor 1n4004. image
1N4007 – High Voltage, High Current Rated Diode
×2
5V DC Fan, 40mm
×4
Kingbright wp7113sgd
5 mm LED: Green
×1
4415447 jg5sklyzsj
Resistor 220 ohm
×1
12002 04
Breadboard (generic)
×1
11026 02
Jumper wires (generic)
This is a rough estimate of the amount.
×30
Adafruit industries ada62 image 75px
USB-A to B Cable
×1
Adafruit industries ada63 image 75px
9V 1A Switching Wall Power Supply
×1
Velcro
×1

Necessary tools and machines

Apps and online services

About this project

Project Goal

Since the outbreak of COVID-19, many people have resorted to producing their own DIY face masks due to supply shortages and to allow health care workers the proper PPE they need. The efficacy of homemade face masks is a disputed topic in recent times with a lot of misinformation spreading, often without any significant scientific backing.

The goal for this project is to create an inexpensive device that can obtain quantitative results on how well a face mask can filter particulates. The sensor used in this project can measure particles that are 1.0 µm, 2.5 µm and 10.0 µm in diameter. This data can be useful in a variety of ways:

  • To test how well different fabrics filter particulates when deciding on a material to create a mask from.
  • To perform a ‘fit test’. The physical fit of a face mask is important to consider. This device will allow you to see the effect of this on the mannequin head, and improve the design of the mask to get better results.
  • Compare DIY masks to commercial masks, such as the N-95 or surgical mask.
  • Face masks tend to lose their filtration quality over time. This device can record data using Excel and Microsoft Data Streamer, so you can keep track of the mask quality with regular testing.

Background Information

This information I found is based on articles 1, 2, 3 and 4 in the References below. They have some pretty interesting information on how experts believe COVID-19 spreads.

“The World Health Organization (WHO) and Centers for Disease Control and Prevention (CDC) postulate that the particles of more than 5 μm as droplets, and those less than 5 μm as aerosols or droplet nuclei.” [2]

COVID-19 can be spread through the air by respiratory droplets or aerosols. Droplets tend to travel a maximum distance of six feet before falling onto the surrounding surfaces (hence the reason for social distancing), while aerosols travel further and stay suspended in the air. There seems to be a dispute among experts as to which modes of transmission are more infectious. [2] Nevertheless, it is beneficial to see how well a mask can filter both of these particle sizes.

The PMS5003 particle sensor used in this project has the ability to read three ranges of PM sizes: [PM1.0: 0.3~1.0 μm] ; [PM2.5: 1.0~2.5 μm] ; [PM10.0: 2.5~10 μm]. [5]

  • The PM1.0 range can detect particles about the size of Coronavirus.
  • The PM2.5 range can detect aerosols.
  • The PM10.0 can detect particles about the size of droplets.

Concept of Design

The design of this device is meant to simulate a person inhaling and exhaling through a face mask. There are two “intake” fans that suck air into the mannequin head enclosure (inhalation), and two “exhaust” fans that blow air back out (exhalation). The particulate sensor takes a reading each time the intake fans cycle on and off and records the PM-1.0, PM-2.5 and PM-10.0 data in Excel. The test is set to run for 6 minutes until a green LED turns on, signaling the test’s completion. The following video shows the device running.

To simulate the particles, I decided to use a burning candle to introduce pollutants into the air and provide a baseline for the sensor. I put the device and the burning candle inside of a large plastic bin to create an “atmosphere” and contain the particulate matter. The cap of the bin was put on loosely to allow oxygen inside so that the candle does not go out. This was the most cost effective idea I could come up with.

Possible Improvements

There are two main aspects of this design that could be improved upon. First, the plastic mannequin is not ideal as it does not have a skin-like material to simulate a realistic fit. There are other more life-like mannequin heads available like CPR dummies, but they tend to be very expensive.

Second, using a burning candle in an open-system is not an ideal way to replicate COVID-19 particles. It would be better to have this test done in a closed-system with a constant supply of an aerosol that is a similar size to COVID-19. This way, each test would be consistent and the variability of the candle would be eliminated. The following link is an example of some aerosol generators. A device like this that can produce particles of a certain size at a specified flow rate would be ideal for this project. https://tsi.com/products/aerosol-generators-dispersers/

Assembly

To assemble the mannequin head, I zip tied the four fans together in the formation shown above with two fans facing in and two out. Then I used some wire to secure it to the mannequin in front of the mouth cut out. I used some duct tape around the fan to act as a shroud enclosure to create better suction. Finally, I used Velcro to attach the sensor.

To seal the mannequin head closed, I cut a piece of plastic tupperware with a lid and glued that onto the bottom of the head. This allows you to still be able to get the sensor and fans out easily. (Ignore the piece of white PVC board shown in some of the pictures, it is not necessary. That is only there for a previous idea that I had that did not work well.) I then cut a small hole in the side of the plastic to thread the wires through, and sealed it with sealant. It is very important that the assembly is well sealed to get accurate results. For this reason, I recommend cutting as little holes as possible when building.

Examples of Data and Results

Here is an example of 4 tests that I did. I tested a DIY mask made from a thick yellow fabric with coffee filters inside (shown in the thumbnail), a surgical mask, a T-shirt wrapped around the face a single time, and no mask.

The DIY mask had the best results of the four tests. This is most likely because it is tight-fitting unlike the surgical mask, and a more effective material compared to the t-shirt.

With no mask, the PM levels increase much faster and reach the highest levels of all the tests.

Although the surgical mask is made of an effective material, is not very tight fitting. For this reason, it seems to allow more particulate matter through. The PM levels do not increases as quickly as with no mask though.

The t-shirt has a good fit, although it is a thin material that allows a lot of particulate matter through. For this reason, it has about double the PM value's of the DIY yellow mask.

Wiring & Circuitry

This is a picture of the breakout board that came with the PMS5003 sensor.

The picture below shows the circuitry for powering the fans in this project. The orange and yellow wires go to the positive and negative terminals on the fan, respectively. A transistor is needed in this case because the fans require too much current to be powered by the pins of the Arduino alone. The blue wire receives a PWM(pulse width modulation) signal and is used to control the speed of the fans. [6]

A flyback diode is necessary to protect the Arduino pins from sudden voltage spikes by the inductive load of the fans. [7] If you want to learn more about this circuitry, there are some great articles and resources explaining them in References!

Programming

I provided two files of code with this project. The main one is supposed to be used with Data Streamer in Excel, and the other can be used with the serial monitor for debugging purposes.

The code below uses the PMS library and is what I used to control the PMS5003 sensor. This library was written by fu-hsi and works great. I learned how to use it here: https://github.com/fu-hsi/PMS.

void getSensorReading(){
pms.requestRead();

if (pms.readUntil(data)) {
Serial.print("PM 1.0,");
Serial.print(data.PM_AE_UG_1_0);
Serial.print(",");

Serial.print("PM 2.5,");
Serial.print(data.PM_AE_UG_2_5);
Serial.print(",");

Serial.print("PM 10.0,");
Serial.print(data.PM_AE_UG_10_0);
Serial.println();
} else {
Serial.print("No data.");
}
delay(100);
}

The creator of the PMS library recommended using 2 hardware serial ports, although the Arduino UNO only has one. For this reason, I used the AltSoftSerial library since it is the next best thing. In hindsight, the Mega or Due would have been better for this application since they have multiple serial ports, although I was able to get good results with the UNO.

References

1. COVID-19 particle size picture: https://abcdust.net/how-large-is-a-corona-virus-virion-compared-to-the-mp10-2-5/

2. “Transmission of COVID-19 virus by droplets and aerosols: A critical review on the unresolved dichotomy”: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7293495/

3. “Aerosols, Droplets, and Airborne Spread: Everything you could possibly want to know”: https://first10em.com/aerosols-droplets-and-airborne-spread/

4. “Does COVID-19 Spread Through Droplets Alone?”: https://www.frontiersin.org/articles/10.3389/fpubh.2020.00163/full

5. PMS5003 Datasheet: http://www.aqmd.gov/docs/default-source/aq-spec/resources-page/plantower-pms5003-manual_v2-3.pdf?sfvrsn=2

6. Example of how to control a DC motor or fan: https://www.arduino.cc/en/Tutorial/TransistorMotorControl

7. Flyback diodes: https://sciencing.com/flyback-diode-6501683.htm

Code

Project Code (Main)Arduino
This is the main code used for this project. It is written for the Arduino Uno and to be used with Microsoft Data Streamer in Excel.
#include "PMS.h"
#include <AltSoftSerial.h>

// NOTE: If using an Arduino with an extra hardware serial port like the Mega or Due,
// use that port instead of the AltSoftSerial library (Serial1 for example).

AltSoftSerial softSerial; // On the Arduino UNO: (Pin 8: RX), (Pin 9: TX), (Pin 10: unusable).
PMS pms(softSerial);
PMS::DATA data;

int endLED = 13; // Built-in LED to turn on when program is done.
int inFan = 6;   // Fans that pull air into the enclosure.
int outFan = 5;  // Fans that push air out of enclosure.

void setup(){
  softSerial.begin(9600); // Software serial port: communicates w/ PMS sensor via pms() library.
  Serial.begin(9600);     // Hardware serial port: sends data to PC.

  pinMode(endLED, OUTPUT);
  pinMode(inFan, OUTPUT);
  pinMode(outFan, OUTPUT);

  pms.passiveMode();   // Set the PMS sensor to passive mode which only takes readings when prompted with 'pms.requestRead()'.
  delay(30000);   //The sensor has to run for about 30 seconds before putting out stable data.
}

void loop(){
  if (millis() <= 360000) {  // Test terminates at 6 minutes
    cycleFan(inFan, true);        // Cycle power of intake fan.
    getSensorReading();           // Get reading from PMS sensor.
    cycleFan(outFan, false);      // Cycle power of exhaust fan.
  } else {
    digitalWrite(endLED, HIGH);   // Turn on green LED (program is over).
  }
}

void getSensorReading(){
  pms.requestRead();
  
  if (pms.readUntil(data)) {
    Serial.print("PM 1.0,");
    Serial.print(data.PM_AE_UG_1_0);
    Serial.print(",");

    Serial.print("PM 2.5,");
    Serial.print(data.PM_AE_UG_2_5);
    Serial.print(",");

    Serial.print("PM 10.0,");
    Serial.print(data.PM_AE_UG_10_0);
    Serial.println();
  } else {
    Serial.print("No data.");
  }
  delay(100);
}

void cycleFan(int fanPin, bool flowDirection_In){
  int fanSpeed;
  
  for (fanSpeed = 0; fanSpeed <= 255; fanSpeed += 5) {  // Gradually increase PWM to get fan up to full speed.
    analogWrite(fanPin, fanSpeed);
    delay(30);
  }
  if (flowDirection_In == true) {  // Amount of time to leave fan at full speed depending on which flow direction.
      delay(10000); //'in' fans -> stay on 10 seconds
  } else {
      delay(5000);  //'out' fans -> stay on 5 seconds
  }

  for (fanSpeed = 255; fanSpeed >= 0; fanSpeed -= 5) {   // Gradually reduce PWM until fan stops.
    analogWrite(fanPin, fanSpeed);
    delay(30);
  }
  delay(1000);
}
Debugging CodeArduino
I used this code when I was debugging and trying to get the fans and PMS sensor to work properly. This code works with the serial monitor.
#include "PMS.h"
#include <AltSoftSerial.h>

int endLED = 13; // 'Built-in' LED to turn on when program is done
int inFan = 6;
int outFan = 5;
int fanSpeed;

// If using an Arduino with an extra hardware serial port like the Mega or Due,
// use that instead of the AltSoftSerial library
AltSoftSerial softSerial; //(Pin 8: RX), (Pin 9: TX), (Pin 10: used to keep time)
PMS pms(softSerial);
PMS::DATA data;

void setup(){
  softSerial.begin(9600); // Software serial port: communicates w/ PMS5003 sensor via pms() library
  Serial.begin(9600);     // Hardware serial port: prints data

  //Initialize the digital pins for the both fans and LED as output
  pinMode(endLED, OUTPUT);
  pinMode(inFan, OUTPUT);
  pinMode(outFan, OUTPUT);

  // Set the sensor to passive mode which only takes readings when prompted with 'pms.requestRead()'
  pms.passiveMode();
  Serial.println("Warming up PMS sensor, wait 30 seconds for stable readings...");
  delay(30000);
}

void loop(){
  if (millis() <= 120000) {
    cycleFan(inFan);    // Cycle power of intake fan
    getSensorReading(); // Get reading from PMS sensor
    cycleFan(outFan);   // Cycle power of exhaust fan
  } else {
    digitalWrite(endLED, HIGH); //Turn on green LED
  }
}

void getSensorReading(){
  Serial.println("Send read request...");
  pms.requestRead();
  Serial.println("Reading data...");
  
  if (pms.readUntil(data)) {
    Serial.print("PM 1.0 (ug/m3): ");
    Serial.println(data.PM_AE_UG_1_0);

    Serial.print("PM 2.5 (ug/m3): ");
    Serial.println(data.PM_AE_UG_2_5);

    Serial.print("PM 10.0 (ug/m3): ");
    Serial.println(data.PM_AE_UG_10_0);
  } else {
    Serial.println("No data.");
  }
  delay(100);
}

void cycleFan(int fanPin){
  //Gradually increase PWM to get fan up to full speed
  Serial.println("Fan on...");
  for (fanSpeed = 0 ; fanSpeed <= 255; fanSpeed += 5) {
    analogWrite(fanPin, fanSpeed);
    delay(30);
  }
  delay(5000);

  //Gradually reduce PWM until fan stops
  Serial.println("Fan off...");
  for (fanSpeed = 255 ; fanSpeed >= 0; fanSpeed -= 5) {
    analogWrite(fanPin, fanSpeed);
    delay(30);
  }
  delay(1000);
}

Custom parts and enclosures

Excel File for Recording PM Data
You need to use Data Streamer with Excel for this to work.
recordprojectdata_8WmqtPAUFc.xlsx

Schematics

Schematic
Schematic ho7nprtgjt
Wiring Diagram
Breadboard ssj2dxcaro

Comments

Similar projects you might like

How to Make LEDs DIY Face Mask Using LED Strip, Arduino Nano

Project tutorial by DKARDU

  • 3,237 views
  • 1 comment
  • 12 respects

Face Tracking Camera

Project tutorial by Little_french_kev

  • 34,380 views
  • 21 comments
  • 103 respects

Smart Door with Face Unlock

Project tutorial by Divins Mathew

  • 32,745 views
  • 8 comments
  • 40 respects

Test DHT22 Sensors with Arduino and MATLAB

Project tutorial by dancili

  • 9,546 views
  • 3 comments
  • 23 respects

Contact-less Entry and Contact Tracing

Project tutorial by Genius Things

  • 1,211 views
  • 0 comments
  • 0 respects

Hacking STEM Flex/Pressure Sensor

Project tutorial by Jen Fox and Hacking STEM

  • 6,300 views
  • 0 comments
  • 16 respects
Add projectSign up / Login