Main Content

Log High Speed ECG or Other Data, Continuously for Over a Month

This project was developed to support a university medical research team, who needed a wearable that could log 2 x ECG signals at 1000 samples/sec each (2K samples/sec total) continuously for 30 days, in order to detect arrhythmias. The project presented here includes remote control and monitoring of the logging. Remote control is via menus presented on a serial terminal, either on a computer or mobile phone. This project does not cover the ECG measurement or packaging or battery required for the final wearable.

This high speed/long duration version uses Teensy 3.2, Adafruit Micro-SD breakout module, a quality 16G SDHC class 10 SD card to log the data and a Bluetooth communications module for control and monitoring. A less developed and slower UNO/Mega2560 version of this project is also available. While this project use a Bluetooth communications module for control and monitoring of the logging, you can also use WiFi or BLE modules.

This version, based on the Teensy 3.2, is capable of much higher sampling rates than the UNO/Mega2560 version. Using this code the Teensy 3.2 can sample and log two ADC samples at >30Khz with hardware averaging over 4 samples and so easily satisfies the 1000 samples/sec requirement above. The code supports saving 100 .bin files of 128K each. At 30Khz that covers 29hrs 30min. At 1000 samples/sec it covers 37 days. The code can easily be extended to handle more than 100 files, so extending the duration of the run. At the end of the run you will have >10Gig of data, .bin, files and a .met file of meta data describing the run and results. The supplied SDtoCSV.jar (source code SDtoCSV_src.zip ) can be used to convert the .bin files to .csv files on your computer for further processing. The resulting data is >60Gig. The UNO/Mega2560 version has .bin to .csv conversion included in the Arduino sketch, but given the volume of data logged by the Teensy version, that is not an efficient way to do the conversion.

Supplies:
Teensy 3.2 by PJRC
Adafruit MicroSD card breakout board+ or similar.
16G SDHC class 10 MicroSD card of good quality e.g. SanDisk.
5V USB supply
A led with a 470R resister in series.
2 x 100R resistors (provides protection from damage due to Tx/Rx wiring errors)
Bluetooth Mate Silver OR one of the modules described on Arduino UNO/Mega Starter, controlled by Android/pfodApp”

Link to article