Spectral Click Board
Spectral Click Board
Overview
The Spectral Click Board™ is a multi-spectral light sensing device, which uses the state-of-the-art sensor IC for a very accurate chromatic white colour sensing. Spectral Click Board™ provides a direct reading of the XYZ colour coordinates, consistent with the CIE 1931 2' Standard Observer colour coordinates. It provides mapping of the XYZ coordinates to the x, y (Y) coordinates of the two-dimensional colour gamut, and it scales them to the CIE 1976 u'v' coordinate system. This Click Board™ also provides accurate Correlated colour Temperature (CCT) measurements and colour point deviation from the black body curve for white light colour, in u'v' coordinate system. Additionally, the Spectral Click Board™ features the Near-IR (NIR) wavelengths sensing channel, as well as two programmable LED channels with a constant current.
The Spectral Click Board™ is a multispectral light sensing device, which uses the state-of-the-art sensor IC for a very accurate chromatic white color sensing. The Spectral Click Board™ provides a direct reading of the XYZ color coordinates, consistent with the CIE 1931 2° Standard Observer color coordinates. It provides the mapping of the XYZ coordinates to the x, y (Y) coordinates of the two-dimensional color gamut, and it scales them to the CIE 1976 u'v' coordinate system. This click board also provides accurate Correlated Color Temperature (CCT) measurements and color point deviation from the black body curve for white light color, in u'v' coordinate system. Additionally, the Spectral Click Board™ features the Near-IR (NIR) wavelengths sensing channel, as well as two programmable LED channels with a constant current.
The onboard sensor has minimal drift over time and with temperature, which makes it very reliable, even after long periods of time. The integrated temperature sensor compensates for all the thermal influences from the environment. Equipped with such an advanced multispectral sensor IC, the Spectral Click Board™ can be used in various applications used for color measurement, color matching, identification, tuning, calibration. Essentially - for all the professional grade applications that require a high degree of color recognition accuracy, especially for the white light coloration sensing, with a great accuracy and consistency.
How Does The Spectral Click Board™ Work?
The multispectral sensor IC used on the Spectral Click Board™ is the AS7261, an XYZ chromatic white color sensor + NIR with electronic shutter and smart interface. This is a very advanced multispectral sensor, which integrates a 6 photodiodes array element. Every photo element is filtered through the Gaussian filters, implemented through the nano-optic deposited interference filter technology, designed to meet the X, Y, Z standard observer filter characteristics, compliant with the CIE 1931 standard. This technology ensures minimal drift of the color readings and the temperature stability. It should be noted that the filter accuracy will be affected by the angle of incidence, determined by an integrated aperture and the internal microlenses, which is ±20.5° for the AS7261 IC.
The measurements from the photo elements are digitized by the 16bit ADC converter and processed by the Cognitive Light Engine (CLE). Besides the raw X, Y and Z values, the CLE calculates all the calibrated and mapped values available on this device. After the specified integration time, those values are available in their respective registers and are accessible via the smart high-level UART interface driven by simple AT commands, or the I2C communication protocol bus. Even the temperature sensor can be accessed via its register. A complete list of all the available color coordinates and the registers which hold these values can be found in the AS7261 datasheet.
The sensor data is organized in two banks. The first bank contains readings from the X, Y, Z and NIR photodiodes, while the second bank contains readings from the X, Y, Z photodiodes, as well as D (dark), and C (clear) photodiodes. Different modes allow readings to be made from each bank, as well as the combinations between these two banks. There is also a mode for one-shot reading when time-critical or triggered measurement needs to be made.
An interrupt can be triggered when the data is ready for reading, depending on the selected bank mode. If the interrupt is enabled (INT = 1), the INT line is pulled to a LOW logic level and DATA_RDY bit of the control register is set to 1. The INT line is released when the control register has been read. The DATA_RDY bit will be cleared whenever the measurement registers are read. An interrupt will be generated after one or more integrating cycles are completed, depending on the selected bank mode. The INT line of the AS7261 is routed to the mikroBUS™ INT pin and can be used to trigger an interrupt on the host MCU. More about bank reading modes and the interrupts can be found in the provided AS7261 datasheet.
The RESET line of the sensor is routed to the mikroBUS™ RST pin. If this line is pulled to a LOW level for more than 100ms, it will reset the device.
The sensor firmware is kept externally, on the auxiliary flash memory IC. The AT25SF041, an SPI serial flash memory is used for storing the firmware of the AS7261 sensor. The AT25SF041 IC communicates with the sensor via the SPI lines, internally routed on the Spectral click itself.
UART and I2C lines of the AS7261 sensor are routed to the mikroBUS™ respective UART pins (RX/TX and SDA/SCL). To select which interface will be used to drive the sensor IC, three onboard SMD jumpers labelled as COM SEL need to be moved either to the left position (to enable UART) or to the right position (to enable I2C). It should be noted that all the SMD jumpers need to be moved at once - if some of them are set as UART and some as I2C, the communication might not be possible at all.
There are two integrated programmable LED drivers on the AS7261 sensor. The first LED constant current driver can be programmed up to 10mA and it can be used as the status indicator. It is also activated during the sensor firmware programming. The second LED driver is intended for driving of the light source for the measurement surface illumination. It can drive high brightness LED with up to 100mA. Both of these LED drivers are available through the communication interfaces.
SPECIFICATIONS
Type | Optical |
Applications | Color measurement and absorbance, color matching and identification, precision color tuning/calibration, all the professional grade applications that require a high degree of color recognition accuracy, especially for the white light coloration sensing |
On-board modules | AS7261, a XYZ chromatic white color and NIR sensor, with electronic shutter and smart interface from ams; AT25SF041, a 4Mb SPI serial flash from Adesto Technologies |
Key Features | Tri-stimulus XYZ sensing, realized by the proprietary silicon interference filters, lifetime-calibrated sensing with no drift over time or temperature, on-chip data processing, auxiliary illumination LED drivers, smart UART interface |
Interface | I2C,UART |
Compatibility | mikroBUS |
Click board size | L (57.15 x 25.4 mm) |
Input Voltage | 3.3V |
PINOUT DIAGRAM
This table shows how the pinout of the Spectral 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 | ||
Reset | RST | 2 | RST | INT | 15 | INT | Interrupt |
NC | 3 | CS | RX | 14 | TX | UART transmit | |
NC | 4 | SCK | TX | 13 | RX | UART receive | |
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 |
LD2 | IND | - | Programmable constant current LED indicator |
LD3 | DRV | - | Programmable constant current LED illuminator |
JP1 | COM.SELL. | Left | Communication Interface Selection I2C/UART, left position UART, right position I2C |
JP2 | COM.SELL. | Left | Communication Interface Selection I2C/UART, left position UART, right position I2C |
JP3 | COM.SELL. | Left | Communication Interface Selection I2C/UART, left position UART, right position I2C |
Software Support
We provide a library for the Spectral Click Board™ on our Libstock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo application can run on all the main MikroElektronika development boards.
Library Description
Library initializes and defines UART driver and functions which offer a choice to providing direct XYZ color coordinates consistent with the CIE 1931 Standard observer color coordinates. It also maps the XYZ coordinates to the x, y (Y) of the 2-dimensional color gamut and scales the coordinates to the CIE 1976 u’v’ coordinate system. The library provides accurate Correlated Color Temperature (CCT) measurements and provides color point deviation from the black body curve for white light color in the delta u’ v’ coordinate system. Check the documentation for more details.
Key functions:
void spectral_getColor_Data(uint8_t *rsp, uint8_t *)
- Reads calibrated X, Y, and Z color data.void spectral_getXYsmall_Data(uint8_t *rsp, uint8_t *xyData)
- Reads calibrated x and y for CIE 1931 color gamut.uint8_t spectral_getLUX_Data(uint8_t *rsp)
- Reads calibrated LUX value from the sensor.uint8_t spectral_getCCT_Data(uint8_t *rsp)
- Reads calibrated CCT value from the sensor.void spectral_getUV_Data(uint8_t *rsp, uint16_t *uvData)
- Reads calibrated u’, v’ and u, v for CIE 1976 color gamut.
Example Description
The demo application is composed of three sections:
- System Initialization - Initializes all necessary GPIO pins, UART used for
the communication with Spectral and UART used for information logging. - Application Initialization - Initializes driver, reset the module and sends
a command for the default module configuration. - Application Task - (code snippet) - Sends the command to start reading data.
Then logs to USB UART, six read values every 1 second.
void applicationTask() { spectral_process(); spectral_cmdSingle(&cmdData[0]); spectral_getData(&dataBuffer[0],&readData[0]); IntToStr(readData[0],text); mikrobus_logWrite( "-- X value:", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_LINE ); IntToStr(readData[1],text); mikrobus_logWrite( "-- Y value:", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_LINE ); IntToStr(readData[2],text); mikrobus_logWrite( "-- Z value:", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_LINE ); IntToStr(readData[3],text); mikrobus_logWrite( "-- NIR value:", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_LINE ); IntToStr(readData[4],text); mikrobus_logWrite( "-- D value:", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_LINE ); IntToStr(readData[5],text); mikrobus_logWrite( "-- C value:", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_LINE ); mikrobus_logWrite( "---------------------", _LOG_LINE ); Delay_1sec(); }
Along with the demo application timer initialization functions are provided. Note that the timer is configured according to the default development system and MCUs, changing the system or MCU may require an update of the timer init and timer ISR functions.
The full application code, and ready to use projects can be found on our LibStock page.
mikroE Libraries used in the example:
- String
- Conversions
- UART
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 Spectral Click Board™ is supported by the mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of the 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 Spectral Click Board™ on our Libstock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo application can run on all the main MikroElektronika development boards.
Library Description
Library initializes and defines UART driver and functions which offer a choice to providing direct XYZ color coordinates consistent with the CIE 1931 Standard observer color coordinates. It also maps the XYZ coordinates to the x, y (Y) of the 2-dimensional color gamut and scales the coordinates to the CIE 1976 u’v’ coordinate system. The library provides accurate Correlated Color Temperature (CCT) measurements and provides color point deviation from the black body curve for white light color in the delta u’ v’ coordinate system. Check the documentation for more details.
Key functions:
void spectral_getColor_Data(uint8_t *rsp, uint8_t *)
- Reads calibrated X, Y, and Z color data.void spectral_getXYsmall_Data(uint8_t *rsp, uint8_t *xyData)
- Reads calibrated x and y for CIE 1931 color gamut.uint8_t spectral_getLUX_Data(uint8_t *rsp)
- Reads calibrated LUX value from the sensor.uint8_t spectral_getCCT_Data(uint8_t *rsp)
- Reads calibrated CCT value from the sensor.void spectral_getUV_Data(uint8_t *rsp, uint16_t *uvData)
- Reads calibrated u’, v’ and u, v for CIE 1976 color gamut.
Example Description
The demo application is composed of three sections:
- System Initialization - Initializes all necessary GPIO pins, UART used for
the communication with Spectral and UART used for information logging. - Application Initialization - Initializes driver, reset the module and sends
a command for the default module configuration. - Application Task - (code snippet) - Sends the command to start reading data.
Then logs to USB UART, six read values every 1 second.
void applicationTask() { spectral_process(); spectral_cmdSingle(&cmdData[0]); spectral_getData(&dataBuffer[0],&readData[0]); IntToStr(readData[0],text); mikrobus_logWrite( "-- X value:", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_LINE ); IntToStr(readData[1],text); mikrobus_logWrite( "-- Y value:", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_LINE ); IntToStr(readData[2],text); mikrobus_logWrite( "-- Z value:", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_LINE ); IntToStr(readData[3],text); mikrobus_logWrite( "-- NIR value:", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_LINE ); IntToStr(readData[4],text); mikrobus_logWrite( "-- D value:", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_LINE ); IntToStr(readData[5],text); mikrobus_logWrite( "-- C value:", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_LINE ); mikrobus_logWrite( "---------------------", _LOG_LINE ); Delay_1sec(); }
Along with the demo application timer initialization functions are provided. Note that the timer is configured according to the default development system and MCUs, changing the system or MCU may require an update of the timer init and timer ISR functions.
The full application code, and ready to use projects can be found on our LibStock page.
mikroE Libraries used in the example:
- String
- Conversions
- UART
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 Spectral Click Board™ is supported by the mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of the mikroSDK compliant click board demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.