Shop OBEX P1 Docs P2 Docs Learn Events
Heart Rate Measurement ??? — Parallax Forums

Heart Rate Measurement ???

edited 2005-03-12 02:06 in BASIC Stamp
I am·looking to monitor the performance of an athlete using the basic stamp2.· Right now I am using a Polar Transmitter and an OEM RF receiver.· For each heartbeat a 10ms 3V pulse is received.· To calculate heartrate with good accuracy it is necessary to measure the period of each beat.· IE rising edge to rising edge.· However, I fear that at rest (40-60 beats per minute) the pulsein feature of PBASIC will timeout.· I have tried to count heartrate using a "count" type feature where you count the number of rising edge in a specified time period.· However, to have good accuracy this must be done over ten second intervals.· Any help from someone in this area would be greatly appreciated.

Ryan O'Hara

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-03-11 18:34
    You will have problem, 60000 milliseconds divided by 40 is 1500 -- way out of the BS2 PULSIN range (131). Have you considered an external RTC? On the edge of Beat0 you could reset the clock, then on the edge of Beat1 you would read it back. With a bit of math you could get heart rate with just two beats.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • edited 2005-03-12 02:06
    Jon, looking at the implementation of the RTC to BS2 it seems that it may be easier to use an external counter and oscillator with a known frequency. On the edge of Beat0 I could poll the counter and then on Beat1 I could poll the counter again and then reset it. This would make the math much simpler. My question is if there is a counter chip that would interface easily with the BS2?
Sign In or Register to comment.