Gas station without pumps

2014 March 16

New phototransistor lab

Filed under: Circuits course — gasstationwithoutpumps @ 00:54
Tags: , , , , , ,

In Phototransistor I talked about one possible phototransistor lab, that looked at the response speed of a phototransistor, as a function of the load resistor.  I rejected that last year as insufficiently interesting for bioengineers.

The lab for phototransistors that I used last year was a “tinkering” lab, where I tried to get the students to play with the hysteresis oscillator that they had built, modulating it with light (see Idea for phototransistor/FET lab). I didn’t think that it was a very successful lab (see Tinkering lab reports show problems), and I’d rather have a lab that seems more directly “bio” oriented.

One lab I’ve not given in class, but have played with a lot at home, trying to find something that works at the right level of complexity for the students is an optical pulse monitor:

Scott Prahl's estimate of oxyhemoglobin and deoxyhemoglobin molar extinction coefficients, copied from http://omlc.ogi.edu/spectra/hemoglobin/summary.gif The higher the curve here the less light is transmitted.  Note that 700nm has very low absorption, but 627nm has much higher absorption.

Scott Prahl’s estimate of oxyhemoglobin and deoxyhemoglobin molar extinction coefficients, copied from http://omlc.ogi.edu/spectra/hemoglobin/summary.gif
The higher the curve here the less light is transmitted. Note that 700nm has very low absorption, but 627nm has much higher absorption.

I played around with the idea some more last week, using a transimpedance amplifier to convert current to voltage (as in Colorimeter design—weird behavior). I can easily get enough gain to see pulse for a 700nm LED shining through a finger, but I listed the “brighter” LED red diffuse 3mm 625nm WP710A10ID part for this year’s parts kit, so I need to test with it (or with LED IR emitter 5mm 950nm SFH 4512). Because I’ll be making the mechanical part of the pulse monitor for the students, I have to know whether a 5mm or 3mm LED will be used.

Because oxyhemoglobin has its lowest absorbance near 700nm, I expect that switching to either 950nm or 627nm will greatly reduce the signal, needing an extra gain of 5.

The mechanical design I’m thinking of using is a simple one: a 3/4″ diameter hole drilled 2″ deep into a 3″-long block of wood that is 1.5″ by 1.5″, with a 1/8″ hole drilled at right angles to accommodate the LED and phototransistor. Carving out a small channel allows the block to sit flat on the tabletop.
The block with LED in the top hole and the phototransistor in the bottom hole. The phototransistor has a bit of rim, necessitating a shallow 5/32" drill allow the phototransistor to go deep enough into the block for the block to sit flush on a tabletop.

The block with LED in the top hole and the phototransistor in the bottom hole. The phototransistor has a bit of rim, necessitating a shallow 5/32″ drill allow the phototransistor to go deep enough into the block for the block to sit flush on a tabletop.

Block viewed from end with 3/4" hole.  The cross hole for the LED (or phototransistor) and the channel for its wires can be seen on the front.

Block viewed from end with 3/4″ hole. The cross hole for the LED (or phototransistor) and the channel for its wires can be seen on the front.

To connect the LED and phototransistor to a breadboard, the leads need to be extended:

I added color-coded leads to the phototransistor and LED, making sure that the negative lead (the cathode for the LED and the emitter for the NPN phototransistor) were given the black wire. Careful folding and crimping with long-nose pliers gives a good mechanical connection.

I added color-coded leads to the phototransistor and LED, making sure that the negative lead (the cathode for the LED and the emitter for the NPN phototransistor) were given the black wire.
Careful folding and crimping with long-nose pliers gives a good mechanical connection.

Next the connections are soldered to make good electrical connections. It will be good for students to do a little freehand soldering, as their other soldering projects use PC boards.

Next the connections are soldered to make good electrical connections. It will be good for students to do a little freehand soldering, as their other soldering projects use PC boards.

Finally, one or both of the connections should be covered with electrical tape, so that the wires don't short.  (The students don't have electrical tape in their kits—I'll have to remember to bring some in.)

Finally, one or both of the connections should be covered with electrical tape, so that the wires don’t short. (The students don’t have electrical tape in their kits—I’ll have to remember to bring some in.)

In order to help me remember which side has the phototransistor and which the LED, I color-coded the leads differently (yellow wire for LED anode, green wire for phototransistor collector), and used colored electrical tape to hold the optoelectronic parts in the block (red tape for the LED, blue tape for the phototransistor—matching their package colors).

I did manage to get  the pulse monitor working sometimes, but it seems to be excessively finicky—I need very high gain with careful setting of the bandpass filter parameters to get a signal. The biggest problem is that the second stage of the amplifier, where I do the high-pass filtering to remove the DC component and slow drift, can end up getting saturated.  Because of the high impedance of the feedback resistor, the output stage takes a long time to recover from being saturated. Saturation is a frequent problem with high-gain amplifiers, but I’m not sure I want students dealing with it on this lab.

Initially, the light is bright and the amplifier saturates at one rail.  When a finger is inserted in the sensor, the light drops enormously, and the amplifier output swings to the other rail.  It takes a very long time (about 30 second here) before the limited current through the feedback resistor can charge the capacitor in the high-pass filter enough to restore the op-amp inputs being the same voltage.

Initially, the light is bright and the amplifier saturates at one rail. When a finger is inserted in the sensor, the light drops enormously, and the amplifier output swings to the other rail. It takes a very long time (about 30 second here) before the limited current through the feedback resistor can charge the capacitor in the high-pass filter enough to restore the op-amp inputs being the same voltage.

The combined gain of the two stages at 1Hz (about the frequency of my pulse) is around 132MΩ, and the output is still only about 0.25V, so the fluctuation in the input current must be around 2nA. That’s not as small as the signals in a nanopore, but it is small enough to be troublesome.

I tried a different set of components that gave me a gain of about 240MΩ at 0.9 Hz, and that amplifier started clipping the output, swinging from around -0.8v to +1.6v.

After the first stage (with a gain of about 1.7MΩ at 0.9Hz and 5.6MΩ at 0Hz), I see about a 10mV swing on top of a DC signal of 0.6 to 0.8v (with considerable drift). That implies about a 6nA signal at 0.9Hz, while the DC signal is about 125nA.  The magnitude of both the DC and the AC component varies a lot, depending on which finger I use and how firmly I press the finger against the sensor.  I can pretty consistently get 2–9nA of AC on top of 100–150nA DC.  I think that good corner frequencies for the low-pass and high-pass filters are around 0.3Hz and 30Hz. By making the gain of the transimpedance amplifier as high as I can (without saturating with the DC signal), I can keep the gain of the second amplifier low enough to avoid the problem of saturation in the second stage, and the pulse monitor can detect the pulse within 5 seconds.

 

Another option is to make the first-stage amplification be a logarithmic transimpedance amplifier, rather than linear one, by using a Schottky diode as the feedback element instead of a resistor.  But that is getting well outside what I’m comfortable assigning as a design exercise to the Applied Circuits class. I tried it anyway, but the signal from the log amplifier was too small:  a 10% variation in current only results in a 2.4mV change in the output of the log amplifier, needing a much higher gain than my second stage currently provides.

While the 700nm LED provides a stronger signal, the 627nm LED works well enough, and a 2-stage transimpedance amplifier is reasonable for the students to design.  I probably want it to be a 2-day lab, though, with the low-pass first stage designed and tested for the first day, then the high-pass second stage added to solve the problem of DC offset and drift.  That will require reworking my schedule, as I only allowed one day for the lab in the current schedule.

2014 February 26

Colorimeter design—almost working

Filed under: freshman design seminar — gasstationwithoutpumps @ 00:34
Tags: , , , ,

Since my freshman design students did not show much interest in designing their own colorimeters, and my son has just gotten to the colorimetry labs in his online AP chemistry class, I decided to prototype my own colorimeter design.  (His AP lab relies on eyeballing the light through two columns of fluid and adjusting the length of the light path through one until the intensities seem to match—that’s a very low tech approach, but it seems rather tedious.)

I had made a prototype colorimeter out of black foamcore,which I mentioned in Seventh day of freshman design seminar. I’d meant to blog about it earlier, but I got a bad virus infection of some sort and was out of action for a while.  The prototype I’d made earlier was not very functional—it fit the cuvette tightly, but did not provide an easy way to remove the cuvette from the colorimeter.  I went through two more prototypes today that would allow me to remove the cuvette, but they looked like they would have bad light leaks.  I finally settled on a 4th design, that uses a separate lid, rather than trying to make a hinged lid.  I’ve included a PDF file that has the design for this version: Colorimeter-draft4.

I constructed the colorimeter by spray-gluing the pattern I made to the black foam core, then carefully cutting it out with a razor knife.  The dashed lines are cut only through the top layer of paper and part way through the foam—bending the foam core then snaps the rest of the foam and leaves the paper on the back as a hinge.  I used black electrical tape to hold the colorimeter together, and to block light from coming through the backs of the phototransistor and the LED.

Top view of the colorimeter with the lid in place.

Top view of the colorimeter with the lid in place.

Top view of the colorimeter with the lid off and the wings open to allow grasping the sides of the cuvette.

Top view of the colorimeter with the lid off and the wings open to allow grasping the sides of the cuvette.

I connected the LED through a current-limiting resistor to the 3.3v supply on the Freedom KL25Z board, and the phototransistor with a current-to-voltage resistor to E22. I actually ended up doing two different circuits, using different LEDs:

    I started with the circuit on the left, using a deep red LED that has a peak wavelength of 700nm. Later I switched to a different LED, with a peak wavelength of 627nm. In both cases, I picked the current-to-voltage resistor so that I got near full-scale readings on a blank cuvette.

I started with the circuit on the left, using a deep red LED that has a peak wavelength of 700nm. Later I switched to a different LED, with a peak wavelength of 627nm. In both cases, I picked the current-to-voltage resistor so that I got near full-scale readings on a blank cuvette.

When the KL25Z is reset, the analog-to-digital measurement on E20 is recorded as the intensity for the blank cuvette.  Then the transmittance (measurement/blank) and absorbance (–log10(transmittance)) are reported 10 times a second on the USB serial line.

With the 700nm LED, I could measure from A=0 to A=1.8 (with an opaque piece of foam core blocking the light). Light leakage around the cuvette and from the outside prevented me from measuring higher absorbancy.

The first thing we tried measuring was a solution of blue food coloring (blue dye #1). My son made a stock solution of 1 drop in 10 ml, and we measured the absorbance (with the 700nm LED) at about 0.0028, which seemed rather low to us. He then made a very concentrated solution with 5 drops in 5ml, which looked almost black to us, and the colorimeter reported it as having an absorbance of 0.157, which seemed absurd—that’s almost clear! We tried looking at the sky through the solution and noticed that the sky looked deep red through the blue. This lead me to suspect that the dye was transparent in the near IR where much of the light from the LED was concentrated.

When I switched to a 627nm LED, I had to use a larger current-to-voltage conversion resistor, as the phototransistor is less sensitive to those wavelengths. This meant that the noise level from light level was increased, and so an opaque object read as absorbance around 1. The stock solution read as 1, as did a 2-fold and 4-fold dilution. We went to a 40-fold dilution (so equivalent to 1 drop in 40ml) and got a reading of 0.637. From there, we started 2-fold dilutions:

dilution Absorbance at 627nm
1/40 0.637
1/80 0.407
1/160 0.230
1/320 0.139
1/640 0.0679
water 0.0040
1/1280 0.0380

I was worried that cuvette was stained by the dye, but putting in distilled water after the 1/640 dilution showed that any residual staining could only be contributing a small error.

Here is a plot of one run of the colorimeter:

The colorimeter is reset with a blank cuvette (filled with distilled water).  After a few seconds the blank is removed and the test cuvette is inserted.  After waiting about 20 seconds, it is removed and the blank re-inserted.  The absorbance is fit on the flat part in the middle.  Note that the colorimeter did not return exactly to 0 on this run.

The colorimeter is reset with a blank cuvette (filled with distilled water). After a few seconds the blank is removed and the test cuvette is inserted. After waiting about 20 seconds, it is removed and the blank re-inserted. The absorbance is fit on the flat part in the middle. Note that the colorimeter did not return exactly to 0 on this run.

The data from the run did not fit the straight line of Beer's Law.  It did fit a power-law curve, but the exponent is too low.

The data from the run did not fit the straight line of Beer’s Law. It did fit a power-law curve, but the exponent is too low.

I’m now trying to figure out why we did not get a good fit for Beer’s Law. Here are some possibilities:

  • The dilutions were not done accurately.  That would explain random fluctuations, but seems unlikely to give such a clean, consistent deviation from theory.
  • Beer’s Law doesn’t apply to this example.  That seems really, really unlikely, since this is the canonical experiment done by 1000s of students a year.
  • The colorimeter is not linear.  I’m relying on the phototransistor providing a current proportional to light intensity, even though the voltage across the phototransistor varies.  I think that this is likely to be the problem.  To check it, we’d have to redo the experiment with a different circuit—probably a transimpedance amplifier to do the current-to-voltage conversion.

Unfortunately, my son did not keep all the serial dilutions, so to test a different colorimeter circuit I’d have to make a new series.  I might do that this weekend if I have time.  At least I know what stock concentration to start with—about one drop of food color in 25ml of distilled water.

I’m also interested in trying the colorimeter design with an RGB LED, so that we could try different wavelengths—perhaps doing a Beer’s Law test with yellow food coloring.

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, …).

2014 February 3

Seventh day of freshman design seminar

Today we continued looking at photodiodes, phototransistors, and LEDs, in the context of the colorimeter I had asked them to design.  I think that next year I may go to the colorimeter first, and then to the more complex photospectrometer.  Since the students weren’t familiar with spectrometry, starting with it was of no help, and all the other concepts (absorbance, irradiance, linearity of phototransistors, …) are more than enough to start with.

I started the class by collecting the work I had asked them to do on fleshing out the design of the colorimeter, which I have not read yet. I’ll have to grade their colorimeter designs before Wednesday, but I hope we can start learning some Arduino programming by then (probably just setup, loop, analogRead, Serial.print, and delay), rather than going over the homework.

After reading what they turned in for photospectrometer and photodiode assignment, I’m not setting my expectations very high for the colorimeters.  I think (hope?) that the students are getting something out of the class, if not quite as quickly as I would like. I guess it takes some time for them to turn around habits of a lifetime and start generating new answers and new questions to answer, rather than just coughing back what the teacher said.

I wanted to get to Arduino programming today, but we didn’t get that far. I started with going over the homework, which was to find the resistor values for the following circuit:

Simple circuits for measuring light with an Arduino.

Simple circuits for measuring light with an Arduino. Update 2014 Feb 6: Q1 is intended to be an NPN phototransistor, not PNP as shown here!

  • For Monday, 2014 Jan 27, as individuals (not groups), find a data sheet for the phototransistor WP3DP3BT. Also, select a cheap photodiode that is available in the same size and shape of package as the WP3DP3BT phototransistor and look up its data sheet.For the photodiode and the phototransistor, report the dark current, the voltage drop across the device (that would be collector-emitter saturation voltage for a phototransistor and the open-circuit voltage for a photodiode), and the sensitivity (current at 1mW/cm2 at λ=940nm, which is the wavelength where silicon photodiodes and phototransistors are most sensitive).Find a plot of the spectral sensitivity of a silicon photodiode or phototransistor (it need not be from the data sheets you found—all the silicon photodiodes and phototransistors have similar properties, unless the packaging they are in filters the light).

    We want to make a circuit so that the full-scale (5v) reading on the Arduino corresponds to an irradiance of 204.8μW/cm2 at 940nm, so that each of the 1024 steps corresponds to an increment of 0.2μW/cm2. Remember that 1000μW=1mW. (We may not be able to use the full range, as the circuit should saturate at a somewhat lower value, depending on the saturation voltage or open-circuit voltage of the photodetector.)

    For the circuits above, figure out what values of R1 and R2 to use to get the desired voltage range at A1 or A2. Look up what standard resistance values are available with 2% tolerance, and pick the nearest one. (Hint: Google is your friend for finding tables of information.)

    In class on Monday, we’ll try building this circuit and seeing how it works with the Arduino Data Logger.

  • By Wed 2014 Jan 29, redo the homework originally due on Monday, and turn it in on paper, typed, with the questions echoed and answered in full sentences. If you have any questions, discuss them on the class e-mail list. (I don’t want “I don’t know” to come up for the first time in class—you should have been asking for help over the weekend!)

The first thing I did in class was to go over that homework, giving them useful advice for adapting to college courses:

  • No one computed R2 correctly. It didn’t bother me (much) that no one knew how to do it, but it did bother me that no one asked for help. I tried to impress on them that asking for explanation is not a sign of weakness, and that it should not be their goal to hide from view when they are confused about something. I don’t know whether this rant got through to them, but maybe if they hear it enough they’ll start asking questions in class or on the e-mail list.
  • Only one person cited a source for the plot of spectral sensitivity for silicon photodiodes, and that more by accident than by design (the URL was printed by the browser). I explained the notion of plagiarism to them, how it was the most serious of academic sins, and how other engineering faculty (and me in other courses) might fail them for the course if they continued to claim other people’s work as their own (which is what an uncited figure is).
  • I told them that they had to get very comfortable with the metric prefixes (only femto, pico, nano, micro, milli, kilo, mega, giga—they mostly won’t have much use for the smaller and larger ones) and their single-letter abbreviations.  This is clearly something they need to work on, as one of the common problems in the homework was off-by-a-factor-of-1000 errors, as students changed µW to mW without scaling the numbers.
  • I also impressed on them the importance of typing part numbers accurately—several had mistyped the part numbers for the photodiode they were specifying, and it took me a little detective work to figure out what they had really meant.  Some had not provided part numbers at all, and I could not check whether their numbers were right (those students still got the computations wrong).
  • Only three students found photodiodes that matched the specs: “a cheap photodiode that is available in the same size and shape of package as the WP3DP3BT phototransistor ” and that was sensitive to visible light.  That meant finding a 3mm diameter, through-hole package.
  • Several students found photodiodes in black packages that block visible light, which was not useful for this application.  I explained why such parts exist (listening to IR emitters like in remote controls, without being swamped by ordinary light).
  • Many students, having found photodiodes, could not accurately specify the sensitivity of the photodiode.  Most just reported a current, without specifying the irradiance that caused that current. We went over the notion of linearity and that what we were interested in was the slope of the line, and that units were µA/(mW/cm^2). I mentioned that some spec sheets specified responsivity in A/W, but that had to be divided by the sensor area to get the more useful unit. I then had them compute the current at the specified maximum irradiance and the resistance that would be needed to get that current with 5v across the resistor.  It took them a very long time (algebra skills are much lower than I would have expected for college freshmen—I have more sympathy now for the teachers of freshman physics), but they did eventually get the right answers for both the current and the resistance.
  • I spent a fair amount of time letting students know that units were their friends, and that they should carry the units throughout the computation.  I don’t know if the message got through, but I hope for their sakes that it will eventually.

Finally we could get to some new material. I asked them about monochromatic light sources for the colorimeter.  Some thought of LEDs, but one student mentioned that he had seen incandescent bulbs as much cheaper than LEDs. It took me a second to figure out where this confusion came from—at the power levels used for room lighting, incandescents are indeed cheap and LEDs expensive.  But we don’t need 5–20W of power—we’re not trying to cook what is in the cuvette.  I pointed out that the maximum light level expected for the phototransistor was only 20mW/cm^2, so we needed only mW of power from the light, and at that light level, LEDs were much cheaper than incandescent bulbs.

I showed them the data sheet for a red LED,  and explained some of the concepts. One concept was the difference between peak and dominant wavelength—the peak is where the light has the highest intensity, and the dominant is where it shifts to when multiplied by human visual sensitivity.  I also explained what the “spectral line half bandwidth” was, though I did not go into the difference between half amplitude and half power—it was not important at the moment.

I then went over the symbol for a diode, how I remember that electrons move from the cathode to the anode (bring up vacuum tubes and cathode rays), and showing them a rough sketch of a diode current-vs-voltage curve.  I showed them where various parameters were on the data sheet, though the particular LED data sheet I was using did not include the threshold voltage, just the forward voltage at high current.

The students brought up the notion of having multiple LEDs to get multiple colors, so I introduced them to  RGB LEDs, showing both the common-anode and common-cathode circuits. They figured out, with a lot of prompting, which way round power had to be connected (the mnemonic device I used was that producing light required power, and power is voltage times current, so there had to be current flowing through the diode).

It doesn’t help that photodiodes are used backwards—the photodiode is reverse biased, and current flows only when light produces electron-hole pairs at the back-biased junction.  I carefully did not talk about that while we were looking at the LEDs, as I’m sure it would have confused them.

By this point we were almost out of time, so I assigned a homework:

For Wed 2014 Feb 5, find a through-hole (not surface mount) RGB LED that is common-cathode, and design a circuit to power it from a +5V power supply. Make each color be as bright as possible without exceeding maximum current (you can leave a safety margin of up to 25%). Explain your design and how you sized the resistors for it.

I recommend using Digi-key’s search feature (looking for RGB LED) to see what parameters are usually most important to designers. I recommend using Digi-key’s free web tool SchemeIt for drawing a circuit diagram. They don’t have an RGB LED symbol, but you can make one out of 3 LED symbols (I’d use variant 1 for that).

Bonus: find an RGB LED that is common-anode, and do the same design exercise with it. (If Digi-Key’s search doesn’t turn up a part, try using Google.)

I did show them the prototype colorimeter I made over the weekend out of black foamcore, but did not have time to demo it. I was also going to demonstrate the use of vernier calipers to measure the cuvettes, but again ran out of time.  I’ll probably do a blog post about my first colorimeter prototype later this week, but I’ll need to get to bed early tonight, as I’m grading an elementary school science fair early tomorrow, and I’ve got a bad cold that is leaving me exhausted.  (I’ll have another science fair to judge Thursday morning, so this is not a good week for me to have a cold.)

2014 January 27

Sixth day of freshman design seminar

Today I went into class with a long list of things to get done, but didn’t quite get to all of them:

  • Feedback on first homework.
  • Look at data sheets together.
  • Get class consensus on resistor values from homework due today.
  • Demo the Arduino Data Logger with the phototransistor and photodiode.
  • Discuss next homework (designing a colorimeter).
  • Start talking about Arduino programming.

The feedback on the homework went pretty much as planned.  I told them that the homework was not graded, but that I had both individual and general feedback on it.  Here is a summary of the general feedback:

  • College homework should be typed.  Professors expect it, even if they never say so.  The one exception is math homework, and I recommend to students that they learn LaTeX and typeset even their math.
  • Homework should always be stapled, not loose sheets, which get separated and lost.
  • Hand-drawn pictures are ok for this class (and many other classes), but I strongly recommend learning to use a drawing tool.  Adobe Illustrator is a popular one for those who have money, but Inkscape is an adequate tool for 2D diagrams and is free, though its user interface is rather clunky.  For more professional engineering drawings, I believe that AutoCAD has a free (or very low-cost) version for students. Sketchup and Blender are popular free tools for 3D modeling.  For schematic capture, I now use DigiKey’s SchemeIt, which I demoed briefly for the students (after having some trouble with the wireless connection in the room—I’ll have to check to see whether there is a live DHCP port by the projector cable in the room).
  • Most students added little to what we did in class. I pointed out that K–12 teachers mainly wanted them to spit back what they had been told, but that college professors were usually looking for added value—stuff from reading outside class or from original design.
  • I pointed out the importance of vocabulary (“diffraction” vs. “refraction”, “focus” vs. “collimate”) and of getting the right physical phenomena (Bragg’s Law for diffraction gratings, Snell’s Law and optical dispersion for prisms).  I told them to read the Wikipedia article on optical dispersion, so that they could understand the complexity of determining the wavelength-to-refraction-angle transformation, which is highly dependent on the material the prism is made of.
  • I also suggested that just dumping factoids (like the Bragg’s Law formula) on the paper without explaining the connection to the design didn’t really buy them much.
  • I pointed out the difficult design problem I had given them (300nm–700nm) with a diffraction grating would result in the second diffraction of 350nm at the same location as the first diffraction spot for 700nm—to handle both one would need two optical filters: one for the long wavelength, one for the short.  Even if we limit the range we’re interested in (say to 400nm–700nm), we’d still need a filter, since the sensor would still detect the 2nd-order 350nm spot, even though we weren’t interested in it.
  • I showed a couple of designs for a collimator (a lens and a slit, or a pair of slits on either end of a black tube) and explained why collimation was needed for a spectrometer (none of them had included a collimator).

The feedback took about the amount of time I expected, and I think I managed to communicate the problems without crushing anyone’s egos.  I was careful to tell them that I was not grading them on the homework, but providing feedback for them to do better later on things that would count—particularly that other faculty would often have these expectations of them without ever articulating them.  This freshman class is intended in part to help the students adapt to the college culture in a low-stakes environment.

Simple circuits for measuring light with an Arduino.

Simple circuits for measuring light with an Arduino. Update 2014 Feb 6: Q1 is intended to be an NPN phototransistor, not PNP as shown here!

We then looked at the WP3DP3BT phototransistor data sheet together.  First, I explained the mechanical drawing (dimensions in mm, the diameter sign , the two different ways that the case indicates which lead is which—both the flat and the shorter lead indicating the collector). This prompted a question about the naming of the collector and emitter (since it seemed strange to them that the collector went to the power lead and the emitter to the resistor), so I briefly explained that it was a NPN transistor, that the N’s stood for negative doping resulting in an excess of electrons as charge carriers, and that the emitter emitted the electrons and the collector collected them. I don’t know if that helped anyone.

I then asked the students what they needed help understanding for the numeric part of the data sheet. We ended up talking about 5 of the 7 parameters provided, covering a lot of different things (like that nA stood for nanoamps, not “not available”—a confusion I had not anticipated). I briefly went over milli-, micro-, nano- and explained that engineers preferred using those prefixes to expressing powers of 10, so that the prefer to express the dark current as 100nA, rather than 10-7A. Some scientific calculators provide engineering notation, in which only multiples of 3 are used as the power of 10, and the numbers are between 1 and 999.999999… .

I had to explain the difference between collector-to-emitter and emitter-to-collector voltages, and show the current vs. VCE curve with the two breakdowns. We talked a bit about the saturation voltage (0.8V with an irradiance of 20mW/cm2 and a current of 2mA). I’m not sure I understand that specification that well myself—it mainly tells me that we want to stay well below a 2mA current.

I asked the students for their resistance values from their homework, expecting some fairly random values that would reveal different misunderstandings. What I had not expected is that most of the class had nothing—not even a guess—at the resistance. I would have expected them to ask questions on the class e-mail list if they didn’t understand, but the notion of asking each other (or a faculty member) for help still seems completely foreign to them.

So we spent some time going over how to interpret the on-state collector current: 0.2 nA at an irradiance of 1mW/cm2 of 940nm light. I then had the look for more information that was given in the question, which no one had in front of them:

For Monday, 2014 Jan 27, as individuals (not groups), find a data sheet for the phototransistor WP3DP3BT. Also, select a cheap photodiode that is available in the same size and shape of package as the WP3DP3BT phototransistor and look up its data sheet. For the photodiode and the phototransistor, report the dark current, the voltage drop across the device (that would be collector-emitter saturation voltage for a phototransistor and the open-circuit voltage for a photodiode), and the sensitivity (current at 1mW/cm2 at λ=940nm, which is the wavelength where silicon photodiodes and phototransistors are most sensitive). Find a plot of the spectral sensitivity of a silicon photodiode or phototransistor (it need not be from the data sheets you found—all the silicon photodiodes and phototransistors have similar properties, unless the packaging they are in filters the light). We want to make a circuit so that the full-scale (5v) reading on the Arduino corresponds to an irradiance of 204.8μW/cm2 at 940nm, so that each of the 1024 steps corresponds to an increment of 0.2μW/cm2.

Eventually someone figured out that we wanted a 5v output to correspond to 204.8μW/cm2. I asked what current that irradiance produced. Note that this is a simple linear scaling of the 0.2 nA at an irradiance of 1mW/cm2. It took several minutes for them to do this on their calculators, and several tries before the class agreed on a value (luckily the right one). Now that they had a voltage and a current, I asked them for the resistance that was needed. One student quickly mentioned Ohm’s law, and they set about doing the division. It took them a couple of minutes to do this division on their calculators, and then most of them got it wrong (getting values in the µΩ range!).  Eventually they managed to converge to 122.1kΩ, after almost settling on 12.2kΩ, but what I had expected to be a 30–60-second computation for computing the resistance had taken 10–15 minutes.  The arithmetic and algebra skills of college freshmen are even lower than I had feared.

I showed them a chart of standard resistance values and helped them round to 120kΩ.  I showed them a 120kΩ resistor and measured it with a multimeter to make sure I had the right resistor.  I passed around an Arduino board and a breadboard and explained the point of ther breadboard. I hooked the resistor up in series with the phototransistor (on a pre-prepared breadboard) and used the Arduino data logger to show them the voltage changing as I covered and uncovered the phototransistor. (Next year I should probably reduce the sensitivity they are requested to match to 0.1µW/cm2 per step, as the classroom light was bright enough to move the voltage almost full scale.)

Class had been over officially by 10 minutes at this point (the first time I looked at my watch), so I gave each student a cuvette and asked them to look up what a colorimeter was and design one around the cuvette.

We still need to discuss the photodiode resistance value (I’ll see if anyone figures it out by Wednesday, when I’ve asked them to turn in the homework for real).  We have lab tours on Wednesday, though, so there won’t be time to discuss colorimeters before they design them.  I hope they have the sense to read about them on Wikipedia or the many web sites that give high school labs using them. The actual assignment was

By Mon 2014 Feb 3, design a colorimeter around the cuvette you picked up in class. Your design report should describe the function of the device, explain how it works, have a detailed drawing (with dimensions) of it, have a materials list of what is needed to build it, and give instructions for using it. If there are any computer components, an outline of the needed software should be included also.

Next Page »

The Rubric Theme. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 251 other followers

%d bloggers like this: