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.

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 18

Digilent’s OpenScope

Filed under: Uncategorized — gasstationwithoutpumps @ 10:08
Tags: , , , ,

 

Digilent, which makes the excellent Analog Discovery 2 USB oscilloscope, which I have praised in several previous post, is running a Kickstarter campaign for a lower-cost oscilloscope: OpenScope: Instrumentation for Everyone by Digilent — Kickstarter.

I’m a little confused about this design, though, as is it is a much lower-quality instrument without a much lower price tag (they’re looking at $100 instead of the $180 or $280 price of the Analog Discovery 2, so it is cheaper, but the specs are much, much worse). The OpenScope looks like a hobbyist attempt at an oscilloscope, unlike the very professional work of the Analog Discovery 2—it is a real step backwards for Digilent.

Hardware Limitations:

  • only a 2MHz bandwidth and 6.25MHz sampling rate (much lower than the 30MHz bandwidth and 100MHz sampling of the Analog Discovery 2)
  • 2 analog channels with shared ground (instead of differential channels)
  • 12-bit resolution (instead of 14-bit)
  • 1 function generator with 1MHz bandwidth and 10MHz sampling (instead of 2 channels 14MHz bandwidth, 100MHz sampling)
  • ±4V programmable power supply up to 50mA (instead of ±5V up to 700mA)
  • no case (you have to 3D print one, or buy one separately)

On the plus side, it looks like they’ll be basing their interface on the Waveforms software that they use for their real USB oscilloscope, which is a decent user interface (unlike many other USB oscilloscopes).  They’ll be doing it all in web browsers though, which makes cross-platform compatibility easier, at the expense of really messy programming and possibly difficulty in handling files well.  The capabilities they list for the software are much more limited than Waveforms 2015, so this may be a somewhat crippled interface.

I would certainly recommend to students and educators that the $180 for the Analog Discovery 2 is a much, much better investment than the rather limited capabilities of the OpenScope.  For a hobbyist who can’t get the academic discount, $280 for the Analog Discovery 2 is probably still a better deal than $100 for the OpenScope. The Analog Discovery 2 and a laptop can replace most of an electronics bench for audio and low-frequency RF work, but the OpenScope is much less capable.

The only hobbyist advantage I can see for the OpenScope (other than the slightly lower price) is that they are opening up the software and firmware, so that hobbyists can hack it.  The hardware is so much more limited, though, that this is not as enticing as it might be.

Some people might be attracted by the WiFi capability, but since power has to be supplied by either USB or a wall wart, I don’t see this as being a huge win.  I suppose there are some battery-powered applications for which not being tethered could make a difference (an oscilloscope built into a mobile robot, for example).

Going from a high-quality professional USB scope to a merely adequate hobbyist scope for not much less money makes no sense to me. It would have made more sense to me if they had come out with OpenScope 5 years ago, and later developed the Analog Discovery 2 as a greatly improved upgrade.

2017 February 6

Every second counts

Filed under: Uncategorized — gasstationwithoutpumps @ 21:03

I’ve been enjoying the videos at http://everysecondcounts.eu/, which were started by a Netherlands comedy show in response to Trump’s America First speech.  They made a fake tourism video, with an excellent Trump voice impersonator, arguing for making the Netherlands second.

Other comedy shows soon took up the challenge creating their own mock tourism videos (I particularly liked Denmark’s entry and Germany’s).

There are now nine videos, with more undoubtedly in the pipeline.

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.

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.

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

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.

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.

Next Page »