How does it work?
Ambient 23 Click is based on the VEML3235SL, a high-accuracy light-to-digital converter from Vishay Semiconductors that transforms light intensity into a digital output signal. The VEML3235SL includes a highly sensitive photodiode, low noise amplifier, and 16-bit A/D converter and supports an easy-to-use serial communication interface. The ambient light read-out is available as a digital value, and the built-in photodiode response is near the human eye’s. The 16-bit dynamic range for ambient light detection is from 0.0021 to 17.867lx, with resolution down to 0.0021lx/counts. The sensor’s remarkable sensitivity of 0.0021lx enables it to operate even when placed behind dark cover glass that significantly blocks light. Still, it can also function behind transparent cover glass, as it can handle high illumination levels up to approximately 18klx without saturation.
This Click board™ communicates with the host MCU using the standard I2C 2-Wire interface supporting Standard Mode operation with a clock frequency of 100kHz and Fast Mode up to 400kHz. All operations are controlled by the command register, allowing users to easily program the operation setting and latch the light data from VEML3235SL. In addition to its outstanding temperature compensation capabilities, the VEML3235SL also offers the added benefit of software shutdown mode control, allowing for random measurements, such as once per second, during which the sensor can be switched to shutdown mode to minimize power consumption.
This Click board™ can only be operated with a 3.3V logic voltage level. The board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. However, the Click board™ comes equipped with a library containing functions and an example code that can be used as a reference for further development.
Specifications
Type
Optical
Applications
Can be used for various applications, including handheld and consumer gadgets, industrial and medical equipment, computing systems, and more
On-board modules
VEML3235SL – ambient light sensor from Vishay Semiconductors
Key Features
Low power consumption, high sensitivity, high accuracy, I2C interface, excellent temperature compensation, high dynamic detection resolution, software shutdown mode control, and more
Interface
I2C
Feature
ClickID
Compatibility
mikroBUS™
Click board size
S (28.6 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on Ambient 23 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 23 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Ambient Light Range | 0.0021 | – | 17.867 | lx |
Peak Wavelength | – | 550 | – | nm |
Ambient Light Resolution | – | 0.0021 | – | lx/cnt |
Data Resolution | – | 16 | – | bit |
Software Support
We provide a library for the Ambient 23 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 Ambient 23 Click driver.
Key functions
-
ambient23_reg_read
Ambient 23 register reading function. -
ambient23_calculate_res
Ambient 23 get conversion data function. -
ambient23_read_light_data
Ambient 23 get light data function.
Example Description
This example demonstrates the use of Ambient 23 Click board™ by measuring the ambient light level in Lux.
void application_task ( void )
{
float data_tmp;
ambient23_read_light_data( &ambient23, &data_tmp );
log_printf( &logger, "Data: %.2f luxrn", data_tmp );
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.Ambient23
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, that needs to be downloaded from the LibStock and installed for the compiler you are using to ensure proper operation of mikroSDK compliant Click board™ demo applications.
For more information about mikroSDK, visit the official page.