Fantastic photodiodes and how to use them
If you want to accurately measure the intensity of light then photodiodes are usually the best way to go about doing so. Photodiodes are basically little solar panels which give out current proportional to the radiant flux upon them. There is a lot of information out there on how they work, which types to choice and their less than ideal properties.
So in this post I'll skip over much of the theory and cover my experience in making a general platform for messing around with them.
But first, why? well photodiodes are everywhere, particularly in spectroscopy they are the
source of the signal in most spectrometers. Cameras can be thought of as just an array of
photodiodes, in fact people have even rolled their own. In the growing popularity of fibre
optic communication, photodiodes are the receivers, and need to work at frequencies in the GHz. So many, many possible projects.
The most common type of photodiode is a silicon photodiode, are these days they are extremely common and inexpensive. The interesting thing about them is that their spectral range spans more than the visible spectrum, so they can be used to measure, or even image near-infrared or even near-UV. I covered this briefly in my NIR photography post.
Photodiodes are not limited to silicon however, materials such as Gallium nitride are sensitive in the UV while Indium gallium arsenide or Mercury cadmium telluride can be used to look far into the infrared. Someone has even made a MWIR camera out of a single photodiode.
In general there are 2 ways to use a photodiode; photovoltaic or photoconductive mode. In
photovoltaic mode a load is added across the photodiode, incoming photons cause charge separation in the depletion zone of the semiconductor and the photocurrent leads to a voltage across the load. This can be measured directly with an analogue to digital converter. In photoconductive mode, the diode is placed under reverse bias and the change separation allows conductance through the diode.
In general photoconductive mode is used at low frequencies as unbiased diodes has a greater capacitance across the junction. Biasing a diode does reduce the capacitance, as well as the offsets while increasing the linearity. However, this does increase the dark and noise currents.
In my setup I would like the be able to choose either mode, as well as amplifying the signal by a tunable amount. I would also like it to be powered by a single low(ish) voltage rail. Thor labs already sell similar products but at over £300 it is a hobby grade tool, but let's see what we can do.
The circuit I went for is a simple transimpedance amplifier. This is a classic circuit for photodiodes, the non-inverting input of the opamp is tied to a fixed potential, and the the inverting input is connected to the photodiode cathode. the feedback is a single resistor which sets the gain. The bias voltage is generated by a small charge pump with heavy filtering on the output to prevent noise injection, as well as an in-series resistor on the supply line to reduce ripple on the power supply line.
The op-amp in this circuit needs to have a low input bias current as any current flowing in/out of the inverting input will not result in voltage gain on the output. For this reason I went with the LTC6268 which can have bias currents as low as 3fA!. This is complete overkill for this project but as im working in low quantities here it's not an issue. The non-inverting input is held at around 1.1V as this is the lowest common-mode voltage the op-amp can support to keep it's rated input bias current. The output stays fixed at around 1.1V and increases with the photocurrent times a factor of 500,000. This is not ideal as it sacrifices dynamic range but is actually good for coupling into a microcontroller ADC as the signal cannot swing negative or above 5V.
The layout of the components is also important. These circuits are prone to oscillating and the stray capacitance needs to be managed. The inverting input also needs to be well isolated otherwise there would be no point choosing the expensive LT op-amp. This is what the first prototype looks like:
Yes the components are mounted on top of the op-amp case, this is great for reducing leakage currents and stray capacitance, as well as saving space.
The charge pump also has a ground plane underneath it so stop it coupling to the sensitive amplifier.
This prototype is part of a hand-held time-resolved luminescence spectrometer which will feature in an upcoming project.
For the next design I went for a custom PCB and a some improved features. The circuit is very similar but with some key differences. Firstly the gain is now selected by moving a jumper over a set of resistors. The regulator is now a low drop-out one. Finally there is a clever diode arrangement in the feedback loop which prevents the op-amp going into saturation even when the photocurrent is outside of the amps dynamic range. The blue led is there as it has a high forward voltage and the bas416 is there to lower the leakage current. This feature means that the photodiode can handle intense bursts of light and recover almost instantly to accurate measurements, useful for pump-probe spectroscopy.
The pcb also packs so clever features, there is a guard ring around the inverting input to lower leakage currents, and the guard ring runs under the feedback resistors which shunts the electric field and lowers their capacitance and therefore increases the operating bandwidth. The ground plane also does a good job of lowering the noise pickup at higher gain settings.
The second prototype works well when coupled to an ADC but is quite hard to use as a light probe with an oscilloscope due to the ~1V offset. To get around this I decided to add an instrumentation amplifier to the output. This has the benefit of cancelling out the offset, as well as adding additional gain without sacrificing bandwidth of the first stage. The problem however, for some reason instrumentation amps fit for this purpose only come with a bandwidth of around 1MHz, but this should be fine for most applications.
I also got the board with black silkscreen to help with internal reflections. The board is also designed to fit into a Hammond aluminium enclosure, with the pcb edges making contact between the ground plane and the enclosure to screen the amplifiers.
It turns out that the aluminium case is anodised which prevents electrical contact, this is no match for some sodium hydroxide however:
The floating black specs were my attempt to mask the outside with some permanent marker but it did not work so the exterior surface is now also conductive but scratches quite easily.
Now that this amplifier is ready, I can play around with some photodiodes, a few i've tried:
The first is a standard bpw34 silicon type, it has quite a large area which makes it easy to work with. The second is an NIR version of the bpw34, useful for an upcoming project. The third is a monster from the Soviet Union, it has some awful parasitic effects but still works quite well as an optical probe due to its huge surface area.
Some examples of where an optical probe is useful; here I used the NIR variant to decode the protocol from my camera remote shutter:
Here is an RGB "smart" bulb in my room, you can see the different pwm channels running in phase, the smaller step is likely the blue LED's as silicon is less sensitive in that region:
An interesting one I came across is this cheap led torch:
You can see the PWM signal controlling the brightness but there is also higher frequency modulation during the on pulse. This may be a switching converter before the led driver providing a nasty power supply, or more likely they did not tune their feedback circuit very well and the driver is oscillating. I would not expect this LED to live very long.
So these are pretty nice tools for precisely probing light in the time domain, be sure to see them in quite a few upcoming projects.