Note
The Color Bricklet is discontinued. We are selling our remaining stock. The Color Bricklet 2.0 is the recommended replacement.
The Color Bricklet can be used to extend the features of Bricks with the capability to measure color, color temperature and illuminance of a light source. Thus the Bricklet can measure the color of an object via its reflected light. To create a defined illumination and color temperature the Bricklet is equipped with a API switchable LED.
The Bricklet can be used for many purposes, e.g. sorting of objects by their color.
The Sensor is equipped with color filters for the colors red, green and blue (RGB). In the chart above the responsivity of the sensor in the given color range is shown. Additional to the color information (RGB) a fourth value is measured called "clear value" (C). This is the sensors value without any color filter. Each value of RGB and C is measured as 16bit value. From these sensor values the Bricklet computes two additional values: illuminance and color temperature each with 16bit resolution.
Property | Value |
---|---|
Sensor | TCS34725 |
Current Consumption | 0.2mA (LED off), 5mA (LED on) |
Dynamic Range | 3800000:1 |
Color Resolution (R,G,B,C) | 16bit each (0-65535) |
Color Temperature Resolution | 16bit (0-65535) |
Illuminance Resolution | 16bit (0-65535) |
Dimensions (W x D x H) | 25 x 20 x 5mm (0.98 x 0.79 x 0.19") |
Weight | 2g |
To test a Color Bricklet you need to have Brick Daemon and Brick Viewer installed. Brick Daemon acts as a proxy between the USB interface of the Bricks and the API bindings. Brick Viewer connects to Brick Daemon. It helps to figure out basic information about the connected Bricks and Bricklets and allows to test them.
Connect the Color Bricklet to a Brick with a Bricklet Cable (see picture below).
If you connect the Brick to the PC over USB, you should see a new tab named "Color Bricklet" in the Brick Viewer after a moment. Select this tab. If everything went as expected you can now see the changing measured values depending on the illumination.
After this test you can go on with writing your own application. See the Programming Interface section for the API of the Color Bricklet and examples in different programming languages.
The sensor of the Bricklet can be configured. Gain and integration time can be changed. Dark environments need a higher gain or a longer integration time. If you use long integration times the sensor will react slower. If you need fast measurements use a high gain and short integration times.
The desired configuration depends on the application. Depending on the illumination and distance to the measured object other parameters have to be chosen. The Brick Viewer can be used to find proper values.
If you want to use the Bricklet in sorting applications it should be mounted in a fixed distance, with a fixed source of light (e.g. the equipped LED) and it should also be protected from interfering light.
See Programming Interface for a detailed description.
Language | API | Examples | Installation |
---|---|---|---|
C/C++ | API | Examples | Installation |
C# | API | Examples | Installation |
Delphi/Lazarus | API | Examples | Installation |
Go | API | Examples | Installation |
Java | API | Examples | Installation |
JavaScript | API | Examples | Installation |
LabVIEW | API | Examples | Installation |
Mathematica | API | Examples | Installation |
MATLAB/Octave | API | Examples | Installation |
MQTT | API | Examples | Installation |
openHAB | API | Examples | Installation |
Perl | API | Examples | Installation |
PHP | API | Examples | Installation |
Python | API | Examples | Installation |
Ruby | API | Examples | Installation |
Rust | API | Examples | Installation |
Shell | API | Examples | Installation |
Visual Basic .NET | API | Examples | Installation |
TCP/IP | API | ||
Modbus | API |