Shop OBEX P1 Docs P2 Docs Learn Events
99-Cent Pulse Sensor — Parallax Forums

99-Cent Pulse Sensor

So shoot me, I nabbed the last one for 99 cents in a hoarder's panic: http://www.ebay.com/itm/5V-Heartbeat-Sensor-Senser-Detector-Module-By-Finger-For-Arduino/191129736978

Looks to be nothing more than an IR LED and phototransistor. Just like a line follower sensor. How well can this work? Has anyone tried one like this? Must be some signal conditioning required.

Comments

  • The Arduino code posted at a non-free-shipping similar/same item on eBay (ebay.com/itm/5V-Heartbeat-Sensor-Senser-Detector-Module-By-Finger-For-Arduino/401101976305?_trksid=p2047675.c100011.m1850&_trkparms=aid%3D222007%26algo%3DSIC.MBE%26ao%3D1%26asc%3D39344%26meid%3D20c53bbc9c014c08a4b3d7279c9999b3%26pid%3D100011%26rk%3D2%26rkt%3D18%26sd%3D191129736978) may help in understanding how it works (i.e. requires an ADC input):
    /*
    1.This project uses bright infrared (IR) LED and a phototransistor to
    detect the pulse of the finger, a red LED flashes with each pulse. Pulse
    monitor works as follows: The LED is the light side of the finger, and
    phototransistor on the other side of the finger, phototransistor used to
    obtain the flux emitted, when the blood pressure pulse by the finger when
    the resistance of the phototransistor will be slight changed.
    2. Chosing a very high resistance resistor R1, because most of the light
    through the finger is absorbed, it is desirable phototransistor sensitive
    enough. Resistance can be selected by experiment to get the best results.
    The most important is to keep the shield stray light into the phototransistor.
    For home lighting that is particularly important because the lights at home
    mostly based 50HZ or 60HZ fluctuate, so faint heartbeat will add considerable
    noise.
    */
    
    Arduino Test Code
    int ledPin=13;
    int sensorPin=0;
    
    double alpha=0.75;
    int period=20;
    double change=0.0;
    
    void setup()
    {
    pinMode(ledPin,OUTPUT);
    }
    
    void loop()
    {
    static double oldValue=0;
    static double oldChange=0;
    int rawValue=analogRead(sensorPin);
    double value=alpha*oldValue+(1-alpha)*rawValue;
    change=value-oldValue;
    
    digitalWrite(ledPin,(change<0.0&&oldChange>0.0));
    
    oldValue=value;
    oldChange=change;
    delay(period);
    }
    

    BTW: I found another for $.99 with free shipping, as well.


    dgately
  • ercoerco Posts: 20,256
    Thanks and most excellent work, dgately! I'm going to double whatever I'm paying you now!
Sign In or Register to comment.