Tableau de clic Ambient 9
Tableau de clic Ambient 9
Overview
Le tableau de bord Ambient 9 Click Board™ est une carte complémentaire compacte qui contient un détecteur de lumière ambiante et de proximité intégré avec LED IR dans un module optique. Cette carte comprend l'APDS-9160-003, l'ALS numérique et la détection IR, une LED IR et une solution complète de détection de proximité de Broadcom Limited, qui peut être utilisée sous une petite ouverture du couvercle de fenêtre de l'appareil. Elle dispose d'une large plage dynamique, la fonction de détection de proximité fonctionne bien de la lumière du soleil aux pièces sombres, et les fonctions PS et ALS offrent indépendamment une flexibilité maximale dans les applications. La carte Click Board Ambient 9™ est approprié pour la gestion de l'affichage afin de prolonger la durée de vie de la batterie et d'offrir une visualisation optimale dans diverses conditions d'éclairage.
Le tableau de bord Ambient 9 Click Board™ est pris en charge par une bibliothèque compatible mikroSDK, qui comprend des fonctions qui simplifient le développement logiciel. Cette Click Board™ est un produit entièrement testé, prêt à être utilisé sur un système équipé du socket mikroBUS™.
How Does The Ambient 9 Click Board™ Work?
The Ambient 9 Click Board™ is based on the APDS-9160-003, digital proximity, and ambient light sensing sensor from Broadcom Limited. The ambient light sensor provides a photopic response to light intensity in low light conditions or behind a darkened glass. It approximates the response of the human eye providing a direct readout where the output count is proportional to the ambient light level. The proximity detection also operates well from bright sunlight to dark rooms. Additionally, the device can be put into a low-power standby mode providing a very low average power consumption.
In a proximity sensing system, the included IR LED can be pulsed with more than 100 mA of rapidly switching current. The number of LED pulses can be configured by using the pulse step, and the LED modulation frequency can be set from 60 kHz to 100 kHz in 5 steps. Proximity sensing resolution can vary from 8 to 11 bits, and the measurement rate can vary from 6.25 ms to 400 ms. This Click board™ is easy to program and read data because it does not require an overly demanding configuration. In order to read ambient or proximity data, it is only necessary to enable certain registers which can also be seen in an example code that contains easy to use functions that may be used as a reference for further development.
The Ambient 9 Click Board™ communicates with the MCU using the standard I2C 2-wire interface. Standard (100 kHz) and Fast (400 kHz) I2C communication modes are available with the device. The I2C bus lines are routed to the dual bidirectional PCA9306 voltage-level translator from Texas Instruments, which allows interfacing with both 3.3V and 5V MCUs. It also generates flexible ambient and proximity programmable interrupt signals routed on the INT pin of the mikroBUS™, which are triggered if upper or lower threshold values are crossed. It is also possible to deactivate a sensor after a certain interrupt event occurred.
The Ambient 9 Click Board™ is designed to be operated with both 3.3V and 5V logic levels that can be selected via a VCC SEL jumper. This allows for both 3.3V and 5V capable MCUs to use the I2C communication lines properly.
SPECIFICATIONS
Type | Optical |
Applications | Can be used for display management to extend battery life and provide optimum viewing in diverse lighting conditions. |
On-board modules | Ambient 9 Click is based on the APDS-9160-003, digital proximity, and ambient light sensing sensor from Broadcom Limited. |
Key Features | Low power consumption, high precision, programmable interrupt, high sensitivity in low lux condition, and more. |
Interface | I2C |
Compatibility | mikroBUS |
Click board size | S (28.6 x 25.4 mm) |
Input Voltage | 3.3V or 5V |
PINOUT DIAGRAM
This table shows how the pinout on the Ambient 9 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 | I2C Clock | |
NC | 6 | MOSI | SDA | 11 | SDA | I2C Data | |
Power Supply | 3.3V | 7 | 3.3V | 5V | 10 | 5V | Power Supply |
Ground | GND | 8 | GND | GND | 9 | GND | Ground |
ONBOARD SETTINGS AND INDICATORS
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | - | Power LED Indicator |
JP1 | VCC SEL | Left | Power Supply Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
AMBIENT 9 CLICK ELECTRICAL SPECIFICATIONS
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | - | - | 3.63 | V |
Peak Wavelength | - | 940 | - | nm |
Output Resolution | - | 18 | - | bit |
Operating Temperature Range | -40 | - | +85 | °C |
Software Support
We provide a library for the Ambient 9 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
Library provides functions for basic reading and writing to the device. There are some specific functions for enabling sensors and reading data from previously enabled sensors.
Key Functions
void ambient9_enable_data ( uint8_t als_ps )
- Enable one of sensorsuint32_t ambient9_als_data ( void )
- Read ALS datauint16_t ambient9_proxy_data ( void )
- Read proximity data
Example Description
The application is composed of three sections :
- System Initialization - Initialization of I2C communication module, log and interrupt pin
- Application Initialization - Reads device status if it's power on and part ID, then enables one of two sensor reading values.
- Application Task - Read one of two selected sensor values every 100ms.
void application_task ( ) { uint16_t proxy_data; uint32_t als_data; if ( AMBIENT9_ALS == dev_mode ) { als_data = ambient9_als_data( ); LongWordToStr( als_data, demo_txt ); mikrobus_logWrite( " - ALS data: ", _LOG_TEXT ); mikrobus_logWrite( demo_txt, _LOG_LINE ); } else if ( AMBIENT9_PROXY == dev_mode ) { proxy_data = ambient9_proxy_data( ); WordToStr( proxy_data, demo_txt ); mikrobus_logWrite( " - Proximity data: ", _LOG_TEXT ); mikrobus_logWrite( demo_txt, _LOG_LINE ); } Delay_ms( 100 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- I2C
- Conversions
- UART
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 Ambient 9 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 Ambient 9 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
Library provides functions for basic reading and writing to the device. There are some specific functions for enabling sensors and reading data from previously enabled sensors.
Key Functions
void ambient9_enable_data ( uint8_t als_ps )
- Enable one of sensorsuint32_t ambient9_als_data ( void )
- Read ALS datauint16_t ambient9_proxy_data ( void )
- Read proximity data
Example Description
The application is composed of three sections :
- System Initialization - Initialization of I2C communication module, log and interrupt pin
- Application Initialization - Reads device status if it's power on and part ID, then enables one of two sensor reading values.
- Application Task - Read one of two selected sensor values every 100ms.
void application_task ( ) { uint16_t proxy_data; uint32_t als_data; if ( AMBIENT9_ALS == dev_mode ) { als_data = ambient9_als_data( ); LongWordToStr( als_data, demo_txt ); mikrobus_logWrite( " - ALS data: ", _LOG_TEXT ); mikrobus_logWrite( demo_txt, _LOG_LINE ); } else if ( AMBIENT9_PROXY == dev_mode ) { proxy_data = ambient9_proxy_data( ); WordToStr( proxy_data, demo_txt ); mikrobus_logWrite( " - Proximity data: ", _LOG_TEXT ); mikrobus_logWrite( demo_txt, _LOG_LINE ); } Delay_ms( 100 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- I2C
- Conversions
- UART
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 Ambient 9 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.