Color Sensor

Original Project by Adafruit.

Tried and tested by TechFarms employee, Nicholas Casassa.

The sensor we will be using is the TCS3725. We need to solder it to a set of header pins so we can attach it to a breadboard and connect some wires to it.










After that, we need to identify the VIN / GND / SDA and SCL pins on the sensor.

Then connect them to the Arduino Uno. VIN to 5V, GND to GND, SDA to SDA, and SCL to SCL.










Next we need to set up the RGB LED.


The RGB LED has 4 pins. These need to be put into a breadboard. The longest (third) pin  is the Anode/Cathode and it needs to go to ground.










The only difference found in the documentation was that there were calls for 2 separate resistor values. For this we will use 1x 1k and 2x 560 ohm.

LED Red Pin -> 1K resistor -> Arduino Digital Pin 3

LED common anode (long pin) -> 5v.

LED Green Pin -> 560 ohm resistor -> Arduino Digital Pin 5

LED Blue Pin -> 560 ohm resistor -> Arduino Digital Pin 6










Once this is all connected up, it is time to fire up the Arduino IDE

Add the following Library.









Upload the ColorView sketch to your Arduino from the examples. Place different objects in front of the sensor, making sure they are very close. The LED color should match the color of the sensed object!

Watch your values stream in the serial monitor and try to identify how it’s working.

I’ve noticed that yellow has a bit of an issue but overall it works great!

How would you use this? Please tell us!

Leave a Reply