New! Yocto-Spectral & Yocto-Spectral-C

New! Yocto-Spectral & Yocto-Spectral-C

Some years ago, we were tempted to develop a color sensor based on a simple RGB sensor chip, but the results didn't convince us. Today, we present the Yocto-Spectral and its USB Type-C version, the Yocto-Spectral-C, modules which can measure the light spectrum over 13 channels. Thanks to these measures, they can estimate RGB, HSL, XYZ, and OkLab values, and thus estimate the color seen by the sensor.


Color perception and light spectrum

Human color perception is based on the interpretation of the light waves that surround us. Visible light is a small part of the electromagnetic spectrum, ranging from around 400 nm (violet) to 700 nm (red). Each color corresponds to a specific wavelength: blue around 450 nm, green around 550 nm and red around 650 nm.
When a surface is illuminated, it absorbs some wavelengths and reflects others, which are then perceived by our eyes. For example, a red apple absorbs light in the blue and green wavelengths, while reflecting mainly red.

Visible light spectrum
Visible light spectrum


To reliably recognize a color, we cannot simply measure the intensity of red, green, and blue. Spectrometric sensors, such as the Yocto-Spectral, can precisely measure this spectral distribution and deduce the perceived color, inferring from this information the resulting color, using a predictive model.

Yocto-Spectral

The Yocto-Spectral and the Yocto-Spectral-C
The Yocto-Spectral and the Yocto-Spectral-C


The Yocto-Spectral incorporates a spectral sensor from AMS Osram, the AS7343. This sensor measures light intensity over 13 channels covering the visible and near-infrared spectrum, between 400 and 850 nm.

Sensor sensitivity by wavelength
Sensor sensitivity by wavelength


The module can therefore analyze the spectral composition of light reflected or emitted by a surface. Unlike conventional RGB sensors, which are content with a vague color estimation based on just three channels (red, green, and blue), the Yocto-Spectral offers a much finer and more detailed analysis, enabling credible representations to be estimated in various color spaces such as RGB, HSL, XYZ, and OkLab. This capacity opens the door to more advanced applications, such as the analysis of specific hues, the identification of materials, or the analysis of lighting conditions.

To facilitate reflection measures, the module is equipped with two wide-spectrum white LEDs, providing uniform illumination of the surface to be analyzed. It can therefore be used for both reflection measures, suitable for passive surfaces, and emission measures, to analyze light from sources such as screens or LEDs.

Color estimation

In addition to estimating RGB, HSL, XYZ, and OkLab values, the sensor also offers classification against three known color sets:

  • the 11 basic colors commonly used: brown, red, orange, yellow, green, blue, purple, pink, white, gray, and black;
  • the RAL Classic palette, used in the materials industry;
  • the HTML Classic palette, used in the IT industry.


Optimal use of Yocto-Spectral

For the Yocto-Spectral to provide an accurate color estimate, especially in reflection mode, it is essential to position the sensor at a fixed distance from the surface to be measured, and with a controlled light source. To do this, we have developed an adapter that attaches directly to the sensor. It is also possible to use the module's dedicated housing, the YoctoBox-Spectral-Black, which incorporates the same adapter in its cover. Simply press this adapter (or the housing cover) against the surface to be analyzed to ensure uniform lighting and thus obtain reproducible measurements.


YoctoBox-Spectral-Black enclosure Spectral-Adapter
The YoctoBox-Spectral-Black enclosure and the Yocto-Spectral-Adapter


The adapter is available for purchase on our web site, but we are also making the 3D files available free of charge, so that you can print it yourself using a 3D printer.

If you wish to take measures under different conditions, for example at a different distance, you can use the calibration procedure to normalize the measures to your environment. If you then maintain the same distance and measure conditions, you should also be able to obtain estimates that are as accurate as possible.

Yoctopuce API function

Yoctopuce libraries include two new classes dedicated to the Yocto-Spectral:

  • ColorSensor: This class configures the sensor and retrieves the estimated values of spectral measures.
  • SpectralChannel: This class provides individual access to the values measured on each of the sensor's 13 spectrometric channels.

colorSensor = YColorSensor.FirstColorSensor();
spectralChannelF1 = YSpectralChannel.FirstSpectralChannel();
// Enables auto mode
colorSensor.set_workingMode(YColorSensor.WORKINGMODE_AUTO)
// Select reflection mode
colorSensor.set_estimationModel(YColorSensor.ESTIMATIONMODEL_REFLECTION)

// Name of the color detected
simpleColor = colorSensor.get_nearSimplecolor()
// RGB value of the color detected
rgb = spectralSensor.get_estimatedRGB()

// Light intensity on channel F1
f1 = spectralChannelF1.get_currentValue()


These new classes allow you not only to read the color estimations made by the module, but also to directly access the raw sensor data to implement your own specific analyses.

Conclusion

Despite their very reasonable price, these new modules offer color recognition capabilities that are incomparable to what we could get from the first sensors we tried a few years ago. We are glad we didn't rush to make a product with those primitive sensors and waited until a true spectral sensor became available.

Add a comment No comment yet Back to blog












Yoctopuce, get your stuff connected.