IR SENSE 3 CLICK
PID: MIKROE-3607
Weight: 18 g
IR Sense 3 Click is the infrared sensor Click board™, designed to be used for 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 Sense 3 click has
human approach detection algoritam that makes perfectly suited for 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.
IR Sense 3 click is supported by a mikroSDK compliant library, which includes functions
that simplify software development. This Click board™ comes as a fully tested product,
ready to be used on a system equipped with the mikroBUS™ socket.
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, 16bit 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 cutoff 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 tristate, 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
Input Voltage
3.3V
Click board
size
S (28.6 x 25.4 mm)
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).
Notes
Pin
Pin
Notes
NC
1
AN
PWM
16
NC
NC
2
RST
INT
15
INT
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
Interrupt
Ground
ONBOARD SETTINGS AND INDICATORS
Label
Name
Default
Description
LD1
PWR
-
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
Power LED Indicator
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.
https://www.mikroe.com/ir‐sense‐3‐click6‐28‐19