Proximity 10 Click Board
Proximity 10 Click Board
Overview
The Proximity 10 Click Board™ is a versatile proximity detection device. It can detect a foreign object distanced up to 200cm. The Click Board™ features a detection sensor IC that can trigger a programmable-event interrupt, which makes this Click Board™ capable of detecting even simple gesture movements. The advanced onboard IC sensor features an LED driver section, a light sensor with the integrated analogue front end (AFE), 16 bit analogue to digital converter (ADC), and a digital engine for processing and aggregation of the measurement result, which simplifies the firmware development. The ambient light cancellation includes both digital and optical filtering, resulting in increased detection reliability.
With its high sensitivity and signal to noise ratio, the Proximity 10 Click Board™ is ideally suited for a range of applications that rely on accurate and reliable proximity detection. It can be used for proximity activated surveillance systems, equipment lid closing, object proximity detection, simple gesture activated HID interface, and other similar applications which rely on an accurate object proximity detection.
How Does The Proximity 10 Click Board™ Work?
The main sensor IC on the Proximity 10 Click Board™ is the SI1143, a photometric sensor for the ambient light and proximity detection, from Silicon Labs. Among other sections, this IC contains a LED driver, used to drive an externally connected LED, which provides feedback for the SI1143 sensory sections. Therefore, the LED should be chosen so that its spectrum matches the spectral sensitivity of the on-chip light sensor. For this reason, the Click board™ is equipped with the narrow beam LED from Rohm Semiconductor with its spectral response characteristic peaking at 870nm, which is a perfect choice for this application.
The proximity detection consists of sending a pulse to the LED while measuring the response of the reflected light. Most of the parameters are user configurable, such as the sampling frequency, pulses duration, averaging parameters and more. More in-depth information about the registers can be found in the SI1143 datasheet. Aimed towards the low consumption market, the SI1143 uses a rather low voltage range, between 1.7V and 3.6V. Since the most of the MCUs use 3.3V, the Proximity 10 Click Board™ is designed so that the SI1143 IC is directly interfaced with the mikroBUS™.
The Proximity 10 Click Board™ offers an interrupt output pin that can be used to trigger an interrupt on the host MCU. The SI1143 IC interrupt engine allows several interrupt sources, which can be used to trigger a state change on the INT pin. These sources include proximity detection interrupts (proximity OFF and proximity ON), sample interrupts, and more. The INT pin itself is highly configurable, and when asserted, this pin triggers an MCU interrupt, informing it that the configured interrupt event has occurred. The MCU can then read the desired register output, not having to poll it constantly, which saves both MCU cycles and power. The INT pin is routed via the level shifting IC to the mikroBUS™ INT pin.
As already mentioned, detailed information on the SI1143 IC registers can be found in the datasheet. However, MikroElektronika provides a library that contains functions compatible with the MikroElektronika compilers, which can be used for simplified programming of the Proximity 10 click. The library also contains an example application, which demonstrates its use. This example application can be used as a reference for custom designs.
Specifications
Type | Proximity |
Applications | It can be used for proximity activated surveillance systems, equipment lid closing, object proximity detection, simple gesture activated HID interface, and other similar applications which rely on an accurate object proximity detection. |
On-board modules | SI1143, a photometric sensor for the ambient light and proximity detection, from Silicon Labs. |
Key Features | Accurate proximity detection, Accurate lux measurements with IR correction algorithm, Integrated infrared proximity detector, Integrated ambient light sensor |
Interface | GPIO,I2C |
Compatibility | mikroBUS |
Click board size | M (42.9 x 25.4 mm) |
Input Voltage | 3.3V |
Pinout Diagram
This table shows how the pinout on the Proximity 10 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 output | |
NC | 3 | CS | RX | 14 | NC | ||
NC | 4 | SCK | TX | 13 | NC | ||
NC | 5 | MISO | SCL | 12 | SCL | I2C Clock | |
NC | 6 | MOSI | SDA | 11 | SDA | I2C 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 |
Software Support
We provide a library for the Proximity 10 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
This library allows user to measure proximity between object and sensor. Also the ALS, temperature and VDD measurement can be performed in the same time and on the same way. The entire control of the Proximity 10 Click board can be perfomed by using this library, by writing to the registers, reading from the registers, writing desired parameters, checking the response, interrupt status checking and sending a commands. For more details check documentation.
Key Functions
T_PROXIMITY10_RETVAL proximity10_readBytes( uint8_t regAddr, uint8_t *dataOut, uint8_t nBytes )
- This function reads the desired number od bytes from the registers..T_PROXIMITY10_RETVAL proximity10_writeByte( uint8_t regAddr, uint8_t dataIn )
- This function writes a one byte data to the desired register.T_PROXIMITY10_RETVAL proximity10_send_command( uint8_t _command )
- This function allows user to execute a desired command and checks the response.
Example Description
The application is composed of three sections :
- System Initialization - Initializes peripherals and pins.
- Application Initialization - Initializes I2C serial interface and performs a device wake up, reset and all necessary configurations. The device will wake up and performs a measurements every 10 milliseconds.
- Application Task - (code snippet) - Reads the proximity PS1 data value and sends result to the uart terminal. If measured proximity value is greater than selected proximity threshold value, the interrupt will be generated and the message will be showed on the uart terminal. When interrupt is generated the Sound function will make an alarm sound with determined duration depending on the detected proximity value, how much is object away or close from the sensor.
void applicationTask() { proximity10_readWord( _PROXIMITY10_PS1_DATA_REG, &proximity ); WordToStr( proximity, text ); mikrobus_logWrite( "** Proximity PS1 : ", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_LINE ); int_status = proximity10_check_int_status( _PROXIMITY10_PS1_INT_FLAG, _PROXIMITY10_INT_CLEAR_DIS ); if (int_status == _PROXIMITY10_PS1_INT_FLAG) { mikrobus_logWrite( "** Object is detected **", _LOG_LINE ); alarm_dur = proximity / 100; alarm_dur = alarm_dur + 35; alarm_dur = (float)(alarm_dur * 0.30928); alarm_dur = 180 - alarm_dur; Sound_Play( 1400, alarm_dur ); Delay_ms( 100 ); } else { Delay_ms( 200 ); } mikrobus_logWrite( "**************************************", _LOG_LINE ); }
Additional Functions :
- checkResponse - Sends an error code message to the uart terminal if error code is detected in the response.
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- Conversions
- I2C
- UART
- Sound
Additional Notes and Information
Depending on the development board you are using, you may need a 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
The Proximity 10 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
We provide a library for the Proximity 10 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
This library allows user to measure proximity between object and sensor. Also the ALS, temperature and VDD measurement can be performed in the same time and on the same way. The entire control of the Proximity 10 Click board can be perfomed by using this library, by writing to the registers, reading from the registers, writing desired parameters, checking the response, interrupt status checking and sending a commands. For more details check documentation.
Key Functions
T_PROXIMITY10_RETVAL proximity10_readBytes( uint8_t regAddr, uint8_t *dataOut, uint8_t nBytes )
- This function reads the desired number od bytes from the registers..T_PROXIMITY10_RETVAL proximity10_writeByte( uint8_t regAddr, uint8_t dataIn )
- This function writes a one byte data to the desired register.T_PROXIMITY10_RETVAL proximity10_send_command( uint8_t _command )
- This function allows user to execute a desired command and checks the response.
Example Description
The application is composed of three sections :
- System Initialization - Initializes peripherals and pins.
- Application Initialization - Initializes I2C serial interface and performs a device wake up, reset and all necessary configurations. The device will wake up and performs a measurements every 10 milliseconds.
- Application Task - (code snippet) - Reads the proximity PS1 data value and sends result to the uart terminal. If measured proximity value is greater than selected proximity threshold value, the interrupt will be generated and the message will be showed on the uart terminal. When interrupt is generated the Sound function will make an alarm sound with determined duration depending on the detected proximity value, how much is object away or close from the sensor.
void applicationTask() { proximity10_readWord( _PROXIMITY10_PS1_DATA_REG, &proximity ); WordToStr( proximity, text ); mikrobus_logWrite( "** Proximity PS1 : ", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_LINE ); int_status = proximity10_check_int_status( _PROXIMITY10_PS1_INT_FLAG, _PROXIMITY10_INT_CLEAR_DIS ); if (int_status == _PROXIMITY10_PS1_INT_FLAG) { mikrobus_logWrite( "** Object is detected **", _LOG_LINE ); alarm_dur = proximity / 100; alarm_dur = alarm_dur + 35; alarm_dur = (float)(alarm_dur * 0.30928); alarm_dur = 180 - alarm_dur; Sound_Play( 1400, alarm_dur ); Delay_ms( 100 ); } else { Delay_ms( 200 ); } mikrobus_logWrite( "**************************************", _LOG_LINE ); }
Additional Functions :
- checkResponse - Sends an error code message to the uart terminal if error code is detected in the response.
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- Conversions
- I2C
- UART
- Sound
Additional Notes and Information
Depending on the development board you are using, you may need a 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
The Proximity 10 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.
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.