This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Clearing my doubts...

I was thinking whether its feasible to use a 8-bit counter with auto-reload to capture the number of peaks detected within 100ms.

Parents Reply Children
  • If i measure the time between 2 heartbeats, how do i convert it to bpm?

    Frequency (f) is the inverse of period (T):

    f = 1/T

    Measuring the time between two heartbeats gives you the period T in a unit of your choice (if you don't want to deal with fractional numbers or floating point just yet, I would suggest you use milliseconds at this point, but you'll need to do some fractional calculations later on).

    For example, if you measure 750 ms, you would get

    f = 1/(0.75 s) = 1.33 Hz = 80 bpm

    Meaning i have to repeat the cycles several more times to get a more stable output?

    Yes. The heartbeat has quite a bit of beat-to-beat variation, and if you don't want to see that in your application, you can average several measurements (how many depends on how stable you'd like the number and how slow of a response to changes you can accept).