Photodiode Array Possible?

Hi all!

I'm very new to Arduino, and truth be told I haven't gotten a board yet, though only because I just learned about it Arduino yesterday. However, not having one hasn't stopped me from having a ton of ideas about how to use it when I get it! ;D

Anyways, I was wondering if it were possible to make a large array of photodiodes (like 400+) and have Arduino get individual readings from each one. To get an idea of my project, think gigantic-close-range-digital IR video camera sensor.

Specifically the diode I would like to use is Sharp Microelectronics' PD3122FE000F, an IR sensor.

First off, is this even possible with Arduino?

I would assume it would be, but I would need some kind of an array of current meters outputting into an analog to digital converter with a ton of inputs and then pump out the 1-20 bits from that ADC into Arduino.

Correct? or am I over thinking this?

Anyways, I would appreciate some input on this if anyone has any! Thanks :slight_smile:

Is this your first project or something you have been planning and you just thouhgt of the Arduino? The diodes will cost around $250 and then you will need a way to mount them. The Arduino is a platform that uses an Atmel atmega168 chip and probably will not do all you need but it is a starting point and easily reprogrammed to test your idea out.

Thanks for your reply! :slight_smile:

This would be my first Arduino project yes, though the end product is something I have been working on for months. I'm not expecting to be able to get the scale of array I want, but I'm hoping that with the help of Arduino I'll be able to make a small scale array and learn from my experience.

Correct, the diodes would be somewhat costly. Eventually I'd like to see the diodes mounted on a PCB board as close as possible to each other. Though right now I'm not to terribly concerned with how they are mounted. Hot gluing them to a piece of paper is a possibility at this point.

I'm just curious as to how I could get the readings from each individual diode if there are way more diodes than inputs.

Its difficult to provide input, you don't say what your application is and there is no link to the datasheet for that part ( I didn't see anything relevant using a google search for PD3122FE000F datasheet)

But if you want a closely spaced array of optical sensors you could consider using the CCD array from an optical mouse. There are a few articles on how to interface them, such as this one: http://meuk.spritesserver.nl/projects/mouseeye/
It may be a very cheap way to prototype and test your concept.

The application is a multi-touch input device. All the multi-touch systems I have seen require a projector + webcam combo, and that requires a lot of space. I have also seen a system that uses IR transmitters and receivers both behind the screen, though the problem with this system is that the detectable resolution is very low due to the transmitters taking up space that could be used by more receivers (this is where FTIR is handy).

What I thought would be a more practical idea (or at least for a flatter application with a higher resolution) is to have an array of sensors (my project) behind an LCD screen with a FTIR plane in front of the screen. Or possibly integrated into the light bar's acrylic pane.

The FTIR (frustrated total internal reflection) plane would provide an excellent light source that would help the sensors register touch points.

PD3122F Datasheet - PD3122FE000F is the RoHS compliant version.

The Mouse Eye project is the exact project that inspired this idea. My original idea was to use a CMOS array as it would have a higher resolution per area per cost than a PD array, but for the sake of simplicity I though a PD array would be easier for a first project. And, the ADNB-2610 is no longer sold. I'd have to get the ADNB-2620 and through Digi-Key I'd have to make a minimum order of 6,000 @ $0.12 a piece. Excellent price if I were making multiple prototypes, but I'd rather not drop $750 at this point, if possible.

Even if I were to use a CMOS/CCD array the Arduino is limited to 20 DI/Os.

Is there a way to expand the number of inputs?
And what do you think of my project?

I think its a very cool project. But I am a little confused, that mouse implimentation uses the ADNS-2610 which is a currently available part costing around $1.50 in one off quantities.
It uses two wire synchronous serial communications to access all pixels on a chip so I think one chip would give you 324 pixels and you could use four chips (five pins?) if you needed more pixels. Perhaps the problem that may rule this very low cost solution out for your application is the optics necessary to get the mouse sensor to read over the full area of the display. But it sure would be a low cost way of implementing your application if it could be done.

If you do want to use individual sensors then some form of multiplexing technology that allowed you to select sensors, perhaps reading 8 at a time as you 'scanned across' the sensors behind the display would be the way to go.

you can build a nice & very simple array where each pixel is a photoresistor in series with a diode. Then you wire & multiplex the array just like you would an array of LEDs. Using just the Arduino you could do a 6x6 array (since you've got 6 analog ins). If you added multiplexers you could really scale things up...

Have you checked out Jeff Han's work?: Jeff Han, NYU Courant Institute of Mathematical Sciences

& of course johnny lee's projects are awesome & relevant: Johnny Lee's website has moved

good luck!

Thanks for the replies!

@mem
The more I read the data sheets for the mouse sensors the more I want to use them, but there are a few problems that come up.

The first problem is the spectrum that the CMOS sensors are calibrated for. I had an IR optical mouse from Logitech for a couple years but I had to toss it because I broke the RF receiver for it and unfortunately now I can't open it up and see what sensor they were using. >.< However, as far as the Avago sensors go, they just barely can see IR, mostly picking up visible light peaking around 600nm. This doesn't rule out using the sensor though. A simple fix for this is some Rosco Roscolux #27 (Medium Red 360-580nm) and #74 (Night Blue 540-660) filter paper. I'm sure I can find some other film that will block out the rest up to 750nm or up to the frequency I used for FTIR.

The second problem is the depth needed to focus the sensors on a given area. The whole idea for this project is to get the sensors to be as slim as possible so that it wouldn't make and LCD monitor much thicker than it already is. However if I took the time to calculate some of the light physics I'm sure I'd find the focusing point to were the sensor picks up just as much space as it's foot print, still there would be more depth taken up by the CMOS sensors than a photodiode. The down side to the PD array is that the resolution is not as great.

The point I guess I'm getting at is that there are trade-offs for either scenario.

@leahb
Correct, my idea did involve considering each photodiode's (or CMOS) return value a pixel (pixel array if CMOS is used) that is between back and white. Thus the array would make a 2D image that can be processed.

Could you point me in a direction to where I could learn more about multiplexing with Arduino?

Thanks! :slight_smile:

I found something interesting and might help me with the project. However, I have no idea how I would program with this.

8-Channel Analog Multiplexer with Serial Interface

I found this trying to do some research on multiplexing. What is cool about it is that you can daisy chain them for a ton of analog inputs only at the expense of 1 digital port!

Like I said, I have no idea how to program this yet, but does anyone think I am on the right path here?

Another (very cheap) well documented way is to use the CD4051 8 channel analog multiplexer IC. I It doesent use serial interface, but you can still daisy chain many of them.

Search the playground for 4051 to see how to interface it to Arduino. It's rather simple.

So I did some more research into photodiodes, and found some REALLY tiny ones, only 2mm long and 1mm wide. And they have a funny wavelength sensory curve that would be great for this project. TEMT6200X01

Considering a 17" monitor (what I'm working with), to get the number of diodes we would need we can use Pythagoreans theorem to help us out. If my math is wrong here help me out.

A² + B² = C²

C = 17" or roughly 432mm
C² = 432mm² = 186624mm

The monitor is not wide-screen so the aspect ratio is 4:3.

Thus, roughly:

186624 / 7 = 26660

A² = 26660 x 4 = 106640
B² = 26660 x 3 = 79980

Making:

A = [ch8730]106640 = 326
B = [ch8730]79980 = 283

If my math is right, the monitor is about 326mm wide by 282mm tall.

If we packed the photodiodes as close as possible but keeping a square foot print (2mm²) this would mean that we could make a 163 x 141 diode array. Unfortunately, this would give us a poor resolution, but the whole array would only be about 2-3mm thick. However, the 23,000 (163 x 141) photodiodes would cost about $8,300... which is about 55 times more than what the monitor cost when it was new!

So this is turning out to be a completely not cost effective porject :P. However, we get wonderfully thin hardware with a relatively decent resolution (considering you could fit about an 8 x 8 array of those diodes on your finger tip).

I guess I'm going back to the drawing board. Going to take a more detailed look at optical mouse sensors and possibly cellphone cameras.

Just wanted to update some of my thoughts. :stuck_out_tongue:

First off I decided I needed to define what cost effective means to me in terms of this project. All the other multi-touch systems that I have seen (excluding the iPhone & iPod Touch) use a projector, webcam and special screen to accomplish their goal. Lets just say a cheap projector is about $800 USD. A webcam is $20. And the special screen (Rosco projection film on an acrylic FTIR pane) is about $150. Rounding up, thats about $1,000 USD... which considering the application thats not a horrible price.

I found some 3mm phototransistors by the company Fairchild for around $0.07 a piece in bulk. The hard part is getting the computer to read the PTs.

My first thought was to daisy chain some 8 channel ADC multiplexers to read all the PTs. I quickly found out that I would need a TON of multiplexers (total # LEDS / 8 or maybe I'm just not using them right). I ended up needing like 1000 some odd multiplexers.

That:
A) is silly
B) will cost to much
and C) will take up a lot of real estate that we don't have.

So, I have shifted my thinking. Rather than using existing multiplex ICs, I'll make my own. The problem, however, is I have no idea how to do that. Ha!

Heres how it works in my head...

The PTs I mentioned earlier (Fairchild QSC113) are 3mm in diameter. Thus, we would make a 110 x 95 array to cover the entire screen with some overlap. Mind you this would require shaving the sides down so that the foot print was literally 3mm².

On a PCB board, the top layer would have 95 rows of copper trace, connecting the emitter of each PT in each row. The bottom layer would have 110 columns of copper trace, connecting to the collector of each PT in each column.

Now this is where I'm not quite sure how this will work...

Basically, each row and column have a switch. The switches need to do 2 things.

First, they need to be controlled by a microprocessor that will turn the switch to an ON or TRUE state.

Second, the switches for each column when in the ON/TRUE state need to connect that column to a power source and the switches for each row to an ADC's input. So that when Column 1's switch is set to ON/TRUE (while the rest are OFF/FALSE) and Row 1's set to ON/TRUE the ADC will get a read out from PT- 1,1 in the matrix.

The microprocessor can then turn on and off switches so that the ADC can essentially scan through the matrix.

The idea is rather simple, I think. Execution on the other hand, I will need some help with.

Can anyone point me in the right direction as to how I might accomplish building a matrix like this, please! :slight_smile:

First off, you need to think about the processing speed needed.

An analogRead with a reliable quality (ADC clock set to 16 cycles) takes around 256 cycles of the master clock. This means you can get an absolute max of 16M/256 = ~60000 samples/sec, and that is without counting all the processing. You have 110x95=10450 receptors to be read in real-time, so you can't possibly obtain more then 6 refreshes per second.

Correct, I think. I hadn't thought the math out yet, because I am more focused on a proof of concept. But I figured speed would eventually be an issue, so later I could add a third dimension to the matrix. Essentially, giving the "switches" a second or third bit so that it knows what layer to select. Thus directing the sensor to another ADC.

Also concerning the speed, now that I think about it... I could just make multiple matrices rather than layers. Like 4 - 28 x 24 matrices (depending on the number of inputs on the ADC). Or something to that effect.

But right now I'm trying to figure out how to do the "switching" for the matrix.

you want to take advantage of the grid...you don't need a dedicated analog in for each pixel ;). check out: http://www.cs.colorado.edu/~buechley/diy/diy_tank.html#arrays

Thanks for you reply Leah. Your site was informative :smiley:

I drew up a schematic, and I am satisfied with the design. Now I need to physically produce athe layout then firgure out how to program it.

I'll post back when I atleast have a few pictures.

While I wait for funding and parts, I'm starting on a new idea.