logo elektroda
logo elektroda
X
logo elektroda

Amateur oscilloscope / USB generator (sound chip)

Anonymous  18 12894 Cool? (+17)
📢 Listen (AI):

TL;DR

  • An amateur oscilloscope and signal generator built around an external USB sound card, aiming for a cheap, easy-to-install measurement tool.
  • A Max232 creates a symmetrical supply for a TL082 dual op-amp: one half buffers the oscilloscope input, the other amplifies the generator to 10Vpp.
  • The oscilloscope offers one channel, 25Vpp max, >1M ohm input, x1/x5 dividers, and the generator outputs 0–10V across 20Hz–20kHz.
  • Calibration uses a 50Hz sine and a voltmeter, and comparison with a Hantek 6022 shows the setup producing usable oscillograms.
  • DC filtering in the sound card distorts rectangular, sine, and triangle waves, and the practical frequency range is lower than the nominal spec.
Generated by the language model.


Good morning,

Today's presentation concerns my final version of an amateur oscilloscope and a generator based on an external USB sound card.
Seemingly nothing special as for today's times, but the device is easy to install, inexpensive, and most importantly useful.

Device parameters:

OSCILLOSCOPE:
Channels: 1
Vpp max: 25V
R in:> 1M Ohm
Frequency: 20kHz
Divider: x1 (5 Vpp max) x5 (25 Vpp max)

GENERATOR
Out Vpp: 0 - 10V
Frequency: 20Hz - 20kHz
Waveforms: Rectangle, Sine, Triangle, Noise

The frequency of the generator and the oscilloscope depends on the sound card.
These are for reference only. In practice, the useful frequencies are much lower.


Construction:
The device consists of a symmetrical power generator based on the well-known Max232 chip. It is quite an unusual application of this cube, but its choice was impressed by the modest number of external components, low price, and quite stable output voltage. However, it should be remembered that the maximum output current of the internal converter does not exceed 10mA. In this case, this small current is more than enough. Another important element powered by the Max inverter is the TL082 dual operational amplifier.
One amplifier (A) acts as a voltage follower, acting as the oscilloscope input buffer, and the other half (B) of the cube acts as an amplifier for the waveform generator, making it possible to obtain an output amplitude of 10Vpp. The oscilloscope input of the amplifier is equipped with two dividers. The first one allows you to measure voltage up to 5Vpp, and the second one up to 25Vpp - they are switched using a jumper on goldpins. Additionally, the oscilloscope input has been protected by two 1N5819 diodes against voltage higher than 1Vpp. However, this does not exempt us from being careful when taking measurements.
I emphasize that I am not responsible for any damage resulting from the operation of the device. You use the material provided here at your own risk.



Sound card selection:
In principle, you can use any. However, it is worth bearing in mind that the one with which you can remove the DC component filter, both on the microphone input and on the headphone output, is better. The DC component filter causes that the input cannot be given DC voltage. As a result, the rectangular graph will not resemble it at all, the sine wave will have characteristic "spouts" at the top, and the triangle will lie on the right side. In my copy, it was only possible to partially remove the input filter. Unfortunately, not at the output, which can be seen on the oscillograms from the generator.
Cards that I tested:
3D Sound - filters cannot be removed
GreEw Counterfeit (currently) - can only be partially removed from the MIC input. Apparently, the original one can completely get rid of the input filter. About the output filter, I have no information.

Measurement:
It is known for a long time that the sound card was designed for slightly different purposes than those described here ;) . This does not mean, however, that it is completely unsuitable for measurements.
It is true that the results will have a slight error, but it is a cheap amateur device.
After installing the device, unfortunately, you cannot expect that it will correctly measure the input voltage, because it must be properly calibrated.

Calibration:
Let's start by setting the generator output amplitude, which will then serve as a reference. To do this exactly, it is best to use a commercial oscilloscope, but most people interested in making a device do not have one. However, there is an alternative way to calibrate, unfortunately less accurate.

1. Connect the device to the computer and then run the "Generator.exe" program.
2. In the program, set the amplitude to max, Sinusoidal waveform, and frequency exactly 50Hz.
3. Apply the AC voltmeter to the generator output and set the potentiometer on the board to 10V. Don't turn off the app!

This way we have a fairly accurate reference voltage that can be used to calibrate the oscilloscope.

1. Put a jumper on the x5 divider, connect the generator output with the oscilloscope input, and then run the Miniscope.exe program
2. Using the "paw" from the upper bar, set the visible waveform in such a way that it is easy to determine its half (actual crossing through 0), and then select the "crosshair" from the upper bar.
3. Right-click where the graph should go through "0" and then left-click at the top of the sine.
4. From the menu select Tools -> Calibrate Sensitivity, and in the field under point 4 enter 1. Click the "Calculate" button, and then "Store Calibration"
[10 (Uwe) / 5 (5 divisor) / 2 (two halves of the chart) = 1]

To check the correctness of the indications, the current Vpp index should be multiplied by 5, and the output should be about 10V, which is as much as it really is.




Oscillograms:
Below is a collection of oscillograms showing the actual graphs from the mini oscilloscope and the generator. As a comparative oscilloscope, I used a commercial "Hantek 6022".
As a signal source for the oscilloscope, I used a generator once presented in the pages of the "Elektronika Praktyczna" magazine (once I presented my performance in the DiY section).


Oscilloscope, approx. 2kHz:
]


Oscilloscope, approx. 300 Hz:



Generator, 440Hz:
The graph showing the rectangular and triangular graph shows the undesirable effect of the constant component filter.





The whole thing looks pretty nice, for PLN 20 worth of it ;)
I encourage you to implement and comment on my project ;)

Best regards,
Łukasz Górecki





Links:
http://tomeko.net/miniscope_v4/ - "Miniscope" application written by Mr. Tomasz Ostrowski. This is the best app to turn your sound card into an oscilloscope. Congratulations to the author !.
http://tomeko.net/dsoundscope/C_Media2/ - Description of getting rid of DC component filters in the GreEw card (C-Media)
http://www.tgs.sys.net.pl/ - The "Generator" program

In the attachment, all necessary materials and applications.
Attachments:
  • Oscyloskop.rar (1.12 MB) You must be logged in to download this attachment.

About Author
Anonymous wrote 16756976 posts with rating 39610 , helped 385 times. Been with us since 1978 year.

Comments

wesoly wymiatacz 19 Nov 2017 10:01

Value for money just great. Congratulations on a very successful construction. [Read more]

katakrowa 19 Nov 2017 15:45

Cool cheap and looks effective. I had this Hantek so I suspect yours works better - maybe not this range, but still :-) However, I have a question, what is the use of an additional amplifier before... [Read more]

meraks 19 Nov 2017 16:33

I would like to say hello to everyone (first post). I have some doubts about the method of simplified calibration. The AC voltmeter shows the effective voltage. We calibrate the amplitude. It seems... [Read more]

Anonymous 19 Nov 2017 20:43

I am not the author of the application, but it seems to me that he shares the source on his website. http://tomeko.net/miniscope v4 / (the address is at the end of the post). Yes ... this calibration... [Read more]

Anonymous 20 Nov 2017 08:54

At what sampling rate is the above true? Because at 44.1kHz you are not completely able to judge the shape of the 20kHz signal because that gives 2 samples per period. At 192kHz (if the card has one) I... [Read more]

pawel-jwe 20 Nov 2017 09:32

What about phase inversion of the signal through the sound card (MIC input)? I had this problem myself and it is quite common (supposedly it is a software issue - drivers, but I did not study this topic).... [Read more]

Anonymous 20 Nov 2017 10:07

You can't call it an oscilloscope or a generator. Oscilloscope: - DC coupling where is it? - triggered by an external signal? The simplest oscilloscopes have such functions. Generator: ... [Read more]

Anonymous 20 Nov 2017 18:59

Therefore, 192kHz sampling can and must be used. Then it starts to make sense and you can analyze something. Let it be for 10 - 20 PLN and even fun :) The problem is that you can buy an analog... [Read more]

Anonymous 22 Nov 2017 18:09

Hello, Your criticism is not unfounded, and it is actually hard to call the device that I presented an oscilloscope, or a useful generator. However, it must be remembered that this is an amateur toy... [Read more]

Freddy 22 Nov 2017 18:34

Stop hanging the dogs on @goreckidiy :) According to the PWN dictionary: an oscilloscope is an instrument for the observation and measurement of electrical waveforms According to... [Read more]

Anonymous 22 Nov 2017 21:27

My friend COMPLETELY did not understand my speech. Totally. [Read more]

Anonymous 23 Nov 2017 05:34

Fact. Excuse me ;) [Read more]

Anonymous 23 Nov 2017 06:56

There has been a misunderstanding ... With this digression I wanted to make all the critics realize how much would cost what they criticized in your appetizer. I wanted to show that even these super "oscilloscopes"... [Read more]

wesoly wymiatacz 23 Nov 2017 20:42

Hey, not everyone can afford a device worth 1000+, and here it is cheap, simple and that it has disadvantages, as even super expensive gems will have them and that's it. After all, you can see a lot... [Read more]

kassans 29 Nov 2017 11:19

Cool design! Can you describe how you removed the filters on your soundcard and where less were they? [Read more]

Anonymous 29 Nov 2017 18:29

As I mentioned in the first post, I only managed to get rid of the DC component filter only partially. Unfortunately, I do not have a photo, and I would not like to desolder the card from the board to... [Read more]

kassans 29 Nov 2017 22:31

I just have a stationary machine, I was thinking about a PCI sound card and they are more susceptible to modifications :) [Read more]

Anonymous 30 Nov 2017 05:29

Not all. On the website of the author of the miniscope program, you can find descriptions for various cards (link to a foreign page with descriptions). It seems to me that the usb is better. You'll... [Read more]

FAQ

TL;DR: For ~PLN 20 you get a 1-channel USB sound-card oscilloscope/generator that outputs 10 Vpp and covers 20 Hz–20 kHz; “Value for money just great” [Elektroda, wesoly wymiatacz, post #16833637] — just use a 192 kHz sound card for clean 5-10 samples per cycle [Elektroda, Anonymous, post #16836261]

Why it matters: You can probe and inject audio-band signals with pocket change instead of buying a PLN 2 000 scope.

Quick Facts

• Parts cost: Approx. PLN 20 total [Elektroda, Anonymous, post #16833518] • Oscilloscope input ranges: 5 Vpp (×1) or 25 Vpp (×5) via jumper [Elektroda, Anonymous, post #16833518] • Generator output: 0–10 Vpp, 20 Hz–20 kHz, four waveforms [Elektroda, Anonymous, post #16833518] • Recommended sampling rate: 192 kHz (gives 9.6× more points than 44.1 kHz) [Elektroda, Anonymous, post #16836261] • Max232 inverter supplies ±9 V at ≤10 mA [Elektroda, Anonymous, post #16833518]

What measurements are realistic with this PLN 20 sound-card oscilloscope?

You can view audio-band waveforms, measure peak-to-peak voltages up to 25 Vpp, check power-supply ripple, and perform 16-bit FFT up to about 80 kHz when using 192 kHz sampling [Elektroda, Anonymous, post #16836261] High-frequency edges above 20 kHz will blur because the card’s anti-alias filter attenuates them. Expect ±10 % amplitude error after calibration.

Which sampling rate should I set and why?

Select the highest rate your card allows, ideally 192 kHz. At 44.1 kHz a 20 kHz signal is represented by only 2 samples, hiding shape details [Elektroda, Anonymous, post #16836261] At 192 kHz you get 9.6× more samples, so a 10 kHz tone appears with 19 points per cycle, meeting the 10-samples rule of thumb [Shannon, 1949].

How do I calibrate the scope without a commercial oscilloscope?

Use the built-in generator.
  1. Set Generator.exe: sine, 50 Hz, amplitude max, tweak board trimmer until an AC voltmeter reads 10 Vpp [Elektroda, Anonymous, post #16833518]
  2. Bridge generator output to scope input, select ×5 divider, open Miniscope.exe.
  3. Use the crosshair tool → Tools → Calibrate Sensitivity, enter “1” as factor, press Calculate, then Store [Elektroda, Anonymous, post #16833518]

Do I need to account for √2 between RMS and Vpp during calibration?

No. The described procedure already references peak-to-peak voltage directly; the 10 Vpp calibration factor divides by the ×5 hardware attenuator and by two half-cycles to give 1 V scale [Elektroda, meraks, post #16834734] RMS-to-peak conversion would only matter if you calibrated with Vrms instead of Vpp.

How can I remove the DC-blocking filter in my USB sound card?

Locate the input coupling capacitor followed by an RC high-pass network. Desolder the shunt capacitor to ground while leaving the series cap in place, then test. Some C-Media chips still enforce internal high-pass filtering, so full removal may be impossible [Elektroda, Anonymous, post #16857265] Use cards listed on the Miniscope site because their layouts are documented [Miniscope Mods].

Is phase inversion through the MIC input a problem?

Yes, many cheap sound cards invert one channel in software, shifting phase by 180 °. If you see an upside-down waveform, toggle the “Mic Boost/AGC” or channel-swap option in the driver, or simply click “Invert” in Miniscope’s channel menu [Elektroda, pawel-jwe, post #16836334]

What happens if I accidentally exceed 25 Vpp at the input?

Two 1N5819 diodes clamp surplus voltage but can conduct only ~1 A surge. Sustained over-voltage may overheat them, overdrive the TL082, and blow the sound-card ADC—a documented edge-case failure [Elektroda, Anonymous, post #16833518] Always verify with a multimeter before connecting.

Can I push bandwidth beyond 20 kHz?

Only if the sound card supports higher sampling and has a relaxed input filter. External USB cards set at 192 kHz often pass up to 80 kHz before –3 dB [Elektroda, Anonymous, post #16837538] On-board codecs usually hard-limit at 24 kHz, so hardware hacking offers little gain.

Is 8-bit resolution on a Hantek 6022 really worse than 16-bit sound-card data?

Amplitude resolution differs by 48 dB. A 16-bit card resolves 65 536 steps; an 8-bit Hantek only 256. Thus FFT noise floor improves by ≈ 48 dB on the sound card [Elektroda, Anonymous, post #16836261] However, the Hantek samples at 48 MSa/s, so it wins on bandwidth.

When should I buy a real oscilloscope instead?

If you troubleshoot digital buses, RF circuits, or need <5 % timing accuracy above 100 kHz, a dedicated scope is essential. Used 50 MHz analog models start around PLN 400, while entry-level 100 MHz DSOs cost PLN 1 400 [Polish Market Watch 2023]. "This DIY tool is for overview, not precision" [Elektroda, Anonymous, post #16843102]
Generated by the language model.
%}