Measuring Light with a Photodiode - Do I Need Other Components? - Page 1
Forum section: electronics / beginners

author: Potomac
author_rank: Regular Contributor
timestamp: December 02, 2015, 06:34:18 am
content: I had a beginner question about using a photodiode to measure light. Hoping someone with more advanced knowledge can fill me get on the right track of thinking.I am wondering if I need to use additional components with the photodiode to get an accurate/non-biased/stable light measurement?Something tells me it's not as easy as plugging in the photodiode to an analog input on an Arduino, reading the digital number, and then applying a conversion factor to find the voltage.I'm thinking I need to use one of the following, but can't quite put my finger on the theory:-Voltage dividerI've used this with a Light Dependent Resistor ("Photocell") to measure voltage with the Arduino. Not sure if this applies to a photodiode. (To my understanding, they are very different components. The LDR decreases resistance to current as it is exposed to more light. The photodiode converts light into current).-Amplifier?(see link and circuit before)-Pullup resistor?Something to do with impedance.These 2 example circuits use 470 Ohm resistors (serving as a pullup or voltage divider?) and an Amplifier, respectively. I'm not sure that the author's thinking is correct. On his bio page, he says he is an arborist/landscaper by trade.https://outsidescience.wordpress.com/2012/11/03/diy-science-measuring-light-with-a-photodiode-ii/

author: Potomac
author_rank: Regular Contributor
timestamp: December 02, 2015, 08:06:15 am
content: Also, here is a schematic showing a similar system using a photodiode in conjuction with an amplifier to measure light. Powered off Arduino.I traced the photodiode route in brown (Pin A1 - Analog) and the IR LED route (Pin 1 - Digital) in purple in the second picOn the parts list in the section of the schematic with the diode:-IR LEDhttp://www.digikey.com/product-detail/en/SIR-563ST3FM/511-1365-ND/638560-IR Photodiodehttp://www.digikey.com/product-detail/en/BPV10NF/751-1002-ND/1681136-Op Amphttp://www.digikey.com/product-detail/en/MCP6022-I%2FP/MCP6022-I%2FP-ND/417828-Tantulum Capacitorhttp://www.digikey.com/product-detail/en/TAP105K050SRW/478-8952-1-ND/4561818-120 k Ohm resistor-10 k Ohm resistorCan someone help me to understand what's going on here? Intimidating to a beginner

author: Wim_L
author_rank: Regular Contributor
timestamp: December 02, 2015, 10:32:39 am
content: A reverse biased photodiode will work as a current source. Putting a resistor in series with the photodiode will result in a voltage over that resistor.Two things that will matter a lot are the light level you want to measure, and the type of photodiode.Photodiodes come in many different sizes, from tiny surface mount devices, to large photovoltaic cells (yep, solar panels are simply big photodiodes). The same principles apply, but the amount of current will be very different depending on photodiode type.The amount of light matters too. The page you link to Describes the use of a photodiode to measure sunlight outside. Indoor conditions are a lot darker, and will result in much weaker signals.The first step would be to estimate the light intensity where you'll be using the device, and see how much current your photodiode will deliver. That will help to decide if a simple series resistor will be sufficient, or if you need to amplify the signal.

author: Potomac
author_rank: Regular Contributor
timestamp: December 03, 2015, 03:55:40 am
content: Thanks, Wim L. Very helpful.I plan on using the IR photodiode listed above in indoor conditions. The schematic I posted is for a design that is meant to work in indoor conditions.The Outside Science link is for outdoor conditions, so I think it would be best to avoid that one

author: Wim_L
author_rank: Regular Contributor
timestamp: December 03, 2015, 10:29:07 am
content: Both an IR photodiode and a IR LED - so I guess you're trying to measure the light from that LED? That simplifies matters somewhat, as you'll be able to modify your source intensity and distance to the detector to find a good operating point.Anyway, to explain the second circuit:- The photodiode acts as a light-dependent current source. Assume you're illuminating it enough to get a 1 microamp current.- This current will then be distributed between the noninverting input of the opamp and the 120k resistor. As the opamp selected here has a relatively low input current, assume it's all going through the resistor. For 1 µA, that will result in 0.12 V at the noninverting input. Note that particularly intense illumination might push the opamp input outside of the supply range.- This voltage is then amplified 7.9 times (amplification factor determined by the resistors between output, inverting input and ground). Depending on how strongly you illuminate (e.g. LED right next to photodiode?) you may have to adjust this.I assume the circuit was designed like this to share the single 5V supply already available on that arduino. The datasheet for the opamp (http://ww1.microchip.com/downloads/en/DeviceDoc/21685d.pdf) also shows another way to do it (see 4.11.2 OPTICAL DETECTOR AMPLIFIER). There, the photodiode (represented by a current source in parallel with a capacitor) is attached to the inverting input. The current-voltage relationship is determined by the resistor value. Note that this circuit uses a split supply. A small extra capacitor should be used in the feedback path to prevent oscillation due to the photodiode capacitance.

author: kylecthomas
author_rank: Newbie
timestamp: December 04, 2015, 11:16:50 pm
content: best way is to use a transimpedance amp, which is whats going on in that second arduino circuit. The photodiode generates current Ip, and the opamp will adjust its output voltage until it equals Ip*Rf. You can also add a cap in parallel with Rf if you want to create a filter (such as filtering our 50hz noise from incandescent bulbs).https://en.wikipedia.org/wiki/Transimpedance_amplifier

author: f5r5e5d
author_rank: Frequent Contributor
timestamp: December 05, 2015, 12:07:58 am
content: you may (likely will) need a lead cap in parallel with the feedback Rthe zero bias photovoltaic mode is highly linear but also has a large internal parasitic C in parallel with the diode which will reduce the stability of the op amp feedback circuitreverse bias photoconductive mode is used when greater speed is required - the reverse bias reduces the photodiode Cif you wanted to use the simpler circuit you could use the +5 supply to reverse bias the photodiode