Gas station without pumps

2014 February 6

Lying to my students

I’ve been lying to my students a bit with the simple circuit I gave them for measuring light levels:

Simple circuits for measuring light with an Arduino.

Simple circuits for measuring light with an Arduino.

First, previous schematics have been showing a PNP phototransistor, when an NPN one was clearly needed (and I’ve been talking all along to them about NPN phototransistors, and simply not noticing that I was drawing a PNP one).  I’ll have to correct this in class!

Second, although the simple circuit that I gave them is sometimes used, photodiodes are usually used with a constant voltage drop across the diode, with a transimpedance amplifier to measure the current:

The standard design for using a phototransistor uses a current-to-voltage (transimpedance) amplifier.  This holds the voltage across the photodiode constant and provides an output voltage proportional to the current

The standard design for using a phototransistor uses a current-to-voltage (transimpedance) amplifier. This holds the voltage across the photodiode constant and provides an output voltage proportional to the current.

Two common bias voltages are used: one which puts zero volts across the photodiode, so that there is no dark current, and one that puts a few volts of reverse bias on the diode, so that the depletion region at the diode junction is thicker and parasitic capacitance of the junction reduced (improving the bandwidth of the detector).

An even better design, and the one that I would probably use if I wanted to hook up a photodiode to an Arduino or KL25Z for good measurements is a two-stage amplifier:

This two-stage amplifier provides current-to-voltage conversion in the first stage and a simple non-inverting voltage gain in the second stage.  Using two stages allows using a much smaller value for R1, which in turn means a much wider frequency response.  Again the V_bias voltage can be adjusted for minimum dark current (V_bias=V_ref) or for better bandwidth (V_bias several volts lower than V_ref).

This two-stage amplifier provides current-to-voltage conversion in the first stage and a simple non-inverting voltage gain in the second stage. Using two stages allows using a much smaller value for R1, which in turn means a much wider frequency response. Again the V_bias voltage can be adjusted for minimum dark current (V_bias=V_ref) or for better bandwidth (V_bias several volts lower than V_ref).

Of course, the biggest lie I told them was about the meaning of the Open Circuit Voltage spec for photodiodes. A photodiode acts like a tiny photocell, and if not externally biased will produce a small voltage. With the simple circuit at the top of the page, using a PD204-6C photodiode and a 5.6MΩ resistor for R2, I got V2 output voltages from 3mV up to 5.55V.  The photovoltaic effect can raise the voltage substantially above the 5V power rail!  This is not a problem with transimpedance amplifier designs, since the amplifier can provide enough current to keep the cathode of the photodiode clamped at V_ref.  The phototransistor design also does not have the same problem with the photovoltaic effect—using WP3DP3BT as Q1 and R1=120kΩ, I get readings from 1mV to the full 5v, but not beyond 5v.

I think I’ll let the freshman design class know about this problem with the photodiode circuit, and that there is a relatively simple solution, but I don’t think I’ll try to get them to design the improved circuit.  I think it would be a good replacement for the rather unsuccessful phototransistor lab in the applied circuits course, though, especially as transimpedance amplifiers are fundamental to a lot of bioelectronics (patch-clamp measurements of ion channels, nanopores, nanopipettes, …).

About these ads

1 Comment »

  1. […] then explained to students the mistake I had made in the photodiode explanations (see Lying to my students) and corrected the understanding of the “open-circuit voltage” spec from the photodiode […]

    Pingback by Ninth day of freshman design seminar | Gas station without pumps — 2014 February 11 @ 17:10 | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Rubric Theme Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 248 other followers

%d bloggers like this: