Pages: [1]   Go Down
Author Topic: Respiratory Frequency Counter  (Read 2853 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi!

I'm completely new to Arduino, and I need to make a respiratory frequency detector.

It's basically a counter. I'm going to use a 1 bit signal as input (taken from an op-amp), every time a breath is detected. What I want to do is to count the number of rising edges received from the op-amp every 30 seconds, and then multiply them to get the number of breaths per minute.
The breath ratio will be shown either on a BCD display, or on an LCD.

I'm not new to programming, I know it's very easy, but I don't have too much time to achieve my objective. Do you have any advise or piece of code that could be useful?

Thanks!

P.S. I'm using the Arduino UNO SMD R2


Logged

Sussex UK / CT USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1028
Forums forever
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

An interesting problem! The solution will have many applications.

If the high state of the output from the "breath taken" sensor lasts long enough that you could see an LED wink, and if all you want is a display of the current respiration rate, then this is very, very do-able.

If the high state isn't that long, it is still do-able- just put a pulse stretcher on the output. (Little bit of hardware).

What makes this project easy is that the events you want to count, in computer terms, happen only once in a "long" time.

You may need to take care not to "double count" a single inspiration.

You will almost certainly want to incorporate some system of averaging the time between inspiration over a number of recent inspirations, with older ones counting for less.

For your output device, have a look at....

http://www.arunet.co.uk/tkboyd/ec/ec1led4x7ser.htm

===
Not really relevant to solving the problem you came to the forum with, but out of curiosity, what is your sensor? Hobbyist grade, or a $2,000 device from Stryker?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi

I am looking for the same code. I am new to arduino and have designed a respiratory sensor now..i need to calculate breaths per minute by displaying data in pc. i have no idea weather how to count breaths per minute as it will be detecting breaths from 60 seconds data and then will find rate. can any please guide me  for breaths detection??
Logged

Pages: [1]   Go Up
Jump to: