---

Monday, March 12, 2012

.Net Gadgeteer Heart Monitor

I have been playing with a .NET Gadgeteer pulse oximeter module from Seeed.



This is a high quality device that you clip over your finger to measure the frequency of your pulse. It detects slight variations in the amount of light passing through your finger as the blood pulses through the blood vessels.

The board has all the necessary filtering, and appears to do it all with analog electronics rather than DSP.  I haven't checked, but from the number of small chips, I suspect there are opamps and instrumentation amps on the board. It requires a U type socket.

As with all Gadgeteer modules, it is simplicity itself to use. Using a Fez Spider, I connected it up as shown below. The lead from socket 1 goes to the USB DP module and then your computer.



I also added an LCD display and another Seeed product, the LED-7R. This has a ring of LEDs which will animate by lighting in turn when a pulse is detected.

The display is just used to display the pulse rate.

The program is listed below. You essentially get an event every time a pulse is detected.


using System;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Presentation;
using Microsoft.SPOT.Presentation.Controls;
using Microsoft.SPOT.Presentation.Media;
using Microsoft.SPOT.Touch;

using Gadgeteer.Networking;
using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;
using Gadgeteer.Modules.GHIElectronics;
using Gadgeteer.Modules.Seeed;

namespace PulseMeter
{
    public partial class Program
    {
        // This method is run when the mainboard is powered up or reset.   
        void ProgramStarted()
        {
            pulseOximeter.Heartbeat += new PulseOximeter.HeartbeatHandler(pulseOximeter_Heartbeat);
            DisplayPulseRate(0);
        }

        void pulseOximeter_Heartbeat(PulseOximeter sender, PulseOximeter.Reading reading)
        {
            lED7R.Animate(50, true, true, false);
            DisplayPulseRate(reading.PulseRate);
        }

        private void DisplayPulseRate(int p)
        {
            display.SimpleGraphics.Clear();
            display.SimpleGraphics.DisplayText("Pluse: " + p,
                Resources.GetFont(Resources.FontResources.NinaB), Colors.Green, 20, 100);
        }
    }
}

Conclusion.

This is a good quality module and this is reflected in the price. 

If you fancy a DIY attempt, then you could try the Arduino-based pulse meter from my book '30 Arduino Projects for the Evil Genius'. Its much simpler, and I admit much more difficult to get to work than this module - unlike the Seeed module, my module requires calibration and is frankly pretty ugly.

About the Author
These are my books. Click on the image below to find out more about them.


3 comments:

Simon Monk said...

Proto-pic also sell my books!

Unknown said...

This project may just be what gets me into Gadgeteer. Can you tell me what part the computer plays in this. I thought the spider board would be all that's needed?

Unknown said...

I'm very new to Gadgeteer. Can you tell me what part the computer plays in this project? (Other than the initial programing). I thought the Spider board would have been all that's needed. Thanks.