Arduino + CPLD + 200+ Photodetectors

I am currently working on a 42" multitouch screen using an array of IR led's and IR photodetectors of over 200 of each, that creates and x-y grid along my screen. I need to find away to interface the 200+ detectors to the arduino,

My first thought and so far best idea(personal opinion), is to hook the detectors to one/multiple CPLD's and and have output pins that pulse high and low according to the detectors that caused the interupt and a high speed binary counter to pick up the pulse and turn them into an 8bit number the arduino can read

My question is if this is a good sulutions to my problem or are there tweaks needed or better solutions, its not easy interfacing 200+ detectors to an arduino :slight_smile:

Solutions also depend on the technology you are willing to apply. Multilayer SMD will give you more freedom than THT :slight_smile:

I assume you plan something like 100 LEDs on the left and upper side and 100 receivers each on the right and lower side?

In this case it could be considered to multiplex the LEDs and add all receivers to a single output. As you know which LED is firing you might be able to compute the position....

The problem with using alot of shift registers say using an I2C bus, during other projects with them its hard to find which of the shift registers pin has changed, since the arduino only has 2 interupt pins using more than 2 shift registers produces problems in sending requests on every chip on the bus,
not to mention using 200+ detectors would need over 12 chips and alot of shift registers only let you use 8 on the same bus,

Agreen microsecond response isnt required but a fast detection < 5-10ms would be minumum

The detectors im using are IR phototransitors(analog output)

And for the LED's i have no problem because they are all just wired up to 5v and gnd rails so there always on, i dont think pulsing each individual led would work only since they have to shine their beam over 36" i dont think just a straght up pulse would give accurate results on the phototransistors, and possible when your done pulseing one side of the screen the object could move(innaccurate results)

I know im shooting down your input and ideas but input like this and any other is really appreciated