IR LED Touchscreen Overlay General Approach

Okay! So I'm making an IR LED/receiver style touch screen overlay using an Arduino Mega and a 5V power supply. The Mega isn't entirely necessary and I'm eventually trying to get off of it entirely, that's just what I'm using currently. Also, I'm somewhat of a beginner in electronics despite having gone to school for electrical engineering, so please bear with me on some of the things that I may not grasp.


I'm using IR LEDs across from IR receivers, in a frame shape, and reading the receivers using firmata/processing to see when a light gets blocked, which would be a touch. I previously had this working for a prototype sized around 4"x4" that used 6 LEDs per side, or 12 total LEDs and 12 total receivers. The setup is simple, a 5V power supply runs a 555 timer which pulses all the LEDs at 38kHz (required by the receivers I found) on one circuitry and the receivers (also powered at 5V) read the signal into the Mega's digital IO pins.

I will eventually need it to be around 6 feet wide and 4 feet tall (LED count of 144x96 or possibly more for higher resolution on touches). I think this can be done because there are companies that make these same type of overlays much larger than 6" (I've bought one that works with a 23" computer monitor). I'm not 100% sure this tech/style will work out to 6 feet but I think with the beams dialed in and low viewing angle hardware, I think/hope it will work (let me know if you think it won't).

Anyway, I then moved to a 12"x12" prototype, with LEDs every half inch; 24 LEDs/receivers per side, or 48 total LEDs and 48 total receivers. The same setup DOESN'T work. There are a LOT of connections to the Mega (see: 48 receivers) and the power consumption for all the LEDs is too much. I'm trying to run them all in parallel because of the low voltage after the 555 timer circuitry.


So onto my problems; first, driving the 48 LEDs at my current model size is a problem. I have to pulse the LEDs at 38kHz to be received and there is a voltage drop over the 555 timer so I am having trouble getting the right voltage and current output from it. I need some type of LED driver here. I had read about a few different kinds and wasn't sure so I talked to Maxim and they suggested I use the MAX16826 (datasheet here). This can control 28 LEDs (4 strings of 7 LEDs) and uses the I2C bus to write to and read from the LED strings. It needs an external clock, so I would still need the 555 timer circuitry or some other micro or oscillator.

Second; I need a method to read in all of the receiver values since there are so many. I researched for a while and I'm considering using the MCP23017 port expanders but those can only be chained together up to 128 and I will eventually need around twice as many. Also, this too uses the I2C bus (like the MAX16826) and I don't know enough about I2C to know if I can have the Mega scanning through the MCP23017 chips as well as writing to the LED strings. I think I would need SPI to do that? So I need a method to do both of those things.

Note: All of this worked on the smaller end because 1) the power consumption from the LEDs was low enough that I could drive them all from the power supply, 2) I was reading all of my receiver values in directly through the Mega's digital IO pins because there were so few receivers needed.

[u]Final Notes[/u]

I'm actually just somewhat confused at this point and I can tell I need a lot of assistance. All of my attempted problem solving has made it more convoluted and I'm having trouble straightening everything out. Thanks for taking the time to read and consider all this. I really appreciate any help and advice you're willing to give.

Also, if you need more info, let me know, but I think I've outlined it pretty well.