Carte à clic IR Sense 3
Carte à clic IR Sense 3
L' IR Sense 3 Click Board™ est un capteur infrarouge Click Board™ conçu pour être utilisé dans des applications de détection IR à courte portée. Contrairement à d'autres capteurs pyroélectriques, il est capable de détecter les changements de chaleur environnementaux jusqu'à 1 m, même à travers le verre.
L' IR Sense 3 Click Board™ utilise un algorithme de détection d'approche humaine qui convient parfaitement à de nombreuses applications de détection de présence humaine. Un moteur d'interruption programmable simplifie le développement logiciel et économise des cycles MCU, qui seraient autrement gaspillés en interrogation. La capacité de détecter l'IR à travers le verre permet une conception sans contrainte du produit final.
Advanced sensing features of the small quantum-type IR sensor chip used on the IR Sense 3 Click Board™, 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 3 Click Board™ Work?
The IR Sense 3 Click Board™ 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 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).
IR Sense 3 Click Board™ 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 Board™ 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, labelled 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 Board™ 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 Board™ library HELP file.
SPECIFICATIONS
Type | Temperature & humidity |
Applications | IR Sense 3 Click Board™ 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 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 | l2C Clock | |
NC | 6 | MOSI | SDA | 11 | SDA | l2C Data | |
Power Supply | 3.3V | 7 | 3.3V | 5V | 10 | NC | |
Ground | GND | 8 | GND | GND | 9 | GND | Ground |
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
Software Support
We provide a library for the IR Sense 3 Click Board™ 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 measurement 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.
Example 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 Information
Depending on the development board you are using, you may need a USB UART Click Board™, USB UART 2 Click Board™ or RS232 Click Board™ 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 3 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
Software Support
We provide a library for the IR Sense 3 Click Board™ 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 measurement 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.
Example 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 Information
Depending on the development board you are using, you may need a USB UART Click Board™, USB UART 2 Click Board™ or RS232 Click Board™ 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 3 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.
Carte à clic IR Sense 3
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.