How does Canandcolor work?

The Canandcolor contains two distinct sensors onboard: A IR Proximity sensor and a color sensor. These both work on similar principles, sending the intensity of reflected light, but operate in different wavelengths.

IR Proximity

The onboard IR Proximity sensor works by pulsing an IR LED out and measuring the intensity of reflected IR light. This gives a value proportional to proximity, as farther away objects will reflect less IR back to the sensor. If an object is too far away, not enough IR light reflects back to the sensor for it to read, and if an object is too close then too much light can reflect back, leading to oversaturation. In practice, the sensor oversaturates only at ranges under 2mm.

The sensor has a controllable integration time, which is the amount of time that it collects IR light in order to determine the object’s range. Lower integration times will run at a faster rate, but will also have slightly more noise and less range. The Canandcolor supports integration times from 5ms to 40ms, which means your minimum latency is only 5ms (200Hz).

Color Sensor

The color sensor works by measuring the intensity of different reflected wavelengths of light. Unlike the IR sensor, this does not emit its own light automatically, but rather lets the user control a built-in LED to provide consistent illumination to the target. The sensor has an integration time as well, similar to the exposure time in a camera. The longer the integration time, the more precise the color readings are, and the better it will perform at range. However, for almost all applications, the default integration time of 25 ms is sufficient. Objects’ colors can be sensed up to 100mm (4”) away easily by using the HSV (Hue, Saturation, Value) color detection mode. It can even work from further distances depending on ambient conditions.