How does it work?
Motion 4 Click is using a PIR sensor that can detect changes in the amount of infrared radiation impinging upon it, which varies depending on the temperature and surface characteristics of the objects in front of the sensor. Detection performance of EKMC1603111 at ambient temperature of 25°C with temperature difference higher than 4°C is up to 12m. Angle detection area with 92 detection zones is 102°(±51°)horizontal and 92°(±46°)vertical.
Output from PIR sensor is feed into buffer and then photorelay alowing users to directly control with galvanic isolation from sensor and MCU electronic devices such as lights, motors, gates etc. The TLP241A photorelay is able to effectively replace traditionally used mechanical relays, bringing up the full set of inherited benefits: virtually unlimited number of cycles since there are no moving parts that would wear off, no bouncing effect on the output contacts, high resistance to mechanical shock and environmental influence, low current required for the activation, constant resistance since no carbon and rust can build up on contacts, there is no sparking or electric arc forming while operated, compact size, higher isolation voltage, and so on.
When an object, such as a person, passes in front of the background, such as a wall, the temperature at that point in the sensor’s field of view will rise from room temperature to body temperature, and then back again. The sensor converts the resulting change in the incoming infrared radiation into a change in the output voltage, and this triggers the detection. Objects of similar temperature but different surface characteristics may also have a different infrared emission pattern, and thus moving them with respect to the background may trigger the detector as well. In some cases, going back and forth towards the sensor (parallel movement to the axis Z), may not be detected.
Difficulty in sensing the heat source is that glass, acrylic or similar materials standing between the target and the sensor may not allow a correct transmission of infrared rays and also non-movement or quick movements of the heat source inside the detection area.
Specifications
Type
Motion
Applications
Alarm systems, light switch controllers, automatic doors and similar systems where human presence needs to be detected.
On-board modules
EKMC1603111 the PIR motion sensor
Key Features
92 detection zones, wide detection range and area and maximum range of 12m
Interface
GPIO
Feature
No ClickID
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 Motion 4 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 |
---|---|---|---|
PWR | LD1 | – | Power LED Indicator |
ON | LD2 | – | Photorelay ON Indicator |
JP1 | VCC SEL | Left | Logic voltage level selection: left position 3.3V, right position 5V |
Detection performance and electrical characteristics
Detection Range | Temperature Difference | Value |
8°C | up to 12m | |
Detection Area | Detection Angle | Value |
Horizontal | 102°(±51°) | |
Vertical | 92°(±46°) | |
Detection Zones | 92 | |
Photorelay Characteristics | Maximum Voltage | Maximum Current |
40V | 2A |
Software Support
We provide a library for the Motion 4 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
Library provides functions for controlling en pin, and getting int pin state.
Key functions:
void motion4_set_en_pin ( uint8_t state )
– Function that sets en pin stateuint8_t motion4_get_int ( void )
– Function that gets int pin state
Examples description
The application is composed of three sections :
- System Initialization – Initialization of pins
- Application Initialization – Maps pins and enables device
- Application Task – Waiting for motion to be detected
void application_task ( ) { uint8_t int_status; int_status = motion4_get_int(); if ( int_status != MOTION4_INTERRUPT_NOT_DETECT ) { mikrobus_logWrite( "Motion detected", _LOG_LINE ); while ( int_status != MOTION4_INTERRUPT_NOT_DETECT ) { int_status = motion4_get_int(); } mikrobus_logWrite( "Motion wait", _LOG_LINE ); } }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- UART
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.