Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

PC oscilloscope for Linux?

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
14 posts • Page 1 of 1
Author
Message
sasq
Apprentice
Apprentice
User avatar
Posts: 234
Joined: Fri Sep 09, 2005 12:05 pm
Location: Poland
Contact:
Contact sasq
Website

PC oscilloscope for Linux?

  • Quote

Post by sasq » Wed Mar 22, 2017 7:03 pm

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?
SasQ
Top
littletux
n00b
n00b
Posts: 74
Joined: Mon Dec 08, 2003 8:52 am

  • Quote

Post by littletux » Thu Mar 23, 2017 12:00 am

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
Top
sasq
Apprentice
Apprentice
User avatar
Posts: 234
Joined: Fri Sep 09, 2005 12:05 pm
Location: Poland
Contact:
Contact sasq
Website

  • Quote

Post by sasq » Thu Mar 23, 2017 7:14 am

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 ;)
SasQ
Top
tomtom69
Apprentice
Apprentice
Posts: 263
Joined: Tue Nov 09, 2010 9:29 am
Location: Bavaria

  • Quote

Post by tomtom69 » Thu Mar 23, 2017 11:57 am

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
Top
littletux
n00b
n00b
Posts: 74
Joined: Mon Dec 08, 2003 8:52 am

  • Quote

Post by littletux » Thu Mar 23, 2017 1:16 pm

1) Limited range of frequencies (only audio from human-audible range).
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 samplingfrequency

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
Top
sasq
Apprentice
Apprentice
User avatar
Posts: 234
Joined: Fri Sep 09, 2005 12:05 pm
Location: Poland
Contact:
Contact sasq
Website

  • Quote

Post by sasq » Thu Mar 23, 2017 1:37 pm

@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.
Last edited by sasq on Thu Mar 23, 2017 1:41 pm, edited 1 time in total.
SasQ
Top
John R. Graham
Administrator
Administrator
User avatar
Posts: 10894
Joined: Tue Mar 08, 2005 3:39 pm
Location: Somewhere over Winder, Georgia, USA

  • Quote

Post by John R. Graham » Thu Mar 23, 2017 1:41 pm

sasq wrote:... No more, no less, ...
Close but not exactly. More is always acceptable. ;)

- John
I can confirm that I have received between 0 and 499 National Security Letters.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56076
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Thu Mar 23, 2017 1:56 pm

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.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
littletux
n00b
n00b
Posts: 74
Joined: Mon Dec 08, 2003 8:52 am

  • Quote

Post by littletux » Thu Mar 23, 2017 3:53 pm

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
Top
sasq
Apprentice
Apprentice
User avatar
Posts: 234
Joined: Fri Sep 09, 2005 12:05 pm
Location: Poland
Contact:
Contact sasq
Website

  • Quote

Post by sasq » Thu Mar 23, 2017 4:41 pm

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?
SasQ
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56076
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Thu Mar 23, 2017 4:54 pm

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.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
sasq
Apprentice
Apprentice
User avatar
Posts: 234
Joined: Fri Sep 09, 2005 12:05 pm
Location: Poland
Contact:
Contact sasq
Website

  • Quote

Post by sasq » Thu Mar 23, 2017 5:39 pm

Thanks, NeddySeagoon, this piece of software looks very promising :)
SasQ
Top
Roman_Gruber
Advocate
Advocate
Posts: 3854
Joined: Tue Oct 03, 2006 8:43 am
Location: Austro Bavaria

  • Quote

Post by Roman_Gruber » Fri Mar 24, 2017 12:34 am

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.
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?
@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.
@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.
Top
Hu
Administrator
Administrator
Posts: 24380
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Fri Mar 24, 2017 1:06 am

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?
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.

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.
Top
Post Reply

14 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy