Multiplexing Photodiodes

Just wondering (and I am very very new to electronics) from what I have read about multiplexing, people do it a lot with LEDs can you do the same for photodiodes, and then return a digital output through the ADC?

If so using Arudnio, what would be the maximum amount I could then plug into the board and and gain an light intensity output for each individual diode?

Many thanks,


Max amount would depend on the number of multiplexers you wanted to connect up.
For example, you could use a part like DG406

If the photodiodes work okay with the DG406 on-resistance of 100 ohm, then you can connect up 16 to this part, and 16 to the other 5 analog inputs, and have 96 inputs.
You will need 4 output pins to select 1 of of 16 outputs from each chip. Write a simple loop:
apply address 0000, read 6 inputs (1 from each mux)
apply address 0001, read 6 inputs
apply address 1110, read 6 inputs
apply address 1111, read 6 inputs

can you do the same for photodiodes

Photodiodes are weird devices as they are not supposed to take dc voltages directly.

Otherwise, you can easily multiplex other light sensors, like photoresistors, or even leds: LEDs can be turned to light emitting devices and light sensors at the same time.

Thanks CR, Will have a good read of that and try and get my head around it, I understand the programming aspect of it, but the schematics confuse me, as I said I'm very new to all of the electronic, but appreciate your help.

And dhenry, I started out with looking at LEds actually, they're much cheaper too, but people tend to like to argue the fact they're called a L Emitting d instead of actually thinking they can sense light too and help, what you said is interesting, you mention at the same time, does this mean the LED has to be lit when it is reading light, I'd assume that would then alter the read out?

I'll have a look into a photoresistor's though, thanks.

Also for this project I would be looking at getting as many sensing diodes into 5 x 4 inch area as possible, hopefully a few 100 as the more the better.

What is the source of the light you are detecting?

I'm not entirely sure as of yet, it depends on how fast the board can read of the data, I have access to a lot of lighting, doing a photographic science degree you see.

Flash duration syncs at 1/60th of a second, I can however use a continues light source, such as tungsten or even LED.

If you were talking about regard to the spectral power distribution of the light source, i plan to filter UV and IR so I am only dealing with the visible light spectrum.

Not exactly concurrently but practically concurrently.

Led's leakage current varies with light shining on it. So you can read back the leakage to detect light sensitivity (or to use led as a switch to detect fingers).

Google a paper by folks from Mitsubishi.

You can light up an led, and then turn it off by applying a reverse voltage on it while measuring its leakage (usually via adc or timer). If the measurement phase is very short, you can have an led that can self-adjust its brightness based on ambient lighting.

Check the photodiode specs, see if they're responsive to the light frequency you're after.

When I went to tech school years ago to learn electronics, one of sections of our course was to build a device to “read” stencils in the shape of letters, and have the computer (an Amiga 1000) interpret the shape. Basically a primitive form of OCR and/or computer vision. Our array was an 8 x 8 phototransistor array (64 elements); the input to the Amiga was via the 8 bit parallel port. We basically had a multiplexing scheme where we used an 8 bit shift register, setting the parallel port to output to select which “row” we wanted; once that was latched in, we switched over to “read” mode and read the outputs of the row. There was also some buffers and such built in (so we didn’t blow anything by attempting to write when in read mode, etc). As I remember, it wasn’t a terribly complex circuit, but still interesting nonetheless. I keep meaning to dig it up, scan it in, and post it on my website (you could make a nice low-vision “eye” using such an array made from SMT photo transistors, and a simple convex lens, all mounted in a box - would be pretty neat for a small robot).

Cheers dhenry, I'll have a read.

CR: they're sensitive up to 820nm, from around 300, so more than enough.

Thanks for the input cr0sh, I'd need a hell of a lot more than that though I think, I suppose the other alternative is to use multiple arduino boards, each diode, or whatever I decide to end up using will act as a pixel to create a image/video - depending on which route I go down, hence why more is better.

I found out there is an electronics department which is combined with the computer science department at a different campus as part of my uni so going to try and have a meeting with them see if they can help me with the project, but cheers for all the input - it gives me an excellent start!

Photodiodes are normally operated in reverse-biased mode. So you connect a pullup or pulldown resistor in series with them and measure the voltage dropped across that. I can't see any problem with using an analogue multiplexer to read several of them from a single Arduino analog pin. However, the current passed by a photodiode is small, so the pullup/pulldown resistor needs quite a high value. So if you are reading the voltage drop directly into an Arduino pin, you need to take precautions to allow for that (i.e. add a delay between setting the internal and external multiplexers, and starting the conversion). Alternatively, use an op amp to buffer and perhaps amplify the signal.

Sorry, if I get a little offtopic, but from what I read about using a LED as photodiode made me think:

Hmmm, why not making a whole LED-Screen act as a camera?

Maybe it is long since done and we all get spyed by our own flatscreens? ]:smiley:

smiles and waves George Orwell 'hello'

Thanks DC42, makes me feel a bit more at ease with what I'm planning on doing, sorry for the late reply, I have about, or exactly 16 other deadlines in the next 3 months before starting this so I'm a bit busy haha!

o_lampe, this sensors needs to fit within an existing camera system, it's all well and good recording light falling on an object, but the light that hits your screen from objects in a room wouldn't be focused (so i wouldn't worry - you'd be upside down too), and as light waves are destructive, you screen has anti glare technology, cheers for the brainstorming though, but I need complete control of the light here, so it's going in the back of something like this...

Infact... you may of just saved me a load of time here o_lampe because i've just realise that these cameras are upside down and probably back to front, so I'll have to read bottom right to top left and then write the reverse - could make things fun...!