How does it work?
PIR 2 Click is based on the ZSLM323511, a dual-element balanced differential pyroelectric (PIR) sensor from Zilog. Designed for high performance and excellent EMI immunity, this sensor is ideal for demanding motion detection applications such as security/intrusion motion detectors, lighting control, video doorbells, and many more. The ZSLM323511 features a low-profile surface mount package compatible with IR reflow processes. It includes two sensing elements behind a spectral filter window tuned to an 8-13um wavelength, blocking out unwanted IR energy sources. With a 0.6mm element spacing, it provides additional white light protection and a typical field of view of 150 degrees from the center of the element on the X-axis and 139 degrees on the Y-axis.
Combined with the ZSLM323511, the PIR 2 Click also integrates the ZCWM05GIV1 PIR lens, made from high-density polyethylene. This lens ensures maximum IR transmissivity with well-defined beam patterns. It clips directly into the Click board over the ZSLM323511 sensor, simplifying mechanical design.
The MCP607, a micropower CMOS operational amplifier from Microchip, processes the ZSLM323511 raw sensor output. This unity-gain stable, low offset voltage OpAmp features rail-to-rail output swing capability and low input bias current. The buffered signal can be then converted to a digital value using the MCP3221, a 12-bit resolution successive approximation A/D converter with a 2-wire I2C compatible interface, or it can be sent directly to an analog pin of the mikroBUS™ socket labeled as AN. Additionally, the board allows for signal monitoring at every process stage via test points, from the raw PIR sensor signal on PIR OUT to the amplified signal stages at AMP1 and AMP2 test points.
This Click board™ can operate with either 3.3V or 5V logic voltage levels selected via the VCC SEL jumper. This way, both 3.3V and 5V capable MCUs can use the communication lines properly. Also, this Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used as a reference for further development.
Specifications
Type
Motion
Applications
Ideal for security systems, lighting control, video doorbells, and more
On-board modules
ZSLM323511 – dual-element balanced differential pyroelectric (PIR) sensor from Zilog
Key Features
High performance, excellent EMI immunity, two sensing elements behind a spectral filter window, tuned to an 8-13um wavelength for blocking unwanted IR energy, 0.6mm element spacing for additional white light protection, typical field of view 150deg on the X- and 139 on Y-axis, integrated the ZCWM05GIV1 PIR lens for maximum IR transmissivity, output options between analog or digital processing, test points for signal monitoring throughout the process stages, and more
Interface
Analog,I2C
Feature
ClickID
Compatibility
mikroBUS™
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on PIR 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 |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
JP1 | VCC SEL | Left | Power Voltage Level Selection 3V3/5V: Left position 3V3, Right position 5V |
PIR 2 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
Field of View – X-axis | – | 150 | – | deg |
Field of View – Y-axis | – | 139 | – | deg |
Software Support
We provide a library for the PIR 2 Click as well as a demo application (example), developed using MIKROE compilers. The demo can run on all the main MIKROE development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended), downloaded from our LibStock™ or found on MIKROE github account.
Library Description
This library contains API for PIR 2 Click driver.
Key functions
-
pir2_read_raw_adc
This function reads raw ADC value. -
pir2_read_voltage
This function reads raw ADC value and converts it to proportional voltage level. -
pir2_set_vref
This function sets the voltage reference for PIR 2 click driver.
Example Description
This example demonstrates the use of PIR 2 Click boards.
void application_task ( void )
{
float voltage = 0;
pir2_read_voltage ( &pir2, &voltage );
if ( voltage > PIR2_VOLTAGE_TRESHOLD )
{
log_printf( &logger, " Motion detected rn" );
Delay_ms( 1000 );
}
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended), downloaded from our LibStock™ or found on MIKROE github account.
Other MIKROE Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.PIR2
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. UART terminal is available in all MIKROE compilers.
mikroSDK
This Click board™ is supported with mikroSDK – MIKROE 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.