Has anybody used a USB sound capture device for an audio frequency oscilloscope on a Raspberry Pi? xoscope is available using apt, but I can't find any reference to what sound devices, if any, it can use over USB.
If there are other USB oscilloscope options worth looking at please post. I don't specifically need RF performance, but if it's available it's worth a look.
It is worth understanding what frequency range you're interested in. Soundcards are typically 20Hz-20kHz. SDR often has a limited bandwidth and doesn't go below ~30MHz.
Often for oscilloscope purposes you're interested in DC, which is outside the range of this hardware. Soundcards may go that low, or maybe it can if you remove a series capacitor.
all you really need is a decent A:D with a good bandwidth.
Then RPi could use SPI or I2C to talk to it. Then you can make a charting application to display the trace, or use an existing one [I assume such things have been done before, it's not a new idea]
Sound card o-scope would limit to audio bandwidth. An A:D that can run at frequencies from DC to above 1Mhz is probably what you want. Maybe an ADC that is capable of doing video would work... [you'll have to search but I remember seeing them]
--
(aka 'Bombastic Bob' in case you wondered)
'Feeling with my fingers, and thinking with my brain' - me
'your story is so touching, but it sounds just like a lie'
"Straighten up and fly right"
Hantek is the name, or at least one of the names, many people rebadge them. There is openhantek6022 which works for the cheapest scope.
It's OK for DC and audio, which is all I need these days. If I have frequencies a bit higher to deal with, I haul out my ancient Tek 465B, which weighs about fifty times as much as the Hantek device.
Xoscope's webpage says it supports ALSA as an input source, so as long as a USB audio adapter is working with ALSA (the cheap Chinese ones seem to do so without issues) it should be fine.
It will have a series capacitor to block DC. You'll need to either remove this (might be difficult if it's a small indistinct-looking SMD part) or use a chopper circuit like this if you want to measure DC signals:
formatting link
For more sensible input impedence (so the behaviour of the circuit doesn't change when you probe it), the buffer circuit shown at the xoscope homepage would also be recommended:
formatting link
Of course at this point you've got a significant amount of front-end circuitry for your "simple" sound card oscilloscope. For a data logging application that might be quite reasonable, but for basic troubleshooting maybe it would be easier to just buy an old CRO (Cathode Ray Oscilloscope), which has the added benefit of working outside the audio frequency range.
There are some decent dual channel, 20MHz oscilloscopes appearing on eBay and at pretty reasonable prices too. Find one locally if possible to same freight costs: a good older 'scope is both heavy and bulky.
Also, its worth noting that a 'scope can also be used as a logic probe: a straight high line is a stable '1', a straight low line is a stable '0' and either a pair of lines or a square wave, depending on scope scan speed vs signal frequency, indicates a digital signal.
Mine is a dual beam 20MHz Hameg I've had since the mid '80s and used for everything from trouble-shooting a floppy drive interface I built for a
6809 system to checking the state of 50mAH NiCd batteries (they were used in a timer to pulse a solenoid with a 500mA, 15mS pulse: the shape, depth and width of the of the battery's voltage drop when the solenoid was operated was an excellent indication of battery condition. As it aged the voltage drop changed progressively from a 15mS wide drop with a flat bottom and instant recovery to a deeper, wider shape with no flat bottom and a longer recovery slope. When the flat bottom was gone it was time to replace the NiCds.
My hope was to elicit reports of practical experience....
The motivating problem is monitoring power supply voltage on a Raspberry Pi4 during boot and disk spin-up. I'd like to see the voltage rise, sag during boot and spin-up and then stabilize. Depth and duration of the sag would be the most essential observation.
Basically power supply circuits. A "stop trigger" that halts recording when something interesting happens is much desired.
Hantek seems to be Windows-oriented, I have great respect for Tektronix, but analog scopes are no help with transients absent a Polaroid camera and a stable trigger pulse.
Ok, that's a good hint. I'm looking at something like:
formatting link
There are reviews saying it works with Raspberry Pi, so maybe it'll work with xoscope. It doesn't have to be good, just good enough to catch sags and spikes on a timescale of milliseconds.
Thank you for the link!
I'm experienced with analog 'scopes and don't want one. They aren't useful for catching one-off transient events, which is what I'm looking for. Something with a stop trigger is essential. A freestanding DSO would be nice, but I won't use it enough to justify the cost and storage.
A search for raspberry pi DSO revealed a range of devices called bitscope which (if as good as advertised) look like handy devices, probably overkill for what you want but it would have cleared several feet of bench space in my 1980s labs.
--
Steve O'Hara-Smith | Directable Mirror Arrays
C:\>WIN | A better way to focus the sun
The computer obeys and wins. | licences available see
You lose and Bill collects. | http://www.sohara.org/
Bitscope are expensive for what they are, and not actually very good (you won't see transients at all). I get *far* better results with an ancient Scopex.
may be worth a look - its (very) small, fully open source software and while I had a different use case, worked for me. Looking at the web site, I probably ought to update my software version before I use it again.
That's why I mention openhantex6022. It's specific to the 6022 but it's native Linux, later ported to Windows. I never found the Hantek supplied Windows software to be much good at triggering.
Thank you - so not as good as advertised then - pity.
--
Steve O'Hara-Smith | Directable Mirror Arrays
C:\>WIN | A better way to focus the sun
The computer obeys and wins. | licences available see
You lose and Bill collects. | http://www.sohara.org/
Please forgive my ignorance on the topic, but would it be possible to use another PI with 'duino type device? Seems the duino would do the sampling and relay the results to the other PI.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.