• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Using an oscilloscope to do my own tests

UwU-Tang

Member
Joined
Aug 10, 2023
Messages
6
Likes
2
Hey y'all, I'm new to these forums. I have an old-ish oscilloscope lying around (analog discovery 2 by digilent) and was considering using it to measure some audio equipment (especially interfaces and mics). It's got 30 megahertz of bandwidth (which is ridiculous by audio standards), an fft, and a signal generator. I also got a bnc adaptor for it.

One of the problems I see with existing tests is that, from what I can tell, they don't measure how the interfaces react to a condenser mic being plugged in. Generating 48 volts, using it to drive a capacitive load (like a condenser mic capsule), and sending the resulting signal to the preamp - all these things can cause challenges for analog circuitry in ways that are difficult to measure. I've always wondered if that might be the cause for certain interfaces sounding worse than others despite having mostly the same THD+N and IMD measurements.

The simplest way to measure that would be to take a mic, hook it up to the interface, play a test tone through a speaker, and record the result. Unfortunately, room noise, acoustics, speaker and mic quality would all interfere with the measurements. Using a signal generator can eliminate these issues, but it wouldn't simulate a real mic load on its own. On top of that, the 48 volts produced by phantom power would probably fry my lil usb scope. Does anyone know if there's a circuit I could build to connect my oscilloscope to phantom power safely while simultaneously simulating a condenser mic load?

I hope my question was clear.

EDIT:
Just to be clear, the idea would be to take my USB scope's waveform generator, use it to drive a circuit that imitates the electrical qualities of a real microphone (including drawing phantom power), and routing that signal into the mic input of an interface in order to measure how the preamp and DAC behave under a realistic load. Then, I could just test the outputs using the scope's FFT. That's how I'd plan to test interfaces, anyway.

As far as testing mics, that was kinda an after thought haha. I wouldn't have the best setup for that.
 
Last edited:

RayDunzl

Grand Contributor
Central Scrutinizer
Joined
Mar 9, 2016
Messages
13,250
Likes
17,199
Location
Riverview FL
Opinion:

Viewing musical/test tones/noise waveforms on an "oldish" analog scope...

Audible variations can be too small to be seen.

The scope displays in a linear format.

The ear hears in a logarithmic way.

--

-140dB, in linear scale, is about the same as a spark plug gap compared to the height of Mt Everest.

--

It can be fun to look at the waves and lissajous patterns, though.

You'll get to see instantaneous peaks, and/or clipping easily.

Other than that, well...

--

Sine with no harmonic distortion:

1691683222478.png


With 5% second harmonic - that's -26dB compared to the pure tone:

1691683301032.png


With 5% third harmonic

1691683478294.png


Smaller differences might be all but invisible, and not quantifiable via eyeballing the wave.
 
Last edited:

MaxwellsEq

Major Contributor
Joined
Aug 18, 2020
Messages
1,752
Likes
2,647
Oscilloscopes are useful for understanding what a circuit does and to look at things like phase differences (assuming two inputs), clocks etc.. They can also be helpful in spotting weird things like out of band oscillations. You mentioned it has FFT, that might be helpful.

In terms of the impact of phantom power on microphones and interface differences, you might be on to something, but your assumption is also right - a valid test would need the microphone in circuit, but the slightest movement will give you different results.
 

LTig

Master Contributor
Forum Donor
Joined
Feb 27, 2019
Messages
5,836
Likes
9,578
Location
Europe
A scope, regardless whether analog or digital, is not good enough to measure distortion of audio equipment (there are DSOs with 14 bit ADCs but even this is not adequate).

You will not fry the inputs of any scope with 48V if you use a 10:1 probe.
 

DVDdoug

Major Contributor
Joined
May 27, 2021
Messages
3,035
Likes
4,000
I'd use a preamp (or interface) to measure the mic. It's easy to block the DC phantom power with a capacitor but the output is balanced/differential and very-low voltage, etc.

If you use an interface you can analyze the digital recording and you don't need the 'scope. ;)

I've always wondered if that might be the cause for certain interfaces sounding worse than others despite having mostly the same THD+N and IMD measurements.
There should be no audible distortion unless it's overdriven into clipping. Frequency response should be audibly flat too. The main difference in "sound quality" should be noise. That's the case with most solid-state audio electronics.... It's easy to get low distortion and flat frequency response these days.

the same THD+N and IMD measurements.
And the measurements would have to be made using the same standards & equipment, etc., and you can't reliably compare the published specs from different manufacturers.

The input impedance can make a difference but I think that's mostly with dynamic mics. I've seen preamps with variable/switchable input impedance. The phantom powered head amp in a condenser makes it more immune to load impedance variations. And like most audio equipment, the impedance isn't "matched". Most preamps/interfaces have microphone input impedance of about 1K (lower than most audio but higher than the mic itself.)

Viewing musical/test tones/noise waveforms on an "oldish" analog scope...

Audible variations can be too small to be seen.
The Tektronix digital 'scope on my bench at work has 9-bit vertical resolution... I was kind-of shocked when I read that but visually it looks good!
 

robwpdx

Active Member
Joined
Aug 8, 2020
Messages
268
Likes
372
I think people are answering assuming you have an ordinary oscilloscope, but I glanced at the manual for your usb test device.

The phantom mic circuit is very simple, and you can buy external ones. The mic can tolerate some phantom noise, but you don't want your microphone preamp to amplify that, so a differential input resolves that.

Hopefully your NI-Digilent has ac coupling, otherwise insert some coupling capacitors. The instrument input should be terminated not bridging. The other method is a good balanced to unbalanced transformer with the secondary terminated. Jensen https://www.jensen-transformers.com/transformers/mic-input/ is a good brand.

It looks like it is a ~4000 point FFT which is fine. 14 bits is a start to a measurement career.

Measuring microphones with speakers is hard because there is no perfect speaker. Some people will use a calibrated microphone and compare the unknown to known microphone. Audio Test Kitchen has their way of doing it. nti-audio.com is a resource to learn from. You would want as pure a sine wave to send to the speaker as possible. The other trick is to use a notch filter at your stimulus frequency to increase the dynamic range in the pass band.

There are several ASR members using different software and ADC/DAC to loop test electronics. Your approach can be added to the list.

Just try it.

As for distortion in microphones, the capsule will be nonlinear they will have their own frequency response. Then the condenser impedance converter in-mic amp will have deliberate distortion - due to the capacitors, FET/other gain element, and any transformer. Many microphones are designed to add compression and distortion especially on louder sources. Many mic preamps are designed for deliberate distortion, and even brand their distortion as "Silk" and even have a variable "Silk" adjustment. So you could add value characterizing the distortion across frequency and overload level. Any very large microphone maker or preamp maker is going to characterize their distortion with expensive test equipment, the small makers are just going to throw the circuit together.

The schematics of classic microphones are published. Microphone-parts.com makes circuit boards and kits. There is a whole mic modification community and DIY microphone world to experiment with the mic circuit. On the preamp side there is a similar DIY audio community. The other trick you can do is send your oscillator through audio workstation plugins and back out to your spectrum analyzer. Most plugins have a free trial period.

BTW, that name Digilent is a slight to Agilent, which by renaming itself was a slight to Hewlett and Packard.
 
Last edited:
OP
U

UwU-Tang

Member
Joined
Aug 10, 2023
Messages
6
Likes
2
Opinion:

Viewing musical/test tones/noise waveforms on an "oldish" analog scope...

Audible variations can be too small to be seen.

The scope displays in a linear format.

The ear hears in a logarithmic way.

--

-140dB, in linear scale, is about the same as a spark plug gap compared to the height of Mt Everest.

--

It can be fun to look at the waves and lissajous patterns, though.

You'll get to see instantaneous peaks, and/or clipping easily.

Other than that, well...

--

Sine with no harmonic distortion:

View attachment 304885

With 5% second harmonic - that's -26dB compared to the pure tone:

View attachment 304886

With 5% third harmonic

View attachment 304887

Smaller differences might be all but invisible, and not quantifiable via eyeballing the wave.
The program it comes with has an FFT, which is what I'd plan on using. It lets you scale the x axis to logarithmic and y-axis can be scaled to dbv.
 
OP
U

UwU-Tang

Member
Joined
Aug 10, 2023
Messages
6
Likes
2
I think people are answering assuming you have an ordinary oscilloscope, but I glanced at the manual for your usb test device.

The phantom mic circuit is very simple, and you can buy external ones. The mic can tolerate some phantom noise, but you don't want your microphone preamp to amplify that, so a differential input resolves that.

Hopefully your NI-Digilent has ac coupling, otherwise insert some coupling capacitors. The instrument input should be terminated not bridging. The other method is a good balanced to unbalanced transformer with the secondary terminated. Jensen https://www.jensen-transformers.com/transformers/mic-input/ is a good brand.

It looks like it is a ~4000 point FFT which is fine. 14 bits is a start to a measurement career.

Measuring microphones with speakers is hard because there is no perfect speaker. Some people will use a calibrated microphone and compare the unknown to known microphone. Audio Test Kitchen has their way of doing it. nti-audio.com is a resource to learn from. You would want as pure a sine wave to send to the speaker as possible. The other trick is to use a notch filter at your stimulus frequency to increase the dynamic range in the pass band.

There are several ASR members using different software and ADC/DAC to loop test electronics. Your approach can be added to the list.

Just try it.

As for distortion in microphones, the capsule will be nonlinear they will have their own frequency response. Then the condenser impedance converter in-mic amp will have deliberate distortion - due to the capacitors, FET/other gain element, and any transformer. Many microphones are designed to add compression and distortion especially on louder sources. Many mic preamps are designed for deliberate distortion, and even brand their distortion as "Silk" and even have a variable "Silk" adjustment. So you could add value characterizing the distortion across frequency and overload level. Any very large microphone maker or preamp maker is going to characterize their distortion with expensive test equipment, the small makers are just going to throw the circuit together.

The schematics of classic microphones are published. Microphone-parts.com makes circuit boards and kits. There is a whole mic modification community and DIY microphone world to experiment with the mic circuit. On the preamp side there is a similar DIY audio community. The other trick you can do is send your oscillator through audio workstation plugins and back out to your spectrum analyzer. Most plugins have a free trial period.

BTW, that name Digilent is a slight to Agilent, which by renaming itself was a slight to Hewlett and Packard.
My scope has ac coupling. Two channels for the fft, two channels for the wave generator, and variable power supply for breadboarding.

As far as building a mic circuit goes, there's a lot of variations i could look into. The hardest part would be the capsule itself, though. My hope is to make something that has the electrical qualities of a mic capsule without actually picking up real sound. That way, room noise won't be an issue. From what I understand, a capsule is basically just a capacitor that changes its capacitance based on air pressure. I'm hoping i might be able to model one with a varicap (a circuit based on varactor diodes). Basically, I'd have to make a voltage-controlled capacitor. Problem is, the only varicaps/varactors they sell are made for radio frequencies (in the megahertz range). Theoretically, they could work, but i can't find much info on how to implement them in an audio-range design. I was hoping maybe some designs existed already.
 
OP
U

UwU-Tang

Member
Joined
Aug 10, 2023
Messages
6
Likes
2
Just to be clear, the idea would be to take my USB scope's waveform generator, use it to drive a circuit that imitates the electrical qualities of a real microphone (including drawing phantom power), and routing that signal into the mic input of an interface in order to measure how the preamp and DAC behave under a realistic load. That's how I'd plan to test interfaces, anyway.

As far as testing mics, that was kinda an after thought haha. I wouldn't have the best setup for that.
 

robwpdx

Active Member
Joined
Aug 8, 2020
Messages
268
Likes
372
Just to be clear, the idea would be to take my USB scope's waveform generator, use it to drive a circuit that imitates the electrical qualities of a real microphone (including drawing phantom power), and routing that signal into the mic input of an interface in order to measure how the preamp and DAC behave under a realistic load. That's how I'd plan to test interfaces, anyway.

As far as testing mics, that was kinda an after thought haha. I wouldn't have the best setup for that.
There are 2 families of condenser microphones: electret (self) polarized and externally polarized from the phantom or a battery. The capsule which is a variable capacitor as you mention is connected to the gate of an FET or the grid of a tube.

Then the gain is extracted by the variable current of the FET or tube output. A FET or tube is considered a voltage-controlled current source.

Then that varying current, realized as a voltage as dropped across the resistor, is passed on to a small FET, bipolar transistor, or op amp circuit, and/or the voltage gain of a transformer.

You can look at some schematics, but I doubt the circuitry on the gate/grid side of the first FET/tube matters for your experiment. I would just inject your signal generator at the resistor where the FET/tube output becomes a voltage, or at the FET/tube gate or grid.

If you have a specific condenser microphone circuit in mind, the mic mod community can advise on component options for each part and the impact on sound. From the preamp in terminals to preamp out terminals, it is a simple 1-several stage amplifier with signal impedances, coupling, gain staging, and feedback, all of which affect the sound.

You can move your spectrum analyzer probe through each stage from the capsule buffer FET to the preamp output.
 

amirm

Founder/Admin
Staff Member
CFO (Chief Fun Officer)
Joined
Feb 13, 2016
Messages
44,680
Likes
241,171
Location
Seattle Area
Just to be clear, the idea would be to take my USB scope's waveform generator, use it to drive a circuit that imitates the electrical qualities of a real microphone (including drawing phantom power), and routing that signal into the mic input of an interface in order to measure how the preamp and DAC behave under a realistic load. That's how I'd plan to test interfaces, anyway.
Phantom power wouldn't do anything there so I would not bother with that.

Before measuring anything, loop back output of the signal generator to its input and measure using FFT. That would show you how much combined distortion and noise your scope has. I suspect it will be no good to measure any audio interface.
 

amirm

Founder/Admin
Staff Member
CFO (Chief Fun Officer)
Joined
Feb 13, 2016
Messages
44,680
Likes
241,171
Location
Seattle Area
If you don't know how to read the FFT, post it here and we can help. Generate a 1 kHz tone. Set the level to 2 or 4 volts RMS. FFT with 32K points and averaging of 3. Bandwidth 20 kHz if it allows you to limit that. Otherwise FFT resolution would be quite low if you allow full BW of the scope.
 

solderdude

Grand Contributor
Joined
Jul 21, 2018
Messages
16,056
Likes
36,450
Location
The Neitherlands
Phantom power wouldn't do anything there so I would not bother with that.

Before measuring anything, loop back output of the signal generator to its input and measure using FFT. That would show you how much combined distortion and noise your scope has. I suspect it will be no good to measure any audio interface.

I suspect OP only wants to measure the mic inputs of audio interface(s) and wants to simulate a microphone. Both dynamic mics, electret mics and phantom powered mics I assume.

Personally if I wanted to do something like this I would use a good sound card and something like REW for that instead of the digilent device.

I reckon he has that and thinks 14 bit is enough for what he wants to know. Maybe only wants to do this a few times max.

Dynamic mics, electret mics and phantom powered mics act different as a 'source' so would require a versatile circuit to mimic them properly.
 
OP
U

UwU-Tang

Member
Joined
Aug 10, 2023
Messages
6
Likes
2
If you don't know how to read the FFT, post it here and we can help. Generate a 1 kHz tone. Set the level to 2 or 4 volts RMS. FFT with 32K points and averaging of 3. Bandwidth 20 kHz if it allows you to limit that. Otherwise FFT resolution would be quite low if you allow full BW of the scope.
I tweaked the settings until i got the least noise and highest precision possible. When averaging with a weight of three, the distortion is a little hard to pick out from the noise, so i set the average weight to 10. Here's the results at 2 volts:
wavegen-to-fft-2v.png

Going much higher than 2v results in clipping. This happens even if I generate the signal with my interface (scarlett solo), so it's the input that's clipping.
 

LTig

Master Contributor
Forum Donor
Joined
Feb 27, 2019
Messages
5,836
Likes
9,578
Location
Europe
Rather impressive for a DSO to show signal components 100 dB below full input.
 
OP
U

UwU-Tang

Member
Joined
Aug 10, 2023
Messages
6
Likes
2
Rather impressive for a DSO to show signal components 100 dB below full input.
Yeah it's a little surprising. The software's manual says it uses averaging to make up for lack of bit depth. It takes longer to measure but oh well.
 

ElJaimito

Member
Joined
Mar 28, 2019
Messages
37
Likes
38
Yes various of these digital USB scopes use averaging to increase resolution from 12 or 14 bits to 16 or sometimes more, they have the bandwidth to do that. This does mean transient analysis is infeasible though, continuous signal only. You'd still IMHO be better off using a soundcard as an oscilloscope, rather than an oscilloscope as a soundcard: even low cost cards/interfaces can provide 24 bit 96 kHz, which is approaching an order of magnitude improvement. The scope is really useful for examining the output post filtering of signals etc. I have a nice digital scope and use it like that, but I use an analog scope the same way. Audio is rather demanding on resolution.
 
Top Bottom