Gas station without pumps

2016 December 19

Impedance of inductors and parasitic impedance of oscilloscope

Filed under: Data acquisition — gasstationwithoutpumps @ 01:04
Tags: , , , ,

Because the Analog Discovery 2 makes doing impedance spectroscopy so easy, I decided to do a quick check of my inductors to plot their impedance, checking the series resistance in the process.  This was just going to be a short interruption to my day of working on my book, but it ended up taking up most of the day, because I got interested in seeing whether I could determine the characteristics of the scope inputs that were limiting the performance at higher frequencies.

Here was the data I started with, after converting the dB scale to |Z|. I used a 20Ω resistor in order to get reasonably large voltages at both ends of the frequency sweep. With a larger resistor, the low-frequency measurement across the inductor was too noisy, because the voltages were so small.

Here was the data I started with, after converting the dB scale to |Z|. I used a 20Ω resistor in order to get reasonably large voltages at both ends of the frequency sweep. With a larger resistor, the low-frequency measurement across the inductor was too noisy, because the voltages were so small.

The data looks fine up to 1MHz, but above that is a resonant peak, probably from the capacitance of the oscilloscope and the wiring to it.

I tried modeling the oscilloscope inputs as capacitors, but that resulted in way too sharp a spike at the resonance to match the data, so I tried a resistor in series with a capacitor. Initially, I tried modeling both channels identically, but I got better fits when I used a different model for each channel:

The resistor in series with the capacitance of the scope limits the sharpness of the resonance peak. Channel 1 was measuring the voltage across the 20Ω resistor, and Channel 2 was measuring the voltage across the inductor, so the setup is more sensitive to the Channel 2 parameters than to the Channel 1 parameters. I don’t really believe that the Channel 1 parameters fit here are correct.

It might be interesting to swap which channel is connected to which device, and see whether the R+C models still fit well, but I’ve not got the time for that tonight.   I did have some earlier data (from playing with resistor sizes) and I fit the oscilloscope models to it:

The fits here suggest some  difference between the channels, but not as radical a difference as the previous plot.  The 62kΩ sense resistor, though not good for determining the DC resistance of the inductor, does give a good handle on the parasitic impedance of the oscilloscope channels.

The fits here suggest some difference between the channels, but not as radical a difference as the previous plot. The 62kΩ sense resistor, though not good for determining the DC resistance of the inductor, does give a good handle on the parasitic impedance of the oscilloscope channels.

2016 December 15

Function generator bandwidth of Analog Discovery 2

Filed under: Data acquisition — gasstationwithoutpumps @ 15:56
Tags: , , ,

The network analyzer function of the Analog Discovery 2 USB oscilloscope makes it easy to characterize the function generator’s bandwidth—just connect the function generator to the input channel (making sure that the input channel is not specified as a reference) and do a sweep.  The only choice is whether to use the wires that come with the basic unit or the optional BNC adapter board and scope probes.  I tried it both ways (and with both 1X and 10X settings of the scope probes), using 1V amplitude on the waveform generator one in all cases:

There is not much difference in the bandwidth between 10X probes and wires (both high impedance) (8.5–8.8MHz bandwidth), but the 1X scope probes provide higher bandwidth—higher than the 10MHz measurable with the network analyzer.

There is not much difference in the bandwidth between 10X probes and wires (both high impedance) (8.5–8.8MHz bandwidth), but the 1X scope probes provide higher bandwidth—higher than the 10MHz measurable with the network analyzer.

I tried loading the function generator with resistors, but this made essentially no difference in the frequency characteristics. It isn’t the 1MΩ resistance of the scope that matters, but the capacitance of the oscilloscope plus probe.

So I tried adding capacitive loads and found that I got a very clear LC resonance. With a 330pF load, I got the peak near 10MHz to approximately cancel the drop:

The resonance around 9.1MHz with a 330pF load is actually a little too strong and over-corrects for the drop in bandwidth. Adding 6.8Ω in series with the 330pF capacitor makes a load that nicely compensates for the inductance of the wires.

A resonance around 9.1MHz with a 330pF capacitor implies an inductance of about 0.93µH, which is in a reasonable ballpark of the sort of inductance one would expect for 80cm of wire (4 wires each about 20cm).

Electret mic DC characterization with Analog Discovery 2

I tried one of the standard labs for the course, producing an I-vs-V plot for an electret microphone, using the Analog Discovery 2 function generator and oscilloscope, rather than a bench function generator and a Teensy board with PteroDAQ.

It was fairly easy to set up a 0–5V triangle wave, running at a very low frequency (50mHz, for a 20-second period).  The maximum output from the waveform generator is 5V, so setting the amplitude higher did not get larger voltages.  The signal was applied across the microphone in series with a sense resistor, and the voltage measured across the mic and across the sense resistor.

I ended up using two different sense resistors: one for measuring the current at high voltages, and one for measuring the current at low voltages, and I had to adjust the voltage scales on the two channels of the scope for the different ranges.  The results were fairly clean:

The low-voltage behavior of the nFET in the electret mic is not quite a linear resistor, and the saturation current definitely increases with voltage.

The low-voltage behavior of the nFET in the electret mic is not quite a linear resistor, and the saturation current definitely increases with voltage.

I tried extending the voltage range by using the power supply as well as the function generator: I set the function generator to a ±5V triangle wave, and used a -5V supply for the low-voltage reference. This worked well for the higher voltages, but the differential signal for the mic had an offset of about 12mV when the common-mode was -5V, which made the low-voltage measurements very wrong.  This offset may be correctable by recalibrating the scope (I am currently using the factory default settings, because I don’t have a voltmeter at home that I trust to be better than the factory settings), but I’m not counting on it.  When I need measurements of small signals, I’ll try to make sure that the common-mode is also small.

One other minor problem with the Analog Discovery 2: the female headers on the wires seem to have looser than usual springs, so that the wires easily fall off male header pins.  Given the stiffness of the wires, this is a bit

2016 December 12

FET I-vs-V with Analog Discovery 2

Filed under: Data acquisition — gasstationwithoutpumps @ 17:41
Tags: , , , ,

Yesterday, in FET Miller plateau with Analog Discovery 2, I started posting about the Analog Discovery 2 USB oscilloscope, an oscilloscope with two differential input channels, 2 arbitrary-waveform function generators, a dual regulated power supply, and a logic analyzer.

I want to modify something I said yesterday:

If I look at the square wave with nothing but the scope attached, then I see a voltage of about 4.005V.  With a 100Ω load, I see 3.44V, which gives an output impedance of 16.4Ω.

I think that what I was seeing should not really be characterized as an output impedance, but as a current limitation.  The AD8067 op-amp that is the output device for the waveform generator is specified to have a 30mA current limitation (for -60dB spurious-free dynamic range) and 105mA short-circuit current, and 3.44V/100Ω is 34.4mA.  I can test this assumption by seeing what happens with a triangle-wave signal:

The triangle wave with a 100Ω load is clipped at approximately ±3.48V, corresponding to a current limitation of ±34.8mA.

The triangle wave with a 100Ω load is clipped at approximately ±3.48V, corresponding to a current limitation of ±34.8mA.

With 100Ω, I get ±3.48V, for ±34.8mA.  With 33Ω, I get ±1.475V, for ±44.7mA.  With 18Ω, I get +1.014V, -0.8458V, for +56.3mA, -47mA.  In each case, I am getting clear clipping, not scaling of the signal, so the best model is as a 0Ω output impedance, combined with current limitation, rather than as a non-zero output impedance.  The current limitation is not quite constant—I can get more current at lower voltages.

Something else you can see in the image above is that the time axis is not limited to starting at 0—I can move the trigger point around either graphically or by typing into boxes that hold the trigger level and time position for the line in the middle of the screen.

What I really wanted to show today was not the waveform generator current limit, but Ids-vs-Vgs plots for an nFET (the same old AOI518 nFET that I was playing with yesterday). I can use the differential inputs to measure the gate-to-source voltage on one channel and voltage across a drain resistor on the second channel.  It is easy to adjust the voltage range for a slow triangle wave driving the gate, and to look at an XY plot:

Voltage across 20Ω drain resistor to 5V for AOI518 nFET for a range of gate-to-source voltages. To get the large current, an external 5V wall-wart had to be connected.

Voltage across 20Ω drain resistor to 5V for AOI518 nFET for a range of gate-to-source voltages. To get the large current, an external 5V wall-wart had to be connected.

It would be nice if there were a way to scale the voltages across the load resistor to plot currents on the XY plot, instead of just voltages.  I can, of course, do this scaling with external programs, as I have with other measurement devices. I tried changing the resistors to get different current ranges, exporting the data in tab-delimited formats, and plotting superimposed I-vs-V plots. The results were not as good as I’ve gotten in the past using PteroDAQ:

The Ids-vs-Vgs curves do not superimpose as nicely as curves I’ve measured with PteroDAQ. I don’t yet understand why not.

I’m also not sure why there seems to be a 4µA leakage current.  At the top end, I’m not hitting the current limit of the voltage regulator, which is 700mA when powered by an external power supply, as I did here.

2016 December 11

FET Miller plateau with Analog Discovery 2

Filed under: Data acquisition — gasstationwithoutpumps @ 21:49
Tags: , , , ,

I recently bought myself a birthday present: an Analog Discovery 2 USB oscilloscope. The device normally costs $279, but  I qualify for the academic discount, which brought the price down to $179—a very good deal.  This oscilloscope is better in every way than the Bitscope BS10 that I bought about 4 years ago: functions, resolution, bandwidth, software, … . The Analog Discovery 2 is also cheaper (at least with the academic discount).

I’ve been playing with it a little bit, and I decided to try to reproduce a few of the plots that I have done before.  This post is about creating the plot of the Miller plateau for an nFET (see, for example, More on nFET Miller plateau).  With the Bitscope, I had to filter the 5V power (which was just passed through the device, record many traces, process them with a program I wrote myself to remove the jitter in the triggering, average them, and plot with gnuplot).

With the Analog Discovery 2, I set the built-in power supply to 4V, set the function generator to a 1kHz square wave from 0V to 4V, and put the scope leads to measure Vgs and Vds for the following circuit:

The 100Ω gate resistor is to limit the current from the 1kHz square wave generator, so that the Miller plateau is stretched out in time.

This setup produced a very nice plot without any averaging—the Waveforms 2015 software that comes with the Analog Discovery 2 does the interpolation between samples to dejitter the waveform:

With a 100Ω gate resistance, the plateau is about 146ns long (easily measured with a pair of cursors not shown in this image).

With a 100Ω gate resistance, the plateau is about 146ns long (easily measured with a pair of cursors not shown in this image).

The average voltage is about 2.87V, so the current is (4V-2.87V)/100Ω=11.3mA, and the gate drain charge is 1.65nC, about half the 3.2nC on the data sheet (which was measured with different circuit parameters and is supposed to be a worst-case).  Note that this is a single trace, but multiple traces show almost no jitter, even though we are sampling at the full  100 Msample/second rate.  Averaging the traces would not make much difference in the signal.

If I replace the 100Ω gate resistor with a wire, I get a shorter Miller plateau:

With no gate resistor, the Miller plateau is only about 40.2ns long and averages 2.987V.

With no gate resistor, the Miller plateau is only about 40.2ns long and averages 2.987V.

If we assume 1.65nC in 40.2ns, we get a 41mA current, and (4V-2.987V)/41mA=24.7Ω for the output impedance of the function generator.  I may not have placed the cursors in exactly the same places on both curves, so this is a terrible way to estimate the output impedance of the function generator.

If I look at the square wave with nothing but the scope attached, then I see a voltage of about 4.005V.  With a 100Ω load, I see 3.44V, which gives an output impedance of 16.4Ω.

Of course, the square waves are not completely square, which may affect the Miller plateau measurement at high speed, but the edges are pretty sharp:

The falling edge takes about 50ns.

The falling edge takes about 50ns.

The rising edge takes about 50ns.

The rising edge takes about 50ns.

The edges are limited by the wiring, and I may be able to get better edges by using the BNC adapter board and 50Ω coax cable, rather than the wires provided, but I don’t happen to have any BNC coax cable handy.

« Previous PageNext Page »

%d bloggers like this: