MIKROE-1988
24 g
Status:
Color 2 Click is a compact add-on board providing an accurate color-sensing solution. This board features the ISL29125, an RGB color light sensor from Renesas. The ISL29125 detects red, green, and blue in various lighting conditions, outputting 16-bit resolution data in a measuring range from 0.152 lux to 10,000 lux. Both the range and output resolution are selectable through an I2C interface. The sensor also incorporates an IR blocking filter, allowing this Click board™ to operate even under a dark glass cover. This Click board™ is suitable for industrial and commercial lighting management, display color balancing, ambient light color detection/correction, and many more.
Color 2 Click is supported by a mikroSDK compliant library, which includes functions that simplify software development. This Click board™ comes as a fully tested product, ready to be used on a system equipped with the mikroBUS™ socket.
This product is no longer in stock
Availability date:
Color 2 Click is based on the ISL29125, a low power, high sensitivity, red, green, and blue color light sensor (RGB) with a compatible I2C interface from Renesas. The ISL29125’s state-of-the-art photodiode array provides an accurate RGB spectral response and excellent light source to light source variation, designed to reject IR in light sources allowing the device to operate in environments from sunlight to dark rooms. It detects red, green, and blue in various lighting conditions, outputting high-resolution data in a measuring range from 0.152 lux to 10,000 lux. Both the range and output resolution are selectable through an I2C interface.
After light is converted to the current during the light-to-signal process, the current output is converted to a digital count by an on-chip analog-to-digital converter with an integrating architecture. The ADC converter resolution is selectable from 12 or 16 bits, with its conversion time inversely proportional to the ADC resolution. The ADC also provides two programmable ranges to accommodate different lighting conditions dynamically. For dim conditions, the ADC can be configured at its high sensitivity (low optical) range, while for bright conditions, it can be configured at its low sensitivity (higher optical) range. The ISL29125 also incorporates an IR blocking filter, allowing this Click board™ to operate even under a dark glass cover.
This Click board™ communicates with MCU using the standard I2C 2-Wire interface to read data and configure settings, supporting a Fast Mode operation up to 400kHz. Besides, it also possesses an interrupt feature, routed to the INT pin of the mikroBUS™ socket, which serves as an alarm or monitoring function to determine whether the ambient light level exceeds the upper threshold or goes below the lower threshold. The user can also configure the persistency of the interrupt pin, which reduces the possibility of false triggers, such as noise or sudden spikes in ambient light conditions.
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.
Type | Optical |
Applications | Can be used for industrial and commercial lighting management, display color balancing, ambient light color detection/correction, and more |
On-board modules | ISL29125 - red, green, and blue color light sensor (RGB) from Renesas |
Key Features | Low power consumption, selectable operational range, I2C interface, high resolution, high performance, programmable interrupt windows, two optical sensitivity ranges, excellent light source to light source variation, IR blocking filter, and more |
Interface | I2C |
Feature | No ClickID |
Compatibility | mikroBUS™ |
Click board size | S (28.6 x 25.4 mm) |
Input Voltage | 3.3V |
This table shows how the pinout on Color 2 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | - | Power LED Indicator |
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | - | 3.3 | - | V |
Spectral Range | 0.152 | - | 10.000 | lux |
Peak Wavelength (R/G/B) | 620/565/485 | nm | ||
ADC Resolution | - | - | 16 | bits |
We provide a library for the Color 2 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 Color 2 Click driver.
Key functions
Function read blue color data from ISL29125
Function read byte of data from register address of ISL29125
Function write byte of data to ISL29125
Example Description
Example demonstrates use of Color 2 click.
void application_task ( void )
{
// Task implementation.
uint16_t value_red_color;
uint16_t value_green_color;
uint16_t value_blue_color;
uint8_t is_color;
float color_value;
color_value = color2_get_color_value( &color2 );
is_color = color2_get_color( color_value );
value_green_color = color2_read_green( &color2 );
value_red_color = color2_read_red( &color2 );
value_blue_color = color2_read_blue( &color2 );
switch(is_color)
{
case 1:
{
log_printf( &logger, " *** ORANGE ***");
break;
}
case 2:
{
log_printf( &logger, " *** RED ***");
break;
}
case 3:
{
log_printf( &logger, " *** PINK ***");
break;
}
case 4:
{
log_printf( &logger, " *** PURPLE ***");
break;
}
case 5:
{
log_printf( &logger, " *** BLUE ***");
break;
}
case 6:
{
log_printf( &logger, " *** CYAN ***");
break;
}
case 7:
{
log_printf( &logger, " *** GREEN ***");
break;
}
case 8:
{
log_printf( &logger, " *** YELLOW ***");
break;
}
default:
{
break;
}
}
log_printf( &logger, "----------------------");
log_printf( &logger, " Red value : %d", value_red_color);
log_printf( &logger, " Green value : %d", value_green_color);
log_printf( &logger, " Blue value : %d", value_blue_color);
log_printf( &logger, "----------------------");
Delay_1sec();
Delay_1sec();
Delay_1sec();
}
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:
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.
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.
NOTE: Please be advised that any peripheral devices or accessories shown connected to the Click board™ are not included in the package. Check their availability in our shop or in the YMAN section below.