Introduction of a heart rate monitor?

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
Matt
Flowcode V4 User
Posts: 9
Joined: Mon Sep 19, 2011 2:52 pm

Introduction of a heart rate monitor?

Post by Matt »

Hi all

It's me asking your help again. This time I'm working with a heart rate monitor (hand grip version), but unfortunately I haven't got it work yet. Can someone give me some hints or flowchart to get that monitor working?

Any help is welcome, because I have no idea how to proceed with this one.

I'm using Flowcode V4 AVR version.

Matt

Matt
Flowcode V4 User
Posts: 9
Joined: Mon Sep 19, 2011 2:52 pm

Re: Introduction of a heart rate monitor?

Post by Matt »

Can someone please help me with this thing? I think the introduction of the heart rate monitor is piece of cake for most of you.

I hope someone would go into this and perhaps give me some flowchart.

Thanks

Matt

User avatar
Steve
Matrix Staff
Posts: 3434
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: Introduction of a heart rate monitor?

Post by Steve »

I've not used the hand-grip one, but I've played a little with the one that fits around the chest and I assume these are similar. It is an analogue sensor that gives a voltage pulse whenever there is a heartbeat.

You can use a comparator to monitor this (this will need some C code) or use an ADC component. You'll need to monitor this input constantly and count the time between pulses. You will then need to create some kind of moving average (perhaps average out the last 5 beats) to smooth the reading out and convert this average time for a beat to a bpm reading.

Determining the time between pulses can be done in a number of ways. One way is to use a timer. You could set a timer interrupt to increment a "count" variable at a certain known rate (the interrupt macro would only increment this value, nothing else). Then in your main program have a constant loop which monitors the input. When the input goes high, the count can be read (this will represent the time between this pulse and the last) and then the count should be reset. You will then perform a quick calculation to determine the current moving average of these counts, and then convert it to a BPM value for display.

I hope this helps.

Matt
Flowcode V4 User
Posts: 9
Joined: Mon Sep 19, 2011 2:52 pm

Re: Introduction of a heart rate monitor?

Post by Matt »

Thanks for your reply Steve.

That sounds quite difficult thing to do for me, but I'll try anyway.

If someone have some flowchart that would get the heart rate monitor functional, then please, share it with me :)

Matt

Harry Tuttle
Posts: 27
Joined: Sat Aug 01, 2009 3:15 pm
Has thanked: 2 times
Been thanked: 10 times

Re: Introduction of a heart rate monitor?

Post by Harry Tuttle »

If you go for the chest monitor have you seen the reciever that Sparkfun offer. It is compatible with Polar transmitters.

http://www.sparkfun.com/products/8661

regards,
ben

Post Reply