Arduino Heart Rate Monitor With LCD

To collect data on a suspected sleeping disorder, I built this project to record my heart rate and movement throughout the night. I borrowed an ear clip pulse sensor from a stationary exercise bike and interfaced it with an Arduino using a simple circuit which normalizes the photo-transistor’s output voltage and amplifies fluctuations. The Arduino senses rises and falls in voltage on one of its analog inputs and counts them as heartbeats. Motion is sensed with a crudely built vibrations sensor attached to my bed. It consists of a coiled thin wire pendulum which makes intermittent contact with a loop shaped electrode during vibrations. It is wired to the Arduino just like a button. Originally I had all heart beat events reported to a running desktop computer for logging, but I disliked this because it seemed silly to keeps a ~200 watt machine powered up for 8+ hours to collect only kilobytes of data. I reduced sampling rates, and made some other compromises in data collection, and now the sleep monitor stores data in the ATmega328’s 2kb of ram. When I turn on my computer in the morning, I can download the data with a C# application and have it stored to a comma separated value format file. CSV files load easily into Excel for analysis.
A major component of this project was the incorporation of a salvaged alphanumeric LCD from a defective answering machine with caller ID. The screen’s controller is a hd44780 equivalent, but the glass itself has many custom elements. Above the standard two lines with 15 characters each, there are over 80 individually addressable segments/elements. Most are arranged in 7 segment groups to produce digits. They behave like the exploded pixels of what would have been three normal characters. To use them I have to assign the three exploded characters to custom char values. I then have to modify the pixel patterns of the three custom chars to turn the elements on and off. Having no documentation, I had to toggle one bit of CC memory at a time and take note of which element was effected by they change. After discovering the memory addresses for all 80 something elements, I had to write all the code which switched the elements on and off in the appropriate patterns to produce readable numbers on the display. It would have been much easier just to spend the 5 bucks and buy an even better non-custom display, but where’s the fun in that.

Edit: A schematic from which I built my circuit from can be found here http://members.shaw.ca/novotill/IrPulseMonitor/index.htm I only used a fraction of this circuit as I was able to do the rest of the signal processing in software. In the image there is text that runs along the top. My circuit only extends up to the “B” in earlobe. Including more of the circuit likely would have resulted in more accurate readings.

Duration : 0:8:39


Related Reading:

Uncategorized

Be Sociable, Share!

Technorati Tags: arduino, atmega328, HD44780, Heart, lcd, rate, sleep, vibration

12 thoughts on “Arduino Heart Rate Monitor With LCD

  1. @giancarlocpy I may …
    @giancarlocpy I may have tried SD Card storage if I thought of it but I don’t remember there being an Arduino library available for it at the time. As far as a blog, no I don’t have one now but I my set up something in the future. I went through a phase where I was doing a lot of YouTube vids and science projects, then I got distracted for a while, and soon I think I will start getting back into it. My plan is to better document my projects and share as much as I can so others can reproduce.

  2. Excelent. I suggest …
    Excelent. I suggest SD-card memory, because it’s cheaper to store long data. Do you have a blog or something like that with project details? My regards.

  3. that’s a …
    that’s a awesome project. i was just thinking, oh i guess that’s cool, but then when i realized that exel can graph it for you it made it so much cooler.

  4. Can you share …
    Can you share details on this: ” I borrowed an ear clip pulse sensor from a stationary exercise bike and interfaced it with an Arduino using a simple circuit which normalizes the photo-transistor’s output voltage and amplifies fluctuations. The Arduino senses rises and falls in voltage on one of its analog inputs and counts them as heartbeats.”? I’m thinking about doing the same thing for a virtual exercise/stationary bike. Thanks.

  5. @hnilom I’m a …
    @hnilom I’m a little obsessive about energy efficiency and always turn my computer off when I’m not using it. I originally was logging directly to the computer but added the logging on Arduino feature to stay green. Probably only prevented the burning of half a lump of coal but at least it made me feel like I was making a difference. 🙂 I also did it for the challenge.

  6. Very nice project. …
    Very nice project. I wonder why instead of logging it into the limitted Arduino’s memory, you did not use your computer to log the data. I’ve just started with the Arduino, but I’ve been using Basic Stamp for a while and take a look at the PLX-DAQ from Parallax, should not be hard to modify and use it to log your data.

  7. didn’t have much …
    didn’t have much luck with google search for the schematics. If you happen to have a link handy (or even a decent photo of your circuit) it would be appreciate immensely!

  8. VERY sophisticated …
    VERY sophisticated project!!!! GREAT WORK!! You should add some “bell” to it, alerting if no heart beat been detected within several seconds. Also i recomment to record “breath actions” using a “resistor belt” around your chest and do breath recordings. you definitly need more ram to store logs! however you should use any log ram as “ring memory”. so if no space left it should overwrite oldest values in memory. Keep on doing this!! This is a GREAT Project and could help a LOT of peoples!!!

  9. Pretty cool project …
    Pretty cool project.

    Do you have the schematic and code available somewhere?

    Props on using the lcd that you have there. It’s kind of cool to see such a odd display working well like that.

Leave a Reply