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.
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.
Try this
I think you might be able to get started with a DATAQ WinDaq starter kit. Specifically, the DI-194 is only $13 + S&H for a four-channel, 8-bit DAQ that you just plug into your serial port.
"It take 9 months to bear a child, no matter how many women you assign to the job."
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))"
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.
http://www.ucl.ac.uk/~ucapwas/scope20m.html: //www.ucl.ac.uk/~ucapwas/video.htmlo c.ic.ac.uk/~ih/doc/adc_dac/. uk/~ih/doc/adc_dac/deck/4chan 8bitadc.ascd ac/deck/8chan 12bitadc.asc_ dac/adc11/a c/dcfg/. html#pcme asuring
http
http://www.d
http://www.doc.ic.ac
http://www.doc.ic.ac.uk/~ih/doc/adc_
http://www.doc.ic.ac.uk/~ih/doc/adc
http://www.doc.ic.ac.uk/~ih/doc/adc_d
http://www.epanorama.net/links/measuring
Have fun...
Reason is the Path to God - Anon
http://www.epanorama.net/links/oscillator.html
s co pe.shtml
t ml
- Information on Oscillator circuits
http://www.dansworkshop.com/Homebuilt%20oscillo
- Website about a homebuilt 'scope
http://members.tripod.com/michaelgellis/scope.h
- 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.
I used to be in your same situation as an EET major a few years ago. My sugguestion is to go buy a copy of Popular Electronics. Inside you will probably find a variety of ads for such a product. The products usually run about $99 and come with software, interface, and more than likely, probes. I even recall an article which described how to build one and gave out the software for free. So you might try contacting them (P.E.) to see if you couldn't recieved an old issue (I know they make CD's for such a thing).
Do the game ports really have true A/D converters? I seem to recall reading that since the joystick input is just a variable resistance, that the game port just puts a capacitor in series with that resistance and times how long the capacitor takes to charge to some predefined level. So this wouldn't really be useful for sampling variable voltages.
:) Try surplus stores, or see if your university has old ones they're trying to get rid of.
I suspect the main issue with the sound card is the low sampling rate. 48 KHz isn't fast enough to see a lot of the signals you might want to see, especially in electronics. So any other approach would have to sample much faster. You'd need special hardware for that. Then if it gets too fast (into the megahertz), you start to have the issue of whether the CPU can read and process the samples that quickly.
I think there's a reason why oscilloscopes are usually dedicated hardware. I suspect you'll be better off trying to pick up an old/used scope for cheap. Unless you have especially high-speed circuits, an older analog one should be sufficient for most purposes, though maybe not as sexy as the latest 824 GHz digital networked uber-scope in your lab
I think it might be this one. If not, check out this page to see the other options available at Radio Shack.
"It take 9 months to bear a child, no matter how many women you assign to the job."
The chip I had needed a clock signal in order to go through the sampling cycle - there are likely those that don't, and they might be more suited to this application. Actually the Intersil ADC0802LCN looks like it might work very well...
I tried using the parallel port itself to generate the clock signal using one of the status lines - but it didn't work as well (random errors). I don't have enough design knowledge to know why.
In any case, a fun project for a programmer like myself.
Let's not stir that bag of worms...
It is; you have to ask (pull a pin up) the A/D converter for a reading. The timer ensures that you get one on the lines every n seconds; this way your software doesn't have to ask and wait for a reading. It just gets one.
My other car is first.
Actually, a buffer IC (74244 or 245?) should be adequate to protect the computer unless your running a few hundred volts through your op amp!
On the parallel port software interface side, I have successfully used the parapin library in my pc-to-breadboard experiments. This way you can spend more time on the hardware and the imaging and less on the hardware interface.
"parapin makes it easy to write C code under Linux that controls individual pins on a PC parallel port. This kind of control is very useful for electronics projects that use the PC's parallel port as a generic digital I/O interface. Parapin goes to great lengths to insulate the programmer from the somewhat complex parallel port programming interface provided by the PC hardware, making it easy to use the parallel port for digital I/O."
- James
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
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
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.
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..
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
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
Campaign for Liberty
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!
The Probescope is more useful than it looks. The device is made for Radio Shack by Wittig Technologies The have an improved version called it the ozziFOX, for around $70. A much better (but more expensive) device is the bitscope. Both devices connect via a serial port.
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.
http://xoscope.sourceforge.net/ (Includes directions for building buffer hardware)
c 50 /50525.htm (for a compatible probe)
http://bul.eecs.umich.edu/signal/ (spectrum analyzer that works with xoscope)
http://support.radioshack.com/support_meters/do
Company Part# Description
Maxim MAX197 8ch. 12bit 5MHz A/D!
Maxim MAX503 10bit D/A
Phillips 89C51RD+ 64K FLASH 1K RAM
Intel 82C55A ISA Control logic If anyone out there needs very accurate waveform data on there PC and has more time than money than this may be the way to go. I have the entire project documented and if anyone wants it I can .pdf it up and send it your way. I have the embedded c-code and the VB GUI code as well that people are free to use. It might be a good senior design project for someone to update my design to make it real time by using a faster bus like a PCI or FIREWIRE! Another great magazine that I have not seen mentioned here yet is "Circuit Cellar Ink." They have a lot of information and ads related to PC data aquisition. Let me know if anyone wants the documentation/code to build this. Makes a great stocking stuffer...
You need to take a really careful look at what you're trying to do ... it is usually better to buy an oscilloscope or a PCI 'scope card. However, if you want to make measurements in the field and keep costs down, that's a lot of extra stuff to carry around.
Corrosion measurements on aircraft is an application where a sound card is appropriate, because it meets those limitations and carrying extra equipment around the aircraft is a real pain.
It is true, sound cards do have limitations when it comes to oscilloscope duty, but they are not as bad as many claim. I can't believe I'm defending the lowly sound card. It is time for some de-bunking. Let's go:
...
... can all be independently controlled via software.
Almost all measurements with oscilloscopes cannot be performed with a sound card. However, if your application meets these
Nothing you're interested in is outside the audio band (50Hz to 5kHz or so)
Low end sound cards with a 48000 sample rate are good from almost DC to 24kHz.
Up to a second delay for the screen update latency (depending on sound card) is ok
Check out a linux program called baudline, it's screen update latency is less than a 1/60 of a second. It's quickness will blow you away.
16 bit digitization (or worse) is enough
Huh? More bits is better. Since high-end digital scopes have 8 or 10 bit ADC's, the cheapo 16 bit PC sound card has far less quanization noise.
No hardware triggering (all done in software)
Why would you want hardware triggering? Deep buffers rule! In baudline you can scroll back to events that happened minutes or hours in the past (depending on RAM).
When dual channel, both have the same settings
What do you mean? Same sample rate? That isn't much of a limitation. Gain, zoom, offset,
Simple(?) Linux software for the ProbeScope
http://www.linuxtoys.com/pscope/pscope.html
Dag B
PAL-Plus never took off in the UK. I didn't realise that it was still in use elsewhere in Europe.
The limit on the capture block size of 674*256*4 is presumably enforced by hardware. It means that continuous waveform sampling can be done for almost 20 ms. which in itself is not bad going. The VDELAY restriction means that the dummy sync generator must generate pulses for at least two lines and I would imagine that a further couple will be needed before the field pulse to allow odd / even field discrimination. I know that we don't really need this but the 848 seems to get confused and refuses to capture if the field ident gets mangled based on problems I've had transcribing video from camcorders. I don't think that the 848 is too picky about the serration pulses so overall it should be possible to capture consecutive 20 ms blocks separated by 360 us holes. For display purposes, the horizontal refresh is unlikely to be an exact multiple of the sample window size so the holes in successive scans should get covered up. The chopping action on most dual trace 'scopes relies on this effect.
The big advantage of using a video capture card for a cheap DSO is the high bandwidth into PC memory. It is not necessary to reduce the AtoD sampling rate when using a slower timebase setting so the aliasing problems which plague most external box solutions (and even some Tek LCD DSOs) simply go away. The display software should translate sample distribution within each time slot into intensity, thereby emulating a conventional 'scope. Modern processors should be fast enough to do this with imperceptible delay.