OFF
MIKROE-2220
16 g
Status:
Color 4 Click is a compact add-on board providing an accurate color-sensing solution. This board features the VEML6040 from Vishay Semiconductors, a 16-bit RGBW color sensor offering spectral response through a compatible I2C interface. The VEML6040 is based on the Filtron™ technology and achieves the closest ambient light spectral sensitivity to real-human eye responses. Alongside the color sensor, this IC also incorporates a signal conditioning circuit consisting of photodiodes, amplifiers, and A/D circuits placed into a single CMOS chip. It provides a selectable measurement range up to 16.496lx with the highest sensitivity of 0.007865lx/step. This Click board™ is suitable for color sensing with maximum flexibility in industrial, mechanical, and consumer applications.
Color 4 Click is fully compatible with the mikroBUS™ socket and can be used on any host system supporting the mikroBUS™ standard. It comes with the mikroSDK open-source libraries, offering unparalleled flexibility for evaluation and customization. What sets this Click board™ apart is the groundbreaking ClickID feature, enabling your host system to seamlessly and automatically detect and identify this add-on board.
This product is no longer in stock
Availability date:
Color 4 Click is based on the VEML6040, an advanced RGB/ambient light sensor from Vishay Semiconductors, that provides fast and accurate spectral measurements. It is based on the Filtron™ technology achieving the closest ambient light spectral sensitivity to real-human eye responses. The VEML6040 senses red, green, blue, and white light and processes those signals using a CMOS signal conditioning circuit. This digital RGBW information can be used in feedback control systems, among other things, to monitor and actively control a light source.
This Click board™ detects light intensity under multiple lighting conditions and through different attenuation materials, including dark glass. The VEML6040 provides a selectable measurement range from 515.4lx up to 16.496lx with the highest sensitivity of 0.007865lx/step. Its peak sensitivities for red, green, and blue are 645nm, 575nm, and 460nm, respectively. Moreover, it provides excellent temperature compensation, keeping the output stable under changing temperatures.
Color 4 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. The VEML6040 contains one configuration register (00h) used for operation control and parameter setup. Its measurement results are stored in four separate registers, each for red, green, blue, and white, with addresses from 08h to 0Bh, respectively. All registers are 16-bit wide.
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
Color Sensing
Applications
Can be used for industrial, mechanical, and consumer applications
On-board modules
VEML6040 - advanced RGB/ambient light sensor from Vishay Semiconductors
Key Features
Integrated RGBW and signal conditioning, Filtron™ technology provides real-human eye responses, supports low transmittance (dark) lens, high resolution, selectable detection range, high sensitivity, I2C interface, and more
Interface
I2C
Feature
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 4 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 Response | 515.4 | - | 16.496 | lx |
Sensitivity | - | 0.007865 | - | lx/step |
Peak Wavelength (R/G/B) | - | 645/575/460 | - | nm |
Resolution | - | 16 | - | bit |
We provide a library for the Color 4 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 Color 4 Click driver.
Key functions
color4_set_config
Color 4 set configuration function.
color4_get_color_data
Color 4 get color data function.
color4_get_ambient_light
Color 4 get ambient light level function.
Example Description
This library contains API for the Color 4 Click driver. This driver provides the functions for the sensor configuration and for reading RGBW and ambient light data from device. This example displays RGBW data, Ambient light level, CCT data and the light color names.
void application_task ( void )
{
if ( COLOR4_OK == color4_get_color_data( &color4, COLOR4_RED, &red_data ) )
{
log_printf( &logger, " Red: %urn", red_data );
}
if ( COLOR4_OK == color4_get_color_data( &color4, COLOR4_GREEN, &green_data ) )
{
log_printf( &logger, " Green: %urn", green_data );
}
if ( COLOR4_OK == color4_get_color_data( &color4, COLOR4_BLUE, &blue_data ) )
{
log_printf( &logger, " Blue: %urn", blue_data );
}
if ( COLOR4_OK == color4_get_color_data( &color4, COLOR4_WHITE, &white_data ) )
{
log_printf( &logger, " White: %urn", white_data );
}
log_printf( &logger, " - - - - - - - - - - - rn" );
if ( COLOR4_OK == color4_get_ambient_light( &color4, &ambient_light ) )
{
log_printf( &logger, " ALS lux level: %.2frn", ambient_light );
}
if ( COLOR4_OK == color4_get_cct( &color4, &cct ) )
{
log_printf( &logger, " CCT: %.2frn", cct );
}
log_printf( &logger, " - - - - - - - - - - - rn" );
display_color();
log_printf( &logger, " ----------------------rn" );
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:
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.
This Click board™ is supported by a mikroSDK - Mikroe Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from 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.