In this project we use every pin on the Arduino to achieve as much control over a set of LEDs as we can. The functionality of the vodka shelf includes:
1. Power 8 sets of two 4 pin RGB LEDs
2. Create two separate colors which are staggered across the surface
3. Turn on and off any set of LEDs
4. Micro controller control of the color and lighting patterns
5. Optional manual control of the LED colors using knob potentiometers
Your eyes are sensitive to only three colors: Red, Green and Blue. All other colors excite the RGB receptors in your eyes in different proportions allowing you to interpret that color. Thus by sending certain amounts of Red, Green and Blue wavelength light into your eyes it appears as though you are seeing different colors. This is how your TV works, if you look really closely you'll see its made up of many small R,G,B lights. We experience this every day. Its just really cool to be able to control it for yourself. I was amazed to when I turned on the Red and Green lights and Yellow appeared.
R+B = Magenta,
R+G+B = White
G+B = Cyan
The easiest way to control the relative amounts of light we get from each LED is by using Pulse Width Modulation (PWM). Instead of turning the lights slightly on by applying a lower voltage we turn them completely on then completely off for a given amount of time over a short cycle. For the arduino, this cycle is approximately 500 Hz. Our eyes respond too slowly to see the fast blinking and they give us the average over time, approximating having partially turned the light on.
Step 1: Materials
-16x RGB LEDs: These are actually 3LEDs built into one casing. They have 4pins, one for each LED anode (+ve) and one common cathode (-ve). These are easy to find on the internet and can be found cheap on ebay. I paid $10 for 50. A good current rating is around 15mA (per internal LED).
-3x 100K Potentiometers: I used knobs
-Protoboard or breadboard + wires, an arduino prototyping shield is ideal.
-16x 2N3904 N-channel Bipolar Junction transistors, very common and inexpensive. Ebay.
-6x 10 Ohm 1/8 Watt Resistor
-8x 1K Ohm 1/8 Watt Resistor
-8x 100 Ohm 1/4 Watt Resistor
-8x 64 Ohm 1/4 Watt Resistor
-8x 56 Ohm 1/4 Watt Resistor
-1x 10K Ohm 1/4 Watt Resistor
-3x 56K Ohm 1/4 Watt Resistor
-Length of ribbon cable