The Design and Development of a Low-Cost Spirometer

Summer 2020

Asa Garner

The COVID-19 pandemic has taken a massive toll on medical infrastructure, and this was especially true at the inception of this project. In response, one of the main things that I worked on for my research at the Fluid Interactions Lab at USC Viterbi was the development of a low cost 3D printable spirometer that could shore up medical device shortages.

What is a Spirometer?

Spirometers are devices that measure lung function in patients, typically in terms of airflow volume. There are multiple forms of them- however, generally digital spirometers are preferred for their ability to interpret data and more accurately describe patient condition and recovery. These digital spirometers are very expensive when compared to the fundamentals of what they're trying to accomplish.

Video Overview of the Project

Embedded below is a short video where I outline the basics of what I was able to accomplish in my research this summer.

Want More Details? Read On!

Cutting Cost: How and Why

Thinking Big Picture About Cutting Costs

First, I want to address the macroeconomic factors that support the concept of 3D printing medical devices. Medical devices typically fall into the category of inelastic products, since supply and demand ideally has a limited effect on the cost. The COVID-19 pandemic has not driven up the cost of these machines, rather, it has driven up the price: centralizing medical infrastructure and rapidly responding to a pandemic is a logistical nightmare, and this is reflected in the amount of money spent on the medical supply chain. Regardless of the actual price of the machines, people pay as much as is needed to actually get them from the production line to  the hospital, from the hub to the spoke. I completely believe that 3D printing components changes the game. A future where hospitals around the world are able to react instantly to changes on a global scale can be facilitated by 3D printers. 3D printing is a way to decouple the cost of medical machines from the actual price of logistically making them available. 


Cutting Cost on a Individual Product Basis

In order to make the price of the actual device as low as possible, I used the most simple configuration of sensors and computing as possible. To calculate pressure differential (the need for which is explained in detail below), I used a diaphragm DP sensor (MPXV7002DP), and to compute the data, I used an open source Arduino Uno development board. This configuration put the total price of my solution at slightly under 50 dollars, however, the Uno was mainly there to make prototyping easier- the computing could've been offloaded to an external source such as a computer. With this in mind, the design could be reproduced in a more final state for less than 20 dollars. Similar handheld devices start at around 80 dollars, however, these don't tend to offer the analytical options of the software I wrote for the Arduino (also detailed below.)

Cost From a Design Perspective

My spirometer design takes complete advantage of the ability to 3D print geometry that would otherwise be difficult, expensive, or impossible with more mainstream techniques such as injection molding, vacuum forming, or subtractive processes. Simplicity is the name of the game with my design: the whole chassis is printed in a single nonmoving part. I accomplished this through the use of an aerodynamic principle known as the venturi effect. Taking advantage of these properties allows the entire chassis of my device to cost slightly under 2 dollars (calculated from filament mass).

Measuring Airflow: From Design to Software

Using the Venturi Effect to Measure Airflow

When air is blown into the spirometer from one end, it flows through a narrow point and into a larger space. The venturi effect states that when flowing through a constricted space, airflow will increase, and therefore localized pressure will actually drop. This can be described by Bernoulli's equation. I take advantage of this by taking measurements at P1 and P2 on my diagram respectively. With these measurements combined with constants, I use Bernoulli's equation to compute airflow kinetic energy, and from that, I can derive all the data I need.

Software

I didn't mention computers in the previous paragraph, so you can almost get a picture of me furiously writing equations as the spirometer beeps away, but this was definitely not the case: the biggest and most time consuming piece of the project was without a doubt the software component. Prior to this project, my experience with coding and software development was limited to brief work on rocket flight computers. That's to say that I knew a lot of the terms, but I didn't really know how to execute my ideas in code. There was a massive amount of trial and error throughout the process, but by the end of it, I successfully learned how to port in data, interpret this data through a series of conditions, and then filter the data using some new calculus techniques I picked up. 

The Code

This is the main bread and butter of how I got my data- pictured is the zeroing condition that sets the accuracy of the data, and part of the conditions that use Bernoulli's equation to derive a useful output.

Testing

Throughout the entire development phase, I was running tests and subsequently changing code- eventually though, I was able to get everything to the point where I could measure inspiratory capacity, among other things. Pictured is my high score plotted out from the Arduino serial output- I was really out of breath after this one.

View my Poster on the Subject

Embedded below is a poster that gives an overview of the project takeaways

Using Format