Great tutorial bud just ordered the bits and pieces that I needed along with a max30102. Keep up the great vids and subscribed and bookmarked your webby :)
Wow I'm first! Another great project idea. I just got through buying a "Thinary MAX30102 Heart rate Sensor Module Puls detection Blood oxygen concentration test For Arduino STM32 Ultra-Low Power" from Aliexpress for under $3 plus a little shipping makes it $3.30 U.S. Plus it lies flat instead of sticking into the air.
@@XTronical you sound like me, stick a label on it and toss it in a box. I have at least started taking screen shots of the description pages for later reference. I have gone to look stuff up before and discovered that it's no longer there.
How were you able to wire it or code? I have been looking all over online, but cannot seem to find anything at all to help. This is my first arduino project, but am worried I have bit off more than I can chew.
XTronical I want to say it’s the more advanced one. The amazon name for the component is “MakerFocus Heart-Rate Sensor Module, MAX30102 Blood Oxygen Sensor”. I was planning to use my Arduino Mega to have an OLED and buzzer work with the component, but cannot make heads or tails where to even begin on the coding=\
In theory yes, but you have to write the software on your laptop to read the serial port and display the results appropriately. I think some channels have done this but not sure if they released source code or the application but I've definitely seen some videos showing this.
In the new year I'm going to look into the MAX30102 sensor, it does oxygen and pulse. I've got one but no time to investigate yet. Hopefully better than these ones. Xxx
Hi, I am quite a newbie, so forgive me if I'm asking a stupid question: I have found an OLE screen but it says"Driver SH1106 (same operation with SSD1306, SSD1106)", will it work or it shuld be strictly an SSD1306? Thank you.
They are very similar but different enough that the adafruit driver used will not drive this screen correctly , so better to stick with a normal SSD1306.
Many thanks! Actually I saw, after better look, that this display is nit a 128x64 but 132x64... weird. Anyway, I had problems finding the right one, finally ordered it on Amazon from US seller.: WINGONEER 2Pcs 0.96 Inch I2C IIC SPI Serial 128x64 OLED Display SSD1306 Module Board with Pin Headers for Arduino - Blue Font. In the mean time I will prepare the rest :-)
Sorry, I'll be more descriptive. Your battery will have two wires, wire the negative to the Gnd pin of the Arduino. Wire the positive wire to one connection of the switch. Connect a wire to the other connection of the switch and wire this to the VIN pin. If your switch has 3 connections then use the middle pin and any other pin (but not all 3). Hope this helps.
@@XTronical i'm using esp8266, and try with or without voltage divider for A0, but the sensor read slightly little what should i do? thanks before for your answer
Ahh, thank you, yes my bad there might be adjustments required in the software, but what you are doing sounds good. As I've been bogged down with the same project for a couple of weeks I'll take a little time off to look at this (and some other requests). I have an ESP8266 and will get it working on that and this will hopefully help you. I'll get back to you in 2-3 days with hopefully a completed project (video will follow). One question though - which ESP8266 board are you using?
Just released a video, good and bad news really. Good is that there is nothing to change, the code and sensors will just work with the ESP8266 or ESP32 etc. no problems. Bad news is that there seems to be some variance in the quality of the sensors out there. I experimented with a brand new one and it gave the same results as you got (and others) and then tried one I'd used before and it was perfect. You could see on the boards that different components were being used. I suspect incorrect resistor values or something that affects the performance of some sensors. Either way it would seem the problem is down to the sensor itself. As other people have reported this problem there does seem to be a few of these about. Out of 5 sensors I've bought I've had one rogue one. You could try a different supplier, that might help.
Hey man, just wanna ask what type of LCD screen are you using? I have a thesis where Ill create a wearable heart beat sensor as well. I use a "lilypad arduino" to make it the same sensor as yours and is also powered with a rechargable battery pack. However, I dont have a LCD screen to display my specific BPMs, I only use 3 LEDs (Green, Orange Red) that represents whether my BPM is either Low, Average, or Critical. Planing on using a LCD screen for better accuracy. Would appreciate your help
Also the sensor used in the video is not brilliant when moved slightly, even when fixed with tape or something, but for a thesis project it'll probably be ok to show proof of concept. Many viewers have used this for their college projects etc. It's incredibly popular for that. However I am working on re-doing this project using a MAX30100 sensor as shown in this video in the next couple of weeks; th-cam.com/video/DRrMQLXYfH4/w-d-xo.html These are less prone to bad results from vibration or movement and as a bonus can also show your blood oxygen level.
These ones are single colour, you can usually choose between white.blue/yellow or even one that has a top line in yellow and rest in white. A small colour TFT LCD is possible though but I've not written any code for one, it would need some adapting. I am working on a large-ish colour LCD(but too large for a wearable) version. However I might do a smaller colour version as it sounds interesting but could be around 2 months before I get that done.
@@richardomosanya6777 Run the test code on the web page for this project www.xtronical.com/pulseheartsensor/ It's where it has a sub-headig of "Connecting it up and initial tests". Keep you finger gently pressed on and not moving. Look at the traces on the serial monitor and note down your max and minimum levels it tends to got to (not any spikes). The code may then be able to be adjusted to work with your sensor
These two constants define the top and bottom #define UpperThreshold 560 #define LowerThreshold 530 But whatever your max and min are you need to go a bit below for your max, and a bit above for your min, for example if your max and min were 400 and 300 respectively you would enter perhaps #define UpperThreshold 380 #define LowerThreshold 320 Of course you need to change to whatever values you have. You may have to play about with them a bit to get the best result.
As mentioned, the range your sensor is returning {505 - 515} is just too small. Either your sensor isn't very sensitive or its struggling to detect the capillaries under your skin
good job, do you have a I2C MAX30102 board tested?
Great tutorial bud just ordered the bits and pieces that I needed along with a max30102. Keep up the great vids and subscribed and bookmarked your webby :)
Great stuff, glad you liked it.
Wow I'm first! Another great project idea. I just got through buying a "Thinary MAX30102 Heart rate Sensor Module Puls detection Blood oxygen concentration test For Arduino STM32 Ultra-Low Power" from Aliexpress for under $3 plus a little shipping makes it $3.30 U.S. Plus it lies flat instead of sticking into the air.
Oohh, I've just had a couple of those arrive last week but not had time to look at them properly yet, gone straight into parts drawers for now.
@@XTronical you sound like me, stick a label on it and toss it in a box. I have at least started taking screen shots of the description pages for later reference. I have gone to look stuff up before and discovered that it's no longer there.
How were you able to wire it or code? I have been looking all over online, but cannot seem to find anything at all to help. This is my first arduino project, but am worried I have bit off more than I can chew.
Do you mean the pulse sensor or the more advanced oxygen level and pulse sensor?
XTronical I want to say it’s the more advanced one. The amazon name for the component is “MakerFocus Heart-Rate Sensor Module, MAX30102 Blood Oxygen Sensor”. I was planning to use my Arduino Mega to have an OLED and buzzer work with the component, but cannot make heads or tails where to even begin on the coding=\
Nice project could it be changed to a counter?
Yes, just alter the code. The code detects a pulse, so just add in a variable to count up every time this happens.
Love this video!!!
Thank you for the comment
can i use my laptop instead of ecg display or oled display ? and instead of pulse sensor can i use IR transmitter and receiver.
In theory yes, but you have to write the software on your laptop to read the serial port and display the results appropriately. I think some channels have done this but not sure if they released source code or the application but I've definitely seen some videos showing this.
Hey man congrats for the vídeo.
Let me make a question, do you have a list of some others heart sensors that i can use beside that one?
Thanks a lot
In the new year I'm going to look into the MAX30102 sensor, it does oxygen and pulse. I've got one but no time to investigate yet. Hopefully better than these ones. Xxx
Hi, I am quite a newbie, so forgive me if I'm asking a stupid question: I have found an OLE screen but it says"Driver SH1106 (same operation with SSD1306, SSD1106)", will it work or it shuld be strictly an SSD1306? Thank you.
They are very similar but different enough that the adafruit driver used will not drive this screen correctly , so better to stick with a normal SSD1306.
Many thanks! Actually I saw, after better look, that this display is nit a 128x64 but 132x64... weird. Anyway, I had problems finding the right one, finally ordered it on Amazon from US seller.: WINGONEER 2Pcs 0.96 Inch I2C IIC SPI Serial 128x64 OLED Display SSD1306 Module Board with Pin Headers for Arduino - Blue Font. In the mean time I will prepare the rest :-)
can u do this with MAX30102 pleasee
Yes, see these two videos,
th-cam.com/video/17im1J1EdZA/w-d-xo.html
th-cam.com/video/DRrMQLXYfH4/w-d-xo.html
@@XTronical do you know how to display ecg on 128x64 oled use max30102? i tried to change the code but i can't upload it because of the error
It's such a different display that it would require some significant changes.
if i want to wire the components to the arduino what pins should i wire the switch and battery to
Negative to ground "Gnd" and positive to "Vin". Just connect your switch in series with the battery to cut its power to the Arduino when required.
@@XTronical so I should also wire the switch to the ground and vin pins too
Sorry, I'll be more descriptive.
Your battery will have two wires, wire the negative to the Gnd pin of the Arduino.
Wire the positive wire to one connection of the switch.
Connect a wire to the other connection of the switch and wire this to the VIN pin.
If your switch has 3 connections then use the middle pin and any other pin (but not all 3).
Hope this helps.
@@XTronical thanks
if i want to put the sensor on 3 volt, which part i need to change on the code?
Nothing, just need a 3.3 volt micro controller instead of arduino
@@XTronical i'm using esp8266, and try with or without voltage divider for A0, but the sensor read slightly little
what should i do? thanks before for your answer
Ahh, thank you, yes my bad there might be adjustments required in the software, but what you are doing sounds good. As I've been bogged down with the same project for a couple of weeks I'll take a little time off to look at this (and some other requests). I have an ESP8266 and will get it working on that and this will hopefully help you. I'll get back to you in 2-3 days with hopefully a completed project (video will follow). One question though - which ESP8266 board are you using?
I’m using NodeMCU V3 ESP8266 ESP-12 CH340 IOT, thank you for your help really appreciate
Just released a video, good and bad news really. Good is that there is nothing to change, the code and sensors will just work with the ESP8266 or ESP32 etc. no problems. Bad news is that there seems to be some variance in the quality of the sensors out there. I experimented with a brand new one and it gave the same results as you got (and others) and then tried one I'd used before and it was perfect. You could see on the boards that different components were being used. I suspect incorrect resistor values or something that affects the performance of some sensors. Either way it would seem the problem is down to the sensor itself. As other people have reported this problem there does seem to be a few of these about. Out of 5 sensors I've bought I've had one rogue one. You could try a different supplier, that might help.
How to use this code in oled display 1.3 inch, 4 pin.please tell
My oled display is not working by this code
Sorry, missed this comment some how. Are you using a 1306 type display, if not this code will not work with your screen
Hey man, just wanna ask what type of LCD screen are you using? I have a thesis where Ill create a wearable heart beat sensor as well. I use a "lilypad arduino" to make it the same sensor as yours and is also powered with a rechargable battery pack. However, I dont have a LCD screen to display my specific BPMs, I only use 3 LEDs (Green, Orange Red) that represents whether my BPM is either Low, Average, or Critical. Planing on using a LCD screen for better accuracy. Would appreciate your help
It's IIC OLED 0.96" display. Not LCD
Also the sensor used in the video is not brilliant when moved slightly, even when fixed with tape or something, but for a thesis project it'll probably be ok to show proof of concept. Many viewers have used this for their college projects etc. It's incredibly popular for that. However I am working on re-doing this project using a MAX30100 sensor as shown in this video in the next couple of weeks;
th-cam.com/video/DRrMQLXYfH4/w-d-xo.html
These are less prone to bad results from vibration or movement and as a bonus can also show your blood oxygen level.
Thanks man,awesome vids. Keep it up
Ow and, is it possible for this specific OLED to change the color of its display? Or is it already set?
These ones are single colour, you can usually choose between white.blue/yellow or even one that has a top line in yellow and rest in white. A small colour TFT LCD is possible though but I've not written any code for one, it would need some adapting. I am working on a large-ish colour LCD(but too large for a wearable) version. However I might do a smaller colour version as it sounds interesting but could be around 2 months before I get that done.
do we connect the pulse sensor to the 3.3v pin or 5v pin
5v
@@XTronical because the pulse sensor is not stable at all only beeps when i move my finger
@@richardomosanya6777 Run the test code on the web page for this project www.xtronical.com/pulseheartsensor/
It's where it has a sub-headig of "Connecting it up and initial tests". Keep you finger gently pressed on and not moving. Look at the traces on the serial monitor and note down your max and minimum levels it tends to got to (not any spikes). The code may then be able to be adjusted to work with your sensor
@@XTronical should i put my max and minimum in the code and if so where
These two constants define the top and bottom
#define UpperThreshold 560
#define LowerThreshold 530
But whatever your max and min are you need to go a bit below for your max, and a bit above for your min, for example if your max and min were 400 and 300 respectively you would enter perhaps
#define UpperThreshold 380
#define LowerThreshold 320
Of course you need to change to whatever values you have. You may have to play about with them a bit to get the best result.
facing problem in programing..guide me
In what way? What's the exact problem
keeps telling me i have 10 bpm
As mentioned, the range your sensor is returning {505 - 515} is just too small. Either your sensor isn't very sensitive or its struggling to detect the capillaries under your skin