Touch LED Table Design

Hi everyone,

I’m trying to build a table that lights up certain areas based on if something is resting on the table. I’ve decided that the top of the table with be translucent glass/plexiglass, and underneath that will be the circuitry.

Objects will be sensed by using an infrared LED and an infrared detector. Changes in the resistance of the infrared detector will correspond to different levels of infrared light; more light means that an object is bouncing light from the IR LED back to the detector.

The table will consist of “pixel modules”. Each module will consist of a single ATMega328P, driving 4 pixels. Each pixel contains 4 single color LEDs, 1 IR emitter, and 1 IR detector.

I was hoping someone could take a quick look at the schematic I made up [attached], and provide some let me know if I’m on the right track. Suggestions on the power supply considerations for the 328P’s and the LEDS (separate power for each?) would be appreciated. Thanks!

Hi, the schematic looks quite good to me. If I get your rigth you want build one of these for every 4x4 array of 'table-pixels'? That should actually work, but is not very sustainable. You should think of multiplexing the IR-signals as well as the LED-output. Let me explain: Let's assume that your table has 8 x 8 = 64 pixels, than you can easily talk to each cell by calling row X and calumn Y. Now you need just a 16 output channels (8 for X-axis and 8 for Y-axis). But you can go even further if you encode your X and Y-axis as binary numbers. Then you just need 3 output-pins per axis (ie: 000, 001, 010, 011, ...). So you will end up with the conclusion that you can control a whole table just with an Uno module and do not need that much controlers than you want to built in by now. For the sensors you can do it all the way around, just implement a loop, asking each sensor for its value and react accordingly.

Danke Kai_Heinz. So you think it'd best to do a single grid of LEDs, and a single grid of sensors? That sounds like a good idea. Would you suggest a shift register, or an I2C bus?

You can't connect 4 LEDs in parallel and expect equal brightness. Options: 1. use resistor for each led; 2. put led in series, may be higher than 12V voltage would be necessary; 3. use high power leds.

Other problem, photocell isn't to be reliable in varying lighting conditions. Solution in using modulated IR 38 kHz or so and specially made sensors/ chips , same as in remote controllers.

You will need a resistor from your adc pins to ground so they work together with your photocell as a voltage divider.

I'm actually using this http://www.mouser.com/Search/ProductDetail.aspx?R=LTR-301virtualkey57820000virtualkey859-LTR-301 as the IR detector.

Magician: Good call, I'll probably just take the resistor route.

lokidude: Thanks, totally missed that.

So I’ve reworked my plan to rely on shift registers to control the total LED array, instead of breaking it up into modules.

The current plan is to have 32x16 LEDs, controlled by 4x2 74hc595 shift registers. In the schematic, the output from the registers goes to a jumper pin, which goes to the LED array. The shift registers will interact with transistors on the array, switching on/off power for that column in the array.

For the IR detectors (in a 16x8 matrix supported with 74hc595 shift registers), I’m thinking I’ll connect them to a set of 3 different pins for on the 328p.

The LED will be using the ShiftPWM library, using the SPI hardware. If anyone has used this, can I use this to read data from one set of registers (IR detectors) and write to another set (LEDs)?

Thanks!

I understand it would be possible to totally eliminate the IR detectors, and use the IR LEDs for both output and input. It would make your software more complex, but might make your hardware simpler.