Specification:
Convert intensity of red, green, blue colors to voltages.
Independent gain selection options for each R,G,B channel (smaller pot)
Overall gain selection option (bigger pot)
Supply Voltage: 5VDC
Maximum output voltage swing: 4V
Strong support for the sensor.
How to make it work?
This tutorial is for calibrating your sensor and testing if the sensor is working properly.
Component Needed:
Arduino Uno R3 with cable
Jumper Wires x6
White paper, and colorful objects.
Steps:
Connection:
Sensor Pins Arduino Uno
VCC 5V
GND GND
OUT A0
RED 8
GRN 9
BLU 10
Open the test code in the Document Section of this page.
Upload that code to Arduino board.
Place a fresh white paper on a flat table and hold the sensor 1-2 cm perpendicular to the paper. It this position Red, Green and Blue light will reflect on the white paper.
Open Serial monitor of Arduino. You’ll see,
Red= xxx Green= yyy Blue= zzz
(here x,y,z are random values between 0 and 1023)
If even one of the value is closer to 1023 (like 1000 or 950) then make them smaller by rotating bigger horizontal pot.
Try to make xxx, yyy and zzz equal by rotating smaller vertical pots.
Now your sensor is fully calibrated. If you hold it under a green object you’ll see green value will rise and others will fall. That means the object under the sensor is green. Same will occur for red/blue paper. Red/blue value will spike. As all the colors in this world could be created by these basic colors, you can detect any color from this. For example if you put a yellow paper under the sensor you’ll realize, green and red values are higher than blue. That means your object is yellowish. Cause red and green makes yellow.
Note that, other values will be smaller than green values but it will never become zero. Your software part should handle that.
Reviews
There are no reviews yet.