How does it work?
Heart Rate 2 Click is well suited for a wide variety of optical sensing applications, consistsing of a single optical readout channel and a precision LED driver current DACs that modulate LED pulses for a variety of optical measurements. The LED current DACs have 8 bits of dynamic range with four programmable full-scale ranges of 31mA, 62mA, 94mA, and 124mA. The LED drivers are low dropout current sources allowing for low-noise, power-supply independent LED currents to be sourced at the lowest supply voltage possible, minimizing LED power consumption. The LED pulse width can be programmed from 14.8μs to 117.3μs to allow the algorithms to optimize SpO2 and HR accuracy at the lowest dynamic power consumption dictated by the application.
The optical subsystem Heart Rate 2 Click based on MAXM86161 is composed of ambient light cancellation (ALC), a continuous-time sigma-delta ADC, and proprietary discrete time filter. ALC incorporates a proprietary scheme to cancel ambientlight-generated photo diode currents, allowing the sensor to work in high ambient light conditions. The optical ADC has programmable full-scale ranges of 4μA to 32μA. The internal ADC is a continuous time, oversampling sigmadelta converter with 19-bit resolution. The ADC output data rate can be programmed from 8sps (samples per second) to 4096sps. The MAXM86161 includes a proprietary discrete time filter to reject 50Hz/60Hz interference and changing residual ambient light from the sensor measurements.
Sensor also includes an optical proximity function which could significantly reduce energy consumption and extend battery life when the sensor is not in contact with the skin. MAXM86161 power to a minimum during situations where there is no reflective returned signal. It is also intended to reduce the emitted light to a minimum or even below that perceivable by the human eye.
The native delta-sigma ADC linearity is exceptional. However, the subranging DAC uses a unary architecture which has some mismatch between unit current sources of the DAC and the ADC reference current. This mismatch results in some transfer function nonlinearity (XNL) errors when the sub-DAC code transitions. For this reason, the sub-ranging DAC algorithm is designed to minimize DAC transitions by introducing large hysteresis through the overlapping sub-DAC ranges. Consequently, under normal PPG operation, the sub-DAC does not transition and the linearity of the converter signal is driven entirely by the linear native delta-sigma ADC. In addition to algorithmically reducing the sub-DAC transitions, the MAXM86161 incorporates a self-calibration scheme that can be used to further reduce the sub-DAC XNL errors.
Specifications
Type
Biometrics,Heart Rate
Applications
Ideal solution for the development of various wearable health-related devices, Optimized for In-Ear Applications, Miniature Package for Mobile Applications
On-board modules
MAXM8616 – Single-Supply Integrated Optical Module
for HR and SpO2 Measurement
Key Features
Complete Single-Channel Optical Data Acquisition System, Built-In Algorithm Further Enhances Rejection of Fast Ambient Transients, Optimized Architecture for Reflective Heart Rate and SpO2 Monitoring…
Interface
I2C
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
S (28.6 x 25.4 mm)
Input Voltage
3.3V,5V
Pinout diagram
This table shows how the pinout on Heart Rate 2 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 |
JP1 | VCC SEL | Left | Logic voltage level selection: left position 3.3V, right position 5V |
Software Support
We provide a library for the Heart Rate 2 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
Library provides a full contol over Heart Rate 2 click. It provides generic functions for reading and writing, default configuration and reading fifo data, and if you are willing you can set your configuration.
Key functions:
uint8_t heartrate2_generic_read ( uint8_t reg_adr )
– Generic function for reading data.void heartrate2_generic_write ( uint8_t reg_adr, uint8_t write_data )
– Generic function for writing data.void heartrate2_default_configuration ( uint8_t cfg_led )
– Function for setting default config and turning on one led with cfg_led parameter.void heartrate2_read_fifo ( heartrate2_fifo_data_t *fifo )
– Function for reading fifo data and tag values from device.
Examples description
The application is composed of three sections :
- System Initialization – Initialization of I2C module and additional pins
- Application Initialization – Resets device, checks ID and configures device to desired led
- Application Task – Reading fifo data and logs it with time
void application_task ( ) { char demo_txt[ 30 ]; heartrate2_fifo_data_t fifo_object; heartrate2_read_fifo( &fifo_object ); if ( fifo_object.tag == HEARTRATE2_FIFO_TAG_PPG1_LEDC1 ) { LongWordToStr( fifo_object.data_val, demo_txt ); Ltrim( demo_txt ); Rtrim( demo_txt ); mikrobus_logWrite( demo_txt, _LOG_TEXT ); mikrobus_logWrite( ",", _LOG_TEXT ); LongWordToStr( counter_tm++, demo_txt ); Ltrim( demo_txt ); Rtrim( demo_txt ); mikrobus_logWrite( demo_txt, _LOG_LINE ); } Delay_ms( 4 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- I2C
- UART
- Conversions
Additional notes and informations
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.