Using the inputs on a computer’s sound card is an old trick to fake a very simplistic, AC coupled, slow oscilloscope. You can get DC operation by desoldering a couple capacitors, but if the sound card is integrated into the motherboard it raises the stakes if you mess that up.
[TMSZ] has a better option, a ~1 dollar USB sound card which is easily hacked to work as a simple oscilloscope. Easily found on eBay, the 7.1 virtual channel sound card is identical in brains to a more expensive c-media model, but the layout of the PCB makes it easier to bypass the DC blocking caps. Software and DLL files to use the sound card with Miniscope v4 — a Windows GUI for oscilloscopes — are also linked, so getting set up should be fairly simple.
Now of course this is not lab-grade measurement equipment: the sampling rate is limited to 44KHz and the voltages must be in the typical “line level” range, under two volts. If you don’t mind a little extra noise, you can increase the input impedance with a single resistor. This extends the input range up to six volts, which covers most hobby and microcontroller usage.
So if you’re really in need of a scope, but only have a buck to spend, this may be just the hack for you! Those willing to shell out a hefty sum for a high-end headless oscilloscope should look onto the virtual bench.
I have been using these sound cards as an oscilloscope / signal generator for several years. My favorite software is viaual analyzer http://www.sillanumsoft.org/ It has the oscilloscope function, AF spectrum analyzer, 2 channel signal generator, and several other functions using the same sound card.
A 3.5 stereo to RCA cord and a 1970’s radio/amp has been my signal generator for ages. It may not have the most accurate voltage control but you can power a lot of surprising loads given it was meant for 8ohm speakers.
‘Soundcard Scope’ was the one suits me best: https://www.zeitnitz.eu/scope_en
It is both a generator and an oscilloscope, it has X-Y mode, FFT, can adjust the phase between channels, etc.
The program is very small, free, and it’s based on LabVIEW.
It’s free for non-commercial use. Otherwise it costs EUR 35 + VAT.
People have been using soundcards as scopes/signal generators for *decades* now.
I don’t think it would be that difficult to build a differential amplifier stage with range switches for a sound-card based o-scope, I’m mulling such a decision myself at this point.
Make a voltage controlled oscillator, and then turn the signal back to voltage using FFT in software.
Bonus point is that it would work as a multimeter for the blind.
Very good idea. This reminds me of using an RTL-SDR as a cheap spectrum analyzer. Not lab grade, but an excellent choice for a hobbyist.
I also remember reading about how to modify the RTLSDR into a very basic oscilloscope by bypassing the RF downconverting stage.
Sounds like something worth looking in to. Thanks for the heads up!
I broke a laptop once trying to pipe a DC signal into the audio jack. Turns out it’s not that simple…
a question..
if a sound card can be used as a o-scope, can it be a 433MHz RF Remote Control signal receiver?
any way, interesting ..
It can be a 43khz control signal receiver.
provided the sound card reliably samples at 96Khz, yes, else a 22Khz IR receiver is the best it can do. remember, half of the sound card’s sampling rate is the max frequency you can sample.
96kHz sampling should allow up to 48kHz detection (Nyquist limit), in reality with typical filters it will allow up to around 40kHz, so just about usable for modulated 38kHz IR detection (the signal will be distorted a bit as the harmonics above 40kHz won’t be received)
When working with IR (at least IR remotes) carrier frequency is not so important. If you are using TSOP17xx or similar receiver you don’t see the carrier. Recommended pulse length is ten times higher than modulation period, so it should be in sound card range. In fact there are PC applications (AFAIR even plugin for Girder) that use IR receiver connected to sound card for remote control.
That should be; 96kHz allows less than 48kHz detection. A 48kHz signal will give a DC sampled value – a constant. Much less than 48kHz is better to avoid really long sample sequences. OK, just over-sample by 8 for good fast results. Nyquist is misstated so often with an = instead of < that it has become lore.
There’s folding artifacts that happen when you approach the Nyquist frequency, so you can’t use the signal reliably anywhere near it.
The problem is that your signal is not phase-locked with the sampling rate, which starts to amplitude-modulate the recorded waveform when approaching the Nyquist limit. The frequency of the signal is measured accurately up to the limit, but the amplitude over time is not.
A naive system with no reconstruction filters to remove the effect would cause spurious signals to appear in the data at anywhere above 2/3 of the Nyquist limit, which is why early CDs were lowpass-filtered as low as 16-17 kHz – some were not, and people with HiFi equipment complained about a metallic noise like someone jangling a bunch of keys in the distance.
you cand o as @AdHocName says, or just use a low pass RC filter to demodulate the IR is you are using just a simple detector….. or if you sample on the transmitting LED to learn the code.
Sound cards are almost universally limited to 44 KHz, which is roughly 10,000 times lower in frequency than the signals you are interested in.
You might want to take a look at an RTL-SDR instead, such as these ones which will have no trouble receiving 433 MHz signals:
http://www.nooelec.com/store/
So how does recording 433mhz signals with audacity work?
ex: http://rurandom.org/justintime/w/Cheapest_ever_433_Mhz_transceiver_for_PCs
I haven’t tried it myself, but I suspect that it’s done using software like SDR# to receive the signal from the RTL-SDR and convert it to audio, which then can be picked up by Audacity. A virtual audio cable program may be needed, depending on your computer’s configuration.
It is using a 433MHz receiver module so all you’re using the audio input for is measuring the on/off output of that module.
because you’re not recording or sending a 433Mhz signal at all, you’re feeding a slower signal into a 433Mhz transmitter and the receiver downconverts the signal and you’re recording that. if you tried to modulate that 433mHz signal faster than 22Khz, you would start running into problems.
Check how super heterodyne and RF mixer work
isnt that the frequency used in those booglar alarms that transmit the pin unencrypted?
When I got my Rigol scope I missed the 16-bit sample depth of the PC audio codec.
And even the cheapest audio codecs usually support 96ksps, while a 5-yr old Acer PC I checked does 192ksps.
http://nerdralph.blogspot.ca/2014/05/pc-storage-oscilloscope-and-logic.html
Many cheap sound cards do not support more than 48kHz. C-Media (or C-Media counterfeits?) chips are commonly used, see http://www.cmedia.com.tw/productsdetail/page-p/c1serno-25/c2serno-26/pserno-7.html
You also won’t get effective 16 bits out of cheap sound card (or even some mid-range sound cards when using mic input) – rather 12-13 when taking noise into account.
On the other hand hardware modification in laptop is quite risky and you still won’t know if it would be able to capture DC (digital filtering may be used) until you reassemble it. Would be interesting to see some internals though, I always refrain from disassembling mine fully.
For anyone interested only in audio frequencies then there’s nothing wrong with this approach. A dedicated DSO will sample at 10x its bandwidth (in the 10’s if not 100’s of MHz) which will give you a better idea of overshoot, harmonics etc, but for $1 you can’t complain.
8 out but only 1 sensitive (not line) input, argh! You just have to pay ten and multiple for one of those USB things with two inputs. Those $1 specials are meant for Skype and gaming. I was disappointed with one of the $30 or so models because of offset that messes with looping audio. So…
I mixed in on that DC side a pair of trimpots that would bias the offset to near zero, enabling the device for my use. I used Audacity for a meter.
Easy to get, cheap, yes.
But don’t forget that for $3 you can buy a microcontroller with USB and 12 bit 2MSps ADC from quite a few manufacturers.
Or buy it soldered on some $10 development board.
Or spend <$20 on that DSO138 available everywhere.
Actually STM32F103 costs $1 and mini-board with it is $4.20. After adding some input protection it is suitable to use with same with same software (miniscope v2c plugin). It isn’t using ADC fully as it based on real time streaming principle (sacrificing speed for continuous recording) thus it is limited by USB FS bandwidth.
might be off with the prices a bit…. but the idea was that there’s no big deal that you can do this with a $1 soundcard. Soundcards are available readily on all PCs, so it is even free. People have been using this trick for a long time.
What is great now is that you can get something a lot better than the lousy sound card oscilloscope for quite a little money. This first time I wanted an oscilloscope even the cheapest one was over 1000.
I try to develop web based O-Scope interface. https://github.com/ch3ll0v3k/js-osciloscope-interface
where does it get the data from?
Seems like simulation (or my sound card suddenly generates perfect sine waves).
WebRTC seems to be useful. Also, Chrome supports HID – would be slightly slow but working with other hardware.
The cloud!
Check also Jaaa for spectrum analysis.
http://kokkinizita.linuxaudio.org/linuxaudio/jaaa-pict.html
Also lots of other software on that site.
You have to do more than just desolder the caps. You need to add a jumper across where the caps were.. or just leave them in and bridge across the pads. Risky as voltage compliance may vary.
My 2 Cents. If the purpose of using an external soundcard is to minimize the risk of damage to your pc, I think you might want to add a higher-end, fused, usb hub as well.