Ambient 21 Click Board
Ambient 21 Click Board
Key Features:
- Low power consumption, corresponds to a dark window because of high sensitivity, close responsivity to the human eye, I2C interface, wide and flexible operational range, stable performance over temperature, and more
- Based on the TSL2591 - light-to-digital converter from ams AG
- Can be used for obtaining ambient light data in applications such as automatic residential and commercial lighting management
- mikroBUS: I2C Interface
Introducing the Ambient 21 Click Board™, the ultimate solution for measuring ambient light levels. Equipped with ams AG's TSL2591, a highly sensitive light-to-digital converter, this compact add-on board accurately transforms light intensity into a digital signal output with a direct I2C interface. With its combination of one broadband photodiode and one infrared-responding photodiode on a single CMOS integrated circuit, the TSL2591 offers a wide operating range of up to 88klx with exceptional responsivity that closely mirrors the human eye's response. Additionally, the TSL2591 features a programmable interrupt function and integrated filter to reduce unwanted IR signals, ensuring superior lux accuracy across various light sources.
Ideal for applications such as automatic residential and commercial lighting management, the Ambient 21 Click Board™ is supported by a mikroSDK-compliant library that simplifies software development. Additionally, the Click board™ comes fully tested and ready to use with a system equipped with the mikroBUS™ socket. Upgrade your ambient light measurement capabilities with the Ambient 21 Click Board™.
How Does The Ambient 21 Click Board™ Work?
The Ambient 21 Click Board™ is based on the TSL2591, a high-sensitivity light-to-digital converter from ams AG. The TSL2591 provides ambient light sensing (ALS) that approximates the human eye response to light intensity under various lighting conditions and through different attenuation materials. It has a flexible and wide operating range of up to 88klx with the highest sensitivity of 188μlx, even when mounted behind dark glass. This sensor comes in a UV-rejection package enabling its operation in IR light environments making this board most suitable for various brightness control functions, helping to reduce power consumption.
The TSL2591 contains two integrating analog-to-digital converters (ADC) that integrate currents from two photodiodes, one broadband photodiode (visible plus infrared) and one infrared-responding photodiode. These ADCs convert the photodiode currents into a digital output representing the irradiance measured on each channel. Ambient 21 Click communicates with MCU using the standard I2C 2-Wire interface to read data and configure settings, supporting Standard Mode operation with a clock frequency of 100kHz and Fast Mode up to 400kHz.
Integration of both channels co-occurs. Upon completion of the conversion cycle, the conversion result is transferred to the appropriate channel data registers. The transfers are double-buffered to ensure that the integrity of the data is maintained. After the transfer, the device automatically begins the next integration cycle. This sensor also supports an interrupt feature, routed to the INT pin on the mikroBUS™ socket, that simplifies and improves system efficiency by eliminating the need to poll a sensor for a light intensity value. The purpose of the interrupt function is to detect a meaningful change in light intensity, where the user can define the concept of a significant change in light intensity and time or persistence. Users can define a threshold above and below the current light level, where an interrupt generates when the conversion value exceeds either of these limits.
The Ambient 21 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. 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 obtaining ambient light data in applications such as automatic residential and commercial lighting management |
On-board modules | TSL2591 - light-to-digital converter from ams AG |
Key Features | Low power consumption, corresponds to a dark window because of high sensitivity, close responsivity to the human eye, I2C interface, wide and flexible operational range, stable performance over temperature, and more |
Interface | I2C |
Compatibility | mikroBUS |
Click board size | S (28.6 x 25.4 mm) |
Input Voltage | 3.3V |
PINOUT DIAGRAM
This table shows how the pinout of the Ambient 21 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 | NC | |
Ground | GND | 8 | GND | GND | 9 | GND | Ground |
ONBOARD SETTINGS AND INDICATORS
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | - | Power LED Indicator |
AMBIENT 21 CLICK ELECTRICAL SPECIFICATIONS
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | - | 3.3 | - | V |
Spectral Range | 0 | - | 88.000 | lx |
Wavelength | 400 | - | 1.000 | nm |
Software Support
We provide a library for the Ambient 21 Click Board™ as well as a demo application (example), developed using MikroE compilers. The demo can run on all the main MikroE development boards.
The package can be downloaded/installed directly from NECTO Studio The package Manager(recommended), downloaded from our LibStock™ or found on MikroE Github account.
Library Description
This library contains API for the Ambient 21 Click Board™ driver.
Key functions
-
ambient21_get_int_pin
This function returns the INT pin logic state. -
ambient21_read_raw_data
This function checks if the data is ready and then reads the raw ADC data from two channels. -
ambient21_measure_light_level
This function reads the raw ADC data from two channels and then measures the light level in lux based on those readings.
Example Description
This example demonstrates the use of the Ambient 21 Click Board™ by measuring the ambient light level in Lux.
void application_task ( void )
{
uint16_t lux;
if ( !ambient21_get_int_pin ( &ambient21 ) )
{
if ( AMBIENT21_OK == ambient21_measure_light_level ( &ambient21, &lux ) )
{
log_printf ( &logger, " Ambient light level [Lux]: %urnn", lux );
}
}
}
The full application code, and ready to use projects can be installed directly from NECTO Studio The 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.Ambient21
Additional Notes and Information
Depending on the development board you are using, you may need USB UART Click Board™, 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
The Ambient 21 Click Board™ is supported with mikroSDK - MikroE 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.
Ambient 21 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.