Hi All, Ok, need ya'lls help for a little brainstorming. I have hit a calibration snag, and to be honest, it doesn't make much sense.
I have built 100 units. Of those units, 88 have calibrated just fine. However, the other 12 units won't calibrate, and they all have a similiar problem, some worse than others, and I have been beating my head against the wall for a couple of weeks now...
In a nutshell, my calibration process is two steps, in which four sets of data are taken. First, I calibrate to a known white sample. With this, I set the gain for each of my red, green and blue channels to get a reading just below max, then store the gain setting and the actual max reading.
I then place the unit in my 'black hole box', a small cardboard box lined with black felt, and take a reading. This determines my 'zero point' for each color. I change to a 2X gain channel I have, and read each color again. I use this for my dark colors.
Finally, I place a navy blue sample in front of the unit, and store the difference between the navy blue and the 2X dark reading. I use this as a scaling factor for my dark colors.
Now, for the mechanics. I have the three LEDs mounted on the top of the board. These are side firing LEDS, and they are at a 45 degree angle to my window with the red and green LEDs on opposite sides of a triangular cut in the board about 1cm from the window, and the blue LED about 25 mm farther back. On the bottom of the board I have an Ambient Light Sensor (phototransistor based) bent 90 degrees and aimed straight at the center of the window. The idea was that the board would screen the PT from the LEDs, and that with the 45 degree angle, most of the reflection from the window would be off to the side. The only signal going to the PT would be the reflectrion from my sample on the other side of the window.
Early in my troubleshooting, I found that I had to color the PCB with its green solder mask with a black sharpie to reduce transmission through the board, and out the edge of the board. This had substantially reduced my dark values, but is one more hand step in the assembly process...
And now, on to the problem. On all the calibrated units, you get a pretty set pattern on these dark and navy values, red slightly higher than green, which is higher than blue. On the bad units, however, the red is MUCH higher than the green, usually in both the dark readings and the navy readings.
My initial thought was that I had mis-aimed the PT so that it was seeing more of the red return than the green. Changing the angle of the PT does not seem to significantly change the readings. I had thought that maybe I had missed a spot on my blacking out the PCB, but even recoating that area has no real effect. On one unit, I even put in a black construction paper 'sheild' along the bottom of the PCB. This did help in further reducing the red dark values, but the high read values on the navy sample still remain.
So, any ideas? Could I have just gotten 12% of the LEDs with much higher output? Could my PT be damaged by too high a soldering temp, and thereby removed the red filters for the ambient light compensation? Right and left field ideas????
Thanks, Charlie