An interesting project has been published to the official Raspberry Pi Foundation blog this week revealing how you can use the awesome Raspberry Pi mini PC to detect colour. In their latest tutorial Electronic Hub shows you how to detect colour using a Raspberry Pi and a TCS3200 colour sensor, check out the video below to learn more, the way that the sensor actually detects colours is what makes this project very interesting.
The TCS3200, sensing development board is readily available to hobbyists, enthusiasts and students and has been created to basically convert light to frequency using the intensity of light falling on it as a frequency for its output signal. The code is calibrated to only three primary colours: Red, Green and Blue. But users can also expand this to a wider range of colours if desired.
“Since both the S0 and S1 inputs of the TCS3200 Colour Sensor are connected to +5V, the output frequency is scaled to 100% i.e. the output frequency will be in the range of 500 KHz to 600 KHz. As S2 and S3 pins of the TCS3200 Colour Sensor are used to select the Photo Diode, they are set in three different combination one after the other to get the RAW data of the Red, Blue and Green values. Keeping these values as reference, the color detection program is written, where the Raspberry Pi correctly displays the name of the colour placed in front of the sensor.”
For more information as well as all the necessary code required to create your very own Raspberry Pi colour sensing project jump over to the official Electronics Hub website by following the link below.
Source: Electronics Hub