IR Sense 2 Click Board
IR Sense 2 Click Board
Overview
The IR Sense 2 Click Board™ is the infrared sensor Click Board™, designed to be used for short-range IR sensing applications. Unlike other pyroelectric sensors, it is able to sense environmental heat changes up to 1m, even through glass. The IR Sense 2 Click Board™ is perfectly suited for human presence detection, so it can be used in many human presence detection applications. A programmable interrupt engine simplifies the software development and saves MCU cycles, that would be otherwise wasted on polling. The ability to sense IR through the glass allows an unconstrained design of the final product.
The IR Sense 2 Click Board™ is the infrared sensor, designed to be used in the short range IR sensing applications. Unlike other pyroelectric sensors, it is able to sense environmental heat changes up to 1m, even through the glass. IR The The IR Sense 2 Click Board™ is perfectly suited for human presence detection, so it can be used in many human presence detection applications. A programmable interrupt engine simplifies the software development and saves MCU cycles, that would be wasted on polling, otherwise. The ability to sense IR through the glass allows an unconstrained design of the final product.
Advanced sensing features of the small quantum-type IR sensor chip used on the IR Sense 2 click, such as the on-chip processing and signal filtering, 16bit ADC signal conversion, I2C interface, programmable interrupt engine, low power consumption, integrated temperature sensor and very compact size, allow this click board to be used as a very reliable and accurate presence detection device. It can be used for a range of applications that rely on human presence detection, such as proximity sensor activated lights and surveillance cameras, automatic doors, detection of heated objects, information terminals, and similar applications.
How Does The IR Sense 2 Click Board™ Work?
The IR Sense 2 Click Board™ uses the AK9752, an ultra-small infrared sensor IC, with an I2C interface, from Asahi Kasei Microdevices (AKM) company. This sensor is capable of sensing wavelengths from 2 to 5 μm, allowing it to penetrate through the 0.7mm glass, which allows it to be hidden behind the transparent housing of some device. The sensor IC integrates the AKM's original InSb quantum IR sensor element - used to sense the IR spectrum light, analog front end - for the signal conditioning and the sensor offset canceling, analog to digital converter (ADC) - used to convert temperature and IR sensor voltages into a digital information, the digital lowpass filter (LPF) with the selectable cut-off frequency, and finally - the communication I2C interface. Power on Reset section as well as the internal oscillator sections are integrated on this chip, as well.
The chip comes with the factory calibrated offset, making the IR Sense 2 Click Board™ ready to be used out of the box. The sensor data is output through the I2C bus, with its pins routed to the appropriate mikroBUS™ pins. The I2C interface supports both normal (clock speed up to 100kHz) and fast mode (clock speed up to 400kHz). However, to enable I2C in fast mode, the device needs to be operated at lower voltage levels, which are not available at the mikroBUS™ directly. For this reason, the click board is equipped with a small LDO network, which provides 1.8V for the sensor. By employing two MOSFET transistors, the I2C levels are shifted to a voltage level selected by the onboard SMD jumper (3.3V or 5V). This allows fast I2C mode, even when interfaced to 3.3V or 5V MCUs.
The programmable interrupt engine can be used to trigger an interrupt request, whenever the programmed criteria are met. The interrupt will be triggered by all the events that meet the programmed criteria; the specific event that caused the interrupt can be found in the INTCAUSE register of the AK9752 sensor IC. The interrupt pin of the AK9752 is routed to the INT pin of the mikroBUS™ and it is driven to a LOW logic state when it is triggered. It is pulled to a HIGH logic level by the onboard resistor (to 1.8V). More about I2C communication and the interrupt sources can be found in the AK9752 datasheet.
The IR Sense 2 Click Board™ can be operate in three modes:
- Stand-By mode : In this mode, all the internal sections are powered down. The data output registers retain their content and it is available for reading. The interrupt pin reverts to its initial state. In this mode, the power consumption is minimal.
- Continuous mode : In this mode, the sensor will repeat the measurement every 100ms. The information in the output register will be updated after each completed conversion.
- Single Shot mode : While working in this mode, the device will trigger a single measurement, store the data in the output register and revert to the standby mode, saving power that way.
As already mentioned, the onboard SMD jumper is used to set the logic voltage for the I2C and INT pin to 3.3V or 5V. this allows both 3.3V and 5V operated MCUs to be interfaced with the IR Sense 2 Click Board™.
The provided click library offers functions for easy configuration and reading of the sensor data. The included example application demonstrates the usage of these functions and it can be used as a reference for a custom development. More information about the functions can be found inside the click library HELP file.
SPECIFICATIONS
Type | Temperature & humidity |
Applications | The IR Sense 2 Click Board™ is perfectly suited for human presence detection, so it can be used in various human presence detection applications |
On-board modules | AK9752, an ultra-small infrared sensor IC with I2C interface, from Asahi Kasei Microdevices (AKM) company |
Key Features | On-chip processing and signal filtering, 16bit ADC signal conversion, I2C interface, programmable interrupt engine, low power consumption, integrated temperature sensor, ability to sense through the glass |
Interface | I2C |
Compatibility | mikroBUS |
Click board size | M (42.9 x 25.4 mm) |
Input Voltage | 3.3V or 5V |
PINOUT DIAGRAM
This table shows how the pinout on the IR Sense 2 Click Board™ corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Notes | Pin | Pin | Notes | ||||
---|---|---|---|---|---|---|---|
NC | 1 | AN | PWM | 16 | NC | ||
NC | 2 | RST | INT | 15 | INT | Interrupt | |
NC | 3 | CS | RX | 14 | NC | ||
NC | 4 | SCK | TX | 13 | NC | ||
NC | 5 | MISO | SCL | 12 | SCL | I2C Clock | |
NC | 6 | MOSI | SDA | 11 | SDA | I2C Data | |
Power supply | +3.3V | 7 | 3.3V | 5V | 10 | +5V | Power supply |
Ground | GND | 8 | GND | GND | 9 | GND | Ground |
ONBOARD SETTINGS AND INDICATORS
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | - | Power LED indicator |
JP1 | SEL JMP | Left | Power supply selection: left position 3V3, right position 5V |
Software Support
We provide a library for the IR Sense 2 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo application can run on all the main MikroElektronika development boards.
Library Description
The library contains basic functions for reading from, and configuring the click's registers,
as well as functions for calculation of temperature and IR data.
Key Functions
uint8_t irsense2_readReg(uint8_t registerAddress)
- generic read function.
void irsense2_writeReg(uint8_t registerAddress, uint8_t data_)
- generic read function.
float irsense2_readTemp()
- reads temperature data, and converts to Celsius degrees.
float irsense2_readIR()
- reads IR data, and converts to pA.
Example Description
The demo application is composed of three sections:
- System Initialization - Initializes logger and I2C peripheral.
- Application Initialization - Initializes click driver, and configures click settings to required values.
- Application Task (code snippet) - Reads out IR and temperature data, and prints them out via UART.
void applicationTask() { char txt[10] = {0}; float temperature; float IRdata; temperature = irsense2_readTemp(); FloatToStr(temperature, txt); mikrobus_logWrite("Temperature reading: ",_LOG_TEXT); mikrobus_logWrite(txt,_LOG_LINE); IRdata = irsense2_readIR(); FloatToStr(IRdata, txt); mikrobus_logWrite("IR reading: ",_LOG_TEXT); mikrobus_logWrite(txt,_LOG_LINE); Delay_ms( 1000 ); }
The full application code, and ready to use projects can be found on our LibStock page.
mikroE Libraries used in the example:
- UART
- Conversions
- C-String
Additional Notes and Information
Depending on the development board you are using, you may need a 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
The IR Sense 2 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.
Software Support
We provide a library for the IR Sense 2 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo application can run on all the main MikroElektronika development boards.
Library Description
The library contains basic functions for reading from, and configuring the click's registers,
as well as functions for calculation of temperature and IR data.
Key Functions
uint8_t irsense2_readReg(uint8_t registerAddress)
- generic read function.
void irsense2_writeReg(uint8_t registerAddress, uint8_t data_)
- generic read function.
float irsense2_readTemp()
- reads temperature data, and converts to Celsius degrees.
float irsense2_readIR()
- reads IR data, and converts to pA.
Example Description
The demo application is composed of three sections:
- System Initialization - Initializes logger and I2C peripheral.
- Application Initialization - Initializes click driver, and configures click settings to required values.
- Application Task (code snippet) - Reads out IR and temperature data, and prints them out via UART.
void applicationTask() { char txt[10] = {0}; float temperature; float IRdata; temperature = irsense2_readTemp(); FloatToStr(temperature, txt); mikrobus_logWrite("Temperature reading: ",_LOG_TEXT); mikrobus_logWrite(txt,_LOG_LINE); IRdata = irsense2_readIR(); FloatToStr(IRdata, txt); mikrobus_logWrite("IR reading: ",_LOG_TEXT); mikrobus_logWrite(txt,_LOG_LINE); Delay_ms( 1000 ); }
The full application code, and ready to use projects can be found on our LibStock page.
mikroE Libraries used in the example:
- UART
- Conversions
- C-String
Additional Notes and Information
Depending on the development board you are using, you may need a 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
The IR Sense 2 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.
IR Sense 2 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.