I'm making a color analyzer which can measure Red, Green, and Blue portions of a color (ex: 128,255,0).I'm not supposed to use pre-made color sensors and need 1% ACCURACY.
I used three LEDs - R,B & B to sequentially measure the values. When green led is on. the reflection is caught by the photo-transistor. The deviation of voltage is converted to current deviation using OPAMP's V to I circuit so that intensity of green reflection can be measured and can be calibrated to show a 0-255 value using a micro-controller.
I was successful in measuring green value of a color only if the color contained green potions. (ex [0,255,0] , [0,128,0], [0,200,0] ). likewise I can get RGB values only if one color is present. If I was given a color which is a combination of R,G,B then the voltage reading is different and wrong. For example I get a higher voltage (higher intensity) when I'm measuring white (255,255,255) than green (0,255,0). Ideally I should have got the same amount of green because those colors had same amount of green - 255.
What is the cause of the problem and how can I use an alternating method to achieve my target? Is there a method to separate the reflection in to R,G,B with high accuracy? Thanks in advance. ( I'm using a Photoshop print on a matte photo print paper as the color)
EDIT: The 3 LED's and the photo-transistor is fully covered making sure that no background light will not interfere.