I am trying to measure my respiratory rate by using a temperature sensor (LM35) under my nose. The temperature will fall during inhalation and will rise during exhalation. Unfortunately the data shows some fluctuations. In order to determine the respiratory rate I want to measure the time between two starting points of inhalation. At each starting point the temperature is the highest of that cycle.
Since I am not a software developer I am wondering whether this is a logical way of thinking. And if so how could I translate this in code?
For this to work,
there will need to be a temperature on the inhale phase that is lower than anything seen during exhalation.
There will need to be a temperature on the exhale phase that is higher than anything seen during exhalation.
So lets say (random temps)
inhaling dependably gets below 80 and
exhaling dependably gets above 90.
When the temperature exceeds 90, set a flag. "lungs emptying"
When the temperature falls below 80, clear the flag. "lungs filling"
The flag will cycle once per breath. Of course this all depends on regular breathing. Someone who knows what you are trying to do can make life hard for you easily.
If you data is so noisy and fluctative that you cannot establish those high and low switching points, this method will take more work and may not be able to be made to. Work.
Google "hysteresis", a standard method for picking out a signal from some nose. It shows up all over the place and good thing, too.
a7
Log the measured values and find out whether your assumptions hold.
Yeah, maybe run your device and use the serial plotter to share a pic of what you are seeing.
a7
Hello,
Look at page 11 fig 3: Response curve of the device, you can see that the device has a time constant of about one minute so it takes 3 minutes in order to reach the final value: it could be that it will work but reliability will not be very good. And if one is breathing fast, it is likely to fail.
Have you considered BMP 180? It measures air pressure and has response times of a few ms. This means that if we use the law of our friend Bernoulli, if your subject blows over the sensor, the thing should see an underpressure related to the speed of the air flow. As BMP 180 is very accurate (used to measure heights above sea level) and as it is made by Bosch (reference in the car industry) I would certainly do some trials with it. It is a cheap device as well and comes with an Arduino compatible interface right out of the box.
On the other hand: alto777 is right: try and record the values, nothing beats a good concept test.
Example I made to record data into excel file.
Best Regards,
Johi.
Gotta say I skipped over the actual sensor you are using, I wonder if a thermistor would work better.
The BMP 180 is a good idea. I know never mind how that e-cigarettes have some kinda pressure sensor for turning on at the right time. But that signal comes from pulling directly on the device or "puffing".
But the thermistor or LM35 can be simply held in the airflow from your nostril, not sure if you'd be able to conveniently deploy a barometer chip. Worth thinking about I suppose.
a7
OK, me again.
An e-cigarrette switching mechanism (looks like a tiny condenser microphone module) held up to my nostril but not terribly in the way of normal breathing turns ON and OFF the feedback LED it incorporates dependably with inhalation and exhalation.
I did observe some rapid switching on both sides of the steady ON and OFF that are achieved in each cycle, so perhaps the equivalent of some kind of debouncing could be used.
For respiration rate you'll probably have to watch a few cycles and maintain some kind of average.
HTH
a7
I remember the same thing was asked a while ago, and it didn't work properly with an LM35.
The thermal mass of a TO-92 case made it react too slow.
A tiny thermistor might work, but I think pressure is commonly used.
Not sure about BMP sensors, with condensating breath.
Something like the MPXV7002DP could be better.
Leo..
Hi,
My late wife had "oxygen in the home" but when she went out and about she had an oxygen cylinder.
The regulator was electronic and to save oxygen it ONLY opened its valve when it sensed a pressure drop from the nose type supply hose.
It also had an alarm that sensed if after a certain amount of time it did not sense her inhaling.
It was very reliable and when she played cards with her group, she would sometimes concentrate so hard that she didn't inhale, the alarm would go off and the other card players would al say "breathe".
There was a override button that allowed constant flow if needed.
Pressure change can be almost instantaneously detected by the electronic sensors available today.
Tom...
Hot wire anemometers are used to measure breathing wind speeds.
My current experiments with using hot wire anemometers show that they can detect the wind movement of someone entering the room.
What's the life span of your hot wire anemometer? How much current?
How hard will it be to distinguish breath in and out?
DrDiettrich:
What's the life span of your hot wire anemometer? How much current?How hard will it be to distinguish breath in and out?
I do not have MTBF data, the hot wire I own has been running for a few months. I've not paid attention to the current used by the hot-wire project.
I figure 2 hot wires in a tube and differing distances can be used to determine breath direction, no?
I am currently experimenting with this device. There is a newer and updated device.
Idahowalker:
I am currently experimenting with this device. There is a newer and updated device.
More info from the manufactures site.
Looks like a nice unit.
Tom...
A big thanks to you all. I really appriciatte all the responses. It becomes clear to me that I have to reconsider the temp sensor. Also on the software side I have got some directions to explore further. Thanks!
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.