# Gas station without pumps

## 2020 June 7

### Tenth video for electronics book

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

I’ve just published my tenth video for my Applied Analog Electronics book.  This video is for part of §29.2.2—fitting models for loudspeakers.

I filmed the video using OBS (Open Broadcaster Software), and this is the unedited first take. This is my longest video yet in the series.

## 2020 June 3

### Ninth video for electronics book

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

I’ve just published my ninth video for my Applied Analog Electronics book.  This video is for part of §29.2.1—models for loudspeakers.

I filmed the video using OBS (Open Broadcaster Software), and this is the unedited first take.

## 2020 May 25

### Eighth video for electronics book

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

I’ve just published my eighth video for my Applied Analog Electronics book.  This video is for part of §29.2—the definition of the nonlinear impedance used for modeling loudspeakers.

I filmed the video using OBS (Open Broadcaster Software), and this is the unedited first take.

## 2019 January 6

### OpenScope MZ review: Bode plot

Filed under: Circuits course,Data acquisition — gasstationwithoutpumps @ 14:47
Tags: , , ,

Continuing the review in OpenScope MZ review, I investigated using the OpenScope MZ for impedance analysis (used in both the loudspeaker lab and the electrode lab).

Waveforms Live does not have the nice Impedance Analyzer instrument that Waveforms 3 has, so impedance analysis is more complicated on the OpenScope MZ than on the Analog Discovery 2.  It can be done well enough for the labs of my course, but only with a fair amount of extra trouble.

There is a “Bode Plot” button in Waveforms Live, which performs something similar to the “Network Analyzer” in Waveforms, but it uses only a single oscilloscope channel, so the setup is a little different. I think I know why the Bode plot option uses only one channel, rather than two channels—the microcontroller gets 6.25Msamples/s total throughput, which would only be 3.125Msamples/s per channel if two channels were used. In contrast, the AD2 gets a full 100Msamples/s on each channel, whether one or two is used, so is effectively 32 times faster than the OpenScope MZ.

We still make a voltage divider with the device under test (DUT) and a known reference resistor, and connect the waveform generator across the whole series chain.  Because there is only one oscilloscope channel, we have to do two sweeps: first one with the oscilloscope measuring the input to the series chain (using the “calibrate” button on the Bode panel), then another sweep measuring just across the DUT.  The sweeps are rather slow, taking about a second per data point, so one would probably want to collect fewer data points than with the AD2.  Also there is no short or open compensation for the test fixture, and the frequency range is more limited (max 625kHz).

The resulting data only contains magnitude information, not phase, and can only be downloaded in CSV format with a dB scale.  It is possible to fit a model of the voltage divider to the data, but the gnuplot script is more awkward than fitting the data from the impedance analyzer:

load '../definitions.gnuplot'
set datafile separator comma

Rref=1e3

undb(db) = 10**(db*0.05)
model(f,R,C) = Zpar(R, Zc(f,C))
div(f,R,C) = divider(Rref, model(f,R,C))

R= 1e3
C= 1e-9
fit log(abs(div(x,R,C))) '1kohm-Ax-Bode.csv' skip 1 u 1:(log(undb($2))) via R,C set xrange [100:1e6] set ylabel 'Voltage divider ratio' plot '1kohm-Ax-Bode.csv' skip 1 u 1:(undb($2)) title 'data', \
abs(div(x,R,C)) title sprintf("R=%.2fkohm, C=%.2fnF", R*1e-3, C*1e9)


The fitting here results in essentially the same results as the fitting done with the Analog Discovery 2.

Although the Bode plot option makes the OpenScope MZ usable for the course, it is rather awkward and limited—the Analog Discovery 2 is still a much better deal.

## 2019 January 5

### Series-parallel and parallel-series indistinguishable

Filed under: Circuits course — gasstationwithoutpumps @ 00:52
Tags: ,

I was looking at 3-component circuits for the impedance tokens, to make more challenging targets for students to identify than the 2-component RC ones.  Here are two of the circuits I was looking at:

Series-parallel : R1+(R2||C2) and Parallel-series: R4||(R3+C3)

I realized over the past couple of days that these two circuits are indistinguishable with an impedance spectrum, if you don’t know any of the R or C values.

The series-parallel circuit has impedance $R_1 + \frac{R_2}{1+j\omega R_2 C2}$, which can also be written as $\frac{R_1+R_2 + j\omega R_1 R_2 C_2}{1+ j\omega R_2 C_2}$.

The parallel-series circuit has impedance $\frac{R_4 \left(R_3 + 1/(j \omega C_3)\right)}{R_4 + R_3 + 1/(j \omega C_3)}$ which can be written as $\frac{R_4 + j \omega R_3 R_4 C_3}{1 + j \omega (R_3+R_4) C_3}$.

If we are given R1, R2, and C2, we can set $R_4 = R_1+R_2$ and $R_3 = R_4 \frac{R_1}{R_2}$ to get the same impedances for both circuits at DC and infinite frequency. If we set $C_3 = C_2 \frac{R_1 R_2}{R_3 R_4}$, then the impedances are identical for the two circuits at all frequencies.

There is one way that we can distinguish between the circuits, but it is pretty subtle, relying on thermal effects. The overall power dissipation is the same for both circuits with any given input voltage waveform, but the heat will be distributed differently. At high frequencies, the energy is dissipated in R1 and in both R3 and R4, but at low frequencies the energy is dissipated in both R1 and R2 or in R4. The thermal masses will be different in the two cases, and so the temperature rise will be different, which can theoretically be detected by differences in the noise spectra of the thermal noise from the resistors.

If the resistors were mounted on a sufficiently thermally conductive substrate, so that the temperature rise was the same for both resistors in each circuit, then even this subtle detection would not be possible.

A similar analysis of the impedances can be made if R1 and R4 are replaced by capacitors C1 and C4, so there are really only two distinguishable 3-component RC circuits: R1+ (R2||C2) and C1 + (R2||C2). Others either reduce to one of these or reduce even further to 2-component or 1-component circuits.

Next Page »