CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Interfacing photodiodes to PIC ADC

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
vsmguy



Joined: 13 Jan 2007
Posts: 91

View user's profile Send private message Visit poster's website

Interfacing photodiodes to PIC ADC
PostPosted: Sun Feb 25, 2007 12:16 am     Reply with quote

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



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Sun Feb 25, 2007 12:53 am     Reply with quote

The simplest way of interfacing this sensor to the PIC is to use an opamp.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
vsmguy



Joined: 13 Jan 2007
Posts: 91

View user's profile Send private message Visit poster's website

PostPosted: Sun Feb 25, 2007 8:25 am     Reply with quote

asmallri wrote:
The simplest way of interfacing this sensor to the PIC is to use an opamp.


I know that Smile

I wanted to know if I could do it another way.
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Sun Feb 25, 2007 9:12 am     Reply with quote

What are you trying to measure? If you are measuring full sunlight or some other bright constant light source you may get away with the single resistor design. But if you are looking for high speed or high sensitivity you are going to need an amplifier.
_________________
The search for better is endless. Instead simply find very good and get the job done.
Ttelmah
Guest







PostPosted: Sun Feb 25, 2007 10:19 am     Reply with quote

SherpaDoug, has 'put his finger' on the critical question.
The photodiode, acts as a current source, with the amount of current, dependant on the quantum efficiency, and the amount of light involved.
Now this diode, will itself have leakage, as does the ADC input on the PIC (quoted as up to 100nA). The current flowing must be large enough, to draw the ADC input, to the required voltage for sampling, in a reasonable timescale. The longer the timescale, the more significant the leakage terms, and other things like thermal noise in the diode become. Now just how small the current involved is, is perhaps best illustrated by a typical 'high sensitivity' photo detector, which will typically use a sampling resistor, in the order of 1000MR. However, with a larger diode (normally bad for frequency response, because it gives a larger junction capacitance, but 'better' in terms of how many photons are collected), for bright illumination levels, the diode may well be useable without an op-amp, especially if the sampling time is kept reasonably long (allowing the internal capacitor to charge). However for lower light levels an amplifier will be needed. It doesn't have to be an op-amp. A simple FET source-follower can of course be used.

Best Wishes
vsmguy



Joined: 13 Jan 2007
Posts: 91

View user's profile Send private message Visit poster's website

PostPosted: Sun Feb 25, 2007 12:58 pm     Reply with quote

am sorry I was not very specific .

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.

Will a simple LM324 work ?
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Sun Feb 25, 2007 4:59 pm     Reply with quote

vsmguy wrote:
Will a simple LM324 work ?


A single supply opamp (typical cmos opamp) will be sufficient - no need to use a dual supply type.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
vsmguy



Joined: 13 Jan 2007
Posts: 91

View user's profile Send private message Visit poster's website

PostPosted: Sun Feb 25, 2007 8:21 pm     Reply with quote

The LM324 can be run from a single supply too...

Will it work ?

What is the specs of the opamp I am looking at to interface with photodiode ?
kender



Joined: 09 Aug 2004
Posts: 768
Location: Silicon Valley

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

PostPosted: Mon Feb 26, 2007 12:01 am     Reply with quote

vsmguy wrote:
What is the specs of the opamp I am looking at to interface with photodiode ?

You want a high input impedance and low input bias current. Takea look at this app note too: http://focus.ti.com/lit/an/sboa035/sboa035.pdf
vsmguy



Joined: 13 Jan 2007
Posts: 91

View user's profile Send private message Visit poster's website

PostPosted: Mon Feb 26, 2007 8:10 am     Reply with quote

Kender,

after I came back here from EDABoard, I had a sense of Deja Vu ;)

Will a LF351 fit the bill ?
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group