HowTo-Color (8) / Hacking Electronics / Simon Monk / 236-3 / Chapter 8
198
Hacking Electronics The easiest way to use the chip is to buy a module like the one shown in Figure 8-7. This module, which cost less than USD 10, also has four white LEDs that illuminate the object whose color you want to measure, as well as convenient header pins. Table 8-1 shows the connections on the module and their purpose. With the exception of the power to the LEDs, these connections are taken straight from the IC, so any module you find that uses the TCS3200 is likely to have the same connections, even if they are not quite in the same place. The IC does not produce an analog output, but instead varies the frequency of a train of pulses. You choose which color the pulse frequency corresponds to by changing the values on the digital inputs S2 and S3.
Figure 8-7 A light-sensing module
You Will Need Quantity
Item
Appendix Code
1
Arduino Uno/Leonardo
M2/M21
1
USB lead; Type B for Uno, Micro USB for Leonardo
1
Color-sensing module
M12
1
Male-to-female jumper set
T12
Pin
Description
Description
Pin
S0
S0 and S1 select the frequency range. Both should be set HIGH.
2.5V to 5.5V
VCC
Ground
GND
Red—S2 and S3 LOW Green—S2 and S3 HIGH Blue—S2 LOW, S3 HIGH White—S2 HIGH, S3 LOW
Output Enable—set to LOW to effectively turn the chip on.
OE
Tie to ground with the attached jumper to turn the LEDs on.
LED
S1 S2 S3 OUT TABLE 8-1
08-ch08.indd 198
The output pulses.
GND
Color-Sensing Module Pinout
1/2/13 12:29 PM