Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Interfacing photodiodes to PIC ADC

Status
Not open for further replies.

vsmGuy

Advanced Member level 2
Joined
Jun 26, 2006
Messages
503
Helped
44
Reputation
88
Reaction score
15
Trophy points
1,298
Location
VddVss
Activity points
3,882
photodiode adc

The PIC ADC requires that the input impedance be max 2.5k for fast operation.

Then, how I do go about interfacing photodiodes to the ADC without using something like opamps, because as far as I know photodiodes have very high impedance.

The circuit I have at mind is :

http://www.geocities.com/vimalsshankar/sch.png

Should it be that I have to adjust the value of R1 to be within specification ?

Please comment.
 

photodiode pic adc

Hi, What do you want to do ?.
 

interfacing photodiode

Find out how much light/ir is falling on the photodiode.

Added after 3 minutes:

and i have to do it at a sampling rate of minimum 60hz
 

what atod converter to use with photodiode

vsmGuy said:
The PIC ADC requires that the input impedance be max 2.5k for fast operation.

Then, how I do go about interfacing photodiodes to the ADC without using something like opamps, because as far as I know photodiodes have very high impedance.

The circuit I have at mind is :

h**p://www.geocities.com/vimalsshankar/sch.png

Should it be that I have to adjust the value of R1 to be within specification ?

Please comment.


It's not clear what do you need, if you need a proportional light to electric conversion then you need to capture the photocurrent. As long the conversion methode is the ohm law and you'll use a simple resistor, the photodiode will be saturaded fast. To avoid that you need a true current to voltage converter.
As sensitive it must be, as lower will be the photocurrent and as low input current must have the operational amplifier.
Define first what do you need.
 

photodiode

I need to convert incident intensity falling on the photodiode to voltage.

A solution which does not saturate easily will be indeed welcome.

I have to sample at rate of minimum 60hz
 

photodiode interfacing with adc

I have never used a photodiode, so I do not know their advantages. However from what I've seen they are faster than phototransistors by orders of magnetude, but have much higher impedance.

If this is correct, you may look into using phototransistors instead. You will be able to get a nice low impedance, and plenty fast for the sample rate you mentioned.

Keep in mind though that the output will not be linear. It will be fairly easy in the middle of the range, but asymptotic at the extremes. A mathematical correction or a lookup table may be necessary if you wish to use more than one decade of sensitivity.

Also, the package that you put the device in will affect the phototransistor. If you can approximate the final mounting configuration then your setup will be easier. You can add optical filters to reduce the sensitivity and the current.
 

photodiode adc voltage

From what I've seen, photodiodes are better suited for intensity measurements and phototransistors for switching.

I opt for a photodiode.. that's the very reason why I posted this question.

I dont trust the active region of a phototransistor enough... too much of a hassle reagrding calibration..

But do point out if I am mistaken...
 

phototransistor interfacing adc

have a look at this user guide from Microchip
 

photodiode adc pic

There is a TI/BurrBrown product, OPT301. It is a photodiode with support circuitry on a 8PDIP. I believe it will source current to read across a 10k resistor. Not cheap, but easy.
 
  • Like
Reactions: rribas

    rribas

    Points: 2
    Helpful Answer Positive Rating
pic adc scale

Nothing simple guys ?

For example, can't I just keep the value of R1 < 2k.. it also doubles up as a I to V converter !
 

photodiode adc circuit

I already mentioned that I have no experience with photodiodes. I did look one up though.

At 5mW/sqcm, the light current is 40uA. Assuming it is fairly linear, pointing it directly at the sun on a clear day will give about 800uA. Through a 2k5 resistor the voltage will be 2V, not even half scale.

I will not assume this is a typical photodiode, but that most will be within an order of magnetude. That said, I believe a photodiode will require support circuitry to be of use to a microcontroller's ADC input.

I missed that part where you mentioned what environment you are monitoring the light level in.
 

monitoring photodiode with pic

ldanielrosa said:
I already mentioned that I have no experience with photodiodes. I did look one up though.

At 5mW/sqcm, the light current is 40uA. Assuming it is fairly linear, pointing it directly at the sun on a clear day will give about 800uA. Through a 2k5 resistor the voltage will be 2V, not even half scale.

That's some serious research !
Yes - I seriously think it needs an opamp UNLESS I explicitly set VRef to 2.5v (or whatever voltage I get for resistance I use)

What do you think ?

ldanielrosa said:
I missed that part where you mentioned what environment you are monitoring the light level in.

Are you an engineer ? High chance :)

I am sorry I was not very specific - I did not expect such good responses.

I am not going to use lumens for specifications, but the setup will be used for hobby robotics in very dimly lit environment for line followers.

The environment should not saturate the diode though - typically classroom flouroscent lighting. I am on the lookout for pointers regarding that.

White poster paper with black poster paper/scotch tape will be the targets to detect.

I don't want digital output using comparator because I want to use dynamic calibration using intensity values.

It's not very convenient to keep on adjusting presets for triggering threshold.

Do you have field experience in PIC ?
 

vsmGuy said:
Nothing simple guys ?

For example, can't I just keep the value of R1 < 2k.. it also doubles up as a I to V converter !


Imagine you need to sense 10nA photocurrent (and this is a huge value sometime). R = 2K, V=2exp3 * 10 exp -9 = 20 exp-3V = 20mV

If you need full scale at say 100nA and 0 to dark, the maximum voltage swing will be 0-200mV. How you'll scale it to full AD converter range?

You still did't answer what kind of light (what wavelenght) and how much will be difference between dark and maximum light level. That's the starting point.
 

    vsmGuy

    Points: 2
    Helpful Answer Positive Rating
I will hookup a DVMM to the circuit I posted and post the readings soon, say today evening.
 

That's some serious research !

...

Are you an engineer ?

You're not the first to say that. Thank you.

That was minimal research, I only pulled up two datasheets and ran with the more sensitive one. As for solar flux, I pulled 1000w/sqm out of my ear.

I'm glad to hear that someone is using the ADC for line following instead of doing it all in external hardware. There are so many more options available.

To avoid confusion and aliasing errors, I recommend a minimum of 240 samples per second per sensor. This will mean that for 60Hz power, you are likely to get 1 good sample out of every two for even low persistence tubes.

You may also want to include an illuminator for when the light is too dim to get a valid reading.

Do you have field experience in PIC ?

Not field experience, but that is the brand of microcontroller I am playing with.
 

    vsmGuy

    Points: 2
    Helpful Answer Positive Rating
I will be getting back to you guys soon...
 

The right way to do this is with an opamp. It's not that difficult. If the intensity of the light doesn't change with high frequency, you cna get away with a single-supply opamp. Here's a Burr-Brown app note
**broken link removed**
 

    vsmGuy

    Points: 2
    Helpful Answer Positive Rating
The results are good. I am getting appreciable contrast between the write and black surfaces even if they are glossy - tens of orders of magnitude difference in resistance.

I don't think we need an opamp - we are using the photodiode in Photoconductive mode rather than photovoltaic mode.

Am I terribly confused regarding this matter ? :)
 

Using an amplifire in a transconductance fashion helps convert the current into voltage which can then be read by the A-D converter....
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top