How does it work?
Ambient 24 Click is based on the VEML4031X00, a high-resolution 16-bit digital ambient light sensor from Vishay Semiconductor, designed to accurately measure ambient light levels, offering a highly precise solution for a wide range of light-sensitive applications. This sensor integrates a high-sensitivity photodiode, a low-noise amplifier, and an advanced 16-bit analog-to-digital converter, ensuring reliable light intensity detection across varying environmental conditions. The easy integration and digital output of the sensor simplify the use of this Click board™ in modern embedded designs, making it an excellent choice for developers aiming to enhance user experience through responsive and adaptive lighting control.
The VEML4031X00 communicates with the host microcontroller via an I2C interface, supporting clock speeds of up to 400kHz and using a fixed 7-bit slave address of 0x29. It delivers an exceptionally wide ambient light detection range from 0 to 172,000 lux, with a fine resolution of just 0.0026 lux, enabling subtle changes in lighting to be captured with high fidelity. This makes Ambient 24 Click an ideal solution for systems that demand intelligent light management, such as automatic display brightness adjustment, infotainment brightness control, dimming of rear-view mirrors, ambient lighting regulation within vehicles, and head-up display optimization.
This Click board™ is designed in a unique format supporting the newly introduced MIKROE feature called “Click Snap.” Unlike the standardized version of Click boards, this feature allows the main module area to become movable by breaking the PCB, opening up many new possibilities for implementation. Thanks to the Snap feature, the VEML4031X00 can operate autonomously by accessing its signals directly on the pins marked 1-8. Additionally, the Snap part includes a specified and fixed screw hole position, enabling users to secure the Snap board in their desired location.
This Click board™ can be operated only with a 3.3V logic voltage level. The board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. It also comes equipped with a library containing functions and example code that can be used as a reference for further development.
Click Snap
Click Snap is an innovative feature of our standardized Click add-on boards, designed to bring greater flexibility and optimize your prototypes. By simply snapping the PCB along predefined lines, you can easily detach the main sensor/IC/module area, reducing the overall size, weight, and power consumption – ideal for the final phase of prototyping. For more details about Click Snap, visit the official page dedicated to this feature.
Specifications
Type
Ambient Light,Optical
Applications
Ideal for intelligent lighting management in applications such as display brightness control, infotainment systems, rear-view mirror dimming, interior illumination regulation, and head-up displays
On-board modules
VEML4031X00 – digital ambient light sensor from Vishay Semiconductor
Key Features
High-resolution, integrated high-sensitivity photodiode, low-noise amplifier, advanced A/D converter, wide detection range from low to high lux levels, ultra-fine light resolution, I2C communication interface, Click Snap, and more
Interface
I2C
Feature
Click Snap,ClickID
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 Ambient 24 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 |
Ambient 24 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Range | 0 | – | 172 | klx |
Resolution | – | 0.0026 | – | lx |
Software Support
Ambient 24 Click demo application is developed using the NECTO Studio, ensuring compatibility with mikroSDK‘s open-source libraries and tools. Designed for plug-and-play implementation and testing, the demo is fully compatible with all development, starter, and mikromedia boards featuring a mikroBUS™ socket.
Example Description
This example demonstrates the use of the Ambient 24 Click board, which measures ambient light and infrared (IR) intensity. The application initializes the device and continuously reads ALS and IR data, displaying the results via UART logging.
Key Functions
ambient24_cfg_setup
This function initializes Click configuration structure to initial values.ambient24_init
This function initializes all necessary pins and peripherals used for this Click board.ambient24_default_cfg
This function executes a default configuration of Ambient 24 Click board.ambient24_get_data
This function reads the raw IR data and ambient light intensity in lux based on raw ALS data.
Application Init
Initializes the logger and configures the Ambient 24 Click board. It establishes I2C communication and applies the default configuration settings.
Application Task
Continuously reads ambient light and infrared sensor data and logs the results in lux and raw IR values, respectively. The readings are updated every 200ms.
Application Output
This Click board can be interfaced and monitored in two ways:
- Application Output – Use the “Application Output” window in Debug mode for real-time data monitoring. Set it up properly by following this tutorial.
- UART Terminal – Monitor data via the UART Terminal using a USB to UART converter. For detailed instructions, check out this tutorial.
Additional Notes and Information
The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.