DIY Heart rate monitor with a photoresistor and 2 op amps

Share
Embed
  • Published on Jan 23, 2015
  • This project is a variation of the ECG Pulse Oximeter circuit from Scott Harden( ru-clip.net/video/bKAJsZJvMI0/video.html ) the main differences are that this one uses a
    photoresistor instead of a photodiode and does not require a led, in fact it just needs ambient light, it even works pretty well in low light conditions.
    For its realization you only need 2 general purpose op-amps, 3 if you don't want to use a dual voltage power supply.
    I've used two old lm741 (lm324 would work as well).
    In the right conditions of illumination you can even observe the systolic and diastolic blood pressure separated by the dicrotic notch, which coincides with the aortic valve closure.

    "Music: www.bensound.com"

Comments • 46

  • Boris L
    Boris L Year ago +3

    Thanks for posting this! I was inspired by your video to make my own heart rate monitor and add Arduino functionality to it. Ended up deriving my own resistor/capacitor values, and adding a comparator to digitize the signal before sending it into the Arduino. I posted the project on Hackster.io if anyone is interested in checking it out: projects.digilentinc.com/boris-leonov/detecting-heart-rate-with-a-photoresistor-680b58

    • Boris L
      Boris L Year ago

      CapitanoRed I haven't tried grounding myself, but I have the photoresistor wrapped in two layers of shrink wrap, which I imagine would be enough insulation. But I'll give it a go and see if that changes anything.

    • CapitanoRed
      CapitanoRed  Year ago

      Great article! Have you tried to ground yourself when touching the photoresistor? It might help to reduce the noise.
      Thanks for sharing, I've pinned the comment. For anyone who's interested in building one this is a very good read!

    • Boris L
      Boris L Year ago

      The article is now viewable if you're still interested. Thank you for this idea!

    • Boris L
      Boris L Year ago

      Link should work in a day or two, I need to do some editing on it so I made it temporarily non-viewable. Kinda jumped the gun with this post..

    • CapitanoRed
      CapitanoRed  Year ago

      I'd like to read it, but the link doesn't seems to work

  • Muhd Hijazz
    Muhd Hijazz 9 months ago

    May i know, how much you supply the voltage for VG?

  • Felipe Vargas
    Felipe Vargas 2 years ago

    Have you considered adding a notch or low pass filter to remove the line noise when using indoor lighting?

  • ajaikumar nadar
    ajaikumar nadar 2 years ago

    i made it on a perf board with lm324 with power supply of 5 volt but the led i connected to the output is on with constant brightness, what could be the reason ?

    • CapitanoRed
      CapitanoRed  2 years ago

      That might be the problem, try to connect it to the virtual ground

    • ajaikumar nadar
      ajaikumar nadar 2 years ago

      nope its connected to the ground.

    • CapitanoRed
      CapitanoRed  2 years ago

      Is the led cathode connected to the virtual ground?

  • Allan Gonzalez
    Allan Gonzalez 2 years ago

    Could you show or send an image of the breadboard? I would need to see to build it.

    • Allan Gonzalez
      Allan Gonzalez 2 years ago

      CapitanoRed will check. I am trying to do the same, but with the IR. Heart rate monitor.

    • CapitanoRed
      CapitanoRed  2 years ago

      I think it could work, what you're trying to achieve with a LED and a phototransistor sounds to me very similar to the circuit Scott Harden has built, which i slightly different than this one. Check the link in the description.

    • Allan Gonzalez
      Allan Gonzalez 2 years ago

      Also, could the photoresistor be changed for an IR emitter and receiver?

    • CapitanoRed
      CapitanoRed  2 years ago

      It's 100nf, there are no 7's, only 1's. That's a 0-100Kohm pot.

    • Allan Gonzalez
      Allan Gonzalez 2 years ago

      CapitanoRed when you say 0-700k it means a pot or a specific resistance? Also i don't understand if on the filter is 700nf or 100nf

  • azamani7
    azamani7 2 years ago

    Hello,
    Is it possible to post a picture of the breadboard. I can't figure out how to connect virtual ground on the breadboard.

  • Thanh tran thi
    Thanh tran thi 2 years ago

    could you give me your email? please! i need a help from you

    • CapitanoRed
      CapitanoRed  2 years ago +2

      Feel free to ask your questions here

  • Taz Colangelo
    Taz Colangelo 2 years ago

    Hello, what is the purpose of the variable resistor infront of the first op amp?

    • Taz Colangelo
      Taz Colangelo 2 years ago

      Now thinking about it I can just use the 12.6V centre-tap AC mains transformer as my input as well my power to the op amps @ +/-6.3V thanks again

    • Taz Colangelo
      Taz Colangelo 2 years ago

      If I only had a regular DC power supply how would I use this as my input?

    • CapitanoRed
      CapitanoRed  2 years ago

      I would start with a low value like 1k and see how it works, if the signal is clipping just go higher value. The input voltage was 12V DC but the rail was splitted in half so basically +/-6V DC

    • Taz Colangelo
      Taz Colangelo 2 years ago

      Ok thank you, for your circuit in natural light what was your approximate value of the variable resistor 0-100k? If I were to use a 12.6V centre-tap AC mains transformer to power my op amps, what would be suitable input voltage? What input voltage did you use? was it a 9v pk-pk AC input from a 12v source?

    • CapitanoRed
      CapitanoRed  2 years ago

      Since it uses ambient light to work, the signal might be too high or too low depending on the illumination condition of the room, you can regulate the gain using that variable resistor.

  • steve weiser
    steve weiser 3 years ago

    I've built this circuit using HA17741 op amps, and 100nf caps instead of 220nf caps and i get a high output unless i wave my hand over the photo resistor in which it bounces low briefly and back high again ...I also used a blue led with a 220 ohm pull up resistor to more easily see the output switch states but it just stays blue until I wave my hand above the photo resistor..also my scope scope (not digital) shows no change on the output unless , again I pass my hand over the photo resistor...the photo resistor just doesnt detect blood flow in my finger..it does detect ambient light as the output does change when I cover the photo resistor...

    • CapitanoRed
      CapitanoRed  3 years ago

      Very strange, have you tried to change the decoupling cap? Maybe it is shorted out.

    • steve weiser
      steve weiser 3 years ago

      i am going to try and add a photo diode and photo transistor to the input and see if I can get a heart rate detector.

  • steve weiser
    steve weiser 3 years ago

    are you purposely putting a finger on the alligator clip as well as the photo resistor?

    • CapitanoRed
      CapitanoRed  3 years ago

      Yes, I was doing it to ground myself. It helps to reduce the noise caused by capacitive coupling.

  • Cadin White
    Cadin White 3 years ago

    Hello, I'm trying to replicate this example. I'm having a hard time telling the difference between the 1's and the 7's on your diagram. Would you be able to clarify those values? Also, is your resistor between the two op amps a 22k or a 2.2k? My other question is if you have any specs for your photo resistor. Was it a 640 nm wavelength? What were your settings on your oscilliscope when you measured the output? Sorry for all the questions, but I'm trying to replicate the circuit, but I haven't been able to replicate your results. Thanks.

    • CapitanoRed
      CapitanoRed  3 years ago

      +Cadin White There are no 7's, those numbers are all 1's. The resistor value is 2.2K. Unfortunately I don't have the datasheet for the photoresistor, it's just a regular photoresistor out of a kit, here's all i could find about it:
      photoresistance (min - max): 2-20 kohm
      dark resistance (after 10 sec.): >2 Mohm
      gamma value at 10-100 Lux: 0.7
      max. power dissipation: 100mW
      max. breakdown voltage: 150Vdc
      peak spectral response: 540nm
      rise response time: 20ms
      fall response time: 30ms
      ambient temperature: -35c to +70c
      The oscilloscope was set on DC mode, 2V per division

  • Вукашин Ракић

    Hi. I wanted to ask some questions too about the circuit.
    On the output you get analog signal right? But, what is the voltage your bringing on this circuit? Is it 12V like in Scott Hardens project or is it 5V so it can be connected to Arduino maybe? And can it be connected to Arduino like this (without IR diode, just ambient light) so it can measure BPM? Thanks.

    • Вукашин Ракић
      Вукашин Ракић 3 years ago

      Thank you very much! You really helped me a lot with this.

    • CapitanoRed
      CapitanoRed  3 years ago

      +Vukasin Rakic Yes, you just connect the non-inverting input to ground.

    • Вукашин Ракић
      Вукашин Ракић 3 years ago

      +CapitanoRed I have a bunch of LM324 op-amps, they are single supply if I'm not mistaken. Instead of V.G. I just need to ground the positive ends of op-amps?

    • CapitanoRed
      CapitanoRed  3 years ago

      +Vukasin Rakic I think those values should be fine, if you just need to measure BPM with the Arduino you may even not need the virtual ground since the lm321 is able to operate in single supply applications. Best way to find out is to try and experiment.

    • Вукашин Ракић
      Вукашин Ракић 3 years ago

      Are values in that case still same?

  • ostritch
    ostritch 3 years ago

    Hi. Can you answer some of my questions about the circuit? Thanks.

    • CapitanoRed
      CapitanoRed  3 years ago +1

      +Akfloatable 1)The purpose of the op-amp is to create a stable reference potential called "virtual ground", the op-amp in that configuration is called "unity gain buffer", just google it up to know more. the two 100k resistors works as a voltage divider, 100k is just an arbitrary value, you can choose any value for those resistors, just don't go too low or too much current will pass and burn them up.
      2)You need the third op-amp in a unity gain buffer configuration to create a Virtual Ground
      3)The active filter not only act as a filter but also as a first stage amplifier.
      Op-Amps are much better than transistors(higher input impedance, lower output impedance, higher gain, etc.)
      4)You can get along with just the first amplifier if you just want to look at the signal on an oscilloscope, but it is still too weak for any other application(light up a led or hook it up to an arduino for example) so i decided to use a second amplifier
      5)EVERY op-amp has two configurations: inverting and non-inverting.
      If you choose one or the other, there are advantages and disadvantages but in general the most commonly used is the inverting one.

    • ostritch
      ostritch 3 years ago

      +CapitanoRed Awesome. I'm kind of a beginner so my questions may be very elementary.
      What is the purpose of the op amp in the Virtual Ground setup? Is it to ensure that no current is drawn and the voltage is at a constant 0 Volts? Why did you pick resistor values of 100K?
      How can I use 3 op amps if I don't have a dual voltage source? Will I need a virtual ground in this case?

      Is there a reason why active filters are used instead of passive filters and amplified using transistors?
      Why do you have another amplifier after the first one? Couldn't you get any gain you want with the first amplifier by adjusting the resistor values?
      Is there a reason why you used an inverting op amp rather than a non-inverting one?

    • CapitanoRed
      CapitanoRed  3 years ago

      +Akfloatable Sure, ask me any question, I'll try to answer them to the best of my knowledge.