Introduction: INTERACTIVE RGB LED TABLE
First of all, I would say, English is not my mother tongue; so please excuse any errors on my part.
In addition to usage as normal LED display, the "INTERACTIVE RGB LED TABLE" is like a "touch screen" made of LEDs with impressive animations. It is used as a dinner table, coffee table, decorated table in a bar, or living room table.... For the project I share below, this interactive LED table is sized in A2 with 256 RGB LEDs, uses infrared emitter and photo-transistor to locate the object on the table and create a nice effect at the corresponding position.
Step 1: How It Works
To know how this table works, you can see DEMO KIT above or at link:
INTERACTIVE LED TABLE - DEMO KIT 8x8
Or
Step 2: B.O.M
For this project, we'll use a lot of copper wires and do a lot of soldering works. Let prepare masks, gloves and exhaust fan for health protection.
Step 3: Table Template
See the picture above to understand how to arrange RGB Leds - Phototransistors - Infrared Leds. The size of the table you can choose reasonably, for me, it is the A2 size (594 x 420 mm) for table 16x16. Thus, on top of interactive table, there are a total of the following components:
- Blue rows: RGB Leds - 256 pcs - Matrix 16x16.
- Red rows: Phototransistors - 64 pcs - Matrix 8x8.
- Pink rows: IR Leds - 56 pcs - Matrix 8x7.
Step 4: IR Led and Photo-transisitor
- IR Led: connect to 5V with current limit resistor 100 ~ 150 ohm.
- Photo-transistor: use the Common - Collector type with RE ~ 10Kohm.
Normally, when there is no object placed on the table, infrared LED is lit but the phototransistor will not receive this light, the RGB LED will turn off.
When objects are placed on the table, infrared rays emitted from the IR LED will reflect from the object and transmit to the phototransistors, the RGB LEDs around the phototransistor (4 RGB LEDs) will light up.
Step 5: Schematic
Based on circuit diagram above, we see that interactive circuit has two main blocks:
- Block 1: 256 or Matrix 16x16 RGB LED display using 4-bit B.A.M method:
- About Bit Angle Modulation (BAM), you can refer at
- Column control :using 74HC595 (12pcs) + ULN2803 (12pcs), and is controlled through SPI.
- Row control : using 2N2222 (8pcs) + TIP42C (8pcs). For faster response and no ghosting, you can switch to MOSFET.
2. Block 2: 64 Analog Signals Processing from photo-transistors:
- Infrared emitter: The IR Leds (total of 56 pcs) are connected to a 5 V source through current limit resistors.
- Infrared transceivers: A total of 64 photo-transistors are read through 8 - channel analog multiplexer/demultiplexer - 74HC4051 (8: 1) because Arduino Mega 2560 can only read 16 Analog channels directly. About 74HC4051 you can refer to: https://github.com/sparkfun/74HC4051_8-Channel_Mu...
Step 6: Table Coordination
For a better understanding, see the red cell on picture above, it represent for the 64 photo-transistors, marked from Zone00 to Zone63 and around each zone, we have 4 RGB LEDs correspondingly.
Example: Zone00 [4] [2] = {{6, 0}, {7, 0}, {6, 1}, {7, 1}}};
It tells us that photo-transistor number 0 is read by A0 pin of Arduino Mega 2560 and around it is 4 RGB LEDs with coordinates: {6, 0}, {7, 0}, {6, 1}, { 7, 1}. When photo-transistor receives infrared ray higher than LimitSense setting, corresponding 4 RGB LEDs will be affected (turned on, for example).
Step 7: Top and Bottom Table After Soldering
Before and after soldering, we have to check the RGB Led carefully. Note that, infrared light is not visible to the human eye but it can be detected by camera. If the object is reflective, (white or some other light color), then most of the radiation will get reflected by it, and will get incident on the photo-transistor. If the object is non-reflective, (black or some other dark color), then most of the radiation will get absorbed by it, and will not become incident on the photo-transistor.
Step 8: RGB Matrix 16x16
Program below for testing RGB Matrix Led 16x16 to ensure that no led is burned or damaged during soldering work.
Step 9: Interactive Test
According to above diagram, Arduino Mega 2560 will read 8 signal photo-transistors depending on 3 signals: Select 1 - Select 2 - Select 3. So if every 200us, Arduino Mega read one time (Each time Arduino read 8 analog signals), we take about 200x8 = 1600us ~ 1.6ms to read 64 analog channels and save data to the array: phototransistor_data [0] ~ phototransistor_data [63]. It is fast enough that interactive table is not responding late when the object goes through. This timing we can adjusted and you can see more detail in the program.
Step 10: VU Meter Test
This spectrum analyzer is base on fix FFT. For more information, you can see at: http://forum.arduino.cc/index.php?topic=38153.0
Step 11: Main Program
This is program for whole project. You can download at address: https://github.com/tuenhidiy/Interactive-RGB-Led-T...
Step 12: More Pictures
Some more project PICTURES....
Step 13: Full Test - Videos
You can see more videos at:
Step 14: Summary
- The photo-transistor receives infrared rays from sunlight so this table does not use interactive mode during the daytime. Note that, black objects will almost completely absorb infrared light so it will not be reflected to photo-transistor.
- Clear acrylic is infrared transmitting, it allows infrared light through. So we can place clear acrylic on interactive led table and then put objects such as books, glasses, cups, teapot ... easily on it.
- This table can be used as a VU meter (spectrum analyzer) or play some games like Tetris, Pong ....
Interactive RGB LED table will be much better if it is increased to size 16x32 LEDs (equal 2 times current table) and is placed in a wooden table. Let imagine how it is great if whole family is sitting on this table and have dinner together under lights and amazing effects .... !!!