PC oscilloscope for Linux?
PC oscilloscope for Linux?
I'm about to buy some of those PC USB oscilloscopes, like Hantek or something similar.
But before I buy it, I'd like to make sure first if I'll be able to use it somehow with my Gentoo Linux box.
Because they usually only list Windows on their "supported operating systems" list, but from what I heard, there are ways to use them with Linux as well.
So my question is:
Is there any software in Portage or some overlays which can work with those PC oscilloscopes?
Which particular models / producers are supported, if any?
But before I buy it, I'd like to make sure first if I'll be able to use it somehow with my Gentoo Linux box.
Because they usually only list Windows on their "supported operating systems" list, but from what I heard, there are ways to use them with Linux as well.
So my question is:
Is there any software in Portage or some overlays which can work with those PC oscilloscopes?
Which particular models / producers are supported, if any?
SasQ
Here are some informations about hantek
http://how-to.wikia.com/wiki/How_to_use ... e_in_Linux
here is a way to use a soundcard as oscilloscope (but this method has a limited useabillity)
http://xoscope.sourceforge.net/
this is in gentoo tree but in max version 2.1 and you see latest is 2.2
http://how-to.wikia.com/wiki/How_to_use ... e_in_Linux
here is a way to use a soundcard as oscilloscope (but this method has a limited useabillity)
http://xoscope.sourceforge.net/
this is in gentoo tree but in max version 2.1 and you see latest is 2.2
I don't think that using a sound card for that is a good idea, for several reasons:
1) Limited range of frequencies (only audio from human-audible range).
2) There might be problems with impedance matching and voltage ranges, so it requires separate hardware adaptors anyway.
3) One can easily damage one's sound card this way by accident.
That's why I'm rather looking for a dedicated hardware for that.
But in order to use such hardware, I need to make sure first if it will work with my Linux box.
Thanks for the Hantek link anyway. Seems useful. I'll give it a try.
Nevertheless, my question is still open, in case anyone had something more to tell me
1) Limited range of frequencies (only audio from human-audible range).
2) There might be problems with impedance matching and voltage ranges, so it requires separate hardware adaptors anyway.
3) One can easily damage one's sound card this way by accident.
That's why I'm rather looking for a dedicated hardware for that.
But in order to use such hardware, I need to make sure first if it will work with my Linux box.
Thanks for the Hantek link anyway. Seems useful. I'll give it a try.
Nevertheless, my question is still open, in case anyone had something more to tell me
SasQ
If a standalone scope is an option (I prefer this because it's also portable, lightweight and independent of the computer as a noise source):
I have a gwinstek gds-1022 for some years now, and it can be attached to the PC by usb port. Linux support works well.
Most gwinstek models do have linux support, for example here:
https://github.com/yytseng/gds2000tools
I have a gwinstek gds-1022 for some years now, and it can be attached to the PC by usb port. Linux support works well.
Most gwinstek models do have linux support, for example here:
https://github.com/yytseng/gds2000tools
No the Range is not as limited as you think because the real hardwarelimited frequency range of soundcards is higher than that was used as samplingfrequency on audio, and the human audible signal is the half of the samplingfrequency1) Limited range of frequencies (only audio from human-audible range).
so make an example the real limit of the hardware maybe is not 48000Hz as it is needed for the audio, maybe it can be also 50000 or 60000 or maybe 80000
but the audible frequency max is 24000Hz because it is the half of the samplinfrequeny
So if you have a good soundcard that can have 96000Hz or 192000Hz or maybe 384000Hz samplingrate your card can maybe work with frequencies high to 500000Hz
Yes this also is not a really high frequency for an Oscilloscope, but is often enough
@tomtom69 I'll take a look at that. But from the first sight, it seem to be only a command-line tool for gathering the sample data from the device, not a full-featured on-screen oscilloscope which would be capable of displaying live signal changes.
@littletux you seem to know some rough facts, but you're mistaken about the details.
The standard for audio frequencies is from 20 Hz to 22 kHz (22050 Hz to be exact), and due to Nyquist's sampling theorem, the actual sampling rate needs to be twice as that, that is, 44100 Hz. No more, no less, because this frequency has been chosen so that it could reliably sample all the important harmonics. The prime factorization of 44100 is 2·2·3·3·5·5·7·7, which means that 2nd, 3rd, 4th, 5th, 6th, and 7th harmonics (the most important ones) can be reliably sampled, as well as the squares of some of them and several other divisors of the fundamental tone.
Nevertheless, 44 kHz is not much. Radio frequency signals or GSM signals are much larger than that. Or if you're trying to debug a clock circuit of a CPU. Then you need megahertzs or even gigahertzs. Certainly not something a sound card (especially a cheap one) would be capable of measuring.
And it's not that the sound card's input characteristics allow to represent the entire range of these frequencies with the same fidelity. Usually the top and bottom ends of that range might be misrepresented, because they're not audible for most of the people anyway. But for lab measurement purposes, fidelity of representation is a must.
That's why I'd rather hold on to the dedicated hardware solution.
But I didn't come here to discuss technical details of how an oscilloscope or a sound card works.
I came for some advices about the software which can handle such hardware.
That's why I posted it in "Portage & Programming" and not in "Hardware" section.
@littletux you seem to know some rough facts, but you're mistaken about the details.
The standard for audio frequencies is from 20 Hz to 22 kHz (22050 Hz to be exact), and due to Nyquist's sampling theorem, the actual sampling rate needs to be twice as that, that is, 44100 Hz. No more, no less, because this frequency has been chosen so that it could reliably sample all the important harmonics. The prime factorization of 44100 is 2·2·3·3·5·5·7·7, which means that 2nd, 3rd, 4th, 5th, 6th, and 7th harmonics (the most important ones) can be reliably sampled, as well as the squares of some of them and several other divisors of the fundamental tone.
Nevertheless, 44 kHz is not much. Radio frequency signals or GSM signals are much larger than that. Or if you're trying to debug a clock circuit of a CPU. Then you need megahertzs or even gigahertzs. Certainly not something a sound card (especially a cheap one) would be capable of measuring.
And it's not that the sound card's input characteristics allow to represent the entire range of these frequencies with the same fidelity. Usually the top and bottom ends of that range might be misrepresented, because they're not audible for most of the people anyway. But for lab measurement purposes, fidelity of representation is a must.
That's why I'd rather hold on to the dedicated hardware solution.
But I didn't come here to discuss technical details of how an oscilloscope or a sound card works.
I came for some advices about the software which can handle such hardware.
That's why I posted it in "Portage & Programming" and not in "Hardware" section.
Last edited by sasq on Thu Mar 23, 2017 1:41 pm, edited 1 time in total.
SasQ
- John R. Graham
- Administrator

- Posts: 10894
- Joined: Tue Mar 08, 2005 3:39 pm
- Location: Somewhere over Winder, Georgia, USA
- NeddySeagoon
- Administrator

- Posts: 56071
- Joined: Sat Jul 05, 2003 9:37 am
- Location: 56N 3W
sasq,
You touched on it, but not mention it explicitly, sound card inputs are AC coupled, so the low frequency end is fairly poor and variable.
Think of the tolerance on the input capacitor.
When you need to measure a DC voltage with a sound card scope - you can't.
It is possible to extend the frequency range beyond the Nyquist limit too but only for repetitive waveforms.
Sampling scopes have been doing this for a long time. A sound card is not a good basis for a sampling scope though.
You touched on it, but not mention it explicitly, sound card inputs are AC coupled, so the low frequency end is fairly poor and variable.
Think of the tolerance on the input capacitor.
When you need to measure a DC voltage with a sound card scope - you can't.
It is possible to extend the frequency range beyond the Nyquist limit too but only for repetitive waveforms.
Sampling scopes have been doing this for a long time. A sound card is not a good basis for a sampling scope though.
Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Ok if you need really a more usable Oscilloscope , soundcard solution isn't that right, but why not buy a completelly dedicated one not a usb to pc solution. Today you can buy good ones for low price, not ocassionally I mean new. and if you have a look for ocassionaly devices you can find for really low price. I have bought a 2 channel analog from HP that can handle about 40MHz for 50 box. (new Price for this years ago was about 5000 box)
But if you buy a new digital it mostly in all cases also have usb for aditional functionality, and you can choose from 300 to 1000 box or more.
But in this price range you will find a lot good devices. its not the same as 20 or nearly 30 years ago, where a good Oscilloscope was really expensive and mostly has a cost of 4000 to 10000 box or more
But if you buy a new digital it mostly in all cases also have usb for aditional functionality, and you can choose from 300 to 1000 box or more.
But in this price range you will find a lot good devices. its not the same as 20 or nearly 30 years ago, where a good Oscilloscope was really expensive and mostly has a cost of 4000 to 10000 box or more
Why is it that every time I ask about something on some forum nowadays, there's always someone who asks why do I want to do what I want to do?
If you can't help me with my question, there's no obligation to answer, no bonus points for answering etc.
So let me ask you for a change: Why do you care what I want to do with that stuff? It's not like it was any of your business, is it?
I repeat, I didn't come here for electronics lessons, for business advices, or what I am supposed to do with my life.
I asked a simple (I tought) question about oscilloscope software and which hardware is supported by it on Linux (if any).
If what I'd like to get is impossible on Linux, just tell me that and save my time.
As for why I'm not considering to buy a standalone oscilloscope, I'll give you two reasons:
1. They are much more expensive.
2. They usually don't have as big displays as I can have on my laptop or PC, to which I can connect whatever big screen I need.
3. Sometimes I'd like to further process the data from the scope, which can be done only on a computer. The scope is not a universal computer. It cannot do everything.
So maybe we can focus on the subject of my question now, shall we?
If you can't help me with my question, there's no obligation to answer, no bonus points for answering etc.
So let me ask you for a change: Why do you care what I want to do with that stuff? It's not like it was any of your business, is it?
I repeat, I didn't come here for electronics lessons, for business advices, or what I am supposed to do with my life.
I asked a simple (I tought) question about oscilloscope software and which hardware is supported by it on Linux (if any).
If what I'd like to get is impossible on Linux, just tell me that and save my time.
As for why I'm not considering to buy a standalone oscilloscope, I'll give you two reasons:
1. They are much more expensive.
2. They usually don't have as big displays as I can have on my laptop or PC, to which I can connect whatever big screen I need.
3. Sometimes I'd like to further process the data from the scope, which can be done only on a computer. The scope is not a universal computer. It cannot do everything.
So maybe we can focus on the subject of my question now, shall we?
SasQ
- NeddySeagoon
- Administrator

- Posts: 56071
- Joined: Sat Jul 05, 2003 9:37 am
- Location: 56N 3W
sasq,
There is an ci-electronics/openhantek/openhantek-0.2.0.ebuild Its EAPI4 so its quite old.
If you are considering a Hantek, updating that ebuild may be a good place to start.
I didn't look very hard, it may already be done.
There is an ci-electronics/openhantek/openhantek-0.2.0.ebuild Its EAPI4 so its quite old.
If you are considering a Hantek, updating that ebuild may be a good place to start.
I didn't look very hard, it may already be done.
Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
-
Roman_Gruber
- Advocate

- Posts: 3854
- Joined: Tue Oct 03, 2006 8:43 am
- Location: Austro Bavaria
I would not suggest using an USB scope.
When the opto copplers dies your computer is a brick. I doubt there are proper electronics in those cheap, lets say 70 euro usb scopes.
Get something used, or those OWON, rigol whatever, cheap ~200-400 euro scopes
personal note: I gave up on scopes. AS these days you need a logic analyzer quite more likely as a pure scope.
@2 depends. as it is a matter of data points of beeing processed (samples) and max mhz. those external usb scopes do not have such high mhz. so therefore. nope on your statement
@3 usually those cheap scopes from owon for example have usb. Not as in the old days with parallel port for example. or floppy discs, ...
@1 Owon-SDS6062 60MHz 2 channel
PC software, probes,
I have not checked but I am quite certain someone has linux software for one of many of those cheap below 300 euros dso.
I am quite certain you can find something around 200 euros when you put in some efforts and talk to the sales person.
When the opto copplers dies your computer is a brick. I doubt there are proper electronics in those cheap, lets say 70 euro usb scopes.
Get something used, or those OWON, rigol whatever, cheap ~200-400 euro scopes
personal note: I gave up on scopes. AS these days you need a logic analyzer quite more likely as a pure scope.
@1 Saw something for 280 Euro. As I was in the mood to buy a scope they were around 600 euros and i skipped that.As for why I'm not considering to buy a standalone oscilloscope, I'll give you two reasons:
1. They are much more expensive.
2. They usually don't have as big displays as I can have on my laptop or PC, to which I can connect whatever big screen I need.
3. Sometimes I'd like to further process the data from the scope, which can be done only on a computer. The scope is not a universal computer. It cannot do everything.
So maybe we can focus on the subject of my question now, shall we?
@2 depends. as it is a matter of data points of beeing processed (samples) and max mhz. those external usb scopes do not have such high mhz. so therefore. nope on your statement
@3 usually those cheap scopes from owon for example have usb. Not as in the old days with parallel port for example. or floppy discs, ...
@1 Owon-SDS6062 60MHz 2 channel
PC software, probes,
I have not checked but I am quite certain someone has linux software for one of many of those cheap below 300 euros dso.
I am quite certain you can find something around 200 euros when you put in some efforts and talk to the sales person.
There are a substantial number of forum users who will encounter a problem, pick a (usually suboptimal) solution, then post asking how to implement the solution. Such users do not explain why they want to achieve that solution, what problem they hope to solve, or why they think that solution is their best choice. Often, when they explain the problem to us, rather than describing what their solution requires, we can identify a better solution.sasq wrote:Why is it that every time I ask about something on some forum nowadays, there's always someone who asks why do I want to do what I want to do?
That justification may not apply in this case, but the pattern has happened often enough that some long time users may have fallen into the habit of challenging any thread that starts off with a preidentified solution.

