# Gas station without pumps

## 2014 March 17

### Revised plan for circuits labs

Filed under: Circuits course — gasstationwithoutpumps @ 14:39
Tags: , , , ,

In Plan for rearranged circuits labs I provided a tentative schedule for the applied circuits course and lab,  which starts on 2014 March 31.But after my experimenting with optical pulse detection this weekend, I need to rearrange the labs to move the phototransistor lab later and allow more time for it.  This post is my attempt to do that rearrangement.

 Monday 2014 Mar 31 Administrivia: structure of course, rotating partners, labs not cookbook—need to read carefully before coming to lab. Pre-lab homework. Demo pressure sensor or EKG? Ohms law, voltage dividers. Homework: install gnuplot on own computers, read Wikipedia on thermistors and the Steinhart-Hart equation, draw voltage divider with schematic capture tool (probably Digi-key’s SchemeIt) Tuesday 2014 Apr 1 Unpacking parts, labeling capacitor bags, using wire strippers, making clip leads, measuring input resistance of multimeter, measuring thermistor resistance at many temperatures. Wednesday 2014 Apr 2 Do-now resistance-to-voltage converter. Gnuplot: fitting thermistor theory to measured data. Derivatives of voltage w.r.t. temperature to maximize sensitivity (and linearize output). Homework: install data logger on own computer and KL25Z, record accelerometer? Thursday 2014 Apr 3 Soldering headers onto KL25Z boards, downloading data logger to KL25Z, if not already done. Measuring voltage of thermistor voltage divider, recording voltage vs. time. See soldering instructions at Soldering headers on a Freedom board and Jameco soldering tips Friday 2014 Apr 4 Voltage-divider do-now exercise. Other temperature measuring devices (RTDs, thermocouples, silicon bandgap temp sensors). Monday 2014 Apr 7 Three-resistor do-now question. Feedback on design reports, i-vs-v plots, how electret mic works.  AC voltage (sine wave: amplitude, peak-to-peak, RMS voltage). DC blocking capacitors, RC filters (without complex impedance). Tuesday 2014 Apr 8 Measure I-vs-V DC characteristic of resistor and of electret mic, both with multimeter and with KL25Z board. Wednesday 2014 Apr 9 Gnuplot: plotting transformed data, fitting various models to i-vs-v (resistor, current source, blending of resistor and current source, more complex model). Thursday 2014 Apr 10 Look at mic with resistor load on oscilloscope (AC & DC coupling).  Capacitor for own AC coupling. Loudspeaker on function generator? Friday 2014 Apr 11 Another 3-resistor do-now question. Voltage sources, current sources, load lines, Thévenin and Norton equivalents. Monday 2014 April 14 Hysteresis. Applications: cleaning up noisy signals to on/off signals, feedback control. Differential equation for capacitor, derived from Q=CV, RC time constant. Basic idea of hysteresis oscillator (demo of touch tensor?) Tuesday 2014 Apr 15 Characterize hysteresis in Schmitt trigger chip using data logger. Breadboard hysteresis oscillator with various R and C values, measuring frequency or period (oscilloscope or frequency meter?). Make and test touch sensor with breadboard oscillator. Solder hysteresis oscillator. Estimate capacitance of touch from change in period of hysteresis oscillator. Note:I’ll have to write touch sensor code for KL25Z. Wednesday 2014 Apr 16 Theory of sampling and aliasing Thursday 2014 Apr 17 Sampling and aliasing lab. Awkward that this gets split from sampling and aliasing theory, but I want to analyze loudspeaker data this week. Friday 2014 Apr 18 High-pass and low-pass RC filters as voltage dividers. Gnuplot plots and Bode plots for amplitude. Make sure they see ω=0 and ω=∞ simplifications, and straight-line approximations (f, 1/f, constant) away from corner frequency.  Introduce dB and dB/decade rolloff. Monday 2014 Apr 21 RC filter/voltage divider quiz/midterm Tuesday 2014 Apr 22 Impedance of stainless steel (polarizing) electrodes in different NaCl concentrations (at several frequencies). Wednesday 2014 Apr 23 Gnuplot: Functions for impedance: Z_C, Z_L, Z_parallel. Fitting R1+(R2‖C) models to data, maybe fitting other models? Polarizing and nonpolarizing electrodes. Properties of stainless steel (corrosion resistance in oxidizing environments, biocompatibility, poor choice for electrodes) Thursday 2014 Apr 24 Impedance of Ag/AgCl (non-polarizing) electrodes in different NaCl concentrations (at several frequencies) Friday 2014 Apr 25 Intro to op amps, unity gain buffer, transimpedance amplifier. Monday 2014 Apr 28 Inverting and non-inverting amplifier. Tuesday 2014 Apr 29 Characterizing impedance of loudspeaker vs. frequency Wednesday 2014 Apr 30 Gnuplot: fitting models for loudspeaker impedance. Thursday 2014 May 1 Measuring nFET current with constant VDS and varying VGS, also with constant VGS and varying VDS. (pFET also?) Friday 2014 May 2 Gnuplot: fitting nMOS transistor models to measured data. nFET and pFET as switches. Monday 2014 May 5 System thinking and block diagrams: developing for audio amplifier Tuesday 2014 May 6 Low-power single-stage audio amplifier with op amp Wednesday 2014 May 7 Op-amp quiz/midterm Thursday 2014 May 8 catchup day? characterizing pFET? characterizing LED? Friday 2014 May 9 Op amps with RC voltage dividers (active filters) Monday 2014 May 12 Do now: transimpedance amplifier.  Models for photodiodes and phototransistors.  (other photosensors?) Tuesday 2014 May 13 Photodiode and phototransistor with single-stage simple transimpedance amplifier. Freeform soldering to attach leads for fingertip transmission sensor. I need to drill a dozen blocks of wood for the fingertip alignment blocks. Cut-and-try design for transimpedance gain needed to see reasonable signal without saturating amplifier. (Determine AC and DC components of current) Wednesday 2014 May 14 Gnuplot: model gain of 1-stage and 2-stage amplifiers with RC filters.  Develop block diagram for 2-stage pulse detector with approximately 0.3Hz–30Hz bandpass. Thursday 2014 May 15 Fingertip pulse sensor with 2-stage amplifier and bandpass filtering. Friday 2014 May 16 class D amplifier  concept. Monday 2014 May19 Developing class D block diagram Tuesday 2014 May 20 class D audio amplifier day 1(preamp and comparators) Wednesday 2014 May 21 Gnuplot: analyzing loudspeaker load, adding LC filter in front of loudspeaker to make sharp cutoff without ringing. Thursday 2014 May 22 class D audio amplifier day 2 (output stage) Friday 2014 May 23 Do-now: Wheatstone bridge. Strain gauges and Wheatstone bridges. Instrumentation amps. Homework: block diagram and design for pressure sensor. Monday 2014 May 26 Memorial Day, no class Tuesday 2014 May 27 Pressure sensor day 1: design and soldering instrumentation amp prototype board Wednesday 2014 May 28 catch up day? Thursday 2014 May 29 Pressure sensor day 2: further debugging. Recording pressure pulses from aquarium air pump?  Would need to buy some more air pumps. Friday 2014 May 30 Action potentials in nerve and muscle cells? Monday 2014 Jun 2 Why EKG signals differ based on placement of electrodes.  (Vector model) Tuesday 2014 Jun 3 EKG day 1:  breadboard and debugging (confident students could go directly to soldering) Wednesday 2014 Jun 4 Catch up? Thursday 2014 Jun 5 EKG day 2: soldering, debugging, and demo.  Last day for any catchup labs. Friday 2014 Jun 6 Catch up? Monday 2014 Jun 9 4–7 p.m. Final exam? (probably not needed, except as a lab catch-up day)

I’m not 100% satisfied with this schedule, and things will probably slip as I discover unexpected difficulties in student preparation, but I think it is likely to run more smoothly than last year, and last year was not bad.

If any of my readers have suggestions on improvements that could be made in the labs or the order of topics, please let me know. I have to buckle down and (re)write the lab handouts soon!

## 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.

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.

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.

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

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.

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 March 12

### Plan for rearranged circuits labs

Filed under: Circuits course — gasstationwithoutpumps @ 22:50
Tags: , , , ,

The Applied Circuits for Bioengineers class starts on 2014 March 31. The big change from last year’s prototype run of the course is that we’ll have two 3-hour lab sessions a week, not just one, so I need to rewrite all the lab handouts to split the work (and, in many cases, increase it slightly). There are also a couple of labs that I want to replace or redo extensively, to make them more useful or require less assistance to the students.

This post, which I’ve been working on fairly solidly all week, is an attempt to schedule the labs for the quarter.  There are 20 lab slots (2/week for 10 weeks), and I plan to use them all, though I might keep one or two open late in the quarter for students who need extra time to catch up after illness or other absence.  Currently I’m planning for the Wednesday lectures between the two halves of the lab to be a data analysis and presentation day, often using Gnuplot.

One big question for me is when lab design reports will be due. If I make them due on Fridays, I can grade them over the weekend and get the feedback to students by the next class, but students will have very little time for the writeup. If I make them due on Mondays, I might not be able to get them back to the students for a week, but students will have more time for the writeup. Currently I’m leaning towards Friday due dates, as students should be writing up the labs the same day they do them, and Wednesdays will be a good time for them to ask questions about the lab data.

 Monday 2014 Mar 31 Administrivia: structure of course, rotating partners, labs not cookbook—need to read carefully before coming to lab. Pre-lab homework. Demo pressure sensor or EKG? Ohms law, voltage dividers. Homework: install gnuplot on own computers, read Wikipedia on thermistors and the Steinhart-Hart equation, draw voltage divider with schematic capture tool (probably Digi-key’s SchemeIt) Tuesday 2014 Apr 1 Unpacking parts, labeling capacitor bags, using wire strippers, making clip leads, measuring input resistance of multimeter, measuring thermistor resistance at many temperatures. Wednesday 2014 Apr 2 Do-now resistance-to-voltage converter. Gnuplot: fitting thermistor theory to measured data. Derivatives of voltage w.r.t. temperature to maximize sensitivity (and linearize output). Homework: install data logger on own computer and KL25Z, record accelerometer? Thursday 2014 Apr 3 Soldering headers onto KL25Z boards, downloading data logger to KL25Z, if not already done. Measuring voltage of thermistor voltage divider, recording voltage vs. time. See soldering instructions at Soldering headers on a Freedom board and Jameco soldering tips Friday 2014 Apr 4 Voltage-divider do-now exercise. Other temperature measuring devices (RTDs, thermocouples, silicon bandgap temp sensors). Monday 2014 Apr 7 Three-resistor do-now question. Feedback on design reports, i-vs-v plots, how electret mic works.  AC voltage (sine wave: amplitude, peak-to-peak, RMS voltage). DC blocking capacitors, RC filters (without complex impedance). Tuesday 2014 Apr 8 Measure I-vs-V DC characteristic of resistor and of electret mic, both with multimeter and with KL25Z board. Wednesday 2014 Apr 9 Gnuplot: plotting transformed data, fitting various models to i-vs-v (resistor, current source, blending of resistor and current source, more complex model). Thursday 2014 Apr 10 Look at mic with resistor load on oscilloscope (AC & DC coupling).  Capacitor for own AC coupling. Loudspeaker on function generator? Friday 2014 Apr 11 Another 3-resistor do-now question. Voltage sources, current sources, load lines, Thévenin and Norton equivalents. Monday 2014 April 14 Hysteresis. Applications: cleaning up noisy signals to on/off signals, feedback control. Differential equation for capacitor, derived from Q=CV, RC time constant. Basic idea of hysteresis oscillator (demo of touch tensor?) Tuesday 2014 Apr 15 Characterize hysteresis in Schmitt trigger chip using data logger. Breadboard hysteresis oscillator with various R and C values, measuring frequency or period (oscilloscope or frequency meter?) Wednesday 2014 Apr 16 Analysis of hysteresis oscillators: deriving formula for frequency. Homework: estimate increase in capacitance of touch sensor when touched.  Design hysteresis oscillator that will change period by factor of 2 or more when sensor touched.$e^{j \theta}= \cos \theta + j \sin \theta$, polar representation as magnitude and phase, $e^{j \omega t}$, current through capacitor for sinusoidal voltage, complex impedance. Thursday 2014 Apr 17 Make and test touch sensor with breadboard oscillator. Solder hysteresis oscillator. Note:I’ll have to write touch sensor code for KL25Z.Estimate capacitance of touch from change in period of hysteresis oscillator. Friday 2014 Apr 18 High-pass and low-pass RC filters as voltage dividers. Gnuplot plots and Bode plots for amplitude. Make sure they see ω=0 and ω=∞ simplifications, and straight-line approximations (f, 1/f, constant) away from corner frequency.  Introduce dB and dB/decade rolloff. Monday 2014 Apr 21 RC filter/voltage divider quiz/midterm Tuesday 2014 Apr 22 Impedance of stainless steel (polarizing) electrodes in different NaCl concentrations (at several frequencies). Wednesday 2014 Apr 23 Gnuplot: Functions for impedance: Z_C, Z_L, Z_parallel. Fitting R1+(R2‖C) models to data, maybe fitting other models?Polarizing and nonpolarizing electrodes. Properties of stainless steel (corrosion resistance in oxidizing environments, biocompatibility, poor choice for electrodes) Thursday 2014 Apr 24 Impedance of Ag/AgCl (non-polarizing) electrodes in different NaCl concentrations (at several frequencies) Friday 2014 Apr 25 Intro to op amps, unity gain buffer, transimpedance amplifier. Monday 2014 Apr 28 Theory of sampling and aliasing Tuesday 2014 Apr 29 Characterizing impedance of loudspeaker vs. frequency Wednesday 2014 Apr 30 Gnuplot: fitting models for loudspeaker impedance. Thursday 2014 May 1 Sampling and aliasing lab. Awkward that this gets split from sampling and aliasing theory, but I want to analyze loudspeaker data this week. Friday 2014 May 2 Inverting and non-inverting amplifier. Monday 2014 May 5 System thinking and block diagrams: developing for audio amplifier Tuesday 2014 May 6 Low-power single-stage audio amplifier with op amp Wednesday 2014 May 7 Do now: transimpedance amplifier.  Models for photodiodes and phototransistors.  (other photosensors?) Develop block diagram for phototransistor amplifier with bandpass. Thursday 2014 May 8 Photodiode and phototransistor with transimpedance amplifier.Fingertip pulse sensor? (doable at 3.3v with 700nm red LED, but I put a 627nm red LED in parts list—I’ll have to test with that also—may need higher gain to compensate for greater finger opacity at that wavelength).  Need higher gain for IR also.  I’d also need to drill a dozen blocks of wood for making the fingertip alignment blocks.  May need to use bandpass filtering (2-stage).  Too complicated for one day? Friday 2014 May 9 Op-amp quiz/midterm Monday 2014 May 12 Review of op amps based on quiz? Tuesday 2014 May 13 Measuring nFET current with constant VDS and varying VGS, also with constant VGS and varying VDS. (Diode-connected also?) Wednesday 2014 May 14 Gnuplot: fitting nMOS transistor models to measured data. Thursday 2014 May 15 Catch up lab day? measuring pFET current? Friday 2014 May 16 class D amplifier  concept.  nFET & pFET as switches. Monday 2014 May19 Developing class D block diagram Tuesday 2014 May 20 class D audio amplifier day 1(preamp and comparators) Wednesday 2014 May 21 Gnuplot: analyzing loudspeaker load, adding LC filter in front of loudspeaker to make sharp cutoff without ringing. Thursday 2014 May 22 class D audio amplifier day 2 (output stage) Friday 2014 May 23 Strain gauges and Wheatstone bridges. Instrumentation amps.  Homework: block diagram and design for pressure sensor. Monday 2014 May 26 Memorial Day, no class Tuesday 2014 May 27 Pressure sensor day 1: design and soldering instrumentation amp prototype board Wednesday 2014 May 28 catch up day? Thursday 2014 May 29 Pressure sensor day 2: further debugging.Recording pressure pulses from aquarium air pump?  Would need to buy some more air pumps. Friday 2014 May 30 Action potentials in nerve and muscle cells? Monday 2014 Jun 2 Why EKG signals differ based on placement of electrodes.  (Vector model) Tuesday 2014 Jun 3 EKG day 1:  breadboard and debugging (confident students could go directly to soldering) Wednesday 2014 Jun 4 Catch up? Thursday 2014 Jun 5 EKG day 2: soldering, debugging, and demo.  Last day for any catchup labs. Friday 2014 Jun 6 Catch up? Monday 2014 Jun 9 4–7 p.m. Final exam? (probably not needed, except as a lab catch-up day)

I’m not 100% satisfied with this schedule, and things will probably slip as I discover unexpected difficulties in student preparation, but I think it is likely to run more smoothly than last year, and last year was not bad.

If any of my readers have suggestions on improvements that could be made in the labs or the order of topics, please let me know. I have to buckle down and (re)write the lab handouts soon!

## 2014 March 6

### Poetry Aloud

Filed under: Uncategorized — gasstationwithoutpumps @ 21:57
Tags: , ,

Sometimes on half-hour bike ride into work, I think up new courses that the university “needs”.  Once in a while I get an opportunity to create such a course—sometimes as part of my regular teaching load, sometimes by taking it on as overload.  I have created many new courses over the years.

Sometimes, the course ideas I come up with are ones that I’ve not really qualified to teach. In some cases, I teach myself the necessary material and create the course anyway: the Bicycle Transportation Engineering course I taught once; “The Art of the Book in the Computer Age” on digital typesetting, when it first became cheap and easy enough for people to do their own; algorithms for digital synthesis of music (OK,  I did know enough to teach that one without more study); technical writing for computer engineers; resource-efficient programming; applied circuits for bioengineers; banana slug genomics; …

Sometimes when I create a course students see no need for it, and it dies for lack of sufficient audience (I have done several of those over the decades). Others end up becoming a standard part of the curriculum (the tech writing course I created with a co-instructor about 26 years ago is now taught every quarter—luckily I only taught it for a little over a decade).

But sometimes the course idea is one that doesn’t rise high enough on my priority list and isn’t a good fit with my department.  It is not worth my time to learn how to teach such classes, but what should I do with the ideas for them?

Here’s an example: Wednesday morning, on my ride up the hill, I came up with a course title: Poetry Aloud.  The idea is a simple one—an interdisciplinary course combining 3 topics:

• Poetics: the study of the structure and technical aspects of poetry, that is, rhythm and meter; assonance, alliteration, and onomatopoeia; formal forms; …
• Poetic content: metaphor, simile, imagery, emotion, word play, allusion, …
• Performance: voice projection, gesture, use of microphone, conveying emotion in the voice, timing, stage presence, performing for video, props, …
• (One could add a fourth component—typesetting poetry—but I think that would dilute rather than enhance the course.)

I’m not thinking of single-genre performance classes (like poetry slams or Shakespearean acting), but of something that spans the gamut from early modern English to the latest song lyrics.

The first two topics comprise a fairly conventional poetry class, and I’m sure that there are courses that include them on campus already.  But I don’t know of any that combine the literary analysis with professional acting skills, to make performance of poetry a central part of the course, along with reading, analyzing, and writing poetry.  I don’t even know how such a course would get created on campus, with the acting teachers and the literature teachers in departments under different deans, located miles apart on campus. Perhaps it would take one of the literature faculty who works as a dramaturge to bring the faculty with the necessary skills together.

This particular course idea is a throwaway one—I’ll never follow up on the idea and will forget it in a week or two. After all, I’ve not written poetry for 30 or 40 years and have never performed poetry.  I don’t plan to start either.

But what should I do with ideas like this that I think (at least for a while) are worth considering, but that I don’t have the skill, energy, time, or resources to pursue?

## 2014 February 22

### Diode-connected nFET characteristics

Filed under: Circuits course,Data acquisition — gasstationwithoutpumps @ 19:20
Tags: , , , ,

Test circuit for determining I-vs-V curves for a diode-connected nFET. The shunt resistor R2 was chosen from 0.5Ω to 680kΩ, and R3 was selected to keep E23 above 0 (0.5Ω to 150Ω).

In More mess in the the FET modeling lab, I showed I-vs-V plots for NTD5867NL nFETs, both with a fixed power supply and load resistor, and diode connected (Vgs=Vds).  But this year, the NTD5867NL FETs were not available from Digikey, so we are getting AOI518 nFETs instead.  I decided to try characterizing these with the KL25Z board.  If I power the test off the KL25Z board’s 3.3v supply, I can take fairly high currents, as the board uses a NCP1117ST33T3G LDO regulator, which can the spec sheet claims can deliver up to 1A (800mA, if we limit the dropout to 1.2v). I’m only limited by the USB current limit (500mA), to keep the laptop from shutting off the USB port.

I used essentially the same circuit for testing a diode-connected AOI518 nFET as I used for testing the Schottky diodes, but I did not put a capacitor across the FET.  (Well, initially I left the 4.7µF capacitor there, but I was noticing changing values that looked like RC charging when I was testing at small currents, so I removed the capacitor.)

Because the 3.3v supply droops if too much current is taken from it, I used the internal 1V bandgap reference to determine the scaling of the analog-to-digital converter on each reading.  The voltage VDS is (E20-E21)/(BANDGAP), and the current IDS is (E22-E23)/(R2*BANDGAP).

Voltage vs current for diode-connected nFET. The model that fits the data (above 1µA) is that of subthreshold conduction, even when the current is over 100mA. (click to embiggen)

I get a very good fit to the data (above 1µA) with the subthreshold conduction model (essentially the same as a junction diode, but using n VT instead of VT, where n is determined by the size and shape of the FET).  The value of n for this FET seems to be around 830mV/26mV = 32. The circuit models I’ve seen on the web seem to claim that I should be using a saturation-current model for a diode-connected FET, but that model doesn’t fit the data at all.

There is a very clear thermal shift in the curve for the high-current tests.  As the transistor warms up the current increases for a given voltage.  This is equivalent to the threshold voltage Vthr dropping with temperature.  This is consistent with the data sheet, which shows a lower threshold voltage but higher on-resistance (at 10A) at 125° C than at 25° C.

I’m not seeing any evidence of the weird negative resistance that I saw on the NTD5867NL nFETs. (I tried checking the NTD5867NL nFET with the same testing setup as for the AOI518, and it definitely still shows weird behavior between 10 and 30 mA.)

Because large nFETs are often used to switch inductive loads (motors, loudspeakers, inductors in switching regulators, …), they incorporate a “flyback” diode in the FET.  Normally, this diode is back-biased and does not conduct, but if an inductive load needs a current and there are no transistors that are on to provide the current, the diode conducts and keeps the output voltage from going too far below ground.

nMOS and pMOS transistors with flyback diodes. If both transistors are off, but the inductor L1 still wants current, it has to come through one of the flyback diodes D1 or D2. They keep the output voltage from going too far outside the rails.

I characterized the flyback diode on the AOI518 nFET the same way as before, now connecting the gate and the source to the higher voltage, and the drain to the lower voltage.

Below about 0.66 V, the flyback diode has a fairly normal exponential current with voltage, but above that it seems to have a linear relationship between current and voltage, with a dynamic resistance of about 180mΩ.
click to embiggen

The red points with the 0.5Ω shunt go up to an amp, which warms the FET enough to change its characteristics—the lower set of points are the warmer set.

I can also use the measurements of the flyback diode with the ½Ω shunt to characterize the LDO voltage regulator on the Freedom KL25Z board:

For currents up to 400mA, the LDO voltage regulator behaves like a 3.332 V source in series with a 55mΩ resistor.
click to embiggen

The data sheet claims that there should only be a 10mV drop in voltage for an 800mA current, and I’m seeing a 290mV drop.  The extra drop is not from the LDO misbehaving, but from the USB voltage dropping—one is only supposed to take up to 500mA from a USB supply and the MacBook Pro apparently has a soft knee at 500mA, rather than an abrupt shutoff.  I suspect that if I took the full amp for very long, the laptop would shut down the USB port, as it does if the USB 5V is accidentally shorted.

« Previous PageNext Page »