Plotting a graph with DA14580

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
10 posts / 0 new
Last post
herochua617
Offline
Last seen:3 years 11 months ago
Joined:2017-01-18 12:46
Plotting a graph with DA14580

Hi there,

I am wondering. Is there any way to plot a graph with DA14580 when the value is sent through custom profile of BLE? Do any apps that can help? I am having difficulty in analysing the data i am obtaining through BLE which the development kit is connected to a ECG module. The output of the ECG module is fed into the development kit and I am having problem to analyse since the value that I have obtained from BLE scanner from ADC VAL 1 in the custom profile is in hexadecimal value and it is an ECG signal. I need to analyse the r-r intervals in order to get the heart rate since there are many signal in the ECG where they are the PR segment, QRS complex and so on. Thanks for the help.

Device:
Qinjiny_Dialog
Offline
Last seen:4 weeks 9 hours ago
Staff
Joined:2016-11-01 05:47
Hi herochua617,

Hi herochua617,

Officially we don't have any debug tool to graph a veriable in real time for 580 now as far as I know, someone correct me if I'm wrong on this as I'm also kinda new to Dialog. Is your analysing work has to be done in real time? I mean if it's not neccessary to do this in real time you can always log the data for a period of time and then import to any kind of app that can plot graph or perform further analysing such as MATLAB, there should be a bunch of software that can do this.

herochua617
Offline
Last seen:3 years 11 months ago
Joined:2017-01-18 12:46
Thanks Qinjiny_Dialog,

Thanks Qinjiny_Dialog,

I see. I actually has been asking a lot of question lately in the forum. hahahahax. Generally, my project is regarding the ECG embedded system for long term monitoring. However, the signal output from my ADC is in the ECG signal form which is not directly equivalent to heart rate since the heart rate is the measure of one R_R intervals but I want to obtain the result in heart rate. I do not think the heart rate profile is suitable for me since it is for those device that generate heart rate directly. I did try using the custom BLE profile through using the ble_app_peripheral example but the main problem is that the value output from the ADC VAL 1 characteristics is in hexadecimal when the notification is turned on. I cannot analyse the R-R interval that I should take to detect the heart rate. I do really need help and I am deeply appreciated with all the help dialog gave. Thanks!

Qinjiny_Dialog
Offline
Last seen:4 weeks 9 hours ago
Staff
Joined:2016-11-01 05:47
I see, you need some kind of

I see, you need some kind of algorithm to convert a stream of signal with periodic spikes to time interval between these spikes, then you can use the intervals to compute realtime heartrate right? Yes a visualized output should make this a lot easier but

a. I'm not able to provide such tool for now, perhaps my colleagues know such tools but I have no idea on this

b. you still need to process these data to get the actual intervals.

What I recommend is you log these values, graph it and find a proper algorithm to compute a threshold in order to identify the spikes, then you can use this threshold to record the comming of the spikes, thus you have the interval you need I suppose.

herochua617
Offline
Last seen:3 years 11 months ago
Joined:2017-01-18 12:46
Hi there,

Hi there,

Thanks for the explanation. You've helped a lot. By the way, I would like to ask : how do you print out values in decimal from the ADC VAL 1 in the custom profile since the value will be in hexadecimal and also do you have any tutorials on how to get a log file from the development kit? Thanks.

JK_Dialog
Offline
Last seen:2 months 1 week ago
Staff
Joined:2016-08-22 23:07
Hi, another option that may

Hi, another option that may be helpful - you can use the uart to print out values and capture this in a terminal window. You could capture the values over the ADC, then print out over uart using arch_console.h. You would just need to do the following: include arch_console.h in your application code. Make sure the following is defined CFG_PRINTF_UART2 in your config files. In user_periph_setup.h, make sure the UART is set P0_4 and P0_5.

现在你可以直接使用arch_printf直接()print out your values, and copy this from the terminal into a text or CSV file. If you use a CSV file, you should print out with a delimiter, say a comma and excel will parse these values into different blocks.

Also, the heart rate profile does support R-R intervals. Please reference the BT SIG documentation:https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=239865

Thank you!

//Jon

herochua617
Offline
Last seen:3 years 11 months ago
Joined:2017-01-18 12:46
Hi there,

Hi there,

另一个问题,我怎么能改变displ价值ay in the BLE Scanner to be decimal values?

Thanks

herochua617
Offline
Last seen:3 years 11 months ago
Joined:2017-01-18 12:46
Hi there,

Hi there,

I have found this. I am thinking of using this to do the graph plotting.https://www.mathworks.com/matlabcentral/fileexchange/28941-real-time-dat.... Meanwhile, I have error in the MATLAB. Just wondering, will the uart connection be available if I want to boot from the flash memory?

Thanks.

JK_Dialog
Offline
Last seen:2 months 1 week ago
Staff
Joined:2016-08-22 23:07
Hi,

Hi,

Supporting Matlab and BLE Scanner is outside the scope of the form. arch_printf() acts as the typical C library printf, so you can cast values to decimal - however, you are printing over UART so you will need the ASCII equivalent - the web should have plenty of information on how to do this.

Utilizing the UART will not have any impact on the bootloader. The bootloader will run on reset, and when using cli_programmer or Smart Snippets Toolbox, you will be prompted for a reset.

Thanks,

//Jon

herochua617
Offline
Last seen:3 years 11 months ago
Joined:2017-01-18 12:46
Hi there,

Hi there,

I have asked something about the BLE scanner topic in another topic since this topic will be unrelated. Please refer to hishttps://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bl.... Thanks!