Advanced sensing features of the small quantum-type IR sensor chip used on the IR Sense 3 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 it work?
IR Sense 3 click uses the AK9754, an ultra-small infrared sensor IC, with an I2C interface, from Asahi Kasei Microdevices (AKM) company. 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, 16-bit 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 3 click 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).
IR Sense 3 click can be operated in two 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.
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 interrupt pin of the AK9754 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. More about I2C communication and the interrupt sources can be found in the AK9754 datasheet.
IR Sense 3 click supports the I2C communication interface, allowing it to be used with a wide range of different MCUs. The slave I2C address can be configured by two SMD jumpers, labeled as ADDR0 and ADDR1. Because both address selection pins are tri-state, SMD jumpers can be used to short the pin to VCC or GND, or can be remove to leave the address selection pin floating. Thanks to that, up to eight devices can be used on the same I2C bus.
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
IR Sense 3 click is perfectly suited for human presence detection, so it can be used in various human presence detection applications
On-board modules
AK9754, 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
Interface
I2C
Compatibility
mikroBUS
Click board size
S (28.6 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on IR Sense 3 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 |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
JP1 | ADDR0 | Left | I2C Address selection bit: left position 0, right position 1 |
JP2 | ADDR1 | Left | I2C Address selection bit: left position 0, right position 1 |
Software support
We provide a library for the IR Sense 3 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 initializes and defines the I2C bus driver and drivers that offer a choice for writing data in register and reads data form register. The library includes function for read Temperature data in C and output current of the IR sensor in pA. The user also has the function for default configuration chip for measuremen, function for software reset device, function for get Interrupt state.
Key functions:
float irsense3_getTemperature()
– Temperature data.float irsense3_getIRSensorData()
– Output currentof the IR sensor.uint8_t irsense3_humanApproachDetect()
– Human approach detection.
Examples description
The application is composed of the three sections :
- System Initialization – Initialization I2C module and set INT pin as INPUT.
- Application Initialization – Initializes driver init, software reset and default configuration chip for measurement.
- Application Task – Reads temperature data, outputs current of IR Sensor and checks for human approach.
void applicationTask() { float Temperature; float IR_Current_data; char demoText[ 50 ]; uint8_t fDetect; /* Detection Object */ fDetect = irsense3_humanApproachDetect(); if (fDetect != 0) { mikrobus_logWrite(" Human Approach detected !!!", _LOG_LINE); Delay_1sec(); } /* Output current of IR sensor */ IR_Current_data = irsense3_getIRSensorData(); FloatToStr(IR_Current_data, demoText); mikrobus_logWrite("--- IR current data: ", _LOG_TEXT); mikrobus_logWrite(demoText, _LOG_TEXT); mikrobus_logWrite(" pA", _LOG_LINE); /* Temperature */ Temperature = irsense3_getTemperature(); FloatToStr(Temperature, demoText); mikrobus_logWrite("--- Temperature: ", _LOG_TEXT); mikrobus_logWrite(demoText, _LOG_TEXT); mikrobus_logWrite(" C", _LOG_LINE); mikrobus_logWrite("----------------------------- ", _LOG_LINE); Delay_100ms(); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
I2C Library
Conversions library
UART Library
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.