Author Topic: Basic Op Amp Question --- Application is For Boosting IR Photodiode Signal  (Read 13154 times)

0 Members and 1 Guest are viewing this topic.

Offline PotomacTopic starter

  • Regular Contributor
  • *
  • Posts: 71
  • Country: us
Hi all.  Another beginner question here.

I have just breadboarded a particular circuit based on a schematic I came across. See attached picture collage below.

The circuit has an op amp connected to a photodiode to boost the signal from an infrared LED in the 940 nm spectrum.  While I know what the circuit's overall function is (gain), I have limited experience with op amps and don't quite have to vocabulary to describe what is going on in this circuit point by point.

The schematic came from an open source design that seems to fit the needs of my project.  I am using the LED and photodiode to measure the optical density of what. (I.E. how cloudy it is and how much light is transmitted across a small rectangular plastic container of liquid)

I have two questions:

1).  What kind of op amp circuit can this be classified as? The nomenclature in the schematic isn't so familiar to me. It looks like a bit of a maze, but I'm sure it makes sense to electrical engineers. Dave talks about a few types of op amp circuits in this video.  I think the op amp component is a "rail to rail" op amp that he talks about in the vid. Indeed, the Microchip Technology MCP6022T op amp that the circuit calls for is a rail-to-rail one:  http://www.digikey.com/product-detail/en/MCP6022T-I%2FSN/MCP6022T-I%2FSNCT-ND/5014121




2). Did I faithfully reproduce the schematic in the breadboard I layed out?  The very bottom most picture in the attached collage focuses on the op amp circuit in question. I am ignoring the rest of the schematic for the time being so I can abstract this single piece out.



Relevant Notes:

-I have fitted a 0.1 uF ceramic capacitor on the breadboard. I am using this since it's not polarized.  There is a tantulum capacitor I took out and set aside. It's the one that's resting on the grey fabric surface.

-Here's the three main component datasheets

OpAmp Digikey Link:  http://www.digikey.com/product-detail/en/MCP6022T-I%2FSN/MCP6022T-I%2FSNCT-ND/5014121
OpAmp Full Datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/21685d.pdf


Photodiode Digikey link: http://www.digikey.com/product-detail/en/BPV10NF/751-1002-ND/1681136

IR LED Digikey link: http://www.digikey.com/product-search/en?keywords=511-1365-nd

« Last Edit: January 01, 2016, 01:57:26 am by Potomac »
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Well, you've answered #1 yourself. The op-amp is a single-supply-capable, low voltage,  rail-to-rail, dual opamp. The circuit is an ordinary amplifier, with gain set in the usual way by the associated resistors.

As for #2.... Your photo does not seem to show that the op-amp is correctly connected.
It's really hard to tell since you are using such thick wires for jumpers but I can't see that there is anything connected to Pin 4 which should be connected to Ground.

 (Your Pin 1 output is connected to Arduino A1, but the schematic shows it connected to A0.)

The Data Sheet gives instructions for what to do with unused op-amps in the quad package but I can't find anything about what to do with the unused amp in the dual package that you have. If it were me, for this application, I'd just have nothing at all connected to the second op-amp (pins 5, 6, and 7) unless problems arose.

Your image shows (I think) a 47K feedback resistor connected from Pin 1 to Pin 2. The schematic calls for 69K (a weird value). This resistor is important for setting the gain of the amp, so you should try to get closer in value. Try 68K which is a standard value. You can put resistors in series to add to the correct value.

The 10K resistor from Pin 2 to Ground is correct. The 100K from Pin 3 to Ground should be 120K according to the schematic. Again, put resistors in series to add up to the correct value if you don't have a 120K in your box.

Pin 4 needs to be connected to Ground. You appear to have a small black jumper connecting Pin 3 to Ground, this is incorrect. Move this jumper so it connects Pin 4 to Ground instead.

Remove the small black jumper connecting Pin 5 to Ground. Remove the small yellow jumper connecting Pins 6 and 7 together. This will leave the second amp completely disconnected, which should be fine for your application. Or, you can follow the scheme shown in Fig. 4-10 of the Data Sheet (which is talking about unused amps in the quad package).

The local bypass cap (0.1 uF) should be as close to the chip's Pins 4 and 8 as possible. This will help to prevent oscillation. The larger 1 uF power bypass cap "FilterC1"(which you don't have connected) can be further away. Both these caps are connected across the chip's power supply. I wouldn't bother with a tantalum for the "FilterC1" cap 1 uF, just use an ordinary electrolytic, with the Negative side to Ground. (It's OK to use the tantalum, just be _darn sure_ you get the polarity correct. Tants usually have the _positive_ side marked, whereas regular electrolytics have the _negative_ side marked. Tants can fail "spectacularly" if they are connected in reverse.)

I don't see any photodiode connected in your picture. It will be connected with Anode to Pin 3 and Cathode to Pin 8 (the positive rail) , according to the schematic. You won't get a varying output for the Arduino to read unless you have this photodiode connected.


I've taken your images, blown them up and indicated the pin numbers for you.





« Last Edit: January 01, 2016, 07:36:57 am by alsetalokin4017 »
The easiest person to fool is yourself. -- Richard Feynman
 

Offline pmbrunelle

  • Regular Contributor
  • *
  • Posts: 183
  • Country: ca
  • lost mech. guy
This is a basic non-inverting amplifier setup. The 10 k and 69 k resistors make up the feedback network which determines the gain.

The reverse-biased photodiode allows a light-dependent current to flow through it, and through the 120 k resistor which is in series with it.

From Ohm's Law, a voltage across the 120 k resistor is developed proportionally to the current through the resistor. You may want to make this resistor a trimmer, so you can adjust the sensitivity. Something like a 25-turn 500 k part.

I recommend you print out the schematic, and then you check every that node (or net) on the schematic has been faithfully reproduced in reality. Once  you have checked a node, take a marker and color over all the wires that comprise that node on the schematic to mark it as "checked". This is the method I use to ensure that my PCB layouts follow my schematic.

Since you're a beginner, this schematic is not an example of good style. Schematics do not have lines running at 45 degrees.

While we're on the subject of the unused op-amp, connect it as a unity-gain buffer and tie it to Vcc/2. While you are learning, you really should be following the best practices. That way, you can be debugging the circuit of interest without worrying in the back of your mind if the unused op-amp is doing funny stuff.
 

Offline Swemarv

  • Contributor
  • Posts: 10
A photodiode generates a current. Usually a transimpedance amplifier is used to convert this current into a voltage. The opamp you have seems to be an excellent  choice to use as an transimpedance  amplifier, there is even an example of this in the beginning of the datasheet.Check out https://en.wikipedia.org/wiki/Transimpedance_amplifier.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19491
  • Country: gb
  • 0999
It's the ratio of resistors which determine the gain. Here 10k and 69k are used which is a ratio of 1:6.9. Here's a tool I use to calculate resistor values, based on a divider or to get a certain ratio which gives 47k and 6k8.
http://jansson.us/resistors.html

Yes, a trans-impedance amplifier is the best way to go. This circuit uses a 120k load on the photodiode, followed by a an amplifier with a gain of 7, so a trans-impedance amplifier with a gain of 120×103×7 = 840×103 could be used.

The unused op-amp should be configured as a voltage follower and connected to the output of one of the other amplifier sections.
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Forgive me for being such a Luddite... but why is an op-amp even needed for this application? Surely the Arduino's ADC is sufficient for the task.

Using the circuit values below, and the IR LED / IR Photodiode pair I tested, the output swings from O V with light path between the pair fully blocked, to about 4.2 V with light path fully clear, and is nicely proportional in between.  This is with no load on the output other than a scope probe.

For testing purposes I used the output to drive the Base of a BC337-25 npn transistor through a 100k series resistor,  which transistor then drove a red LED connected from the +5V rail, through a 220R currentlimiting resistor, to the transistor Collector. Emitter connected to Ground. Inserting an opaque object gradually into the light path between the IR pair causes a nicely proportional dimming of the red LED from quite bright to completely off.

I have not yet tested this arrangement with an Arduino but I see no reason why it would not work just fine.

Yes, if desired the 230k resistor could be made a trimpot of 500 k value, but also, sensitivity is easily set in the Arduino software as well.

The easiest person to fool is yourself. -- Richard Feynman
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Yep, just as I thought, it works fine with Arduino. No op-amp appears to be needed for this application.

Here's the complex program sketch I used to test the system.

Code: [Select]
// EEV Blog PhotoDiode Test
//
// Testing Arduino with IR LED / PhotoDiode pair
//
// Connect monitor LED Anode to Pin 9 with 220R
// Connect monitor LED Cathode to Gnd
//
// Connect IR LED Anode to +5 with 3k3
// Connect IR LED Cathode to Gnd
// Connect IR PD Cathode to +5
// Connect IR PD Anode to 230k to Gnd
// Connect junction of IR PD Anode and 230k to A0
//

void setup() {
  pinMode(9, OUTPUT);
}

void loop() {
  analogWrite(9,map(analogRead(A0),0,1023,0,255));  // adjust values to tune sensitivity
}

Note that the map() statement works as a kind of "software amplifier" (or attenuator).  That is, say your Raw sensor range when operating only swings from 400 to 600, instead of the full ADC 1024 steps.  You can use the map() statement thusly:   
Result = map(Raw, 400, 600, 1, 1000);
Then Result will be 1 if Raw is 400, and will be 1000 if Raw is 600, and in-between values are scaled accordingly. 
(Of course you would still only have 200 steps of resolution, so it helps if you can achieve the full 1024 ADC steps in the Raw input in the first place.)
« Last Edit: January 02, 2016, 04:21:48 am by alsetalokin4017 »
The easiest person to fool is yourself. -- Richard Feynman
 

Offline pmbrunelle

  • Regular Contributor
  • *
  • Posts: 183
  • Country: ca
  • lost mech. guy
Typically, even though a photodiode is a "current source", it is not an ideal current source, so the best linearity will be obtained if there is a constant voltage drop across it.

So that's why I would like an inverting op-amp amplifier with the photodiode connected to the virtual ground.

Also, there are also the input protection diodes of the microcontroller which will leak current (varying from part to part). With resistance in the 100s of k, the leakage could be important. Then there's also the need to charge the sample-and-hold capacitor...

So rather than worry about characterizing all this nonsense, it's just easier to slap an op-amp on there and be confident that the circuit will work correctly. It's one thing to make one assembly and conclude that it works, but that really doesn't prove anything. Maybe you just got lucky with low leakage on your microcontroller's I/O pin leakage current. This does not guarantee that someone else will be able to reproduce your success. Nevertheless, it is a good sign.

The right solution also depends on if OP expects the detector to work out of the box without touching anything, or if it's okay to do trimming/calibration (either hardware or software).

Also, we don't know OP's specs for linearity. In the absence of information, people tend to suggest "best practices", even if it results in a more complex/costly solution. However, maybe the photodiode and current sense resistor is all that is required to meet OP's requirements.
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
I'm afraid I don't understand how using an op-amp will remove the need for calibration (turbidity level of sample -> output level of system). Nor do I see how an op-amp will compensate for nonlinearity in the detector-illuminator system response, or compensate for ambient (IR) light levels hitting the sensor, etc.  Or even take care of the other issues you mentioned. All of these issues would seem to be easily handled by a few statements in the Arduino code, adjusting some scaling variables appropriately. They can even be adjusted "on the fly" if necessary while the program is running.

At any rate, I think I've demonstrated that the op-amp isn't necessary to get a full-scale graded response in the Arduino, from the detector in response to a graded change in illumination. Just one line of code does almost all the heavy lifting. I would be astounded to learn that other samples of an Arduino Pro Mini, or Uno R3, or a raw Atmel 328P, would behave differently than mine does, using the same components and code.

But of course that removes all the fun involved with sourcing components, breadboarding up the op-amp circuit properly, calculating the gain resistors, testing and adjusting the hardware and code, transferring it all to a PCB, adjusting the code again....
 :scared:
The easiest person to fool is yourself. -- Richard Feynman
 

Offline andybarrett1

  • Regular Contributor
  • *
  • Posts: 133
  • Country: gb
Pre-made...

http://www.engineersgarage.com/sites/default/files/TSOP1738.pdf


Quote
But of course that removes all the fun involved with sourcing components, breadboarding up the op-amp circuit properly, calculating the gain resistors, testing and adjusting the hardware and code, transferring it all to a PCB, adjusting the code again....
 

Online Brumby

  • Supporter
  • ****
  • Posts: 12297
  • Country: au
Re: Basic Op Amp Question --- Application is For Boosting IR Photodiode Signal
« Reply #10 on: January 03, 2016, 09:43:56 am »
For some it's the destination - for others, it's the journey.
 

Offline PotomacTopic starter

  • Regular Contributor
  • *
  • Posts: 71
  • Country: us
Re: Basic Op Amp Question --- Application is For Boosting IR Photodiode Signal
« Reply #11 on: January 03, 2016, 11:00:16 pm »
Hey all. Original poster here again. Going to respond to all your helpful comments, starting with alsetalokin

As for #2.... Your photo does not seem to show that the op-amp is correctly connected.
It's really hard to tell since you are using such thick wires for jumpers but I can't see that there is anything connected to Pin 4 which should be connected to Ground.

 (Your Pin 1 output is connected to Arduino A1, but the schematic shows it connected to A0.)

Thanks. Good eyes.  I just re-did the circuit and posted a picture below. Pin 4 of Op Amp is now connected to ground.

Quote
The Data Sheet gives instructions for what to do with unused op-amps in the quad package but I can't find anything about what to do with the unused amp in the dual package that you have. If it were me, for this application, I'd just have nothing at all connected to the second op-amp (pins 5, 6, and 7) unless problems arose.

How should I handle connecting stuff to 5, 6 and 7?  Should I disconnect as shown in the pic below? I was given some assistance a few weeks ago, but I think he may have been wrong.


Quote
Your image shows (I think) a 47K feedback resistor connected from Pin 1 to Pin 2. The schematic calls for 69K (a weird value). This resistor is important for setting the gain of the amp, so you should try to get closer in value. Try 68K which is a standard value. You can put resistors in series to add to the correct value.

The 10K resistor from Pin 2 to Ground is correct. The 100K from Pin 3 to Ground should be 120K according to the schematic. Again, put resistors in series to add up to the correct value if you don't have a 120K in your box.

Will do this

Quote
Pin 4 needs to be connected to Ground. You appear to have a small black jumper connecting Pin 3 to Ground, this is incorrect. Move this jumper so it connects Pin 4 to Ground instead.

Corrected this. See comment above

Quote
Remove the small black jumper connecting Pin 5 to Ground. Remove the small yellow jumper connecting Pins 6 and 7 together. This will leave the second amp completely disconnected, which should be fine for your application. Or, you can follow the scheme shown in Fig. 4-10 of the Data Sheet (which is talking about unused amps in the quad package).

Ok so I should disconnect the second half of the amp? (Pins 5, 6, 7) See comments above

Quote
The local bypass cap (0.1 uF) should be as close to the chip's Pins 4 and 8 as possible. This will help to prevent oscillation. The larger 1 uF power bypass cap "FilterC1"(which you don't have connected) can be further away. Both these caps are connected across the chip's power supply. I wouldn't bother with a tantalum for the "FilterC1" cap 1 uF, just use an ordinary electrolytic, with the Negative side to Ground. (It's OK to use the tantalum, just be _darn sure_ you get the polarity correct. Tants usually have the _positive_ side marked, whereas regular electrolytics have the _negative_ side marked. Tants can fail "spectacularly" if they are connected in reverse.)

Oh, I now see the second capacitor you are referring to in the diagram.  (The one with the 1 uF value)

Can I use ceramic caps for both so long as they are the correct value? I like ceramic since they are non polarized

Quote
I don't see any photodiode connected in your picture. It will be connected with Anode to Pin 3 and Cathode to Pin 8 (the positive rail) , according to the schematic. You won't get a varying output for the Arduino to read unless you have this photodiode connected.

Will setup of the photodiode and take some pics soon
« Last Edit: January 03, 2016, 11:38:15 pm by Potomac »
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3237
  • Country: gb
Re: Basic Op Amp Question --- Application is For Boosting IR Photodiode Signal
« Reply #12 on: January 03, 2016, 11:16:06 pm »
Nor do I see how an op-amp will compensate for nonlinearity in the detector-illuminator system response,

When you operate a photodiode in the reverse biased state, it becomes a current source.  By applying a reverse bias the depletion region is increased which both increases the responsivity of the diode (i.e. higher sensitivity) and reduces junction capacitance (higher bandwidth).  If you simply attach a resistor, the voltage bias decreases with increasing photocurrent, and this can cause non-linear response.  By making the resistor lower in value, you get less variation in bias voltage, but that means you signal is also lower.

A transimpedance amplifier will maintain a fixed bias voltage across the photodiode, and provide a voltage output proportional to photocurrent with whatever gain is required (within reason).

Clearly you can get away with just using a resistor in some non-critical applications, but just because it works for you don't assume that there's never any need to control the bias.
 

Offline natbuk

  • Contributor
  • Posts: 10
  • Country: gb
Re: Basic Op Amp Question --- Application is For Boosting IR Photodiode Signal
« Reply #13 on: January 03, 2016, 11:20:23 pm »
Hey,

Apologies if this is a repeat, but haven't read all the replies (naughty me!) - but here's my ha'penny.

If I were interfacing to a current-output device, an inverting op-amp configurtation acting as a current-to-votlage (i-v) converter would be a starting point. In this application, op amps with rail-to-rail output and low current noise would be a good start (the effective output impedance of your diode will be high-ohms, so low voltage noise of little interest here). for theses general kinds of applications, I'd suggest low offset and low drift, but looking at the data sheet of your diode, the temperature dependence alone would negate any such care, unless this is mitigated.

In terms of using the optical device you've specified for absolute measurements, I'd look elsewhere for devices which have things like temperature compensation built in, or your circuit will have to get quite complex (relatively speaking). That IR diode you're listing is good for things like IR remote receivers, where you only really care about differences, i.e. the  AC, (and you would arrange you're encoding scheme to remove dependence on any kind of DC-accuracy) - of course, with enough ingenuity, you can (mostly) cancel all the temperature stuff and other non linearities, but if sensing absolute light level is your aim, look at more sophisticated light detection devices, where some clever guys from the semicon MFR have done a lot of the hard work for you, building in things like temperature compensation

maybe go for all digital interface, something like the TSL2561?

again, sorry if I misunderstood your aims, or for any repetitions

Best regards,

Nat
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Re: Basic Op Amp Question --- Application is For Boosting IR Photodiode Signal
« Reply #14 on: January 03, 2016, 11:56:24 pm »
Yes you can use a ceramic cap for the power supply decoupling/filtering.

In your application you can just leave the second op-amp completely disconnected, or "for best practices" wire it as shown in the Data Sheet Figure 4-10.

However as I've noted, you probably don't even need an op-amp at all for your purposes.

I've been playing with the idea on a ProMini. It works fine for me with no opamp. I hope you don't mind....


(I really think "KISS" applies here....)

The easiest person to fool is yourself. -- Richard Feynman
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Re: Basic Op Amp Question --- Application is For Boosting IR Photodiode Signal
« Reply #15 on: January 03, 2016, 11:57:35 pm »
Pre-made...

http://www.engineersgarage.com/sites/default/files/TSOP1738.pdf


Quote
But of course that removes all the fun involved with sourcing components, breadboarding up the op-amp circuit properly, calculating the gain resistors, testing and adjusting the hardware and code, transferring it all to a PCB, adjusting the code again....

Good luck using a PCM receiver in this application.
The easiest person to fool is yourself. -- Richard Feynman
 

Offline PotomacTopic starter

  • Regular Contributor
  • *
  • Posts: 71
  • Country: us
Re: Basic Op Amp Question --- Application is For Boosting IR Photodiode Signal
« Reply #16 on: January 04, 2016, 12:12:00 am »
Alsetalokin, I think the op amp is used because this is a design for a precision scientific device.  The IR LED has a limited range.  Theoretically, as the IR LED gets further away from the photodiode, the signal weakens. So if you're measuring the density of a liquid across a few inches, it can be a weaker signal.

The op amp gives you a higher resolution, and thus higher precision.  Able to measure out to more decimal points of voltage this way. Does this sound like a plausible explanation?

By the way, below is a description of how you can use a photospec machine for this application. It includes an amplifier for the light-to-current signal from the photodiode.  See picture below.

Note that this general photospec example uses a 600 nm LED + photodiode.  I am using a 940 IR + photodiode, but the concept is the same.  IR has the advantage of not being abundant in indoor settings, so there is less background noise.

« Last Edit: January 04, 2016, 12:17:53 am by Potomac »
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Re: Basic Op Amp Question --- Application is For Boosting IR Photodiode Signal
« Reply #17 on: January 04, 2016, 12:45:09 am »
Somehow, I have trouble holding the concepts "Precision scientific device" and "Arduino ADC input, PWM output" in the same head at the same time.   :-\

No matter what sensing or input device you use, you are limited to the 1024 steps of precision in the Arduino's analog input stage, and the 256 levels of PWM output.

What good is it to use an op-amp with parts-per-billion precision, if your ADC on the Arduino is going to chop that up into 1024 chunks anyway?

OK, I can see that if you are looking at very slight changes in turbidity and you want to convert, say, a few microamps of current change from the IR detector into a full 0-5V swing for the Arduino's ADC, then perhaps using a _precision instrumentation amplifier_ might be the way to go. But you now are up against all kinds of noise sources that will complexify your task immensely. And you might be surprised just how much background 940 nm radiation there actually is in modern indoor settings, with the types of lighting and heating we are using these days.

I'm not trying to discourage your use of the op-amp, actually. I just think that you might benefit from going at the problem a step at a time, and the op-amp may be several steps up. You can make the kinds of adjustments for sensitivity and range that you are talking about by choosing your resistor values carefully in the no-op-amp version as well, and no matter what system you use you will still have to calibrate your input-output function (this output level = that turbidity level, etc.)


"In theory, theory and practice should be the same. In practice.... they are often different."     :blah:
The easiest person to fool is yourself. -- Richard Feynman
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Re: Basic Op Amp Question --- Application is For Boosting IR Photodiode Signal
« Reply #18 on: January 04, 2016, 01:28:23 am »
A precision scientific device .... NOT !     :-DD

For amusement only:

The easiest person to fool is yourself. -- Richard Feynman
 

Offline PotomacTopic starter

  • Regular Contributor
  • *
  • Posts: 71
  • Country: us
Re: Basic Op Amp Question --- Application is For Boosting IR Photodiode Signal
« Reply #19 on: January 04, 2016, 02:24:40 am »
^ Thanks alestalokin. Good food for thought.  Going to go out for a few hours, will work on this later.

Interesting point about the Arduino ADC cancelling out billion part precision of the op amp. I hadn't considered that
 

Offline PotomacTopic starter

  • Regular Contributor
  • *
  • Posts: 71
  • Country: us
Re: Basic Op Amp Question --- Application is For Boosting IR Photodiode Signal
« Reply #20 on: January 04, 2016, 05:02:38 am »
Ok I'm back

In regards to the ADC levels:


How many bits of ADC would be able to take advantage of the op amp? Arduino is 10 bits.  There are 12, 14 16, and 32 bit ADC's  out there... Does the op amp become beneficial at the 16 bit range? 32 bit range?

I found this discussion of ADC's:  http://www.dataq.com/data-acquisition/general-education-tutorials/how-much-adc-resolution-do-you-really-need.html

Seems to be a fair amount of relatively cheap 16 bit ADC's out there, including an Arduino breakout board with a built in Op Amp at Adafruit. Just wondering about the utility of these:  https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=16+bit+adc&safe=off&tbm=shop&spd=6885881390222837947

Digkey stock: http://www.digikey.com/product-search/en/integrated-circuits-ics/data-acquisition-analog-to-digital-converters-adc/2556291
« Last Edit: January 04, 2016, 08:58:38 am by Potomac »
 

Offline PotomacTopic starter

  • Regular Contributor
  • *
  • Posts: 71
  • Country: us
Re: Basic Op Amp Question --- Application is For Boosting IR Photodiode Signal
« Reply #21 on: January 04, 2016, 08:57:27 am »
In regards to the background noise:

The photodiode in this design has a clear black cover to filter out some of the ambient light.  It also has a 40 degree viewing angle.  Does the black cover/viewing angle minimize the effect of ambient IR light?  http://www.digikey.com/product-detail/en/BPV10NF/751-1002-ND/1681136

Also, density/turbidity measurements will be taken by comparing 2 readings.  Once with the  LED on and once with it off. The difference is then used to computer the density of the liquid.  I'm thinking this could mitigate the noise issue too, since there is always a reference measurement with the light off. (Compare this method to one where you just take reading with the light on, and compare that to a single benchmark).   Does this reasoning sound right?
« Last Edit: January 04, 2016, 09:03:33 am by Potomac »
 

Offline 3141592

  • Regular Contributor
  • *
  • Posts: 50
  • Country: 00
Re: Basic Op Amp Question --- Application is For Boosting IR Photodiode Signal
« Reply #22 on: January 04, 2016, 10:11:10 am »
How many bits of ADC would be able to take advantage of the op amp? Arduino is 10 bits.  There are 12, 14 16, and 32 bit ADC's  out there... Does the op amp become beneficial at the 16 bit range? 32 bit range?

If you are really serious about precision, read up about ADCs, there is a lot more to them than just considering how many bits of resolution they provide (linearity, drift, ENOB etc..). Also, if you do decide to use a lower resolution ADC, like the Arduino's 10 bit one, you should look into oversampling and dithering, and check if your sensor/circuit might provide the random noise necessary to use it. In this case a preamp with a lower noise might actually hurt the accuracy of the system.

It is you that has to decide how much error is acceptable for your application, and design with that in mind. I would start with figuring out the acceptable error, then check if it's reasonable by looking at the ADCs that fit your budget and then designing a preamp for that. Basing all this on an opamp makes no sense to me.
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Re: Basic Op Amp Question --- Application is For Boosting IR Photodiode Signal
« Reply #23 on: January 04, 2016, 06:58:14 pm »
In regards to the background noise:

The photodiode in this design has a clear black cover to filter out some of the ambient light.  It also has a 40 degree viewing angle.  Does the black cover/viewing angle minimize the effect of ambient IR light?  http://www.digikey.com/product-detail/en/BPV10NF/751-1002-ND/1681136

Also, density/turbidity measurements will be taken by comparing 2 readings.  Once with the  LED on and once with it off. The difference is then used to computer the density of the liquid.  I'm thinking this could mitigate the noise issue too, since there is always a reference measurement with the light off. (Compare this method to one where you just take reading with the light on, and compare that to a single benchmark).   Does this reasoning sound right?

Yes, and yes. I have an Arduino-based, optically-sensed magnetic levitation system that works just that way; it takes a sample of ambient light every few dozen position samples in order to correct its own response as ambient lighting varies. You are of course looking at a bit more complex coding for this to work properly.

You might try that Adafruit ADS1115 breakout board, since you apparently will be needing to look at very small changes in turbidity over a wide range of possible values in your application. It's nice that it works over the I2C interface and has 4 inputs; you could even run parallel samples of blank (clear) solvent/vehicle against your test sample simultaneously, if you want super-overkill. This would take care of lots of potential sources of error. Will 16 bits (over 65 thousand discrete levels) of precision be enough for your needs? Only you can decide that.

I just may have to order one of those breakout boards from Lady Ada to fool around with myself. Thanks for finding it!
The easiest person to fool is yourself. -- Richard Feynman
 

Offline 3141592

  • Regular Contributor
  • *
  • Posts: 50
  • Country: 00
Re: Basic Op Amp Question --- Application is For Boosting IR Photodiode Signal
« Reply #24 on: January 04, 2016, 08:30:28 pm »
16 bits (over 65 thousand discrete levels) of precision

Resolution != precision. It may provide 16 bits of resolution, that does not mean it will provide accuracy matching that. The datasheet shows a ±3mV total error at full scale input (2048 mV @860 sps), though lower sample rates should improve that, it's not 'over 65 thousand discrete levels of precision' in my opinion.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf