How does it work?
Ambient 25 Click is based on the TSL2522, an ambient light sensor with light flicker detection from ams OSRAM. The sensor combines two concurrent ambient light sensing channels with programmable multiplexer selection of photodiodes, enabling flexible measurements across both photopic and infrared ranges. The architecture integrates photopic photodiodes with a peak wavelength of 560nm and infrared photodiodes with a peak wavelength of 880nm, ensuring accurate irradiance calculation under various light sources. This allows precise brightness measurement that supports display appearance optimization and enhanced camera image correction, regardless of indoor or outdoor conditions.
.jpg)
In parallel, the TSL2522 incorporates a light flicker detection engine that uses the same photodiodes to sample and buffer data, enabling external host to determine flicker frequencies for improved system performance. Its invisible ALS sensing operates reliably under any glass type, while high configurability provides outstanding sensitivity with programmable gain, adjustable integration time, and a dynamic range of up to 4096x by gain adjustment alone.
With detection capabilities as low as 1mlux, a photopic filter for the visible channel, and an independent IR channel, the TSL2522 ensures versatile ambient light detection well-suited for a wide range of applications, including indoor and outdoor brightness information gathering, brightness management for displays, and camera assistance features.
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 sensor/IC/module area to become movable by breaking the PCB, opening up many new possibilities for implementation. Thanks to the Snap feature, the TSL2522 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™ uses an I2C interface with clock speeds of up to 1MHz, ensuring fast communication with the host MCU. The TSL2522 does not require a specific Power-Up sequence but requires a voltage of 1.8V for its interface and logic part to work correctly. Therefore, a small regulating LDO, the BH18PB1WHFV, provides a 1.8V out of 3.3V mikroBUS™ power rail. The Ambient 25 Click uses an EN pin used to control the power supply of the LDO, the BH18PB1WHFV. This setup allows power management by enabling or disabling the supply of the sensor as needed, making it especially useful for low-power and battery-operated applications.
In addition to the I2C interface pins, the board also provides interrupt-driven detect/release events through the INT pin on the mikroBUS™ socket. These interrupts are triggered when proximity results exceed or fall below user-configured threshold levels. The SYC pin on the mikroBUS™ socket serves a dual-purpose function. It can be used as a synchronization input, allowing the sensor to align its measurements with external events or signals, ensuring accurate timing and coordination in applications that require precise synchronization. Alternatively, it can also function as a general-purpose open-drain input/output pin, providing additional flexibility for various control or signaling tasks, depending on the application's specific requirements.
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 indoor and outdoor brightness measurement, display brightness management, and camera assistance applications |
On-board modules |
TSL2522 - highly-sensitive ambient light sensor with light flicker detection from ams OSRAM |
Key Features |
High sensitivity ambient light sensing with detection down to 1mlux, dual concurrent photopic and infrared sensing channels, programmable gain and adjustable integration time, invisible ALS operation under any glass type, integrated light flicker detection engine, I2C communication, dual-purpose pin for synchronization or GPIO functionality, Click Snap format, 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 25 Click 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 |
SYC |
Synchronization / GPIO |
Device Enable |
EN |
2 |
RST |
INT |
15 |
INT |
Interrupt |
ID COMM |
CS |
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 |
Ambient 25 Click electrical specifications
Description |
Min |
Typ |
Max |
Unit |
---|
Supply Voltage |
- |
3.3 |
- |
V |
Photopic peak wavelength |
- |
560 |
- |
nm |
IR peak wavelength |
- |
880 |
- |
nm |
Detectable illuminance |
1 |
- |
- |
mlux |
Software Support
Ambient 25 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 Ambient 25 Click by reading and displaying the values from two modulator channels.
Key Functions
ambient25_cfg_setup
This function initializes Click configuration structure to initial values.
ambient25_init
This function initializes all necessary pins and peripherals used for this Click board.
ambient25_default_cfg
This function executes a default configuration of Ambient 25 Click board.
ambient25_get_int_pin
This function returns the INT pin logic state.
ambient25_read_data
This function checks if the als measurement data are ready for all channels and reads them.
Application Init
Initializes the driver and performs the Click default configuration which sets the ALS gain level to 32x and 4x for modulators 0 and 1.
Application Task
Waits for a data ready interrupt then reads data from two modulator channels and displays the results on the USB UART every 200ms approximately.
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.