Digital Osci and Logic Analyzer

How complicated is it to create a simple pc based oscilloscope and logic analyzer(excluding the pc software)?

Does it just consist of getting a ADC and interface for sending the data to the pc? I'm looking at trying to make one in a similar way to what is done on this site:

formatting link

I figured that the main the parts are the ADC, the probe, and the method of sending the information(which I think is the hardest part at high data rates?)? I've seen some ADC's that have sample rates of over 100Msps which should give me a 50Mhz bandwidth? Although these aren't cheep I've also seen some upwards of 1Gsps that would give me a larger bandwidth if I needed it.

Lets suppose I decide to buy a 1Gsps ADC(which isn't going to happen any time soon) and I have a probe that works properly with the ADC. How would I go about storing/streaming all those samples? This would require a memory chip be able to work down at 1ns or so? I was thinking I could use several gigs of pc memory in parallel to reduce the latency and increase total sample size to a few seconds... is this possible? What about encoding for a digital stream? do something like rle on the bit stream where 01 one would store 2 bits as one and its number of repetitions? (need to use 2 bits atleast so things like a clock signal are encoded efficiently)

I'm kinda curious to how high speed logic analyzers overcome some of these problems?

Another thing I wanted to know is how digital logic signals are "sampled" in logic analyzers? Surely one doesn't need anything more than a 1-bit ADC to convert the line signal? (therefor one doens't even need an ADC since it would act more like a buffer than an real ADC?)

I was thinking about buying a ADC that does about 40Msps and try it out just to see if it was going to work but and make a homemade probe to play with it. It doesn't seem like a terribly complex project but there seems to be a lot of technical issues involved.

Thanks, Jon

Reply to
Abstract Dissonance
Loading thread data ...

Jon, save your money and buy Wins book (AoE) instead. Learn a bit about Electronics and start with a project that is not over your head, maybe a LED flasher. Slowly when the need arises for these kind of instruments get them from Ebay. Just my advice, take it or leave it.

--
ciao Ban
Apricale, Italy
Reply to
Ban

As a rule of thumb, estimate the useable bandwidth as being limited by one-tenth of the ADC sample rate, not one-half. That lets you recover (more or less) the fifth harmonic of the signal of interest right at Nyquist. For some commercial examples, there's the Fluke 199C: 2.5 Gsps, overall bandwidth 200 MHz; and Tek TDS2012: 1 Gsps and 100 MHz. So for your

You don't need to capture or store more samples than you need for one display screen.

Assume that your display area is 500 pixels x 500 pixels at ten divisions each for horizontal and vertical. No matter how fast you sample, you've only that area to work with. For each time step (vertical column) you have several choices.

You can decimate your sample rate down to where you grab just one instantaneous sample at that tick and store/plot only that value. For example, at 1 msec/div and 50 pixels/div that's just 500 samples at a lazy 50 Ksps rate.

You could take, say, ten equally spaced samples within the column interval and plot the mean or median value. For the 1 msec/div example, that's acquiring 5000 samples at a 500 Ksps rate.

Or, sample at full rated speed for the entire sample interval and plot the extremes. If that's handled at the front end, only two values per column need to be sent or stored

By only needing to store a 1 or 0 for each sample point, and often by not storing every sample, just the transition times.

New gizmo that might be of interest (although at about 2 Msps)

formatting link

Mouser has the dev kits in stock. Related article at

formatting link

More targeted at data acquisition and analysis than as an o'scope core but would give you a working platform to experiment with.

--
Rich Webb   Norfolk, VA
Reply to
Rich Webb

I disagree here. Shannon says a signal can be reconstructed up to half the sampling frequency. The higher sampling rates of the examples you mention are probably used to use less bits for sampling and make the analog input filter easier to construct (an RC filter still won't do the job) to prevent frequency aliasing. Digital filtering does the rest.

I disagree again, the less memory you have the more difficult it will be to capture a problem. You'll need some pretty fancy triggering.

Which makes the oscilloscope totally useless to capture problems. A good DSO can store loads of samples which where sampled at the highest possible frequency.

--
Reply to nico@nctdevpuntnl (punt=.)
Bedrijven en winkels vindt U op www.adresboekje.nl
Reply to
Nico Coesel

Thought problem. Signal A is a 1 MHz sine wave, signal B is a 1 MHz square wave. Sample each at 2 Msps. Based only on the samples, and not on any a priori knowledge of the expected signal characteristics, what would the o'scope display at 1 usec/div'n?

Ultimately, however many samples are collected at whatever resolution and at whatever rate, they're going to end up on a relatively low-res display (low-res at least as compared to an "infinite" resolution analog display). The 500x500 is just an example to make the numbers easy; most are probably based on 1/4 VGA, VGA, or XGA resolutions.

True. I'm not saying that decimation is an optimal or even recommended approach, just trying to point out to the OP that in and of itself an ADC that's capable of high sample rates does not mean that it must always be sampled, stored, and processed at that rate, irrespective of the display resolution and rate.

It's not aimed at how DSOs from Tek or Agilent approach the problem but how a reasonable home-brewer might take a first step.

--
Rich Webb   Norfolk, VA
Reply to
Rich Webb

This situation can produce any result.

Anyway, the presumption there is no knowlegde about the input signal is not correct. Signals can always be expressed as a sum of sine waves with different frequencies and phase. With this in mind it easy to see it is possible the reconstruct the spectral part of a signal which is within the nyquist limit.

Try to display a 100MHz square wave on a 100MHz analogue scope. You'll see a sine wave. On a 300MHz analogue scope you'll see something that resembles a square wave. According to your 'rules', an analogue scope would also be usefull up to 1 tenth of its bandwidth.

True, but it is very convenient to be able to scroll through a signal and zoom in/out without recapturing the signal.

--
Reply to nico@nctdevpuntnl (punt=.)
Bedrijven en winkels vindt U op www.adresboekje.nl
Reply to
Nico Coesel

Nico, you should leave these guys some room for improvement. Once the memory is there, it is almoste done, the rest is software. Provided the cpu has some code space free.

As additional improvement when there are 1k samples per pixel, one can think of displaying the mean, or the min, or the peak-peak at each pixel. And a fourier tranform as second shown trace.

Rene

--
Ing.Buero R.Tschaggelar - http://www.ibrtses.com
& commercial newsgroups - http://www.talkto.net
Reply to
Rene Tschaggelar
[snip]

Well, for the fast ADC's I've seen, the digital output is usually widened up so that the digital circuitry can run at a more reasonable rate. For example, an 8-bit 1 GSPS ADC might have a 32-bit digital output at 250 MHz.

[snip]

--Mac

Reply to
Mac

um. I have his book. I have did a pic led flasher and more. What makes you think that this is over my head and that I have no electronics experience?

I guess I'll leave it.

Reply to
Abstract Dissonance

Hmm. The shannon sampling theorem says you only need to sample 2x to reconstruct the sample exactly? (i.e., need to sample twice as fast as the bandwidth you want to capture?)

? not for a digital logic analyzer? Also It would be nice to have some memory even for an oscilloscope since one might want look at the history of the signal? Maybe even zoom in and zoom out would be nice?

but if you have 1Gsps as some ADC's run at then thats storing 1Gb/s... so for 10 seconds for digital logic capture for a logic analyzer you would need

10Gb/s or about 1.25GB/s... and thats just for one channel ;/

Yeah... but I don't see it being really any different than what I have mentioned at the top... The do the post filtering on the device but that can easily be handled by the pc. I'm just interested in getting the data to the pc where I can then have as much fun with it as I want.

The sample rate bothers me though as its to low for what I need. I want to sample atleast a 40mhz signal so this won't help much and all it seems like to me is a glorified ADC.

Thanks, Jon

Reply to
Abstract Dissonance

? another though problem, say, is just sampling a sine wave at 2x its frequency. if you happen to sample it along its "nodes" then you will think you are sampling a something with 0 frequency.

The reason is simply that you have to sample strictly above the nyquist frequency and not on it. Sampling at 2.0001 will resolve the problem and the more you oversample the less likely(and shorter period of time) you will have these sorts of problems.

Not true. If you have zoom capabilities you could zoom in on as much detail as you want. While the display itself as fixed resolution the data's resolution is relative to the divisions. I suppose you just need a high enough resolution to show enough detail to make sense.

Jon

Reply to
Abstract Dissonance
[snip...snip...]

True. Thinking about this after I had hit the return key, what I was trying to say was that, e.g., a square wave contains info beyond the fundamental. (Yeah, yeah, I know ... duh.)

--
Rich Webb   Norfolk, VA
Reply to
Rich Webb

Also note that for the sine and square wave is that the bandwidth of the square wave is much larger than that of the sine wave.

I.e., your 10mhz square wave has infinite bandwidth while the 10mhz sine wave has a bandwidth of 10mhz. (the sine wave is actually the "fundamental" of the square wave and hence a 20mhz "scope" will treat them as the same).

Jon

Reply to
Abstract Dissonance

How can you diagnose a transmission system where you need to check if the transmitted checksum is correct. Or similar problems..?

Reply to
pbdelete

You could grab an development board from Altera, Xilinx etc.. that contains an ethernet interface. Maybe you can find a pre-made ADC module aswell.

On a note some fgpa have 1 Gbps ethernet builtin..

The other option is a pcb board with the components you want. Althought that would be complicated.

You could select the cheapeast memory per byte. Then use them in parallell to compensate for any speed compromise. Unless you simple download it all to computer. Ethernet could be convinient for this.

They most likely have an schmitt trigger at input. Possible some level converter.

Reply to
pbdelete

Typically these do not have awfully deep buffers (in fact, in terms of modern PC memory they're positively puny) but they do have very good and configurable triggering setups for many common uses.

When I need a very deep storage scope (megasamples to gigasamples) I end up using a PC and a data acquisition card (which pretty much is your postulated project!)

The digital storage scopes that come closest to the depth and breadth that I use are the high-end LeCroy's, but man are they expensive! LeCroy's cheaper digital scopes also tend to match analog scope capabilities for showing jitter noise etc. like I'm used to on analog scopes. My feeling as a ex-nuclear physicist is that LeCroy's long experience in nuclear instrumentation shines through in terms of how I think of data acquisition.

Tim.

Reply to
Tim Shoppa

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.