7 years, 2 months ago.

ECG data to mobile/app by Bluetooth

Seems our app has no ECG waveform/data display, why? If we need to display ECG waveform on mobile/Anroid, how to do? Do it needs change hardware? Or how to change firmware if hardware no need modify?

Question relating to:

MAXREFDES100# Health Sensor Platform

1 Answer

6 years, 7 months ago.

Currently I am working on pushing the ECG datas to the BLE Interface.

The HspBLE.cpp and HspBLE.h allows to define Characteristics. 1 Characteristic can hold up to 20 Bytes data. More than 20 Bytes will request a "long read". According to the datasheet of the MAX30003 ECG AFE one ECG Sample takes 18 Bits of Data. A "full sample" 24 Bits.

The intervall of BLE -Transmits is set to 1 transfer per second (HspBLE.cpp ticker.attach function). You have to transfer for a 128 Samples ECG * 24 Bits = 3072 Bits = 384 Bytes ECG Data via Characteristics. That means you need to create a minimum of 20 Characteristic with 20 Bytes capacity to transfer a 128 sps ECG. I tried it and it is not possible to create so many Chars. The board gets stuck while transferring random data. Maybe the SRAM overloads. I don't know. (But you can delete some not used Chars to get more space)

Cheers Emin

/media/uploads/Emin/image.png

The ECG data is filled in the class max30001.cpp line 1098 and is stored in a uint32_t max30001_ECG_FIFO_buffer[32] array. Currently i am not able to write a function that collects 20 bytes of ECG data and returns it to one of the Characteristics. But i think that is the way to get the ECG waveform displayed over BLE

I hope that one of the support team of Maxim Integrated can help us and comment weather i am on the right way or not. The team is very competent :) Perhaps they provide us a function that allows the transmission of ECG via BLE.

Hello Emin,

The HSP board features a BLE radio, not Classic Bluetooth. The ECG and accelerometer generate a significant amount of data. The intended use case is to collect data from the multiple sensors, then process onboard with an algorithm and then transmit a short message such as heart rate through BLE. However, during algorithm development large datasets from the sensors are needed. This is best done via a wired connection (USB). It is obviously a hassle being tethered, but you can collect so much more data. Many people process this data in a program such as MatLab. This is the best approach for development.

My suggestion for the use case you mentioned is to read the ECG and filter/process the data locally and then only transmit one screen worth of the waveform, and then repeat.

posted by Brian Hindman 05 Dec 2017