[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference noted::bicycle

Title: Bicycling
Notice:Bicycling for Fun
Moderator:JAMIN::WASSER
Created:Mon Apr 14 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3214
Total number of notes:31946

2046.0. "Using a PC to monitor heart-rate" by HAMPS::NISBET_D (Dougie Nisbet) Tue Aug 20 1991 06:19

	 For my final year project at college I decided to do something
	 which had been on my mind for years. I'm an occasional user of the
	 Turbo Trainer, and often considered that it would be nice to have
	 a real-time graphical display on my PC of my heart-rate. The
	 software on the PC could trigger an 'alarm' message when my pulse
	 exceeded, say, 180 bpm, or fell below 120 bpm. (Based on the
	 principle that training is scheduled not so much on elapsed time,
	 but repeating effort once the pulse falls below a certain level.)

	 Although I have a background in electronics, it is pretty shaky
	 and I've never built anything that actually worked. Therefore I
	 concentrated on writing the software, using Turbo C, for the PC
	 family. I included a simulator in software which would create a
	 realistic, or more often, wholly unrealistic, sample training
	 session. I'm pleased with the end result, but ultimately all I
	 have is a nifty piece of software that is missing a hardware
	 interface.

	 I am now looking for ideas for a suitable electronic circuit,
	 within the grasp of a home hobbyist, which could take a subject's
	 heartrate and convert it into a digital form suitable for
	 processing by a PC. If anyone has any ideas, or pointers to
	 references such as project magazines, I would be very grateful.
	 The curcuits I have attempted to build so far have been on the
	 principle of a Photocell and have been spectacularly unsuccesful.

	 On a technical note; the software calls the simulator function
	 whenever it requires a new pulse value. I would hope to replace
	 this function call with a call to the interface, which would
	 provide the current heart-rate.


	 It's rather frustrating to get so far, and find myself stuck on
	 the practical electronics. Any help and/or ideas would be very
	 much appreciated.

	 If anyone would like a copy of the software, let me know and I'll
	 sort something out. Probably put it on-line somewhere.

	 Finally; I know that this project is probably a case of
	 re-inventing the wheel. I believe that PC's have been used for
	 this sort of thing before, but I have been unable to find any
	 'off-the-shelf' solutions.

	 Regards,

	 Dougie Nisbet
	 Basingstoke, UK.
	 
T.RTitleUserPersonal
Name
DateLines
2046.1you'll get a charge out of this oneDOGONE::WOODBURYTue Aug 20 1991 11:0215
    Typically, you will want to use an op-amp circuit with very large
    gain, and electrodes (two [differential inputs to op-amp] on the 
    chest for the pulse and a reference on the foot if you want: that's
    what we used to do in biology lab).  From this, a voltage converter
    to get to TTL and input to the rs232 or Centronics port for an
    interrupt.  
    
    The major concern here is that you are wiring yourself to a machine
    which is plugged into the wall socket with 120v-AC.  It can hurt when
    you do things like this.  I wouldn't play around with it unless I
    ran the analog section on batteries and used an opto-isolator before
    the TTL section.  I bet this is the reason you don't see these things
    in all the catalogs....
    
    good luck
2046.2FSDB00::BRANAMSteve Branam, DECcallserver ProjectTue Aug 20 1991 17:2511
For real isolation, there's the method CIC (???) uses in their heart rate 
monitors: the sensor is on a chest strap and transmits a weak FM signal to the 
receiver, which straps onto your wrist like a watch and has an LCD display. 
It has a range of about 3 or 4 feet. Both parts are battery powered 
and completely safe (also no annoying wires running from the sensor). 
So now all you need is an FM receiver (and decoder?) to catch the signal and 
turn it into a digital pulse to the PC...

These monitors are available in many bike mags and catalogs for $130-150.

SDB
2046.3DRIFT::WOODLaughter is the best medicineTue Aug 20 1991 19:239
    CIC also makes a version of their heart watch which can upload the
    heart rate samples to a PC.  The watch records the heart rates at 5,
    15, or 60 second intervals.  After use, the watch is plugged into an
    interface that is also connected to a PC via a serial port.  The data
    is uploaded where it is saved and graphed.
    
    All you need is $$$
    
    John
2046.4Polar Vantage XL HRM looks like this:FMCSSE::ELLISONRick CXN2/35 DTN:523-2917Tue Aug 20 1991 23:2373

The following is pretty far removed from the thrust of the discussion, but
it does describe the Heart Rate Monitor referred to in Note 2046.3 by
DRIFT::WOOD.

    An elastic strap which goes around my chest.  There is a hard plastic
    section which has two "snaps" on it.  This part is positioned over the
    heart.  I have not investigated closely, but suspect the hard material
    is highly conductive and there are probably two halves - one for each
    snap.

    A transmitter which snaps to the chest strap.  This contains a battery
    which I replaced after a year - only because I had to replace the
    battery in the watch.  I supect there is some circuitry which senses
    being connected to the snaps (perhaps some "leakage" between the two
    hard plastic parts).

    The watch which is the reciever and local storage.  It seems that
    there's about 3k bytes storage (2hours 40 minutes at 5 seconds per
    sample; 8 hours at 15 seconds and 30 some hours at 1 minute).
    Although, perhaps unrelated, the watch has a metal (stainless steel I
    suspect) back.  The watch will receive the signal from the transmitter
    without being physically on my arm (I've wrapped it around the tube of
    the frame of a stair climber with no problems).

    The computer interface.  This connects to a serial line (RS-232).  Data
    Terminal Ready is required from the host (or a convenient 9 V battery)
    to enable the interface.  The data is transmitted at 600 baud, 8 bits,
    no parity, 1 stop bit.

    The chest transmitter emits a barely audible click in sync with my
    heart beat - the room must be quiet, and it took me several months to
    become aware of it.  My guess is that the transmitter is a very simple
    electro-magnetic pulse generator without any of the refinement of a
    frequency based "radio".  Part of my reasoning is that another watch I
    have has a auto restarting count-down timer which creates an audible
    beep upon expiration of the timer.  I was able to trick the HRM into
    thinking my heart rate was 60 beats per minute by setting the timer to
    a one second period.  It'd be interesting to see what a spectrum
    analyzer had to say about the matter.

    The watch makes a connection to the computer interface in what appears
    to be a similar "wireless" manner - since the cover of the interface is
    plastic and there are no jacks or other direct electrical connections.
    I've not detected any "clicking" from the watch when uploading, but my
    Mac-II has a very noisy fan which may mask it.  I've also not tried to
    see what the watch's transmitting range is.

    Software wise, there was not any Mac software available when I bought
    mine; so I got the IBM PC version.  Some experimentation with a PC
    enabled me to deduce the encoding of the data from the watch.  I wrote
    a program on the Mac to translate the binary to something humanly
    readable, but have yet to make headway on fancy graphing and so on.  If
    you're interested I'll be glad to share what I know about the encoding
    of the data stream - it's very straight forward.

    About a year ago someone and I played phone tag for a round or two but
    never connected, and with work pressures, I dropped the ball.  Perhaps
    this reply will re-stimulate.


To come back to the orginal flow of building your own HRM, the opto
isolation idea can probably be easily implemented.  Radio Shack had a book
with a lot of electonic basics with simple experiments to show how it
works.  There was a section on electro-optical stuff.  The title escapes
me.  But book was 8.5" x 11", about 1/4 to 3/8" thick, and the font for the
print was "handwritten".  Recently, I've not seen that book at my local
R-S, but several physically smaller ones by the same author with the same
handwriting.

regards,
Rick
2046.5Build HW to Get Data; Use SW for CrunchingGIAMEM::JERICKSONJohn Erickson, DTN 232-2590Wed Aug 21 1991 14:2671
        A very interesting discussion going on here!
        
        I have  a  few comments, based on my experience using a CIC/Polar
        wireless HR monitor, and  [before  that]  considering building my
        own wireless monitor.
        
            * Some research I did  into  back  issues  of IEEE biomedical
            engineering literature showed that one of the most vulnerable
            elements in an EKG monitoring system is  the integrity of the
            _electrodes_.    Having  read numerous discussions about this
            made me  wary  of  both building my own and even purchasing a
            commercially available system;  having  used CIC's system for
            a year I have _tremendous_ respect  for  the  simplicity  and
            elegance of their design.  Those Finns are clever, fer sure! 
            
            *  Seriously  consider  using  a  wireless  system, both  for
            _safety_  (isolation) and for _convenience_.  I have converse
            with folks  that  have  used wireful (as opposed to wireless)
            monitor;    their   feeling  is  that  these  are  incredibly
            inconvenient.
            
        The  description  of the "simulated" system is quite  similar  to
        what  I  wear on my _wrist_ during my daily  running  and  biking
        training --- the point being, one can purchase a system which can
        do  the  basic  stuff  described  in .0.  If you're gonna  do  it
        yourself, perhaps consider the following:
        
             (1)  Purchase an inexpensive  wireless  HR  monitor.    Even
             consider contacting CIC/Polar or a  place  that  sell  _and_
             services  these  units, and ASK TO  PURCHASE  A  REPLACEMENT
             TRANSMITTER.
             
             (2) Be clever and design a receiver.    Find a local DEC lab
             that has a spectrum analyzer, or try to  get  access  to one
             through  local  amateur  radio operators.  Also figure out a
             circuit which will calculate the  HR  based on the number of
             samples counted during some fixed amount of time. 
             
             (3)  Design  an  efficient, CMOS-based circuit  that  stores
             these HR sample values.
             
             (4)  Here's  where  it  gets  interesting:    also design-in
             circuits which sample  _cadence_  and  _speed_;    have your
             unit store them bundled with the HR sample. 
             
             (5)  Create  a simple  interface  with  which  to  read  the
             information out at some later time.   If you have a parallel
             port on your PC, this is _really_  easy;   if you want to go
             RS232,    include    one    of    those   CMOS,  68xx-family
             microprocessors with the built-in serial lines in your unit.
             The sample storage buffer can be part  of  the 68xx's memory
             map,    and   PROM-based  commands  you  design  will  allow
             information to get sucked out under the control of the PC.
             
             (6) Put in  all  in a nice little box which attaches to your
             handlebars.  Go out for a ride and fill up memory;  when you
             get home, plug in the serial line from your PC, switch modes
             on the little box, and activate  the "download" part of your
             PC-based program.  This puts it into  a structure which your
             analysis program can then play with, or alternately  into  a
             data file which you  can  do  _all_sorts_ of things with ---
             like  reading  into  a  program  like,  say,  MathCAD  (From
             MathSoft) for numerical analysis and interpretation.
             
        In other words, I advocate off-loading the data accumulation task
        to  a remote hardware unit, and suggest using the "host"  PC  for
        wicked-excellent data analysis tasks. 
        
        Later! And good luck!
        
        John
2046.6Try electro_hobby noteWMOIS::MALLETTE_PWed Aug 21 1991 14:557
    To base noter,
    
     You might try the notesfile "CSOA1::ELECTRO_HOBBY" Its frequented by
    the electro-inclined that may be able to help you out quickly.
    
    Regs,
     PM
2046.7more of my 2 cents worthFMCSSE::ELLISONRick CXN2/35 DTN:523-2917Thu Aug 22 1991 00:1497
re: <<< Note 2046.5 by GIAMEM::JERICKSON "John Erickson, DTN 232-2590" >>>

<<<deletions/Rick>>>

            * Some research I did  into  back  issues  of IEEE biomedical
            engineering literature showed that one of the most vulnerable
            elements in an EKG monitoring system is  the integrity of the
            _electrodes_.    Having  read numerous discussions about this
            made me  wary  of  both building my own and even purchasing a
            commercially available system;  having  used CIC's system for
            a year I have _tremendous_ respect  for  the  simplicity  and
            elegance of their design.  Those Finns are clever, fer sure!
RE>
RE> The place where I mail ordered my HRM was Creative Health Products (the
RE> US distributor for the Polar line and others).  They are very helpful
RE> people.  One thing they (or the HRM instruction booklet) point out is
RE> that some people have problems getting good contact from the normal
RE> elastic strap based electrodes. They say that the disposable EKG type
RE> electrodes can be used instead with a dab of conductive grease instead
RE> of the elastic strap.  Those electrodes bear a resemblance to the clear
RE> suction cups used to hold the stuffed Garfield cat's paws to the inside
RE> of your car's back window.

            *  Seriously  consider  using  a  wireless  system, both  for
            _safety_  (isolation) and for _convenience_.  I have converse
            with folks  that  have  used wireful (as opposed to wireless)
            monitor;    their   feeling  is  that  these  are  incredibly
            inconvenient.
RE>
RE> much better said than I did.

<<<deletions/Rick>>>

             (1)  Purchase an inexpensive  wireless  HR  monitor.    Even
             consider contacting CIC/Polar or a  place  that  sell  _and_
             services  these  units, and ASK TO  PURCHASE  A  REPLACEMENT
             TRANSMITTER.
RE>
RE> The CHP will send you a good catalog of their product line.  You can
RE> call them at 1-800-742-4478.  Their ad says "guaranteed lowest prices -
RE> 90 day price protection guarantee" and "all products sold with 30-day,
RE> money back satisfaction guarantee".  Their range of HRM products is very
RE> broad.  I haven't looked at the catalog recently, but I think I
RE> remember "spare parts" in there.

             (2) Be clever and design a receiver.    Find a local DEC lab
             that has a spectrum analyzer, or try to  get  access  to one
             through  local  amateur  radio operators.  Also figure out a
             circuit which will calculate the  HR  based on the number of
             samples counted during some fixed amount of time.
RE>
RE> For some reason that I can't remember any longer, I came to the
RE> conclusion that my HRM must maintain some kind of a sliding window of
RE> the average heart rate of which it dutifully records the current value
RE> once every 5, 15, or 60 seconds.  Assuming that to be true I then
RE> decided that it must not count the number of beats in the sample
RE> period, but rather count the time between each beat which it
RE> manipulates into the sliding average.  That explaination made more
RE> sense to me than anything else I could think of (but then lots of
RE> things that make sense to me have no relationship to reality).

<<<deletions/Rick>>>

             (4)  Here's  where  it  gets  interesting:    also design-in
             circuits which sample  _cadence_  and  _speed_;    have your
             unit store them bundled with the HR sample.
RE>
RE> The HRM interface I have is compatible with a bike mount receiver
RE> (instead of the watch) which collects heart rate data and the normal
RE> bike cycloputer stuff like wheel revolutions and crank revolutions
RE> (from which can be calculated speed, distance, and cadence).  I don't
RE> have one of these.

             (5)  Create  a simple  interface  with  which  to  read  the
             information out at some later time.   If you have a parallel
             port on your PC, this is _really_  easy;   if you want to go
             RS232,    include    one    of    those   CMOS,  68xx-family
             microprocessors with the built-in serial lines in your unit.
             The sample storage buffer can be part  of  the 68xx's memory
             map,    and   PROM-based  commands  you  design  will  allow
             information to get sucked out under the control of the PC.
RE>
RE> my HRM uploads its heart rates as an unsigned 8 bit byte indicating beats
RE> per second from 0 to 250 or so - the remaining 5 or so values are flags
RE> for events like "start of session", "interval split", "change to
RE> alternate set of rate limit alerts", "end of session", and "end of
RE> file".  Each event is followed by some defined number of bytes
RE> containing encoded information like the current average heart rate at
RE> the time of the event, elapsed time since the start of session, or time
RE> of day when session started, and other stuff like that.  The basic
RE> heart rate data are just one byte for every n-second sample interval.

<<<deletions/Rick>>>

RE> Let us know what you come up with.
RE> regard,
RE> Rick