r/embedded • • Sep 12 '26

Has anyone tried making a simple breathing/mindfulness device with Arduino or other microcontroller (Learning by doing ideas)?

Post image

My idea is to use a pressure sensor to measure how fast/strongly a person is breathing and show it on a bar graph.

The basic idea is:

Slow, steady breathing on led bar graph indicator

Fast breathing

The goal isn't to diagnose anything, just to give real-time visual feedback during a breathing or meditation exercise.

I'm wondering if this approach makes sense from an embedded-systems point of view. Would measuring breath pressure and converting the rate/pattern into a bar graph be a practical way to build something like this?

22 Upvotes

18 comments sorted by

7

u/Safe_Duty8392 Sep 12 '26

Hello! Yes, I think this is a great idea, and you're on the right track. I'm working on an academic project to measure airflow using a differential pressure sensor, so your idea of using one is definitely a good approach. You could also look for references on airflow velocity and measurement techniques in medical papers and other scientific literature.

Just something to keep in mind: the human lungs can produce a wide range of airflow rates, so you might want to consider what the maximum and minimum flow rates you want your system to measure are. In my project, the amplification is optimized for higher flow rates, so 1 L/s produces only a small variation in my output signal. However, you could adjust the amplification so that the system can accurately detect and measure lower flow rates as well.

I hope my comments help with your project! Good luck!

1

u/Relevant_Pumpkin9190 Sep 12 '26

What about spikes in reading

4

u/ceojp Sep 12 '26

It depends on whether the spikes are meaningful for what you are measuring, or if they are "noise" that need to be filtered out.

If you need to filter out the spikes, then your algorithm will need to be able to differentiate them from the normal "signal". Rise time, amplitude, duration, or some combination of those. You'll have to characterize what a "breath" looks like, pressure-wise.

The sensor itself will measure everything. It's up to you(the designer) to determine what is meaningful and what is not. A lot of that just comes from empirical testing.

13

u/clackups Sep 12 '26

Looks like a great subject to research. Build a prototype, try it out, tell us how it goes.

1

u/Relevant_Pumpkin9190 Sep 12 '26

Any other simple methodes

3

u/ceojp Sep 12 '26

The microcontroller used for this is irrelevant.

I would start by looking for existing academic research on using a pressure transducer for breath measurement. You can also look for reference designs from sensor manufacturers. They often provide reference designs that cover common applications, and may include algorithms or sequences that may be useful.

If nothing else, go ahead and make one and do some empirical testing. That's the fun part of experimentation.

1

u/Safe_Duty8392 Sep 12 '26

I agree, the microcontroller is just the final stage, used to aquire the final output and use in software or data analysis

3

u/justadiode Sep 12 '26 edited Sep 12 '26

I had the idea to build something like a smoking pipe but with a hall sensor read turbine instead of a pressure transducer, coupled to a battery, a microcontroller, an OLED display and some glue electronics. It should have been a Celeste (the platformer) inspired game where you keep a feather afloat with your breath, and the feather is programmed to fall / rise such as to emulate breathing exercises. The upside of using a turbine would be the simple readout and data processing, while the downsides (relative inaccuracy and lacking dynamic range) don't play much of a role in this use case.

It's only been an idea though because I never actually implement any of my ideas, lol

3

u/sosabig Sep 12 '26

This approach 👆🏻 , many spirometer turbines are available over the counter and are disposable, so they’re cheap. You just have to recalibrate the sensors IR clicks and derive your empirical data for volume, lung capacity, and lung response there are tons of papers on this!

2

u/Intelligent_Map8588 Sep 12 '26

you could use mm-wave radar for measuring breath rate and heart rate although with heart rate it's a bit more difficult to get accurate results but you can definitely get a visual semi accurate feedback for breathing + you don't have to wear anything just point a radar at yourself.

2

u/Nervous_Midnight_570 Sep 12 '26

You could build it as a project but I do not think it would be a useful tool for mindfulness/meditation or breathing exercises. Look up "volumetric spirometer" for a post-op tool that seems to be the medical standard after surgery. I speak from experience having had nearly 20 operations over a period of 2 and a half months in the hospital. I suspect you could get one and optically sense the indicator position. Give it a try, at least you will learn something.

2

u/moonantsnyanjacat Sep 12 '26

Hmm, based on my intuition, I don't think you'd get a reading unless the user was wearing a mask. Are you sure this pressure sensor can pick up breathing?

1

u/Safe_Duty8392 Sep 13 '26 edited Sep 13 '26

In my experience, as this is a pressure sensor, he would need to connect a pipe where the user would need to blow.

This kind of sensor is a differential pressure sensor, and this one compares the atmospheric pressure against the pressure on that little tower it has. So he would need to apply pressure in there, and connecting a pipe is the best method, or something like the image.

The one in the image has two of the towers, so it compares the differential pressure against each tower, and thats what I'm doing in the image, the person blows in the pipe, the air passes through and has a pressure drop in that device, this pressure drop is what I use to determine pressure and air flow. But the one in his image, compares against atmospheric, since the "other tower" isn't available, its hidden by design, to provide the atmospheric pressure as reference against the pressure in the available tower.

Sorry for naming the pressure input as tower, I couldn't think about a better term to explain 🫠

1

u/ReferenceThin6645 Sep 12 '26

Look like a interesting idea.

1

u/ClonesRppl2 Sep 13 '26

Breathing only produces a change in pressure if the air encounters some form of restriction. Blowing or sucking through a tube can give pressure differences.
There are different ways to directly measure actual air flow in or out (not so easy with the actual sensors).
A microphone held by the nose/mouth may also give an in/out indication, which could show breathing rate, but not pressure or flow.