Measuring heart rate/pulse and Blood Oxygen % Level with your Arduino, using the Max30100, MAX30102

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ก.ย. 2024
  • Here we look at hooking up this cheap but very functional sensor that can monitor both your pulse (heart beat) and blood oxygen levels. Although you've to remove 3 surface mount components from the board before you can use it don't let that put you off as it really is very simple to do and use and super interesting. This is a basics video so it just shows you the basics you need to get it up and running. In a near future a more full project will be built around this basic system.
    For other projects and ideas see :
    Web : www.xtronical.com
    If you'd like to support me via Patreon then the link is below and that would be just amazing. Patreons have access to all videos around 24 hours early plus can view all the posts on Patreon. There are other rewards if you're interested. If you just want to watch videos then that's also fantastic because without people viewing I wouldn't even do half of what I do. So thanks very much :)
    Patreon at : / xtronical
    Intro/Outro Music by Creo Music : www.creo-music.com

ความคิดเห็น • 128

  • @akhaqan
    @akhaqan 4 วันที่ผ่านมา +1

    Excellent video, thanks for taking out the time to make it. I have a few ideas for another video project: It will be a health monitor with a screen that shows the following things:
    1. Two digits after decimal point for better accuracy for all read outs
    2. Heart sine wave
    3. If this sensor can calculate heart rate variability (HRV) i.e. the time between two heart beats then you can add that
    4. You can also add a skin conductance sensor to show volts
    5. Infrared temperature sensor
    I have seen several projects on youtube but no one has combined all these in one. If you like, I can collaborate with you. Let me know and I will send you an email. Thanks

    • @XTronical
      @XTronical  4 วันที่ผ่านมา

      Thanks for your ideas, I will keep them in mind

  • @garudakurt5166
    @garudakurt5166 2 ปีที่แล้ว

    I am using MAX30102 and it's not working .

  • @amrapalibhagat9886
    @amrapalibhagat9886 4 ปีที่แล้ว +1

    I so like it
    But if you send me the code of Arduino programming....
    Tomorrow is my school science exhibition
    Please please please send me the code

    • @XTronical
      @XTronical  4 ปีที่แล้ว

      If you watch the video again you can see that the code is already available in the Arduino software, just follow the instructions.

  • @adrianhp6549
    @adrianhp6549 5 หลายเดือนก่อน

    Can this library be used with the max30102 black sensor?

  • @vonries
    @vonries 5 ปีที่แล้ว +2

    I know I am no expert by any dream or act. However, I have always heard too add fresh new solder if you want to take old solder away. Otherwise, great video as always!

    • @XTronical
      @XTronical  5 ปีที่แล้ว

      And have much better eye sight than me too!

  • @rajgohil8137
    @rajgohil8137 4 ปีที่แล้ว +1

    HIiiiii I am making a soldier strap. I am looking for a hear reate sensor. So can MAX30100 will work if connected to wrist rather then finger tip

    • @aravindreddy7616
      @aravindreddy7616 4 ปีที่แล้ว

      i am also making the same soilder strao explain me gps module ill explain oxymeter it has worked for me..

    • @XTronical
      @XTronical  4 ปีที่แล้ว

      Sorry for very late reply, I missed this somehow. I've not experimented on the wrist ut the same technology is in smart watches so it should work but can't guarantee.

  • @YStechWorld
    @YStechWorld 5 ปีที่แล้ว +1

    Please please please how can I get its proteus library?

    • @XTronical
      @XTronical  5 ปีที่แล้ว

      Sorry, I don't know where it's library would be, I don't use proteus.

    • @YStechWorld
      @YStechWorld 5 ปีที่แล้ว

      Okay..thank u for the replay

  • @ushahn5834
    @ushahn5834 2 ปีที่แล้ว

    How can we interface 1.3 OLED display to this

  • @angelociprian1322
    @angelociprian1322 5 ปีที่แล้ว +1

    Hey, can you help me? I do EXACTLY the same thing as you just on max30102! I unsoldered the resistors, same schematisc, code...
    Initializing pulse oximeter..FAILED
    The led not show up.

    • @XTronical
      @XTronical  5 ปีที่แล้ว

      Sorry, I'm a bit stumped, if everything is exactly the same it should work, I did a later version using the 30102 where it's connected up to a display showing heart beat, a trace and O2 and all just worked fine. If it's not working and it's exactly the same then I cannot think what may be wrong.

    • @angelociprian1322
      @angelociprian1322 5 ปีที่แล้ว

      @@XTronical I tried with your ecg but there are code errors when compiling the code, are you sure that you put on site the right code. The libraries are installed. The code should be compiled even I don't have that display

    • @XTronical
      @XTronical  5 ปีที่แล้ว

      Fairly sure the code is good, have you got the compiler settings set to treat warnings as errors? The setting is in "Preferences" and the "Compiler Warnings" should be set to "Default"

    • @lucianpetcu149
      @lucianpetcu149 5 ปีที่แล้ว

      I have the same problem. Do you solve it? I think for the max30102 the circuit is good and we don't need to take of those rezistors.
      reedpaper.wordpress.com/2018/08/22/pulse-oximeter-max30100-max30102-how-to-fix-wrong-board/

  • @ridhaturki1907
    @ridhaturki1907 5 ปีที่แล้ว +1

    thank you...
    i was planning to buy it but know i wont, i really wanna a fixed value heart beat sensor for my project, one with digital output if anyone could help i would be thankful

    • @XTronical
      @XTronical  5 ปีที่แล้ว +1

      This sensor does provide a fixed digital output, what your looking at is software working with the sensor to provide the enhanced display. You just need to write your own software if you just want to display the heart rate.

  • @yongman2083
    @yongman2083 5 ปีที่แล้ว +1

    Can arduino Connect with Java Netbeans ?

    • @XTronical
      @XTronical  5 ปีที่แล้ว

      Yes, as you can just send data/characters from the Arduino over the serial connection using the Serial.print / Serial.println functions. The tricky bit is writing your code on Windows/Linux/Mac to listen on the serial port and do something with the data you've sent. I've never done this but I found some videos on youtube that seem to look at what your asking, here are the links;
      th-cam.com/video/cAgmKCCeiGo/w-d-xo.html
      th-cam.com/video/nhwDD--RfpA/w-d-xo.html
      th-cam.com/video/Sk37gRil-9c/w-d-xo.html

  • @alaaedine3004
    @alaaedine3004 5 ปีที่แล้ว +1

    Hello , can we show the spo2 as a pourcentage not a graphe?

    • @XTronical
      @XTronical  5 ปีที่แล้ว +1

      Yes, got a video over due for release using a colour lcd that shows spo2, BPM and ecg trace all at once. Should have been out by now but none you tube life got in the way. Circuit and code all done, just putting the video together.

  • @rahultalla2552
    @rahultalla2552 5 ปีที่แล้ว +1

    Hi, I am using the GY-max30100 (purple) I believe it uses the same configuration? When I am using the purple one do I need to have external resistors and also the (same one you used) code is being uploaded but the heart sensor is not lighting up. Pls help this is for a school project and your knowledge on this matter is greatly appreciated

    • @XTronical
      @XTronical  5 ปีที่แล้ว

      Hi, I also have a GY-max30100 that I tried to get to work but couldn't. It suffered the same problems as yours. I never got to the bottom of it. I tried with and without resistors but it made no difference. I even tried different software libraries but still wouldn't work. So I stick to the one I use because I know I can get it to work. Sorry I cannot be more helpful.

    • @rahultalla2552
      @rahultalla2552 5 ปีที่แล้ว

      @@XTronical no it's alright thank you very much

    • @rahultalla2552
      @rahultalla2552 5 ปีที่แล้ว

      @@XTronical Hi, say if i use the
      max 30102 do i still need to remove the three resistors on board and connect externally. Also does this mean i need to change the sample code?

    • @XTronical
      @XTronical  5 ปีที่แล้ว +1

      @@rahultalla2552 Yes, you need to remove and add external resistors, but the code remains the same :)

  • @coveydenton692
    @coveydenton692 4 ปีที่แล้ว +1

    Do you have the code for this? My 11 year old is trying to make a simple Pulse Oximeter for a school project.

    • @XTronical
      @XTronical  4 ปีที่แล้ว

      Link to code/project in description box.

    • @coveydenton692
      @coveydenton692 4 ปีที่แล้ว

      @@XTronical I can see the web link to your site but not the link to specific code--when I go to your website there is a complex one with a display. She just needs something simple--could you paste the link here. This poor mama is not tech savvy!

    • @XTronical
      @XTronical  4 ปีที่แล้ว

      Ah, sorry, I forgot that actually the code shown is from the examples that come with the library for the sensor. If you watch the video you'll see how I access it from the Arduino IDE. Good luck with the project👍

  • @md.mahfuzhasan4412
    @md.mahfuzhasan4412 4 ปีที่แล้ว

    i am using arduino ...... red led not on .. and stuck in serial monitor " Initializing pulse oximeter " .. what should i do .........

    • @XTronical
      @XTronical  4 ปีที่แล้ว

      Have you made the required hardware changes to the board?

  • @윤이준-r8g
    @윤이준-r8g 2 ปีที่แล้ว

    Hi! i am from korean. it was really surprised at this. can i get your source code? nowaday i've done same things

    • @XTronical
      @XTronical  2 ปีที่แล้ว

      It wasn't my code, the example shown comes with the library I installed in the video. Install that library and you can get the source for that example.

  • @renaldiprimaswara5786
    @renaldiprimaswara5786 5 ปีที่แล้ว +1

    awesome tutorial, i only have arduino nano and max30102 sensor. Can I use it simply without needing to modify the resistor, and plug the arduino's usb into the laptop as its voltage source?

    • @XTronical
      @XTronical  5 ปีที่แล้ว

      Usb into laptop is fine, but the resistor mod is unfortunately required to get it to work with the nano.

    • @renaldiprimaswara5786
      @renaldiprimaswara5786 5 ปีที่แล้ว

      ​@@XTronical how's about 4.7 kOhm parallel pullup connected to 3.3v and ird -> gnd (4.7 kOhm seris) to reduce current, have you ever tried it?

    • @XTronical
      @XTronical  5 ปีที่แล้ว

      No not tried, but wouldn't have thought it would work. Do you not have a soldering irom?

  • @Ravansidh
    @Ravansidh 2 ปีที่แล้ว

    Hi I am using uno instead of nano.so will it be same pin 📌 connection correct?

    • @XTronical
      @XTronical  2 ปีที่แล้ว

      Yes, quite sure they are the same.

  • @redreska6311
    @redreska6311 3 ปีที่แล้ว

    Hello mate I need your help !
    I want to mesure Oxygen in the air at the outlet of an oxygen generator ! is this sensor useful ?

    • @XTronical
      @XTronical  3 ปีที่แล้ว

      No, would not do that. You need a gas monitor of some sort.

    • @redreska6311
      @redreska6311 3 ปีที่แล้ว

      @@XTronical thakns ! there is no cheap arduino componenet similar to this type ?

  • @warishabaig5000
    @warishabaig5000 4 ปีที่แล้ว

    Kindly tell me if values are fluctuating too much then what should i do? i am using this sensor in my project and heart rate reading is fluctuating like yours in this video. what is the reason and how i resolve this problem?? its urgent.

    • @XTronical
      @XTronical  4 ปีที่แล้ว

      It's because it's calculating it more than once a second. To smooth it out you need to do an average over time, perhaps 15 seconds or more.

    • @warishabaig5000
      @warishabaig5000 4 ปีที่แล้ว

      @@XTronical it is still not giving me accurate readings. It suddenly drops to zero then 40 then 70 then 80 then 100 above. Please help me out.

    • @dayahhhnrdin2250
      @dayahhhnrdin2250 21 วันที่ผ่านมา

      ​@@warishabaig5000same like me. how you solve it

  • @Candemirhalil
    @Candemirhalil 5 ปีที่แล้ว

    I have a project. I need codes. Could you help ? I'm waiting for an urgent answer

    • @XTronical
      @XTronical  5 ปีที่แล้ว

      For this video it just uses the standard examples from the library. If you want something more advanced (with full code) see this video : th-cam.com/video/17im1J1EdZA/w-d-xo.html

  • @amrapalibhagat9886
    @amrapalibhagat9886 4 ปีที่แล้ว

    When I removed the resistors & fit 4.7 k resistors
    The source code will be changing or not ?????

    • @XTronical
      @XTronical  4 ปีที่แล้ว

      Code stays same

  • @rahultalla2552
    @rahultalla2552 5 ปีที่แล้ว

    Hi, I have purchased all the components s u have used and did the same things you have. When I run the code I get 'intitialising max30100...failed. '
    I ran the i2c scanner and the sensor address is found at 0x57. Also I attached 4.7kohm from the ird and rd to ground I was able to get red light to appear but still no readings on serial monitor.
    Please help me out. This was for a school project and I was really counting on your tutorial.
    Thank you

    • @XTronical
      @XTronical  5 ปีที่แล้ว

      Your description of what you did does not quite match the video. Just to clarify, there should only be resistors on INT, SDA & SCL. Also have you desoldered the surface mount resistors on the 30100 as shown. It won't work unless you do as this device is not arduino compatible without this mod. Hope this helps.

    • @rahultalla2552
      @rahultalla2552 5 ปีที่แล้ว

      @@XTronical yes yes I did all that, I was just explaining what else I tried

    • @XTronical
      @XTronical  5 ปีที่แล้ว

      If everything is the same then I don't know, I've just setup another this morning in the same way. Just perhaps double check that the INT is connected to the correct pin. Also have you got any other libraries in the code as this sensor doesn't work well with other sensors/libraries.

  • @brendonryan5285
    @brendonryan5285 3 ปีที่แล้ว

    Hey great video, I noticed when you took your finger off that the monitor was still picking up values, but they were a bit off. Is that due to the components quality? Do you know of any that are more reliable?

    • @XTronical
      @XTronical  3 ปีที่แล้ว +1

      Did it, can't remember. I think they fluctuate a little. You can get proper ecg sensors that connect to your chest on pads if you want to be really adventurous.

  • @saurabsaseendran5209
    @saurabsaseendran5209 5 ปีที่แล้ว

    I have MAX30100. Should I desolder each resistor, or desoldering only one of the resistor is enough? Also is desoldering needed? Can I just short circuit the resistor?

    • @XTronical
      @XTronical  5 ปีที่แล้ว +1

      You only need to desolder them if using with arduino, if using with an esp32 etc then you can leave as is.. But if using arduino then all 3 need to go and you need the external 4.7k resistors adding as shown. Otherwise the MCU won't be able to read the data from the sensor. You can't short circuit as again you won't be able to read any data back if you do.

    • @saurabsaseendran5209
      @saurabsaseendran5209 5 ปีที่แล้ว

      @@XTronical Thank you for replying. Yes, I am using node MCU(esp266). The problem I am encountering is that when I keep pressing my finger on the sensor, its showing bpm as 0 and spo2 as 0. It's giving me the readings only when I tap the sensor.

    • @XTronical
      @XTronical  5 ปีที่แล้ว

      I've got another sensor on order, should be here in next couple of weeks, I'm doing a video using with esp32 and esp8266, I might be able to sort your problems then.

  • @iotguy2423
    @iotguy2423 5 ปีที่แล้ว +1

    great video if I use with esp would i still need to desolder the resister also would this code work at esp.

    • @XTronical
      @XTronical  5 ปีที่แล้ว

      Well..... Another person reported having problems getting the max30100 to work on esp32. I investigated and also had issues. You shouldn't need to remove the resistors but I tried either way just to make sure but still no joy. So I'm guessing the library needs updating to work with esp32. I have some ideas for using this with ESP32 as well,, so disappointed. I've not contacted the library author yet my last test was some time ago so it might be worth seeing if anything has changed. But just to confirm : resistors do not need removing for esp32 and the external ones don't need adding.

    • @iotguy2423
      @iotguy2423 5 ปีที่แล้ว

      @@XTronical Thank you for your guide ,Sir how can I contact you.

    • @XTronical
      @XTronical  5 ปีที่แล้ว

      Place a comment on my website and then I will have your email and will contact you via mine.

    • @kaizoku5656
      @kaizoku5656 3 ปีที่แล้ว

      @@XTronical hello have you find the fix for the issue? cos I got the same problem

    • @XTronical
      @XTronical  3 ปีที่แล้ว

      I've not had time to look into it, sorry

  • @missunawwa402
    @missunawwa402 4 ปีที่แล้ว

    hi, can you share to me link your connect max30100 with nodemcu? i have a problem when connect to ThingSpeak, the sensor is not work. please help me to solve it.

    • @XTronical
      @XTronical  4 ปีที่แล้ว

      I tried some time ago to use with esp32 and had no success, I am going back to this problem in the future but not the near future

    • @missunawwa402
      @missunawwa402 4 ปีที่แล้ว

      @@XTronical if max sensor will not work with wifi, what if happen if i change the system using bluetooth module ? it is can be connecting with bluetooth?

    • @XTronical
      @XTronical  4 ปีที่แล้ว

      It doesn't appear to work with esp32 at all, WiFi or no WiFi. I think it maybe the driver library. So whether you use Bluetooth would make no difference. You could see if there are any more library's out there that work better with esp32 but I've not got round to doing that yet. Sorry.

  • @tejanaveen7387
    @tejanaveen7387 5 ปีที่แล้ว

    You have soldered the copper wire to sensor what was that? What is it's use?

    • @XTronical
      @XTronical  5 ปีที่แล้ว

      There are three 4k7 resistors, is that what you mean. There is a video and circuit diagram coming up in next 3 days. With a full project using an lcd.

  • @abdulhaseeb7744
    @abdulhaseeb7744 3 ปีที่แล้ว

    Oled 0.91 connect plese hlep

    • @XTronical
      @XTronical  3 ปีที่แล้ว

      I've done two displays with this sensor (but not oled), here are the videos for those
      th-cam.com/video/17im1J1EdZA/w-d-xo.html
      th-cam.com/video/0zNeVVHoLgE/w-d-xo.html

  • @kentpaul8269
    @kentpaul8269 4 ปีที่แล้ว

    I follow your instructions and im using arduino uno. But my max30102 is not glowing can you help me? Is it a code problem?

    • @XTronical
      @XTronical  4 ปีที่แล้ว

      As you can see the code does work, and the Uno is identical in functionality to the Nano, most likely in these cases there is a wiring issue or you've not removed the surface mount resistors and added the external ones. Have you definitely removed the on board resistors and added the external ones?

    • @kentpaul8269
      @kentpaul8269 4 ปีที่แล้ว

      XTronical yes i already removed the mount resistor. And i put pull up resistor 4.7k. Btw is 1k resistor works too?

    • @kentpaul8269
      @kentpaul8269 4 ปีที่แล้ว

      Im using max30102 same design and color as yours. Rcwl 0531

    • @XTronical
      @XTronical  4 ปีที่แล้ว

      Don't know if 1k would work, never tested, it might be a struggle for the line to pulled to ground with that low level of resistance. If you've used 4.7k's then I'm at a bit of a loss, sorry.

    • @kentpaul8269
      @kentpaul8269 4 ปีที่แล้ว +1

      XTronical thanks

  • @prettygirl2012ist
    @prettygirl2012ist 5 ปีที่แล้ว

    Hi im using this sensor for a project do u have a schematic diagram of the set up ?

    • @XTronical
      @XTronical  5 ปีที่แล้ว

      Sorry, not at the moment, only the description in the video. I've other videos coming out in next few weeks that implement a solution with different displays, they will get a circuit diagram and write up

    • @prettygirl2012ist
      @prettygirl2012ist 5 ปีที่แล้ว

      Hi so i managed to set up the circuit but it giving me a very different sets of readings and if i take the hand of the sensor it still continues to take the reading :/ do you know why this might be happening

    • @XTronical
      @XTronical  5 ปีที่แล้ว

      If you are using the serial plotter in the Arduino IDE you will see random noise basically. You have to do a little bit of software processing. If you use the demo that uses the serial monitor then you should get some sensible values printed to screen.

  • @minalhira
    @minalhira 5 ปีที่แล้ว

    Hey. I am using a MAX30102 and i just wanted to if it is mandatory to desolder those three 4.7k resistors or not. And will the code for MAX30100 work for MAX30102?

    • @XTronical
      @XTronical  5 ปีที่แล้ว +1

      If using with arduino then yes, you must desolder. Code will work with max30102. The difference between them is minor.

    • @minalhira
      @minalhira 5 ปีที่แล้ว

      @@XTronical Also my MAX30102 is getting badly heated up pretty fast. Could it be because of not unsoldering these 3 resistors?

    • @XTronical
      @XTronical  5 ปีที่แล้ว

      Don't remember mine getting hot, so yes maybe. Remove and see if it works and if it runs cooler.

    • @minalhira
      @minalhira 5 ปีที่แล้ว

      @@XTronical hey so I unsoldered those 3 resistors but I'm getting garbage values ( heart rate: 221.4bpm / SpO2: 94%). And it's showing these values even when the fingers isn't placed. Please help me.

    • @XTronical
      @XTronical  5 ปีที่แล้ว

      Have you added the 4k7 external pull up resistors shown in the video.

  • @mohamadnaser2697
    @mohamadnaser2697 4 ปีที่แล้ว +1

    thank you, it is a really good video

  • @tejanaveen7387
    @tejanaveen7387 5 ปีที่แล้ว

    Can we get ecg graph accurately with this two sensors?

    • @XTronical
      @XTronical  5 ปีที่แล้ว

      I'm working on it at the moment for next video. It looks promising, but still some further work and tests to do. Video should be out in about 1.5 weeks.

    • @tejanaveen7387
      @tejanaveen7387 5 ปีที่แล้ว

      Max30100 and the sensor used in previous video which is more accurate

    • @XTronical
      @XTronical  5 ปีที่แล้ว

      Max30100 is better and you can also show amount of oxygen in blood.

    • @tejanaveen7387
      @tejanaveen7387 5 ปีที่แล้ว

      What is difference between Max30100 and max30102 and which is accurate for ecg graph?

    • @XTronical
      @XTronical  5 ปีที่แล้ว

      Both are fine for ecg, the 30102 has a larger internal buffer memory and slightly better performance but nothing that would affect any project a hobbiest might do. I've got both and I'm currently working with the 30100, I will replace with the 30102 when to see if there is anything dramatically different, but I think they'll perform the same.

  • @kabeerphulwaney
    @kabeerphulwaney 4 ปีที่แล้ว

    Searched tons of videos, by far the best video I’ve come across, great explanation! Will try it and let you know the results

    • @XTronical
      @XTronical  4 ปีที่แล้ว

      Brilliant, glad it's been useful.

    • @kabeerphulwaney
      @kabeerphulwaney 4 ปีที่แล้ว

      XTronical sir, I tried that but my serial monitors only shows 0bpm and 0spo2 it only varies if I give some motion to the sensor

    • @XTronical
      @XTronical  4 ปีที่แล้ว

      Have you done the hardware mods

    • @kabeerphulwaney
      @kabeerphulwaney 4 ปีที่แล้ว

      XTronical yes I’m using 3 4.7k resistors with int, scl, sda just like you showed

    • @XTronical
      @XTronical  4 ปีที่แล้ว

      Can you post a pic on a photo sharing site for me to look at