Slashdot Mirror


Building a Cheap Oscilloscope Using Your PC?

JohnMadison asks: "As a engineering student, I have a lot of projects, but not much test equipment at home. I was wondering if anybody has advice on using my PC as an oscilloscope. I've downloaded a couple of shareware programs that use the sound card for input, but they weren't really useful. I am looking for a good way to make a cheap, yet decent scope. Any sugestions?" While something like this would be an interesting hack, I'm at a loss as to what you would use for probes. The submitter mentions using the sound card as an input, but would that be the best solution? If you were going to make a custom add-on to the PC to do this, what would it need? Does such an add-on already exist? Interestingly enough, this fits in well with an earlier article we did.

25 of 247 comments (clear)

  1. Need better inputs! by multipartmixed · · Score: 3, Interesting

    The sound card might offer reasonably sensitive voltage comparisons in the 1V range, but really wouldn't be an ideal way to go, IMHO.

    Looking at the game ports (two ADCs each) might be one option, and probably "safer". (Game boards are practically free).

    Another might be look at the tape port. You have a true IBM-PC, don't you? :)

    --

    Do daemons dream of electric sleep()?
    1. Re:Need better inputs! by Colin · · Score: 5, Informative

      Game ports don't actually have ADC's on them. The standard design is to discharge a capacitor, then charge it through the resitance of the joystick pot, and tim ehow long it takes to get to a specific voltage. This is related to the resistance. So, you can't use the game port for measuring voltages directly.

      Picotech have addons for PCs to convert into a datalogging scope. I've never used one - and note that they tend to connect via the Parallel port. You can't get a whole lot of data through that port, so a 100Mhz scope won't actually show on the screen in real time. This doesn't usually matter, but you do want to bear in mind the delay between the measurement being made, and it actually appearing on the PC monitor.

      On the plus side, they normally have data processing facilities that you only find on top of the range digital scopes - things like "trigger before", and FFT's.

    2. Re:Need better inputs! by Dr.+Awktagon · · Score: 5, Insightful

      Game ports don't actually have ADC's on them. The standard design is to discharge a capacitor, then charge it through the resitance of the joystick pot, and time how long it takes to get to a specific voltage. This is related to the resistance. So, you can't use the game port for measuring voltages directly.

      Erm, that's single-slope integration, that's an ADC! Many voltmeters for instance use a variation called dual-slope integration that charges a cap for a fixed time and then times the discharge back to zero. How else can a digital device measure voltage "directly"?

  2. Re:RAdioshack? by Breakerofthings · · Score: 5, Informative

    Radio Shack "ProbeScope" ... about $100, plugs into your serial port, uses 9v battery for power ... comes with pretty decent software (16 bit win, but I have seen linux software that claims to support it).
    It also has a little lcd screen that will show you the waveform, and will act as a digital multimeter.

  3. Latency is a problem by SilentTristero · · Score: 5, Insightful

    I've done this with some of the freeware Windows scope programs out there (I'm a former VLSI hardware designer), but even at 96kHz the latency vs. buffer size issue gets to be a problem when probing around in a circuit. It's marginally acceptable for tuning up tape deck heads and so on, but don't try it for any serious design or repair work.

    The other problem is of course sound card inputs are AC, you really want DC coupling. And high impedance.

    Bottom line: you're better off with a scope board from the back pages of one of the magazines.

    1. Re:Latency is a problem by Technician · · Score: 4, Informative

      I second the suggestion of using a scope card. Many times you can run into an unexpected voltage that will quickly fry an input not designed for it. A good example is a simple 2 line LCD display module with an EL backlight has more than 90 volts. Probing the wrong spot while checking a logic signal quickly spells any any savings just became more expense. Having captured wave forms is very useful in many fields. Just like deciding on what computer you need, you need to evaluate your requirements. You may not like the price, but not meeting your requirements is a waste of time and money. My requirements lead to the purchase of a "real" scope. It is protected up to 1000 volts at any setting and has memory. It can directly print to an HP laser printer, or export screenshots directly to a PC. The screen shots include all the important stuff like voltage scales, time scales, curser measurements, etc. Not to do a plug, but I am using a Tektronix TDS 200 series scope I have had for several years.

      --
      The truth shall set you free!
  4. Bitscope by bfoz · · Score: 4, Informative

    Try this

  5. Parallel Port by JMZero · · Score: 3, Interesting

    I built one a while back out of a A/D chip and a few transistors. The only other part was a clock chip and crystal. I didn't bother to sync everything perfectly - I just let the clock chip flap away and read whatever was on the lines.

    Worked pretty well. It even worked as a video in(though it didn't get much resolution).

    This is a really fun project if that's what you're looking for - and it's good enough for simple electronics. You'll certainly be able to see simple wave shapes. That said, you'd have to do some work if you were

    1. Were worried about accuracy
    2. Needed fast sampling
    3. Deal with large ranges of voltages. Mine dealt only in 0-5 volts.

    -Dave

    --
    Let's not stir that bag of worms...
  6. Ask Slashdot FAQ: 1. Ask Google First by Anonymous Coward · · Score: 4, Funny

    http://www.designnotes.com/pcs64i.htm
    found from
    http://www.google.com/search?q=pc+Oscilloscope+& bt nG=Google+Search

    1. Re:Ask Slashdot FAQ: 1. Ask Google First by Rick+the+Red · · Score: 3, Insightful
      And for just under $400! Uh, but at that price, why not just buy a stand-alone 'scope?

      --
      If all this should have a reason, we would be the last to know.
  7. Couple links by dimator · · Score: 5, Informative

    I was looking for something along these lines as well, a couple months ago. The software/sound-card solution is xoscope. I'm afraid I haven't had time to try that.

    Another cool site is bitscope.com where you can find a completely open-design for an oscope you can build yourself (or order from them, I think.) It includes all the schematics and such, and the finished unit slides into a bay in your PC, with two slots for probes. How cool is that!

    --
    python -c "x='python -c %sx=%s; print x%%(chr(34),repr(x),chr(34))%s'; print x%(chr(34),repr(x),chr(34))"
  8. Some computer O-scopes type projects on the net... by cr0sh · · Score: 4, Informative

    http://www.ucl.ac.uk/~ucapwas/scope20m.html
    http: //www.ucl.ac.uk/~ucapwas/video.html
    http://www.do c.ic.ac.uk/~ih/doc/adc_dac/
    http://www.doc.ic.ac. uk/~ih/doc/adc_dac/deck/4chan 8bitadc.asc
    http://www.doc.ic.ac.uk/~ih/doc/adc_d ac/deck/8chan 12bitadc.asc
    http://www.doc.ic.ac.uk/~ih/doc/adc_ dac/adc11/
    http://www.doc.ic.ac.uk/~ih/doc/adc_da c/dcfg/
    http://www.epanorama.net/links/measuring. html#pcme asuring

    Have fun...

    --
    Reason is the Path to God - Anon
  9. Helpful Links... by jyak · · Score: 4, Informative

    http://www.epanorama.net/links/oscillator.html
    - Information on Oscillator circuits

    http://www.dansworkshop.com/Homebuilt%20oscillos co pe.shtml
    - Website about a homebuilt 'scope

    http://members.tripod.com/michaelgellis/scope.ht ml
    - Scope diagrams and schematics

    http://www.picotech.com/oscilloscope.html
    - Company with PC based products

    Hope this helps...

    National Instruments has great instruments as PCI cards and you can make your own programs/software in Labview but this option is on the expensive side.

  10. How cheap? by Jeffrey+Baker · · Score: 4, Insightful

    How cheap are we talking about here? You can get a Tektronix 465 with a probe for $200 or less and this is a nice featureful scope. There's a reason the 465 was in production for decades. It's many times better than some sound card hack.

  11. O-Scope 'n the PC by ackthpt · · Score: 3, Insightful

    Hopefully someone can set you up with a way to do it, but what I've seen is often worse than buying a good used one at a Hamfest. You should get in touch with ARRL folks in your neck of the woods and find out when and where Hamfests take place. Granted, you may have to shell if you want a good storage scope, but some decent scopes can be found. My dad has a soft spot for Tektronix scopes.

    --

    A feeling of having made the same mistake before: Deja Foobar
  12. xoscope, BitScope by rrwood · · Score: 3, Interesting

    Some specific links:

    xoscope - a software oscilloscope

    BitScope - hardware black-box oscilloscope that you control via a PC

    Xoscope is Open Source, so hack away if you don't like something about it. The SourceForge page has links to a schematic you can build to use your soundcard as the ADC, though you are of course limited to about 20kHz signals (stereo input = dual trace though). Definitely a cheap way to go.

    The BitScope is a really cool design that is open or free (as in beer and speech). You can download all the specs and build it yourself, or buy preassembled kits or BitScopes (cheaper than buying the individual parts yourself). It is a black box that you control via software on a PC, which is pretty cool.

    And then, you can always snag a scope on EBay for a couple of hundred bucks. Loads of Tektronix scopes, etc. Wish I could afford a Fluke ScopeMeter myself.

    -Roy

  13. Get a real, used scope. by Matt_Bennett · · Score: 5, Insightful

    I know you want to use your PC, but try to get a real live scope- you'll probably spend less money and get a better measurement device. A sound card would be barely good enough for doing audio measurements, but you run into the problem of an impedance that is too low, with too low a bandwidth. Yeah, you may only want to look at audio frequencies, but realistically, you want a scope with 3-10 times the bandwidth of the highest frequency you'll be looking at.

    You don't specify what frequencies you want to work with, but for any sort of digital work I wouldn't suggest that you use *anything* less than a 30 MHz bandwidth analog scope. With that, you'll see a lot of rounding on a 10MHz signal, but you'll be able to see something. Digital scopes are very nice, if they have a decent sample rate. To get the equivalent performance of a 30 MHz analog scope in a digital scope, the digital scope must have at least a 30MHz bandwidth and 100MHz sampling rate (or a good equivalent time setting).

    Bandwidth is *very* important. Oscillations can and will happen, and if it is a high frequency parasitic oscillation, a low bandwidth scope will fool you into thinking there is nothing there. You will spend many, many hours trying to debug such a circuit, because your tools will lie.

    If you look around (hamfests, ebay) you should be able to find a working old tektronix boat-anchor for between $100 and $200. I've seen plenty of kits available, but they all cost more and have less performance. Since you don't say that you want to build the scope as a learning experience, you want it as a tool. The scope should be your third piece of electronic test equipment, after a multitester and a logic probe. These tools are fundamental. Get something good, whose performance you can trust, that you won't need to debug.

  14. Idea by jrockway · · Score: 3, Interesting

    I was going to build something like this a while ago, but I haven't had time. Just get a A->D chip, hook it up to a USB bridge, and read it a certain number of times a second (500, I think; most D/A converters can handle this IIRC). Connect a probe, voltage limiting circutry, and ground (and a timer, so your software doesn't have to raise the read pin 500 times a second :). Since it's USB, you can easily have another device in the box that does D/A and transposes it on a higher voltage. Then you have an osciloscope and a frequency generator. I think I'll start drawing some diagrams and investigating the IC's. Email me if you want information.

    --
    My other car is first.
  15. If you have to ask Slashdot you aren't qualified by Zero__Kelvin · · Score: 5, Informative


    This not meant to be rude, but rather a simple statement of fact. If you have to ask Slashdot you aren't qualified to do it. Analog electronics is Voodoo science, and in the end you will have no idea if the representation on the screen is accurate. Even if you compare certain captured signals to ones grabbed by a high end O'Scope, there will be no assurance that signals of different amplitude and frequency are properly represented.

    As an Engineer who was also an Electronics Technician for many years I have seen improper understanding of the nature of Analog cause all kinds of misunderstandings. For example, using a long ground lead or improper input impedance can distort the signal so much that a perfect signal looks FUBARed, or a FUBARed signal looks good. Indeed, there is a kind of Heisenburg Uncertainty to it all. By this I mean that the act of measuring changes the results, of course. I have seen faulty circuits that only work when you are probing them!

    Your best bet is to try saving up for one designed by qualified Engineers ... perhaps the bitscope.com ones, or another one mentioned by others. I haven't looked seriously at any of these, so I cannot offer a valid opinion one way or the other.

    Also, a sound card based O'Scope is only going to handle signals in the audio range, and if the card is any good it will do some pre-processing on the inpuit anyway, further distorting the input signal, so that's way out IMNSHO.

    Finally, if you do decide to do this just for fun, spend the money to purchase real (quality) probes, and learn to write device drivers if you don't have this skill already. Expect to spend several years coming up with anything that is marginally decent (based on your level of knowledge at this time, as indicated by your post.) Also, be fully prepared to never succeed and ruin a motherboard or two along the way 8^}

    Whatever approach you decide upon, Good Luck!

    --
    Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
  16. Re:Radioshack? by terpia · · Score: 5, Informative

    You are correct. I have this and do use it on occassion. Its certainly not a tektronix, but its really great for tinkering. A real nice perk with this unit is that although it connects to a serial port, near the connector it transfers the signal optically, so you dont have any ground loop problems to worry about, nor do you have to worry about nuking your mobo - which lets you poke around freely without worrying (except about the board you are poking around on)...
    It's really a nice quality geek toy, and it does have a small silly lcd display right on the unit so it does not always require a computer unless you want to look at something other than a semi accurate representation of the waveform.

    --
    .sig wanted: Must be concise, funny, and display my cleverness.
  17. Velleman's build-yourself-scope! by freaker_TuC · · Score: 3, Informative

    There is a very high quality oscilloscope box from Velleman. It has it's own box and probes with software package together in the box.

    They use the software package Scope-It as "digital storage oscilloscope and spectrum analyser". They also have a demo downloadable at that page.

    PCS641, PCS500 (PC-Scope 50MHz) and with adapter.

    --
    --- I am known for the ones who want to find me on the net. Is that a privacy risk or a privilege? One might wonder..
  18. Recommended test gear by KC7GR · · Score: 5, Informative

    If you're at all serious about building up your stash of test gear, the PC is just about the last place you want to look. Nothing it can ever do, even with add-in boards, will ever equal the quality of equipment that was made for the purpose you're trying to accomplish.

    Others have pointed out that you should check out ham radio/electronic swap meets for a good used O-scope. This is an excellent idea. As far as that goes, I have some suggestions.

    The Tektronix 7000 series, more notably the 7603, 7704, 7904, and 7104 are all some of the longest-lived and most durable instruments that Tek ever built. My personal unit is a 7904 (500 MHz basic bandwidth on the mainframe) with a whole raft of plug-ins. If I recall my specs correctly, the 7603 mainframe is rated at 100 MHz, the 7704 at 250, the 7904 at 500, and the 7104 at 1 GHz.

    Keep in mind those are MAINFRAME bandwidths (top-end response for the mainframe IOW). You'll need appropriate plug-ins to take full advantage of that. Anyway, the 7000 series mainframes need a minimum of one time-base and one vertical amplifier plug-in to be useful. I would settle for nothing less than a 7A26 (200 MHz dual-trace) vertical module, and a 7B85 (time base) module. If you can, find a 7B92A for the time base and a 7904 or 7904A for the mainframe.

    If you need REALLY high-frequency response on the vertical side, look for a 7A19 (single-trace, 50-ohm input, 1 GHz response). Bear in mind that you'll only get the full bandwidth from such in a 7104 mainframe (although you can use it in other mainframes at reduced bandwidth).

    A word of caution on the 7104 mainframe, assuming you should choose it: Its CRT is more delicate than those of other Tek scopes, thanks to its extremely high writing speed, so be VERY careful to check it for screen burn.

    If a portable 'scope is more to your liking, look around for a Tektronix 465, 475, 475A, or 485. Hard to go wrong with those, especially if you get one that has the DMM option.

    Other sources for used Tek equipment include, of course, Ebay.

    OTHER TEST GEAR: I suggest HP or Fluke for a multimeter. Fluke makes good stuff, especially older hardware, but HP's is easier to get calibrated. My own benchtop meter is an HP3456, backed up by a Fluke 8520.

    POWER SUPPLIES: A good bench power supply is critical to any lab. HP, Kepco, and Lamda all make excellent units. Figure out what you're going to be working with and shop around.

    As for more specialized stuff, I can't comment intelligently without knowing what specific sub-field you want to go into. There are different specialty instruments for RF, digital design, microwave, power supplies, etc.

    Perhaps the best advice I can offer is ALWAYS get the best stuff that you can possibly afford. NEVER sell yourself short where your own test gear is concerned! Doing so -will- come back to haunt you later on.

    --

    Bruce Lane, KC7GR,

    Blue Feather Technologies

  19. Re:Try National Instruments' LabVIEW by Milican · · Score: 3, Informative

    I too have used National Instrument's LabVIEW and I recommend it as well. Compared to the $5k benchtop oscopes this is inexpensive, and you'll get great results. You can get away with somewhere under $1k maybe even around $500 for a good DAQ card and some software. Their software is awesome and easy to use. LabVIEW contains a graphical programming language that makes working with complex stuff as easy as drag and drop. Serial, TCP/IP, almost anthing is simple as pie. Hell, I believe they even include a sample oscope app somewhere (either online or with LabVIEW software). If you can get the educational price you are in for some cost savings as well. Definitely the way to go for precise measurements. They have products you can plug into your PCI slot that run the gamut from low end more affordable systems to the high end. I used their stuff in school alot and I love it.

    JOhn

  20. I Just Went Through This! My Solution Below: by MBCook · · Score: 5, Informative
    I just went throught this same problem. I looked on the internet but cound't find much of anything. The only solutions that I found were the soundcard based one you mentioned, and ones that hooked to the parallel port. There are some out there but I highly recomend that you do what I did.

    Because I couldn't find anything good that required a PC, I went out and just bought a used oscilloscope. I bought a used oscilloscope off of e-bay for ~$400 (you can find cheaper ones easily). What I did was I would search daily for oscilloscopes that worked, included probes (they are really expensive), and most importantly had a "buy now" option. I found one that a guy put up that the "buy now" was really low (considdering the scope would be over $1500 brand new). The other trick is to MISPELL things. If you search for oscilloscope, oscilliscope, osciliscope, etc... you'd be amazed what you can find. Because it's mispelled, most people don't see it and therefore don't bid on it. That way you can get things cheaper.

    My last suggestion would be to go around to schools, electronic repair shops, etc. and ask if they have any old oscilloscopes you could buy cheap. If you explain your situation you'd be suprised how nice people can be.

    --
    Comment forecast: Bits of genius surrounded by a sea of mediocrity.
  21. Re:If you have to ask Slashdot you aren't qualifie by markmoss · · Score: 4, Insightful

    I'd amend that statement a bit -- by the time you get decent results by building your own, you will have acquired valuable and rare skills in analog design and construction. And you will have had to buy or borrow a real oscilloscope in order to find out what's wrong with the one you built! I'm a test engineer. I make functional test fixtures that apply stimulus to a board and check the output signals from it. Getting DC analog signals from the board to the A/D converter accurately is harder than it looks. Audio frequencies are harder. Scopes should work at well above audio frequencies, and that gets very hairy -- every wire is also an antenna, capacitor, and inductor, all at the same time.

    I might have plunged into a project like this when I was a kid and didn't know what I was getting into. I'd probably be a hell of a lot better analog designer if I had. But god, it's a big project. If you still want to go ahead, best of luck. If you actually get it working, you might as well go ahead and get the BSEE degree. Good analog designers are scarce and high-paid.

    Some intermediate possibilities:

    Scopes that use the PC as the display device, for instance this from JDR Micro. It's a box with the signal conditioning and A/D circuits of a low-end digital scope, but connects to a PC parallel port for displaying the signals captured. The advantages of this, compared to a standalone scope, are that you save a few hundred dollars for the scope display and control panel, and you've got the full power of the PC for analysis of the datapoints captured.

    Scope card in the PC: I'm not aware of any low-end cards now on the market. The problem with this arrangement is that the PC is full of high frequency radiated signals, so shielding a scope card from that is quite an accomplishment. It can be done, but not by amateurs, or even by non-specialized EE's like me. It does have considerable advantages, as mentioned above, plus it can DMA to the PC's memory and so be able to record for longer.

    Use a Data Acquisition (DAQ) card as a scope. I've done that at audio frequencies, using National Instruments MIO cards. I'd be dubious about higher frequencies, because the signal reaching the A/D converter would be quite different from the signal you were probing. (I used Labview to program it. It lets you set up a simple system fast, and there are library functions to capture data to an array, and then display it on a scope-like window. But for the test programs I was doing, after a long learning curve, I decided that for any complex program, graphical programming is inherently less efficient than typing the code as text. Labwindows/CVI is better: you create the user interface windows by plopping icons into the window, which is nice, then type in code sort of like Visual Basic. CVI is very expensive, as compared to Visual Basic and C++ development systems which work pretty much the same, except you've got to put some work into interfacing to the card. If a nice pre-written interface to the DAQ cards is worth several thousand $, then get CVI... Labview is a little less expensive; whether it is appropriate depends on how far you need to go beyond the library functions.)

    Finally, whatever you do, spend about $100 for good probes. The best scope is only as good as the probe that brings in the signal.