Gas station without pumps

2022 January 4

Book scheduled to come out in June

Filed under: Circuits course — gasstationwithoutpumps @ 17:56
Tags: , , ,

My book now has a web page with World Scientific Publishing ( with price information and a DOI.  The claim there is that the book will be available in June at $88 for paperback and $178 for hardback (a rather larger premium for the hardback than I had expected).  Of course, the PDF version will continue to be available for $7.99 from

I have to write a press release (about 500 words and expressing something novel that would attract science writers). Writing press releases is not one of my strong skills—I’m not sure what spin to put on the book to attract science writers.  I know what I like about the book and why I wrote it, but I’m not sure I can encapsulate that in a press release that would attract attention.

Anyone have any advice for the press release?

I also have to decide whether to buy an ad in the July 2022 “Stanford Authors” issue of Stanford magazine.  It would be $525 for about 400 characters and a picture of the book cover, which I’d be unlikely to recover in direct sales, but if one of the people seeing the book there adopted it for a course, the ad might break even. The magazine claims about 200k readers.

Should I buy the Stanford ad?

2022 January 3

Test box resonances

In Microphone test box, I talked about the first steps in building a box for testing microphones, testing hearing aids, and other small sound experiments.  In that post, I just showed the physical setup and did some impedance measurements of the loudspeakers in the box.

I saw only weak indications of acoustic resonances in the impedance measurements of the speakers, but I expected that a wooden rectangular box would actually have strong resonances. So my next step was to put a microphone and transimpedance amplifier in the box to measure the resonances using the Analog Discovery 2 as a network analyzer.


Here is the transimpedance amplifier I used for biasing the microphone and converting the current output to a voltage. The bias voltage is set by W2 of the Analog Discovery 2, with a low-pass filter to remove any noise added in the wire. The gain of the amplifier is 1kΩ (so 1µA becomes 1mV). The 5.6kΩ at the scope input reduces the scope impedance, so that current picked up in the wire does not make a large voltage. (More on that below.)

I set up the network analyzer to use a 2V amplitude to drive the loudspeaker. With about an 80Ω load, this makes 25mA as the peak current, which is within the range that the function generator can handle.  I set some of the other parameters to non-default values: 100ms settling time, 5× averaging, and auto offset.  I swept from 10Hz to 10MHz at 50 steps per decade.  For the first set of tests I did not have the 5.6kΩ resistor R3 on the scope input, but I was not satisfied with the results:


Although I saw a lot of fluctuation in the gain of the loudspeaker+mic, when I removed the mic, I saw signals as large as (or larger than) with the mic, so clearly a lot of the signal I was seeing was not an acoustic signal, but electrical interference.

The electrical interference is not too surprising, as we’re delivering 25mW RMS to the loudspeaker coils, which will radiate a lot of electromagnetic interference.  The low-pass filter on the bias wire should be eliminating any noise picked up there, but  the high-impedance (1MΩ) input of the oscilloscope means that even small currents in the output wire could result in large voltage swings at the scope input.

To test whether the electrical interference was in the output wire, I added a 5.6kΩ resistor in parallel with the scope input.  This reduces the impedance of the scope, so that small currents no longer produce large voltage swings, while not putting too much load on the transimpedance amplifier (<1mA).  The results were much more like what I expected:


At low frequencies, almost no electrical interference is seen, but above 10kHz the electrical interference is as big as the acoustic signal.  I don’t know whether the problem is that the loudspeaker is producing essentially no sound at the higher frequencies, or if the electromagnetic interference is still too big.  Above 100kHz, I’m sure that both are the case—no sound and enormous electromagnetic interference. Luckily, I’m not planning to try to do ultrasonic measurements in this box (at least, not with these speakers).  I might consider adding a tweeter to the box, if I need to work above 8kHz.

The resonances seem to be the same with different bias voltages, but the microphone gets a little more sensitive as the bias voltage increases.

My next step is to line the box with foam sound-absorbing tiles, to try to tame the resonances a little.

2021 December 14

Which cover?

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

My publisher has sent me 3 mock-ups of the cover for the book.  Which of them do you think will sell best?  (I know which one I like best, I think, but that is less important than how well the book will sell.)  I’ve converted their files to PNG for the blog—the real covers have much better resolution.


Peach cover


Blue cover


Brown cover

2021 Dec 28: We’re going with the blue cover.

2021 December 10

Microphone test box

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

For several years I’ve had the idea of building a testing box for testing microphones, hearing aids, and other small sound devices, but I never got around to doing anything about it until recently.  My original plan was to buy some sort of solid box, line it with sound-reducing foam, and add a partition with a loudspeaker at one end.  At the other end I would mount the device being tested, with an extra microphone to monitor how loud the sound is outside the device.

A few months ago, one of our neighbors down the street was selling their house and had dumped a rather large, but ugly double wooden chest on the corner to give away.  This box seemed ideal for my project, and I’m a sucker for free things, so I went home to get my hand truck and wheeled the chest home.  It sat on the hand truck in my garage for months, waiting for me to get the loudspeakers, a hole saw, and sound-reducing foam.


This box has two lids, each of which opens into a separate compartment. The compartments are about 82 cm long, 40 cm wide, and 33 cm high. The wood seems to be fir or pine.


The box is solidly made, but rather roughly finished inside.

I finally started work on the project this week, having bought a 4¼” hole saw, a huge number of sound-reducing foam tiles, and two Valcom 936398 intercom loudspeakers. I chose the loudspeakers because they were cheap ($5 each) midrange speakers with 45Ω impedance.  Having a large impedance means that I can drive the speakers directly from the Analog Discovery 2 function generator with reasonable power, without hitting the 30mA current limit of the function generator.  By putting two in series I should get 90Ω, which would mean a maximum voltage of about 2.7V  at the maximum current and 81 mW of power.  With a sensitivity from the spec sheet of 85.95dB @ 2.83V and 1m, I should be able to get about 79dB at 1m.  Inside the box, the mic will be closer and there will be reflections of the walls, so the sound may be quite a bit louder, but there are likely to be weird resonances.

My first task was to do impedance spectroscopy on the loudspeakers just sitting on a table (no box), using the Analog Discovery 2 impedance analyzer.  For the individual speakers, I used a 100Ω sense resistor and a 1V amplitude, and I played with different voltages for the series connection.  The impedance measurements were pretty much the same for different voltages. I ended up using a 1kΩ sense resistor and 5V amplitude, to avoid any possibility of clipping when doing the short-circuit compensation.


The resonant frequencies are around 124Hz and 111Hz, with the series pair having a resonance around 122Hz.  The impedance is more like 40Ω than 45Ω, and the series impedance is around 80Ω, so my max power is about 72mW (or about 36mW for a sine wave).

I marked and drilled the 4 corner holes for each loudspeaker, then cut out the large hole with the hole saw.  I was surprised by how much the hole saw kicked when its teeth engaged the wood—the first time  it happened I was not holding the drill firmly enough and it broke the ¼” guide bit!


The bit snapped off very cleanly, but luckily I had a spare drill bit I could use.

I braced my arm against the edge of the box and managed to hold the drill steady enough to cut the circles, but I ended up with linear bruises from the edge of the box. I probably will not be using the hole saw with a hand drill in any future projects—I’ll clamp stuff very firmly and use the drill press!  Unfortunately, that was not really a possibility for this chest, as I was not about to try to disassemble and reassemble it.

The holes came out ugly (I couldn’t hold the drill steady when it kicked) and a bit too big.


Here are the holes from the side I started and finished on. In the middle I tried cutting from the other side, so as not to have massive tear-out when the blade finally came through.


Here are the holes from the other side. Despite the guide hole from the ¼” drill bit, the holes did not line up precisely, and I had to use a rasp to remove a little of the wood.

Although the hole from hole saw was a little too big and intersected with some of the holes for the bolts, it was still possible to bolt the loudspeakers in place with 1½” 10-24 machine screws and nuts.


Here are the loudspeakers viewed from the front


And here they are from the back.

My next step was to measure the impedance again with the loudspeakers in the box.


The resonant frequency is the same, but there are many smaller secondary resonances. These resonances are probably from acoustic resonances of the box, not just noise, as they were repeatable even with different voltages and sense resistance and redoing the short-circuit and open-circuit compensations

My next step is to try to remove some of the resonances of the wooden box by lining both compartments with sound-reducing foam.  The foam comes vacuum-packed, and it expands quite impressively when the plastic wrapping is removed.


Here are the foam tiles, completely filling one compartment. I’ll use over half the tiles lining each side.

I got a bunch of double-stick adhesive pieces to mount the foam tiles on the bottom, sides, and top of each compartment, but that is going to be fairly tedious cutting and sticking to make it all fit, so I did not have the energy to do that yesterday or today. Tomorrow my wife and I are talking one of our walks, and Sunday it is going to rain (we hope), so I won’t want to work on the porch where I have this box set up. So it may be a while before I get to the next step of testing with the foam in place. I won’t bother modeling the loudspeakers until I get the box lined, and I’ll probably only model up to about 2MHz—I’m pretty sure that there is not going to be any sound from the loudspeakers above about 40kHz (and I’d even be surprised to see much signal even at that frequency).

Once that is done, I can hook up a microphone and do network analysis to see what sort of frequency range I can get out of this setup.

The photos in this post were all done with my moto g(7) phone, and they required more color correction and exposure modification than I’m used to doing—I really have to get around to ordering a new camera!

2021 December 2

Help needed with writing blurb

Filed under: Circuits course — gasstationwithoutpumps @ 08:56
Tags: , , ,

I need to write a draft blurb for my textbook as part of the “promotional questionnaire”, and that is something I’ve always been bad at.  I’ve not been able to make the book sound as good as I think it is. Can anyone provide some suggestions?

Here is what I have so far:

2. Book Information

2.1. Describe the aims and scope of the book.

This textbook is for a first course on electronics. It assumes no prior electronics experience, but does assume that students have had calculus 1 (single-variable differential calculus) and high-school physics. A key idea of the course is that students need a lot of design experience and hands-on work, rather than a lot of theory. The course is centered around the labs, which are a mix of design labs and measurement/modeling labs.

The book is also intended for hobbyists and students on a limited budget to be able to learn from without a course. The inexpensive equipment needed is described in the Preface.

The book is intended to take students from knowing no electronics to being able to design and build amplifier and filter circuits for connecting sensors to microcontrollers within 20 weeks.  Students design a digital thermometer, a blood-pressure meter, an optical pulse monitor, an EKG, an audio preamplifier, and a class-D power amplifier.  They also learn how to measure and characterize components, including impedance spectroscopy of a loudspeaker and of electrochemical electrodes.

2.2 Explain why the book is important in the field or market. Feel free to elaborate on the value it can provide to the readers.

Many educators have seen the need for getting engineering students to do hands-on projects early in their education, but few textbooks exist to support ambitious projects with few prerequisites—most either develop foundational math and never get to design or assume that the foundations have already been covered in a previous course.  This book was deliberately written for a design-first approach, in which the design projects are the center of the course, with just-in-time teaching of concepts as they are needed for the projects.

The book focusses on three building-block concepts that are used over and over: voltage dividers, complex impedance, and negative-feedback amplifiers.  Despite the simplicity of these concepts, they provide powerful tools for doing design.

The book does not shy away from non-linear components, as it has students design a log-transimpedance amplifier for the optical pulse monitor and uses FETs as switches in the class-D power amplifier.

Although the book can certainly be used for teaching electrical engineering majors, it was aimed primarily at non-EE engineering majors (bioengineers).

2.3. Describe 3 key selling points of your book (e.g., how it differs from competing titles; unique treatment of certain topics; new edition/material; prominent authors or contributors).

  1. This book is centered around the design labs, rather than using labs just to illustrate concepts, the concepts are introduced just in time to support the work of the labs. Design is started right away, rather than building a lot of foundations with the usual empty promise that they will be useful “later”.
  2. The labs are mostly centered around the small amount of analog electronics needed for connecting sensors to computers and are chosen to appeal to a wide range of  engineering students, not just electrical engineers. In fact, bioengineering students were the primary audience for the first several years, and many labs are measuring heart function (blood pressure, optical pulse measurement, and EKG). The class-D power-amp lab also introduces H-bridges, which are a major concept for motor controllers and mechatronics.
  3. Three basic concepts (voltage dividers, complex impedance, and negative-feedback amplifiers) are used over and over in different ways, encouraging students to learn engineering as creative reuse of building blocks, rather than as memorizing piles of unrelated formulas.
Next Page »

%d bloggers like this: