Gas station without pumps

2016 July 29

Two-factor authentication done wrong

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

The Social Security Administration has decided to add two-factor authentication to the website, where you can check the status of your Social Security account. They’ve picked a fairly standard way to do it:

When you sign in at with your username and password, we will ask you to add your text-enabled cell phone number.  The purpose of providing your cell phone number is that, each time you log in to your account with your username and password, we will send you a one-time security code you must also enter to log in successfully to your account.

Each time you sign into your account, you will complete two steps:

  • Step 1:  Enter your username and password.
  • Step 2:  Enter the security code we text to your cell phone (cell phone provider’s text message and data rates may apply).

Unfortunately, unlike almost all other two-factor systems, they provided no opt-out:

If you do not have a text-enabled cell phone or you do not wish to provide your cell phone number, you will not be able to access your my Social Security account. 

Given that the people most interested in using are also the people with the lowest probability of having text-enabled cell phones, this seems extremely short-sighted.  According to a study by the Pew Research Center, only about 30% of adults over 65 have a smartphone and only 78% have a cellphone of any sort.  It seems really weird to insist that 22% (or more—some cell phones have no text capability and some older adults can’t use the text capability of their phones) of the adults over 65 won’t be allowed to access their Social Security accounts by computer.

I’ll probably have to deactivate the online account when they turn on the mandatory two-factor authentication next month.  Of course, given that they’ve not provided any opt-out, they probably won’t let me deactivate the account  without a cell phone. With any luck, though, they’ll realize (eventually) that they made a bone-headed decision and allow those of us without cell phones some other way to access

Update 2016 Sept 1: The Social Security Administration admitted they made a mistake and have removed the mandatory two-factor identification.  It is still available and highly recommended, but no longer required.

2016 July 27

Measuring a high-voltage nFET

Filed under: Circuits course — gasstationwithoutpumps @ 21:07
Tags: , , ,

I got the nFETs today that we’re planning to use for the LED theater lights, and decided to characterize them, to make sure that they would work as we expected.  These are IPU50R950CEAKMA1 500V 4.3A nFETs from Infineon.

The gate voltage at which these nFETs turn on is a fairly high one (traditional, rather than low-threshold for logic-level input), so I had to use a voltage divider to measure Vgs.  I tried measuring with the 3.3V power from the Teensy board and with a 9V power supply—I needed to use voltage dividers to measure Vds and Vdd with the 9V power supply.  (Note: the power supply was a Mean Well GS60A09-P1J power supply—it delivered 9.24V without load and 9.14V with a 790mA load.)

The gate voltage at which the nFET turns on drops as the nFET gets warm:

The flat current at higher voltages is an artifact of the load resistor being used—the load resistor acts as a current-limiting resistor.

The flat current at higher voltages is an artifact of the load resistor being used—the load resistor acts as a current-limiting resistor.

The specs give a Vgs for a current of 0.1mA of 2.5V to 3.5V, and so this device seems to be in spec (I have to guesstimate the shift for the higher currents).

The current is limited by the load resistor, but the maximum current here is close to what we expect to use for the LEDs, and the gate voltage is supposed to be at least 7.25V for the driver we are using (HV9910B), so the characteristics here are probably a bit conservative.

I tried using a smaller resistor (1.8Ω) with the 9V power supply to try to characterize at higher currents. The power supply and the 50W resistor had no problems with this, but the nFET got very hot very fast, so I terminated the test before I could damage the nFET. I think that the nFET was trying to dissipate about 8W of power, and at 63°C/W that would exceed the 150°C max junction temperature long before reaching equilibrium.

I also tried running with the 10Ω resistor for a few minutes, to get closer to an equilibrium condition for the nFET, and then recorded for about 87 seconds. I used this recording to plot power dissipated in the nFET versus Vgs, in order to figure out what the steady-state power dissipation would be at the currents we expect to use.

The power peaks at 2.11W when the effective drain-to-source resistance matches the load resistance (around Vgs=4.4V), but even with the transistor fully on, we're dissipating about 1.26W.

The power peaks at 2.11W when the effective drain-to-source resistance matches the load resistance (around Vgs=4.4V), but even with the transistor fully on, we’re dissipating about 1.26W.

The 1.26W at 63°C/W would give a junction temperature around 105°C, which is well below the 150°C limit. Of course, that is assuming an ambient temperature of 25°C, and the interior of the lighting can will be warmer than that. We’ll have to run fans to keep things cool enough.

I would not want to use this nFET for class-D amplifier lab in the circuits course, because it has such a high threshold voltage, though 35¢ price in hundreds is not bad.  It does look like it will work well for the theater lights, though.

2016 July 25

Hearing aids

Filed under: Uncategorized — gasstationwithoutpumps @ 22:20
Tags: ,

Because I’m gradually going deaf (I’ve lost a lot of my hearing over 2kHz already), I’ve been learning about hearing aids—I’ve even been thinking of doing “thrift-store science” with them, with a plan for making my own test box and 2cc coupler.  I have not bought hearing aids yet, but will probably need to do so by next year.

So far, I’ve read two books to bring myself up to speed on modern hearing-aid design:

Digital Hearing Aids James M. Kates [Plural Publishing 2008]
A fairly easy read, with a good intro to signal-processing basics, but a bit dated.
Hearing Aids, 2nd ed. Harvey Dillon [Thieme 2012]
A much more thorough look at the acoustical physics and prescription of modern hearing aids, but surprisingly little on the signal processing or algorithms needed to make them work. The author is also way too fond of acronyms—he lists over 140 of them in the index in the back. Many of them are very similar to each other (REAG, RECD, REDD, REIG, REOG, REOIG, RESR, RETSPL, REUG, RIC, RITA, RITC, RITE, RSETS), , and he generally uses them without expanding them except the first time, which makes reading the book unnecessarily tedious.

(Actually, I’m only about 2/3 of the way through this book—I’m finding it rather dull in places.)

Both of these books are aimed at clinicians prescribing hearing aids, not engineers interested in designing or testing them, and so they have had more information than I need about how hearing aids are prescribed, and less than I would like about how they are designed and programmed (much of which is likely to be trade-secret coding).

Recently, the New York Times had an article about PSAPs (Personal Sound Amplification Products), which are hearing aids sold under a different product name, because of US regulations that require hearing aids to be certified by the FDA.  That article points to research by Nicholas Reed, a Johns Hopkins audiologist, into how well these non-prescription devices work.

Note: the research article in American Journal of Medicine has Reed as the second author,  with Sara Mamo as the first author—why was the female first author overlooked by NY Times? Perhaps there is another publication coming out with the authors in a different order—maybe the cited [Reed NS, Betz J, Lin FR, Mamo SK. Electroacoustic analysis of direct-to-consumer amplification devices. In preparation.]?

The NY Times article claims that the authors were impressed by three products:

  • Soundhawk, which works with a smartphone (about $400) and is quite large (looks like you’re on the phone with a Bluetooth headset, and only designed to be used in one ear, I think).
  • CS50+, made by Soundworld Solutions (about $350, $700 for a pair) and looking like cross between a conventional behind-the-ear model and an in-the-ear model (so combining the disadvantages of each). Customization can be done with either a computer or a smartphone (a plus for me, since I still have not bought even a dumb cell phone).Based on the specs and the documentation for their customizer app, this device appears to be a 16-channel amplifier with 16-channel noise suppression, with feedback cancellation, moderate (not adjustable) compression, and switchable omnidirectional or unidirectional mic, and the left and right ears can be separately adjusted. The American Journal of Medicine article mentions good signal-to-noise ratio, noise reduction, and speech-enhancement software.
  • Bean T-coil, made by Etymotic (about $350, $600 for a pair), which looks like a conventional in-the-ear hearing aid.  It is not as adjustable as the other two—they even claim “No adjustments needed; no controls to adjust” as if everyone had the same needs.  According to the specs, it is a 15dB analog amplifier with wide dynamic range compression. The frequency response and compression are fixed, not adjustable. This is not a modern hearing-aid design, but one from the late 1980s!  It would be a good deal at $30, but  not at $350. The American Journal of Medicine article did not indicate that they were impressed with the Bean T-coil: too much low-frequency gain, only adequate signal-to-noise ratio, no noise reduction or low internal noise.

These are not low prices, but much cheaper than the medically priced ones, which average $1400 each (according to Wikipedia)—a ridiculously high price for what they contain—even the $350 ones have a huge markup, as the components probably cost in the $10–$50 range.

The Bluetooth-enabled Soundhawk and CS50+ are huge devices, which probably helps them put in all the components needed for the Bluetooth connectivity, in addition to the sound-processing components. The Companion hearing aid seems to be the same as the CS50+, but in a smaller, traditional behind-the-ear, receiver-in-the-ear aid ($450 for one, $735 for two). They claim a longer battery life, despite a smaller battery, so there are probably some compromises on the design (possibly a lower sampling rate).

You can get very cheap sound amplifiers from China ($5–$20 each), but these are often just 1-transistor amplifiers with awful distortion—equivalent to 1970s-era designs or earlier.  I’ve been wondering whether it would be possible to design my own PC board to fit into a behind-the-ear case and make a hearing aid that is comparable to the Bean T-coil, but designed around my hearing losses. I don’t think that I have the patience this summer to design a full digital hearing aid like the Companion, CS50+, or Soundhawk—there is a lot of code tweaking needed to make the signal processing work right at low enough power. If I can get good answers from their customer support, I may just buy myself a pair of the Companion hearing aids.

2016 July 24

More thoughts on measuring FETs

Filed under: Circuits course — gasstationwithoutpumps @ 21:29
Tags: , , ,

I have spent some time this week thinking about a lab for characterizing nFETs (and pFETs) for the applied electronics course, because I was not very happy with the preliminary work in Possible new FET lab for electronics course and pFET Ron_vs_Vgs. There were a couple of things that bothered me:

  • Should we be looking at equivalent resistance or current? which is more consistent across different test conditions? which is more useful for continued design?
  • Does it matter what circuit we use for making the measurement? What are the advantages or disadvantages of choosing different power supply values, different load resistors, or different transistor configurations?

The most basic choice is between a common-source or common-drain amplifier setup, both of which are special cases of the same circuit:

For a common-source configuration, the output is Vd, the load resistor is Rd, and Rs is set to 0Ω. For a common-drain configuration, Vs is the output, Rs is the load resistor, and Rd is set to 0Ω.

For a common-source configuration, the output is Vd, the load resistor is Rd, and Rs is set to 0Ω. For a common-drain configuration, Vs is the output, Rs is the load resistor, and Rd is set to 0Ω.

The testing I did before was with a common-source circuit. The output voltage range is from very close to 0V up to Vdd, which means that either Vdd has to be limited to the range of the analog-to-digital converter or a voltage divider is needed to divide down Vd. The current we are interested in is I_d = (V_{dd}-V_{d})/R_d. Taking the difference of two measurements increases the noise of the measurement, and if Vdd is large enough that voltage dividers are needed, then the current through the voltage divider also goes through the load resistor, making measuring low drain currents (when Vgs is small) difficult.

The common-drain circuit only requires measuring Vg and Vs, both of which can be within the analog-to-digital converter range even when Vdd is large, assuming that the load resistor (Rs in this case) is chosen sufficiently small. Determining Vgs requires a subtraction, but Id does not. Avoiding voltage dividers (with their current stealing and the extra trouble of measuring the divider ratio) seemed like a good idea.

I tried making measurements with the common-drain configuration today, and found it surprisingly difficult. I kept getting huge amounts of noise on the Vs plot, whenever the FET was on. It appeared to be 120Hz interference, but I have no idea where the interference was coming from—the power supply did not show significant 120Hz ripple and large bypass capacitors on the power supply lines did not help. I finally managed to get rid of the problem by putting a 10µF capacitor between the source and drain, providing a negative feedback path that eliminated the problem. (The capacitor appeared to make no difference to the plots for common-source configurations.)

The common-source circuits, however, provided much cleaner plots than the common-drain circuits. The common-source circuits also allowed me to measure much higher drain currents, because I could go to a higher Vgs value without exceed the ADC range when Vs was constrained to be 0V.

For the range that I could measure, I got essentially the same current whether I measured drain current or source current, and pretty much independent of the voltage and load resistance I used. To first approximation, it looks like Id is a function of Vgs in a way that the equivalent resistance that plotted in Possible new FET lab for electronics course is not.

Using a small load resistor allows measuring up to a fairly high current (Vdd/R), as long as the power supply can deliver the current and the resistor doesn't overheat. Using a large load resistor allows measuring to a fairly low current.

Using a small load resistor allows measuring up to a fairly high current (Vdd/R), as long as the power supply can deliver the current and the resistor doesn’t overheat. Using a large load resistor allows measuring to a fairly low current.

2016 July 22

Modeling bicycle balance—a disappointing Nature article

Filed under: Uncategorized — gasstationwithoutpumps @ 17:38
Tags: , ,

The bicycle problem that nearly broke mathematics in Nature News & Comment is a badly titled (click-bait) article that talks about one person who contributed to the development of  the differential equations that accurately describe bicycle balancing (which has been incorrectly or incompletely described many times in the physics and engineering literature).

The one-line summary of the article is pretty accurate:

Jim Papadopoulos has spent a lifetime pondering the maths of bikes in motion. Now his work has found fresh momentum.

There is nothing in the article giving any indication that the equations Papadopoulos derived provided any stress to mathematics.  The problem, as in many physics problems, is all in deciding what needs to be included in the model to get the best compromise between the tractability of the model and its accuracy.  So far as I can tell from the vague descriptions in the article, the equations themselves are pretty much standard PDEs.

Unfortunately, the article does not give the equations themselves, so this article is particularly disappointing.  It is People article, not a science article.

The article did give one prediction from the equations that showed their worth: it is possible to design a rideable bike with no gyroscopic balancing and negative trail, which would be inherently unstable in previous, simpler models. The trick is to move the center of gravity far enough forward to be ahead of the steering axis. Supposedly, such a bike has been built [Kooijman, J. D., G. Meijaard, J. P., Papadopoulos, J. M., Ruina, A., Schwab, A. L. A Bicycle Can Be Self-Stable Without Gyroscopic or Caster Effects Science 3(32), 339–342 (2011)], but that article is hidden behind the Science paywall, so you’ll need to go to a university library to access it.

The supplementary material for the Science article is where the equations are presented and explained.

« Previous PageNext Page »

%d bloggers like this: