Tableau à cliquer couleur 9
Tableau à cliquer couleur 9
Le Color 9 Click Board™ est un capteur de couleur Click Board™ très précis qui comprend le capteur APDS-9250, IR et de lumière ambiante de Broadcom. Il contient une matrice spécialement conçue d'éléments photosensibles, qui peuvent détecter les composants rouges, verts, bleus et IR. Quatre ADC 18 bits à faible bruit garantissent une plage dynamique élevée, ce qui rend ce capteur adapté à une utilisation derrière un verre foncé.
Ce capteur offre une interface I2C rapide pour la communication avec le microcontrôleur hôte. Il est parfait pour détecter les changements de lumière subtils, car il est équipé non seulement du capteur rouge, vert et bleu (RVB) mais également du capteur infrarouge, permettant une mesure très précise des changements de lumière les plus subtils.
The great precision of color measuring is achieved with features such as the IR blocking filter which reduces the influence of the IR light to non-IR sensing elements, a dedicated IR photosensor, 50/60 Hz noise rejection algorithm, three independent up to 18-bit A/D converters, and very high color sensitivity with the programmable integrator and gain amplifier.In addition to high accuracy and sensitivity, this color sensor also offers a programmable interrupt pin, which can be used to trigger an interrupt on the host MCU. This allows a more efficient controller firmware to be written. Features, such as the high dynamic range, programmable gain and integration time, a very high sensitivity, a flexible interrupt engine, and more, make it a very convenient solution for LED lighting color management, TFT display color correction, display color correction on mobile devices, and other similar applications that require an accurate color sensing.
How Does The Color 9 Click Board™ Work?
The Color 9 Click Board™ utilizes the APDS-9250, an integrated color sensor IC, made by Broadcom. This highly advanced four-channel color sensing device incorporates an IR blocking filter, that is used to block a portion of light in the IR spectrum, which can interfere with the readings of three independent photo-diodes, used to sense red, green and blue components of the light. However, it features an additional IR photo-sensing element, which is used to detect the intensity in the IR range. The IR measurement value can be used as a compensation parameter for the accurate color calculation.
The color intensity sensing is roughly matched to the sensitivity of the human eye, so the sensor is the most sensitive in the range between 500nm and 600nm. The datasheet of the APDS-9250 offers an intensity over the wavelength diagram, so an accurate color calculation can be made in respect to the variable sensitivity of the sensor over the light wavelength.
There are four independent A/D converters which are used to digitize the color intensity in 18-bit resolution. The color and IR conversion results are available at the output registers in MSB/LSB format. Color 9 click communicates with the host MCU over the I2C interface, with its pin routed to the appropriate SCL and SDA pins of the mikroBUS™.
The powerful interrupt engine allows more optimized firmware for the controller (MCU) to be written. The interrupt engine allows 16-bit values for the upper and lower threshold levels to be defined, as well as the persistence interval during which the event has occurred, before the interrupt is triggered, and more. Also, the user has the possibility to select which channel is included in the interrupt event detection. The APDS-9250 requires a very low number of external components. It requires only pull-up resistors for the I2C bus lines and the INT pin, which is an open-drain interrupt line.
To allow for the best performance and most accurate measurements, the surface of the board and especially the sensor IC itself, should always stay clean and without scratches, as dirt and moisture can alter the light penetration through the filters. In addition, the manufacturer recommends that the angle of incidence stays less than 10° since the sensor IC has an aperture angle (beam width) of nearly 90°. If the angle of incidence is greater than advised, the filter shifting might occur, introducing distortion and affecting the measurement results. The spectral filters of this sensor are specialized for working with the broadband source of light, and measurement of the narrowband light sources should not be performed by this sensor.
The Color 9 Click Board™ is designed to work with 3.3V only. When using it with MCUs that use 5V levels for their communication, a proper level translation circuit should be used.
SPECIFICATIONS
Type | Color Sensing,Optical |
Applications | This Click board™ is an ideal solution for LED lighting color management, ambient light sensing for display backlight control, TFT display color control, and other similar applications that require an accurate color and ambient light sensing |
On-board modules | APDS-9250, an integrated color sensor IC, made by Broadcom. |
Key Features | High dynamic range, high sensitivity, IRCUT filter reduces influence of the IR spectrum, a dedicated IR photo-diode, powerful interrupt engine, sensitive to IR spectrum, programmable gain and integration time, low number of external components required |
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 Color 9 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 |
COLOR 9 CLICK ELECTRICAL SPECIFICATIONS
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
ADC Resolution | 13 | - | 18 | bit |
ADC Integration Time | 2.97 | 3.125 | 3.28 | ms |
Dark Count | 0 | - | 3 | Counts |
Software Support
We provide a library for the Color 9 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
Library contains generic functions that will allow a user to easily get started with the click board.
Key Functions
uint32_t color9_getGreen()
- Return the value of the green color mesurement.uint32_t color9_getBlue()
- Return the value of the blue color mesurement.uint32_t color9_getRed()
- Return the value of the red color mesurement.
Example Description
The application is composed of three sections :
- System Initialization - Initialize GPIO, I2C and LOG structures.
- Application Initialization - Initialize the driver and test if the sensor is present. If the ID read from the sensor is correct execute the initialization procedure./li>
- Application Task - Wait for the color data to be available then read the data and send it to the serial port.
void applicationTask() { char txt[20]; uint8_t convComplete; uint32_t measurementData; convComplete = color9_gStatusreg(); if( convComplete & 0x08 ) { convComplete = 0; mikrobus_logWrite("Ir: ",_LOG_TEXT); measurementData=color9_getIr(); LongToStr(measurementData,txt); Ltrim(txt); mikrobus_logWrite(txt,_LOG_LINE); mikrobus_logWrite("Green: ",_LOG_TEXT); measurementData=color9_getGreen(); LongToStr(measurementData,txt); Ltrim(txt); mikrobus_logWrite(txt,_LOG_LINE); mikrobus_logWrite("Blue: ",_LOG_TEXT); measurementData=color9_getBlue(); LongToStr(measurementData,txt); Ltrim(txt); mikrobus_logWrite(txt,_LOG_LINE); mikrobus_logWrite("Red: ",_LOG_TEXT); measurementData=color9_getRed(); LongToStr(measurementData,txt); Ltrim(txt); mikrobus_logWrite(txt,_LOG_LINE); mikrobus_logWrite("--",_LOG_LINE); } }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- UART Library
- I2C Library
- Conversions Library
- C_String Library
Additional Notes and Information
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. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
MIKROSDK
The Color 9 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.
Software Support
We provide a library for the Color 9 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
Library contains generic functions that will allow a user to easily get started with the click board.
Key Functions
uint32_t color9_getGreen()
- Return the value of the green color mesurement.uint32_t color9_getBlue()
- Return the value of the blue color mesurement.uint32_t color9_getRed()
- Return the value of the red color mesurement.
Example Description
The application is composed of three sections :
- System Initialization - Initialize GPIO, I2C and LOG structures.
- Application Initialization - Initialize the driver and test if the sensor is present. If the ID read from the sensor is correct execute the initialization procedure./li>
- Application Task - Wait for the color data to be available then read the data and send it to the serial port.
void applicationTask() { char txt[20]; uint8_t convComplete; uint32_t measurementData; convComplete = color9_gStatusreg(); if( convComplete & 0x08 ) { convComplete = 0; mikrobus_logWrite("Ir: ",_LOG_TEXT); measurementData=color9_getIr(); LongToStr(measurementData,txt); Ltrim(txt); mikrobus_logWrite(txt,_LOG_LINE); mikrobus_logWrite("Green: ",_LOG_TEXT); measurementData=color9_getGreen(); LongToStr(measurementData,txt); Ltrim(txt); mikrobus_logWrite(txt,_LOG_LINE); mikrobus_logWrite("Blue: ",_LOG_TEXT); measurementData=color9_getBlue(); LongToStr(measurementData,txt); Ltrim(txt); mikrobus_logWrite(txt,_LOG_LINE); mikrobus_logWrite("Red: ",_LOG_TEXT); measurementData=color9_getRed(); LongToStr(measurementData,txt); Ltrim(txt); mikrobus_logWrite(txt,_LOG_LINE); mikrobus_logWrite("--",_LOG_LINE); } }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- UART Library
- I2C Library
- Conversions Library
- C_String Library
Additional Notes and Information
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. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
MIKROSDK
The Color 9 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.
Tableau à cliquer couleur 9
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.