# Gas station without pumps

## 2017 February 27

### Understanding semilog plots

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

I realized in doing the homework grading this weekend that few of the students in my electronics course had any intuitive understanding of semilog plots (that is, plots in which one axis is linear and the other logarithmic).  I had been assuming that providing the following plot

Forward voltage as a function of current for a 1N914BTR diode.

would let students see that the voltage grows approximately with the logarithm of the current, and that means that a voltage difference corresponds to a current ratio. Very few students got that from the picture, the formulas, or the description in the text. They almost all wanted to pretend that the diode was a linear device with voltage proportional to current (i.e., that it was a resistor), so that a 6% change in current would result in a 6% change in voltage.  The whole point of using the diode was to introduce the exponential non-linearity, so this confusion definitely needs to be cleared up.

I was going to try to explain semilog plots and exponential/logarithmic relationships in class today, but my cold has gotten so bad that I had to cancel class today. That means I have another 2 days to figure out how to explain the concepts. If any of my readers can think of ways to get students to interpret semilog plots correctly, please let me know. I think that the relationships are too obvious to me for me to help students past their misunderstandings—I can’t get far enough into their mindsets to lead them out of confusion.

## 2017 February 25

### More writing advice from the electronics course

Filed under: Circuits course — gasstationwithoutpumps @ 20:13
Tags: , , ,

I spent the entire long Presidents’ Day weekend grading and still did not clear my backlog (the cold I’ve had for the past two weeks has really reduced my ability to work long hours).  I did get a homework set graded and a design report set graded during the 3-day weekend, but I was left with a set of 18 redone lab reports that I still hadn’t gotten to.  Wednesday produced another set of redone reports (so I now have about 35), and Friday produced another homework set (which I just finished grading after spending all Saturday—I haven’t even gotten dressed yet and it is almost 8pm). Tomorrow I’ll tackle the first set of redone reports, assuming my cold lets me do anything tomorrow.

In Disappointment with chain stores, I commented on no longer wanting to grade in the Peet’s coffee shop I used to grade in, and commenter “Mike” wanted to know what solution I came up with. This winter, I’ve mainly been grading in my breakfast room at home, using a tiny laptop (an 11″ MacBook Air, which we bought for travel and for lecturing) when needed to look things up (data sheets, my solution sets, the exact wording in the book, …).  This has worked out ok this year, though I do tend to wander into the kitchen for snacks a bit too often.  Still, the snacks at home are healthier than in a coffee shop!

Here are some general comments that I shared with the whole class, based on the most recent design reports:

Content:

Many students reported using a 3.3V power supply without measuring it, resulting in inconsistent information, such as VOH > 3.3V.  PteroDAQ reports the power-supply voltage on the GUI and in the metadata for the data file, so the data was available, even if the students hadn’t thought to measure it while in lab.

Formatting:

• Equations are parts of sentences, not figures and not objects dropped randomly on the page. Treat them grammatically as noun phrases.
• Explicit figure credit is needed any time a figure is copied or adapted. The caption must say something like “figure adapted from …” or “figure copied from …”. Failure to do so is plagiarism, and I’ll have to start academic integrity proceedings if students fail to do proper figure credits in future.
• Don’t bury the lede. Start with the design goal, not with generic background. A lot of students still wanted to give me a bunch of B.S. about what hysteresis was, before telling me that they were designing a capacitive touch sensor using a relaxation oscillator built around a Schmitt trigger.

Grammar:

• The subjunctive mood marked by the auxiliary verb “would” is used for many things in English, but technical writing primarily uses just one: contrary-to-fact statement. “The inverter that we would be using” says that you didn’t use that inverter and are about to say why. A lot of students seem to think that “would be” is some formal form of past tense—they’ve seen it in writing, but never understood what it means.  I fault their middle-school English teachers for not stressing the importance of more advanced grammar than the bare minimum, but the fault could have been corrected in high school or in college composition classes, but still persists.
• Students are still using way too much passive: “It was decided …” should be replaced with “We decided …”.  Part of the problem here is that much of the writing they are exposed to overuses passive also—excessive passive is a common writing error for scientists and engineers, not just students.

Wording:

• “Firstly”, “secondly”, “lastly” ⇒ “first”, “second”, “last”. These are already adverbs and don’t need an “-ly” ending.  Strangely, I never see the corresponding problem with “next”, though it is in the same class of words that are simultaneously adjectives and adverbs.
• There are a lot of words that are compound words as nouns, but separable verb+particle pairs as verbs. For example, “setup” is a noun, but “set up” is a verb. Other examples include layout, turnaround, pickup, putdown, stowaway, flyover, and setback.
• Avoid the unit abbreviation mm2, as it is too hard to tell whether you mean m(m2) or (mm)2. Most often, the (mm)2 interpretation will be made, but a lot of students used it for m(m2).  (Same for cm2.)
• Many students are using “proportional” wrong, for any increasing function. The phrase “f proportional to d” means f=kd for some k, not just that f increases with d. Similarly, “T inversely proportional to d” means T=k/d for some k, not just that C decreases with d.

Punctuation:

• Capitalize at beginning of sentence and proper names only: “Schmitt trigger” not “Schmitt Trigger”, “Figure 3” but “many figures”. Figure names, table names, and equation names are proper nouns, so should be capitalized: “There are three figures on the last page: Figures 4, 5, and 7”.
• Unit names are not capitalized (hertz, volts, amps, …), but symbols for units from people’s names are (Hz, V, A)
• Hyphenate a noun phrase used as a modifier for another noun: “Schmitt-trigger inverter” but “Schmitt trigger”.

## 2017 February 6

### Hysteresis oscillator is voltage-dependent

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

Today in class I did a demo where I tested the dependence of the frequency of my relaxation oscillator board on the power supply voltage.

The demo I did in class had to be debugged on the fly (it turns out that if you configure the power supplies of the Analog Discovery 2 to be low-speed waveform channels, then you can’t set them with the “Supplies” tool, but there is no warning that you can’t when you do the setting), but otherwise went well.

One surprising result (i.e., something else that hadn’t happened when I tested the demo at home on Sunday) was that the frequency appeared to go up instead of down when I touched the capacitive touch sensor.  This I managed to quickly debug by changing my sampling rate to 600Hz, and observing that the 60Hz frequency modulation was extreme at the podium, taking the oscillation frequency from 0Hz to 3MHz on each cycle.  Grounding myself against the laptop removed this interference and produced the smooth expected signal.

Anyway, when I got home I was much too tired to grade the lab reports turned in today (I’ve got a cold that is wiping me out), so after a nap and dinner, I decided to make a clean plot of frequency vs. power-supply voltage for my relaxation oscillator.  I stuck the board into a breadboard, with no touch sensor, so that the capacitance would be fairly stable and not too much 60Hz interference would be picked up.  I powered the board from the Analog Discovery 2 power supply, sweeping the voltage from 0V to 5V (triangle wave, 50mHz, for a 20-second period).

I used the Teensy LC board with PteroDAQ to record both the frequency of the output and the voltage of the power supply.  To protect the Teensy board inputs, I used a 74AC04 inverter with 3.3V power to buffer the output of the hysteresis board, and I used a voltage divider made of two 180kΩ resistors to divide the power-supply voltage in half.

When I recorded a few cycles of the triangle waveform, using 1/60-second counting times for the frequency measurements, I got a clean plot:

At low voltages, the oscillator doesn’t oscillate. The frequency then goes up with voltage, but peaks around 4.2V, then drops again at higher voltages.

I expected the loss of oscillation at low voltage, but I did not expect the oscillator to be so sensitive to power-supply voltage, and I certainly did not expect it to be non-monotone.  I need to heed my class motto (“Try it and see!”) more often.

Sampling at a higher frequency reveals that the hysteresis oscillator is far from holding a steady frequency:

Using 1/600 second counting intervals for the frequency counter reveals substantial modulation of the frequency.

This plot of frequency vs. time shows the pattern of frequency modulation, which varies substantially as the voltage changes, but seems to be repeatable for a given voltage. (One period of the triangle wave is shown.)

Zooming in on a region where the frequency modulation is large, we can see that there are components of both 60Hz and 120Hz.

I could reduce the 60Hz interference a lot by using a larger C and smaller R for the RC time constant. That would make the touch sensor less sensitive (since the change in capacitance due to touching would be the same, but would be a much smaller fraction of the total capacitance). The sensor is currently excessively sensitive, though, so this might be a good idea anyway.

## 2017 February 5

### Units matter

Filed under: Circuits course — gasstationwithoutpumps @ 11:37
Tags: , , , , ,

I was a little surprised by how many students had trouble with the following homework question, which was intended to be an easy point for them:

Estimate C2(touching) − C2(not touching), the capacitance of a finger touch on the packing-tape and foil sensor, by estimating the area of your finger that comes in contact with the tape, and assume that the tape is 2mil tape (0.002” thick) made of polypropylene (look up the dielectric constant of polypropylene on line). Warning: an inch is not a meter, and the area of your finger tip touching a plate is not a square meter—watch your units in your calculations!

Remember that capacitance can be computed with the formula $C = \frac{\epsilon_r\epsilon_0 A}{d}~,$
where $\epsilon_r$ is the dielectric constant,  $\epsilon_0=$8.854187817E-12 F/m is the permittivity of free space, A is the area, and d is the distance between the plates.

The problem is part of their preparation for making a capacitance touch sensor in lab—estimating about how much capacitance they are trying to sense.

There is a fairly wide range of different correct answers to this question, depending on how large an area is estimated for a finger touch. I considered any area from 0.5 (cm)2 to 4 (cm)2 reasonable, and might have accepted numbers outside that range with written justification from the students.  Some students have no notion of area, apparently, trying to use something like the length of their finger times the thickness of the tape for A.

People did not have trouble looking up the relative dielectric constant of polypropylene (about 2.2)—it might have helped that I mentioned that plastics were generally around 2.2 when we discussed capacitors a week or so ago.

What people had trouble with was the arithmetic with units, a subject that is supposed to have been covered repeatedly since pre-algebra in 7th grade. Students wanted to give me area in meters or cm (not square meters), or thought that inches, cm, and m could all be mixed in the same formula without any conversions.  Many students didn’t bother writing down the units in their formula, and just used raw numbers—this was a good way to forget to do the conversions into consistent units.  This despite the warning in the question to watch out for units!

A lot of students thought that 1 (cm)2 was 0.01 m2, rather than 1E-4 m2. Others made conversion errors from inches to meters (getting the thickness of the tape wrong by factors of 10 to 1000).

A number of students either left units entirely off their answer (no credit) or had the units way off (some students reported capacitances in the farad range, rather than a few tens of picofarads).

A couple of students forgot what the floating-point notation 8.854187817E-12 meant, even though we had covered that earlier in the quarter, and they could easily have looked up the constant on the web to figure out the meaning if they forgot.  I wish high-school teachers would cover this standard way of writing numbers, as most engineering and science faculty assume students already know how to read floating-point notation.

Many students left their answers in “scientific” notation (numbers like 3.3 10-11 F) instead of using more readable engineering notation (33pF). I didn’t take off anything for that, if the answer was correct, but I think that many students need a lot more practice with metric prefixes, so that they get in the habit of using them.

On the plus side, it seems that about a third of the class did get this question right, so there is some hope that students helping each other will spread the understanding to more students.  (Unfortunately, the collaborations that are naturally forming seem to be good students together and clueless students together, which doesn’t help the bottom half of the class much.)

## 2017 January 29

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

I just spent my entire weekend grading 37 design reports for the thermistor lab—it has not been a fun weekend.  The coming week or two will be grading hell, as I have homework due for the 72-person class Monday, Wednesday, and Friday (with another lab report due next Monday), and no grader or TA.

This lab report was the first of the quarter, so there were a lot more problems with the submissions than I expect to see on future lab reports.  I’ve tried to collect some of my notes on the more common writing errors for this blog post, with the intent of trying to work them into the chapter on lab reports in the textbook:

• Some students had wordy introductions. I want reports to start with a clear, concise statement of the engineering goal, not a dump of any random factoid that might be vaguely related to the report.
• Report should be standalone—not referring to homework. If something in the homework is needed, incorporate it!
• Use paragraphs with one topic each. Every paragraph should start with a topic sentence, and the rest of the paragraph (if there is any) should support and amplify that topic sentence. It is better to have one-sentence paragraphs than to ramble from topic to topic without a paragraph break.
• Fit your model to your data, not your data to a model. You should never be changing your data to make it fit your theory—you should be changing your theory to fit your data.If you say you are fitting your data to your model, you are claiming to commit scientific fraud.
• Best-fit curves are not necessarily lines—students don’t have a “line of best fit” in this lab, because the models we’re fitting are nonlinear.
• Figure captions should be paragraphs below figure, not noun phrases above figure. Any anomalies or interesting features of the figure should be pointed out in the caption.  Most of the crucial content of the report should be in the figures and captions, because that is all 90% of readers ever look at in a science or engineering paper.
• Refer to figures and equations by number, rather than “schematic below” or “equation above”.
• Don’t use screenshots for schematics or gnuplot output—export graphics properly as PDF files and incorporate them into the report so that they can be printed at full resolution even when scaled.
• Many students use way too much passive voice.  Using passive voice is a way to hide who did something or deny responsibility (see Nixon’s “mistakes were made”) and should not be necessary in a design report.
• Use past tense for things that have been done, not present tense.  Also, “would” is not some formal version of the past tense—it is a marker for the subjunctive mood in English, which has a whole lot of different uses.  In technical writing, the most common use of subjunctive is for “contrary to fact”.  If you say “I would put the thermometer in the water”, I immediately want to know why you don’t—I expect to see the sentence continue with “, but I won’t because …”
• “Software” is an uncountable noun, which means that it can’t be used with the indefinite article “a”.  There are a lot of uncountable nouns in English, and there isn’t much sense to which words are countable and which aren’t—even closely related languages with similar notions of countable and uncountable nouns mark different nouns as uncountable.  I’ve only found one dictionary that marks countability of English nouns—the Oxford Dictionary of American English, which is available used for very little money.
• Equations are part of a sentence (as a noun phrase), not random blobs that can be sprinkled anywhere in the paper.  No equation should appear without a textual explanation of its meaning, and the meaning of its variables.
• There was a lot of misuse of “directly proportional” and “inversely proportional”: A directly proportional relationship plots as a straight line through zero. The voltage output in the thermistor lab is not directly proportional to temperature—it is increasing with temperature, but the function is sigmoidal, not linear.  Similarly, an inversely proportional relationship between x and y is a direct relationship between 1/x and y. It plots as a hyperbola. The resistance of a thermistor is not inversely proportional to temperature, as the resistance is proportional to $e^{B/T}$  not $B/T$.
• Read the data sheet carefully!  A lot of students claimed that their thermometers were good to 150°C, but the data sheet said that the thermistor they were using had a maximum temperature range of  –40°C to 105°C, not 150°C.
• Students need to use the right metric prefixes.  For example, “kilo” is a lower-case “k” not an upper-case “K”.  This becomes even more urgent for “micro” (µ), “milli” (m), and “mega” (M).  At least one report needs to be redone because the students claimed a value around 200MΩ, when they (probably) meant 200mΩ.  What’s a factor of a billion between friends?
• Some students are clearly not used to using the prefixes, because I saw a lot of values around 0.0001kΩ, which should have been written 0.1Ω (or even 100mΩ).  Even worse, a lot of students just wrote 0.0001, with no indication what the units were (that triggered a number of “redo” grades on the reports).
• “Lastly” is not a word—”last” is already an adverb. The same goes for “first”, “second”, and “third”. Perhaps it is easier to keep this in mind if you think of “next”, which is in the same class of words that are both adjectives and adverbs. For some reason, students never write “nextly”.
• The ×  symbol (\times in LaTeX) is only used for crossproduct, not for scalar multiplication (except in elementary school). The normal way to show scalar multiplication is juxtaposition of the variables, with no operator symbol.
• “Before” and “after” make no sense in the voltage divider circuit. You can sometimes use those terms in a block diagram that has a clearly directed information flow from inputs to output, but not for talking about the two legs of a voltage divider.

Next Page »

Create a free website or blog at WordPress.com.