Required PC software
- Matlab, Excel or any other data processing software
The software consists out two parts, one in written in Arduino and the other in Python. Both are free downloadable.
The arduino part is to program the Arduino Uno, which is the “computer” of the setup. It controls the speed of the air fan and reads the pressure sensors. The file “pressure_drop_arduino_main.ino” needs to be uploaded one time on the Arduino UNO board. In order to do so, the Arduino software is needed on your PC, which can be downloaded for free at https://www.arduino.cc/en/Main/Software
The second software part in python, “readdata_pressure_drop.py”, is to control the Arduino UNO board with your PC. The measurement will be done automatically and a data file will be generated for analysis. The installation of python and instruction for conducting measurements are explained later on.
During the measurement the speed of the air fan is build up, until the fan reaches its maximum speed or the pressure sensors reach their limit. This increases the flow through the mask and the pressure in the system, which are related by the resistance of the mask. When a mask has a higher resistance, it is harder to breath though and the pressure in the system will be higher and less air will flow through.
Installation of Python
- Open command prompt and enter “python” (This step is not necessary for MacOS users, proceed with step 3)
- Microsoft store will open, install Python 3.8
- In the command prompt, enter “pip install pyserial” in order to install pyserial.
- In the command prompt, enter “pip install datetime” in order to install datetime.
Instruction for conducting measurements
- Open the windows command prompt
- Type: “cd directory” (directory is the location on your PC where the Python file is located and where you store the results.)
- Make sure that everything is connected to the PC and ready to start measuring
a. USB connected to PC
b. Setup is powered up
c. Setup is configured correctly
- Type: “python readdata.py”
a. Enter the COM-port that is used in the measurement, which can be found in the device manager.
b. Enter the setup number (You can insert any number, but it is convenient for when using multiple setups)
c. Enter the sample number of the measurement
- The data obtained from the measurement will be saved as:
- Go back to step 3
When multiple setups are used simultaneously, open command prompt multiple
When matlab available, use the files “importfile.m” and “sweepdata.m”, type the filename of the data you want to analyse in the “sweepdata.m” script and press “RUN” and a flow-resistance graph will be plotted.
In order to analyse data using Microsoft excel the following steps can be performed:
- Open the data.csv file
- Separate the first line of cells using the comma separation https://support.office.com/en-us/article/split-a-cell-f1804d0c-e180-4ed0-a2ae-973a0b7c6a23
- Select all (ctrl-a) and delete blank rows https://www.excel-easy.com/examples/delete-blank-rows.html
- Make two new columns where the flow and pressure is calculated:
a. Flow formula with D2 as flow sensor value cell: = PI()/40,012^2SQRT(2(( (5/1023D2)/(50,4)-1,25)^2525)/(1,2(1-(0,012/0,033)^4)))60000
This formula calculates the flow in Litre per minute
b. Pressure formula with F2 as pressure sensor value cell: =( (5/1023F2)/(50,4)-1,25)^2*525 This formula calculates the pressure in Pascal (1 bar = 100 000 Pa)
- Make a point scatter of the Flow and pressure.
An example of data processing in excel can be found in “Dataprocessing_excel.xlsx”