TCS3200 chip introduction
TCS3200 is TAOS introduced programmable color light to frequency converter, the configurable silicon photodiode and current frequency converter integrated in a single CMOS circuit integrated on a single chip, while the red green and blue ( RGB ) three kinds of filter, is the industry's first digital compatible interface RGB color sensor, TCS3200 output signal is a digital quantity, can drive the standard TTL or CMOS logic input, it can be directly associated with the microprocessor or other logic circuit, because the output of the digital quantity, and can achieve the goal of each color channel 10 or more conversion accuracy, so that the need for A/D conversion circuit, the circuit becomes more simple.
TCS3200 uses a 8 pin SOIC surface mount package, integrated on a single chip with 64 photoelectric diode, the diode is divided into four types, the 16 photodiode with the red filter; a 16 photodiode with a green filter; a 16 photodiode with blue filter, the remaining 16 not with any filter, through all of the light information, these photodiodes in the chip are arranged in a cross, can minimize the incident optical radiation uniformity, thereby increasing the color recognition accuracy; on the other hand, 16 of the same color photoelectric diode is connected in parallel, distributed evenly on the diodes in the array, can eliminate color position error. Work, through the two programmable pin to dynamically select the desired filter, the sensor typical output frequency range from 2Hz to 500kHz, the user can also through two programmable pin to choose 100%, 20% or 2% output scaling factor, or power off mode. Output scaling factor that the sensor output can be adapted to different measuring range, improve its ability to adapt. For example, when using low frequency counters, can choose small scaled values, so that the output frequency of the TCS3200 and counter matches.
When the incident light is projected onto the TCS3200, through the photoelectric diode control pin S2, S3 in different combinations, you can choose a different filter; after current to frequency converter output square wave of different frequency ( the duty ratio is 50% ), different color and light intensity corresponding to different frequency square wave; also can output constant standard control pin S0, S1, choose a different output scaling factor, the range of output frequency is adjusted, to adapt to different needs.
Following a brief description of TCS3200 chip, the function of each pin and some of its combination option. S0, S1 is used to select the output scale factor or power off mode; S2, S3 is used to select the type of filter; OE is the frequency of the output enable pin, can control the output state, when there are multiple chip pin shared microprocessor output pin, can also be used as a chip select signal, OUT is the frequency of the output pins, the GND chip is a grounding pin, VCC chip provides working voltage, table 1 is S0, S1 and S2, S3 free combination.
TCS3200 color identification principle
( 1) RGB induction principle
Usually see the color of objects, is actually the surface absorbing light above it white light ( sunlight ) is part of the colored components, while reflecting on another portion of the colored light in the eyes of the reaction. White is composed of various frequencies of visible light mixed together, that is to say Bai Guangzhong contains a variety of colors ( such as red R, yellow Y, green G, green, blue, violet P V B ). According to the German physicist Herm Holtz ( Helinholtz ) the trichromatic theory knowable, various color is different from the proportion of primary colors ( red, green, and blue ) mixture.
( 2) TCS3200 color identification principle
From RGB induction principle that, if the composition of various color RGB values, will be able to know the test object color. For TCS3200, when a selected color filter, it allows only certain colors by, stop by other primary. For example: when choosing a red filter, the incident light can pass only red, blue and green are to be prevented, so they can get red light; at the same time, other selection filter, can get the blue light and the green light. Through these three values, we can analysis onto the TCS3200 sensor light.
( 3) the white balance and color recognition principle
White balance is to tell the system what is white. Theoretically, white is composed of equal amounts of red, green and blue blend; but in fact, in white primaries are not completely the same, and for the TCS3200 light sensor, which of the three basic color sensitivity is not the same, resulting in TCS3200 RGB output are not equal, so in the test must be carried out before the white balance adjustment, allows the TCS3200 to detection of the " white " in the primaries are equal. White balance adjustment is to follow the color identification for. In this device, the white balance adjustment concrete step and method are as follows: the empty tube is placed above the transducer, tube placed on top of a white light source, so that the incident light to pass through in vitro irradiation to TCS3200; according to the method presented, followed by the strobe red, green and blue filters, respectively. Measurement of red, green and blue values, and then calculates the required 3 adjusting parameters.
When the TCS3200 recognition color, used the 3 parameters of the color measurement of R, G and B adjustment. There are two methods to calculate the adjustment parameters: 1, followed by strobe three color filter, and then the TCS3200 output pulse sequence count. When the count to 255 when stop counting, were calculated for each channel by the time, these time corresponds to the actual test TCS3200 each filter uses the time reference, in this period of time measured by the number of pulses is corresponding to the R, G and B values. 2, set the timer for a fixed period of time ( such as 10ms ), then select three kinds of color filter, calculation of the period of time TCS3200 output pulse number, computes a scale factor, the scale factor can keep the pulse number becomes 255. In the actual test, outside the same time counts, the measured pulse number multiplied by the scale factor, and then can get the corresponding R, G and B values.