The objective of this project is to log ones heart rate to an SD card. This could be done for extended periods, including during sleep, for some pretty interesting investigation. The video shows a treadmill session with periods of jogging and walking to show the fluctuations in heart rate.
As a baseboard, we continue to use our custom Atmega8 / Atmega168 through hole board. Attached to this, we have a custom SD breakout since it is a little cleaner than soldering to the SD card adapter sleeve. For power, we simply use a 3 AA battery holder (provides 3.3-3.8v). Most importantly, we use the Poler OEM module from Sparkfun.com to receive the heart rate. Typically, Polar sells chest strap and watch combos. The chest strap goes on your chest (duh) and the signal is picked up by and displayed on the watch. We simply use the OEM receiver module to also listen to the signal.
The Polar OEM heartrate module outputs a pulse each time it detects a heart beat. We tie this signal to an interrupt pin on our AVR. We use the duration between pulses to calculate the heart rate. The F_CPU (frequency of the CPU) is used in the calculation of said heart beat. From the factory, AVR internal oscillators are only accurate +/- 10%. If one calibrates it with the calibration register, you can get it within +/- 1%. Our heart rate is only going to be as accurate as our cpu frequency.
We also use a timer counter to detect when our signal goes away to alert the user they should go back in range.
Use this command to check out the source:
git clone https://code.google.com/p/avr-atmega168-heartratelogger/
- or -
Visit this webpage: https://code.google.com/p/avr-atmega168-heartratelogger/