4,773

12

1

## Introduction: Make Your Own Spirometer

The following are instructions on how to build your very own spirometer!! We had to build this for an engineering class at my university. Our project uses a pressure transducer, arduino, and a switch to compute the change in breath volume through a tube with two different diameters. We used a simple circuit in order to cut down on possible complications.

## Step 1: Step 1: Supplies

-Pressure Sensor (Honeywell RR Transducer ASDXRRX010ND7A5) (\$53.06)

-Glue (\$6.74))

-Switch (\$0.95)

## Step 2: Step 2: Coding

While we waited on our parts to arrive, we worked on the arduino code for the Spirometer.

First, we read in the analog signal from the transducer and converted it to a digital signal using:

voltage = inputVolt*(vs/1023.0);

Next, we converted the voltage to pressure (and into the correct units) using:

pressure_psi = (15/2)*(volt-2.5);

pressure_Pa = pressure_psi*6894.76;

Then, we calculated the mass flow from the pressure using:

dP = ((W^2)/2rho)*(1/A2^2-1/A1^2)

massFlow = 1000*sqrt((abs(pressure_pa)*2*rho)/((1/pow(area_2,2)))-(1/pow(area_1,2)))));

Lastly, we converted the mass flow to volumetric flow and computed the volume using:

volFlow = massFlow/rho;

volume = volFlow*dt+volume;