Pages: [1]   Go Down
Author Topic: amplifier vs voltage divider when using a photodiode and analog input  (Read 2535 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 3
Posts: 120
Arduinos are cool! :D
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have an ir photodiode and was wondering, why would I use an amplifier instead of using a voltage divider with a big ass resistor.  By increasing the resistor value on the voltage divider, you can get the voltage to the maximum of the ADC.

Are there benefits/drawbacks with one over the other in terms of measurement?

Thanks,


Adrian
Logged

I'm a programmer dammit, not an engineer! smiley-grin
Like this post?  Please give me some karma for it.  Thanks! smiley

Offline Offline
Full Member
***
Karma: 3
Posts: 120
Arduinos are cool! :D
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No one has a comment on this?
Logged

I'm a programmer dammit, not an engineer! smiley-grin
Like this post?  Please give me some karma for it.  Thanks! smiley

Montreal
Online Online
Edison Member
*
Karma: 23
Posts: 2486
Per aspera ad astra.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

IR led is also sensitive to ambient light, it'd be practically impossible to get accurate reading using resistive divider only during the day time and night. Amplifier usually has some kind of AGC (automatic gain control) to keep diodes biasing voltage constant
Logged

Rapa Nui
Offline Offline
Edison Member
*
Karma: 53
Posts: 1990
Pukao hats cleaning services
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The ADC's input impedance shall be <10kohm. In order to get the high impedance IR into low impedance ADC (by maintaining a specific frequency response) you need a special preamplifier. Note the IR diode could be used 2 different modi.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16520
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The ADC's input impedance shall be <10kohm. In order to get the high impedance IR into low impedance ADC (by maintaining a specific frequency response) you need a special preamplifier. Note the IR diode could be used 2 different modi.

Yes, because a photodiode is used in it's reverse bias mode there is very small currents involved which means it's a very high impedance device not readily connectable directly to a arduino analog input pin. Impedance matching is required which is most easily done with an appropriate op-amp circuit.

Appropriate bandpass filtering is a different issue but also relevant and important in most applications.

Lefty
Logged

Topsham, Vermont USA
Offline Offline
Edison Member
*
Karma: 24
Posts: 1764
... in The Woods In Vermont
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The Arduino's Analog Input impedance is 'large' I believe: >100K.  Anyone have a real spec. number?

The other reason for using an amplifier is Speed. It can react primarily, and quickly to Current from the photodiode. Photodiodes can have very fast response. What do you need? If it's "slow" like 38KHz or lower, not much of a problem...

Logged

Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16520
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The Arduino's Analog Input impedance is 'large' I believe: >100K.  Anyone have a real spec. number?

The other reason for using an amplifier is Speed. It can react primarily, and quickly to Current from the photodiode. Photodiodes can have very fast response. What do you need? If it's "slow" like 38KHz or lower, not much of a problem...



Rather then the DC input impedance of the pin being a limit it's the single sample and hold capacitor integration time that limits the source impedance to the recommended 10k ohms or less.

Lefty
Logged

Offline Offline
Sr. Member
****
Karma: 9
Posts: 296
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I have an ir photodiode and was wondering, why would I use an amplifier instead of using a voltage divider with a big ass resistor.  By increasing the resistor value on the voltage divider, you can get the voltage to the maximum of the ADC.

Your assumption here is your photodiode will produce enough current or voltage such that a sufficient voltage drop will appear across your big ass resistor.
It doesn't.

Your second assumption here is the ADC doesn't care what impedance it sees across it's input.
It does.
It prefers a low impedance source.
If you have a high source impedance, and say you have (2) channel inputs on your ADC, you'll experience channel-to-channel crosstalk. The readings you'll now be getting from your ADC will be incorrect because of this crosstalk. As a side effect of the high impedance, you'll also lost some bandwidth to your input signal.

So what's the solution to this problem?
An almost universal solution to this is using an opamp to lower the source impedance the ADC sees at it's input.  The  opamps also gives you the ability to provide voltage gain (boost up that input signal) and also provide input/output impedance matching. You can cater your opamp circuit to match the impedance that your sensor wants to see, and at the same time provide a low output impedance that your ADC wants to see.
Logged

Montreal
Online Online
Edison Member
*
Karma: 23
Posts: 2486
Per aspera ad astra.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
If you have a high source impedance, and say you have (2) channel inputs on your ADC, you'll experience channel-to-channel crosstalk. The readings you'll now be getting from your ADC will be incorrect because of this crosstalk. As a side effect of the high impedance, you'll also lost some bandwidth to your input signal.
This simple isn't correct, crosstalk is not related with output impedance of the source, rather speed of switching internal mux circuitry.
 Arduino input resistance for DC is about 100 M Ohm, it's not clear how fast OP needs to sample source, but even at hight rate S/H timing only 1 / 10 of ADC conversion timing, plus cap is only a few pF, so additional capacitor between input and ground may be used to solve a problem with lowering  input impedance with fast sampling.
 Still, I believe the main issue with photosensors is extremely wide dynamic range of ambient lighting, and that combine with relatively low resolution ADC (10 bits)
http://en.wikipedia.org/wiki/Moonlight
Quote
The full moon is about 500,000 times fainter than the Sun.
there is almost 120 dB dynamic, which imply 19 / 20 -bit ADC
Logged

Offline Offline
Sr. Member
****
Karma: 9
Posts: 296
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
This simple isn't correct, crosstalk is not related with output impedance of the source, rather speed of switching internal mux circuitry.

True. But a high impedance at the inputs will exacerbate the problem worse.

Now I don't know if the Arduino ADC are considered high or low impedance.

You can buy ADCs with high input impedance, helping reduce component count and support circuitry in a design.
Logged

Offline Offline
Full Member
***
Karma: 3
Posts: 120
Arduinos are cool! :D
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, so, if IR photo diodes are high impedance which won't work on the ADC, what is this that I have?  It works and works really well.  I tried some others that I found that look like diodes or diodes that are black and they work but no where near as well as this little black box on a voltage splitter.  Does it contain a preamp?  I found it at my local surplus store.  They didn't have any specs.

Note the IR diode could be used 2 different modi.
What do you mean?

The other reason for using an amplifier is Speed. It can react primarily, and quickly to Current from the photodiode. Photodiodes can have very fast response. What do you need? If it's "slow" like 38KHz or lower, not much of a problem...
I noticed that this device looks like it takes about 400-500usec to respond to turning on a IR LED.  Can it be made faster using a amp then?

I'll need to read up on impedance matching.


* 1366668622504.jpg (47.41 KB, 550x645 - viewed 16 times.)
Logged

I'm a programmer dammit, not an engineer! smiley-grin
Like this post?  Please give me some karma for it.  Thanks! smiley

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

I noticed that this device looks like it takes about 400-500usec to respond to turning on a IR LED.  Can it be made faster using a amp then?

Yes. If you connect it direct to an analog input, you need to use a high value pullup or pulldown resistor. The high resistance, coupled with the diode and pin capacitance, slows down the response. You need to use an amplifier that presents a much lower resistance to the photodiode.
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
Newbie
*
Karma: 1
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi adrian_h,

You may want to check out "Transimpedance Photodiode Amplifier" in Google.
From what I understand, they are good for when you need a linear response (Vout vs Radiance).
They are easily implemented with an opamp, resistor and (optionally) a cap.
These amps should satisfy the impedance requirements of the arduino ADC's.
Logged

Pages: [1]   Go Up
Jump to: