Pages: [1]   Go Down
Author Topic: Multiplexing Photodiodes  (Read 1759 times)
0 Members and 1 Guest are viewing this topic.
London, UK
Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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,

Simon
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 437
Posts: 23650
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Max amount would depend on the number of multiplexers you wanted to connect up.
For example, you could use a part like DG406
http://www.maximintegrated.com/datasheet/index.mvp/id/1002/t/al
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
repeat

Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

London, UK
Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 437
Posts: 23650
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What is the source of the light you are detecting?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

London, UK
Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 437
Posts: 23650
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 36
Posts: 5519
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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).
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

London, UK
Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 220
Posts: 6587
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Full Member
***
Karma: 2
Posts: 213
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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-twist

*smiles and waves George Orwell 'hello'*

Logged

It's not my fault when my Posts are full of Errors. This stupid autocorrection from my browser is set up for german grammar.

London, UK
Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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...

http://www.helixphoto.com/ebay/ProDigital/SinarP_4x5sn26285_1.jpg

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...!
Logged

Pages: [1]   Go Up
Jump to: