Additional features of the AD8232 include HR LED indicator for visual feedback, adaptive high-pass filter for faster recovery, dedicated reference buffer for the virtual ground, and high ESD rating, up to 8kV human body model. All these features allow ECG 5 click to be used in a range of health-related ECG and HR applications, including fitness and activity heart rate monitors, portable ECG, wearable and remote health monitors, and similar.
Note: ECG 5 is a development and prototyping tool. It is not intended to be used for medical treatment of patients, and should not be used to diagnose or treat any conditions.
How does it work?
To measure the activity of the heart muscle, it is necessary to extract its weak electrical impulses, reduce the interferences of surrounding tissues and the environment, amplify them, and allow them to be further processed, most likely in the digital domain. Such a task demands very specific instrumentation equipment. ECG 5 click utilizes the AD8232, an integrated heart rate monitoring front-end, by Analog Devices. This IC is targeted towards wearables and battery-operated applications.
The heart-rate impulses are weak by nature and in the range of just a few millivolts, even microvolts. Therefore, any external interference might obscure them. The interferences might be induced in the human body itself, or they might appear as the result of the activity of other muscles, such as skeletal muscles. Therefore, the input signal from the electrodes is processed by several filtering sections, until it is amplified to a value suitable for sampling. However, the correct placement of the measurement electrodes is crucial for accurate readings. More about the electrodes and their placement can be found in this blog article.
ECG 5 click features a 3.5mm jack connector, which is used to connect three electrodes. One of the electrodes is a so-called right leg drive electrode (RLD), used to set the body of the patient to the same potential as the rest of the system. In addition, it is used to reduce the noise which results from the human-body acting as an antenna (picking up 50/60 Hz hum from the mains, etc.) Along with the integrated 2-pole high-pass filtering section, and the RFI filtering section, the IC effectively reduces the overall system noise.
Lead-off detection is very important for accurate ECG measurements. Therefore, this IC is equipped with the dedicated LOD pin, which is set to a HIGH logic level when any of the electrodes is missing. Lead-off circuitry is basically a comparator, that makes sure that the body stays within 0.5V from the positive rail. By featuring two separate LOD pins, it is possible to determine the exact electrode that may be missing. In DC lead-off detection mode, all three electrodes must be connected. The LOD+ is routed to the mikroBUS™ INT pin, while the LOD- is routed to the mikroBUS™ PWM pin. The pins are labeled as LO+ and LO- respectively, on this Click board™.
Due to the signal filtering within the AD8232 IC, the settling time for the connected electrodes may be too long. Therefore this IC features the fast restore option (FR pin is pulled to a HIGH logic level on ECG 5 click), which dynamically sets the cutoff frequency to a higher value, speeding up the settling time, which may be in the magnitude of several seconds (for example, when the electrodes are connected).
The IC can be driven to a low power consumption mode. If the SDN pin is pulled to a LOW logic level, the IC will enter the standby mode, greatly reducing the power consumption. By utilizing the LOD pins, the MCU can be programmed to enter the standby mode along with the AD8232, which is ideal for battery-powered applications. SDN pin is routed to the mikroBUS™ CS pin and is labeled as SDN.
The OUT pin of the AD8232 is routed to the AN pin of the mikroBUS™. It provides the amplified and filtered signal from the electrodes, which can be used directly on the A/D peripheral of the host MCU. The AD8232 can drive both resistive and capacitive loads, so no additional buffering IC is required. In addition, ECG 5 click is equipped with a LED labeled as ECG, which can be used as a visual indicator of the output signal.
Specifications
Type
Biometrics,ECG
Applications
ECG 5 click is an ideal solution for development of health-related ECG applications, including fitness and activity heart rate monitors, portable ECG, wearable and remote health monitors, and similar.
On-board modules
AD8232, an integrated heart rate monitoring front-end, by Analog Devices.
Key Features
ESD and EMI protection of the inputs, compatible with several types of electrodes, lead-off detection for each electrode, bio-signal conditioning reduces influence of movement artifacts, simplified design with the complete heart monitoring front end.
Interface
Analog,GPIO
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on ECG 5 click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
PWR | PWR | – | Power LED Indicator |
CN1 | 3.5mm jack | – | 3.5mm jack connector for electrodes |
Software support
We provide a library for the ECG 5 click on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library performs a device mode setting (Normal or Shutdown) and a leads off detection checking. Also the library initializes GPIO driver. For more details check documentation.
Key functions:
void ecg5_setMode( uint8_t state )
– The function performs a device mode setting.T_ECG5_RETVAL ecg5_check_LOD_negative( void )
– In DC Leads Off Detection Mode, LOD- is high when the electrode to -IN is disconnected, and it is low when connected. In AC Leads Off Detection Mode, LOD- is always low.void ecg5_gpioDriverInit(T_ECG5_P gpioObj)
– Function initializes GPIO driver.
Examples description
The application is composed of three sections :
- System Initialization – Initializes peripherals and pins.
- Application Initialization – Initializes GPIO driver, selects a desired mode of the device and performs the ADC and timer interrupt initialization.
- Application Task – (code snippet) – When the timer has reached the set value (4ms), the ADC converted result will be read and sent to the serial plotter.
void applicationTask() { if (respReady == RESPONSE_READY) { respReady = RESPONSE_NOT_READY; adcValue = ADC_Get_Sample( 0 ); WordToStr( adcValue, text ); mikrobus_logWrite( text, _LOG_TEXT ); mikrobus_logWrite( ",", _LOG_TEXT ); LongWordToStr( plotX, text ); mikrobus_logWrite( text, _LOG_LINE ); if (plotX == 0xFFFFFFFF) { plotX = 0; } else { plotX++; } } }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
ADC
UART
Conversions
Additional notes and information
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
mikroSDK
This click board is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant click board demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.