Thank you , the plotter is working now .
currently am using arduino uno shield on top of the STM32F446E, so talking of the connection don’t really understand the way their link. I have tried to change the spi Bus connection , but still saying either the board has crushed or giving those big values like what I sent you previously.
Talking of the changes , I have done it but this time round the output is as follow HeardBeat: 0, R: 65528, ECG: 262143, and continuously repeat same values .
So I believe the issue is with the connection , I was wondering , what does D4, D5, 43 represent in the spiBus() function ? I have checked the library to understand but could not find it.
thank you so much, well understood now . Yes that is the shield I use, but still does not work, it is saying the board has crushed so meaning the PINS are wrong. I have also tried to change it as follow
SPI spiBus(D11, D12, D13);
ECG_3_click ecg3click(spiBus, D9);
base on the explanation from link you sent but for this one, it’s generating same constant values like before ,which means still wrong .
Ah, I again made a mistake, I looked to wrong line on shield…
Simplest is take out the shield and connect the ECG 3 click directly by wires.
If you still want to use the shield, then you must take soldering iron tool, turn the Nucleo board and remove SB21 (Solder Bridge) on the backside. You will lose control of LED 1(Mbed’s mask, on the board is marked as LD2, the green one) but that allow you use that pin for SPI1.
That is right, only D9 can be changed to D10, according what a position on shield you will choose.
Good morning Sir
Thank you so much.
Ok, I have done the connection on a breadboard for now. But still having wrong values with the ecgData and the outRR. Talking of the heartbeat rate, it is varying between 60-72 bpm .
But was wondering about my connection , I have only connected the 6 pins on the left of the ECG 3 click (from GND to CS) to the STM32F446E , I have not touched the right side. Is it the right connection ?
In addition, I have noticed that the output generated by the terminal or console stops generating after 4 or 5 minutes . Why is it like that please ? is it not supposed to continuously generate till I decide to disconnect my board ?
Ok, so what is the issue with the other reading ? The ecgData and the RR ? If the connections are correct , what can it be the issue ?
Yes, the heart beat rate corresponds to the reality.
I might say it’s the NUCLEO , because before it stops generating values , the RGB LED on the board will be blinking as if a new .bin file is being sent to the board .
_ Yes please , It works , I have to close and OPEN the software again before it works
_ The green LED continuing blinking with an interval of 3 seconds, but this time round even throughout the intensity is very low .
That it is cool the heart beat rate is OK . With the rest it will be hard, maybe tomorrow I will try some changes in library, I will let you know. But it will be probably about configuration, I think.
You can look into the init method in the library and if you know what you want then you can to set it - page 26+ of MAX30003 - datasheet
That blinking of RGB led, on the ST-link, mean St-link connection initialization. That seems like…
Good morning Sir
I’m grateful for everything , you are such a great help. Thanks a million
I have checked the datasheet and the library , everything was perfectly done, registers were well assigned . But I have realized from the datasheet that ECG burst and the ECG (FIFO memory) could read ECG voltage sample data , so I decided to read the ECG values from the ECG burst register , I have then changed the address 0x21 to 0x20 . So the output this time is not that bad , it seems to be okay, but I want to confirm it first. And want to do more experiment to see if it will continue working perfectly.
But please Sir, you can still try what you wanted , I want to be sure , I have not made any mistake.
Please I have been testing the code as I promised, but still it is not perfectly giving results was expected. When I plot the generated values, it does not generate a perfect or like shape of heart beats. I tried my best to adjust it throughout the week but still getting same results. So was wondering if there is still something you can try to help ?
trully I do not know, I do not have this hardware in my hand so I can not test it.
From my point of view, when you receive some data, then the communication is OK and it is only about settings in registers, maybe about frequency of reading - for example.
You can try to read only getRTOR and then only getECG, if there is a difference.
Good day Sir.
Sorry for this again.
Like the reading for Heart beats rate is correct, as well as the R-R interval . Only the ECG reading is not correct. And that is what I really want to displayed. It gives this huge number 262042.
Thank you Sir, I did not see much on getRTOR and getECG. But I have read the plotECG () , And I have written an ECG function accordingly as well to see if it will generate good result since the condition in the function is if (ecgData>50000) but still not getting any good result , kindly check my code below to see if I have made some mistakes