Introduction: ECG Logger - a Wearable Cardiac Monitor for Long-Term Data Acquisition and Analysis
First release : Oct 2017
Latest version : 1.6.0
Status : Stable
Difficulty : High
Prerequisite : Arduino, Programming, Hardware building
Unique repository : SF (see links below)
Support : Forum only, no PM
ECG Logger is a Wearable Cardiac Monitor for Long-Term Data Acquisition and Analysis. The ECG Logger Project is aimed for providing a very low-cost (~35$) open-source (GPL3 license) hardware device and freeware (CC-BY-NC-NA license) application software for a Rhythmic Holter. The hardware has been made very simple and is based on an “Arduino Nano” with two companion boards for the SD card and the instrumentation differential amplifier. It helps monitoring arrhythmia syndromes such as bradycardia, tachycardia, extra-systoles or pause. In no case it can be use to replace a professional medical examination.
ECG Logger Viewer is the companion software for reading ECG data from the ECG Logger device
=>Safety rules related to electrical devices must be complied and no connection direct or indirect* shall be made between the Holter device and appliances connected to mains (* e.g. when the device is connected to the USB port of a PC powered from the mains).
.DISCLAIMER: *** RISK OF ELECTRICAL SHOCKS AND DEATH ***
Persons unskilled, not familiar or unaware of electrical risks are discouraged to get involved. This project is provided for training/education and in no case for commercial purposes or medical diagnostics. Use of this project information is under the ENTIRE and SOLE RESPONSIBILITY of the USERS. It has not been approved for any kind of applications.
Step 1: ECG Logger - a Holter Device
ECG Logger make available a complete solution including a pocket-size ECG recorder hardware device with embedded firmware. The ECG signal is recorded onto a SD card memory at high frequency (250Hz sampling rate). The device is backed by the recent technology offering more freedom and accuracy for up to 24 hours continuous recording.
The system is based on an “Arduino Nano” microcontroller, an AD8232 Heart Rate Monitor amplifier board and a SPI SD card module with absolute minimum extra components
- Stable and reliable recorder, based on state-of-the-art and most recent technology
- Anti-jamming and anti-shock
- Small in size
- Waveform record and event marking
- Accurate start time record and sampled data
- Built-in SD card for storage (can be plug-in and pull-out)
- No need to compress original data, thanks to the large storage capability
- Faster USB 2.0 interface
- Record waveform details based on high precision and sampling frequency
- Record the state of pacemaker using higher sampling frequency.
- Automatic R-R peaks detection using Pan-Tompkins.
- International standard of 3 leads. Record up to 24-hour of ECG signal.
- Very simple and ergonomic user interface
This project is Open-Source licensed for educational purposes only and none of its components can be used or reused for commercial purposes or applications.
USB driver must be installed on the computer prior to Holter (Arduino Nano) connection. Some Arduino use the FTDI chipset whereas some Chinese products require the CH340 chipset. The corresponding driver must be downloaded and installed on the computer. Click Start >> Control Panel >> Device Manager, and in the device list look for Com Ports (e.g. USB-SERIAL CH340).
- Number of Channels: 1
- Lead:standard 3-lead
- Sampling Rate: 250 Hz
- Sampling Accuracy: 10-bit / 8-bit selectable
- Recording Time: up to 24 Hours
- Time accuracy: +/- 1 minute per day
- Interface: USB 2.0 (230 kbauds)
- Scale Voltage: 1 mV ±5%
- Sensitivity valve: ≤20μV
- Lowest voltage signal: 50 μ Vpp
- Input Impedance: ≥ 1GΩ
- Input circuit bias current: ≤ 0.1 μA
- Noise level: ≤ 10 μ Vpp (0.1 Hz to 40 Hz)
- Common-Mode Rejection Ratio: >= 60 dB (DC to 60Hz)
- Electrode offset rejection: ± 300 mV
- Voltage tolerance: ± 500 mV
- Time constant: ＞ 3.2 s (0.3Hz)
- Frequency response: 0.05 ~ 125 Hz
- Filter: AC, EMG, Drift Filter, RFI
- Complex QRS detection: Pan & Tompkins algorithm
- Safety Human Body Model: 8 kV ESD (HBM)
- Type B: internally powered
- Size (L x W x H) : 100 x 60 x 25 mm
- Net weight (w/o battery): 65 g
- Weight with batteries: 111g
- Total weight: 195 g (incl. carrier/electrodes)
- Power: 4 x AAA batteries
- Autonomy: >30 hours with Alkaline batteries
- Normal mode: 17 mA (Standby)
- Sleep mode: 6.2 mA
- Recording mode: 31 mA (~36 hours - depend on SD Card)
Step 2: ECG Logger Viewer - a Data Analyzer
ECG Logger Viewer is the Holter device companion application for downloading, analyzing data and managing patients.
- NEW: Version 2 with drastically improved performances (requires ECG Logger FW v1.6.0+)
- Heart rate variability processing (HRV)
- R-peak detection and arrythmia classification
- Arrythmia : Bracardia, Tachycardio, Extrasystoles and Pauses
- Detection of ECG artifacts
- Preview and print of ECG signal and statistics
- Data export in EDF/BDF formats
- Interface in English, French and Chinese
- Automatic firmware update
- ECG navigation by arryhtmia types or time position
- IMPORTANT: runs only with the "ECG Logger" Holter device. Requires "ECG Logger" Holter device version 1.6 or above
- Portable version supported from v2.0
Software runs under Windows and support 3 different languages. Run the installer and read the Help file.
NEW VERSION v22.214.171.124
SF is the unique place for "ECG Logger Viewer" application download.
Step 3: Building the Device
The electronics has been made as simple as possible and does not require a PCB. A simple piece of Veroboard can do the job.
You must upload the Arduino Nano with the HEX. The code use 99% of the memory and new bootloaders could prevent uploading the firmware if there are bigger.
SF is the unique place for "ECG Logger" device Firmware download.
Note about HEX file and Arduino bootloader:
The Arduino Nano has a 32K Flash memory and the bootloader uses 2K. From the remaining 30K (30 720 B) of Flash, the firmware uses 30 692 Bytes leaving very few bytes free!
There are two different bootloaders (selectable from Arduino IDE >> Tools >> Processor ):
- ATmega328P (Old Bootloader) is the "ATmegaBOOT" bootloader and expects the upload communication at 57600 baud.
- ATmega328P is the "Optiboot" bootloader expects the upload communication at 115200 baud.
Whereas genuine Arduino Nano are provided with the Optiboot bootloader, the chinese versions (using the USB chipset CH341) are loaded with the ATmegaBOOT bootloader. Programming communication speeds is different !
NOTE : The current HEX file have been developed for Arduino with "ATmegaBOOT" bootloader but also runs with the Optiboot too.