Here we will be learning how to make a color sensor. my model consists of three cardboard compartments containing an LED - one red, one blue, and one green - and an OP550B phototransistor. The LED's shine simultaneously on a solid colored card. The phototransistors are connected to an Arduino Uno, which converts the relative amounts of measured reflected light of each color into RGB components which are used to light an RGB LED the same color as the card.
Video of it working:
Step 1: Materials
To make this color sensor, you will need:
* Red LED
* Green LED
* Blue LED
* RGB LED
* 3 phototransistors - I used OP550B's, but others could be used.
* 6 220 ohm resistors
* 3 10k ohm resistors
* Cardboard or some other divider to separate the LED's
* Breadboard or circuit board and soldering materials
* Arduino and usb cord
* Electrical tape
* Cards of various colors - I used index cards covered in electrical tape of different colors.