How does it work?
Ambient 17 Click as its foundation uses the TSL2572, a high sensitivity light-to-digital converter that transforms light intensity into a digital output signal from ams AG. The TSL2572 provides ambient light sensing (ALS) that approximates human eye response to light intensity under various lighting conditions and through a variety of attenuation materials. Accurate ALS measurements result from dual-diode technology and the UV rejection filter incorporated in the package. In addition, the TSL2584TSV can detect a wide range of precise lux measurements up to 60klx, even when mounted behind dark glass. It also has stable performance over a wide temperature range of -30°C to 70°C, suitable for measuring the present ambient light.
Ambient 17 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. It also possesses an additional interrupt signal, routed on the INT pin of the mikroBUS™ socket labeled as INT, indicating when a specific interrupt event occurs, such as detecting a meaningful change in light intensity. An interrupt is generated when the value of an ALS conversion exceeds either an upper or lower threshold. In addition, a programmable interrupt persistence feature allows the user to determine how many consecutive exceeded thresholds are necessary to trigger an interrupt.
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. 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 for adjusting brightness in applications that require power saving and better visibility
On-board modules
TSL2572 – high sensitivity light-to-digital converter that transforms light intensity into a digital output signal 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 operational range, stable performance over temperature, and more
Interface
I2C
Feature
No 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 17 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 17 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Illuminance Measurement Range | 0 | – | 60.000 | lx |
Resolution | – | 16 | – | bits |
Operating Temperature Range | -30 | +25 | +70 | °C |
Software Support
We provide a library for the Ambient 17 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for Ambient 17 Click driver.
Key functions
-
ambient17_get_int_pin
This function returns the INT pin logic state. -
ambient17_set_atime
This function sets the ATIME register for the selected ALS integration time. -
ambient17_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 Ambient 17 Click board™ by measuring the ambient light level in Lux.
void application_task ( void )
{
if ( !ambient17_get_int_pin ( &ambient17 ) )
{
uint16_t lux;
if ( AMBIENT17_OK == ambient17_measure_light_level ( &ambient17, &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 Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.Ambient17
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 MikroElektronika compilers.
mikroSDK
This 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.
For more information about mikroSDK, visit the official page.