PDA

View Full Version : Low-Cost USB Oscilloscope



T.Jackson
- 21st February 2007, 08:43
Hi everyone.

In terms of actual hardware circuitry, I would like to invite you all to share your views on what just exactly would be required in order to produce a respectable USB-based Digital Storage Oscilloscope. My first initial thought is a 18f4550 teamed up with a fast dedicated ADC and 32K of SRAM. Plus, an analog front-end of some description somewhere in the equation. Is there an easier way or some form of hidden magic inside a 18f4550 or similar? Anyone accomplished a project like this?

Desirable criteria:
1. 5 MHz bandwidth.
2. Dual Trace.
3. 400V.
4. All controls adjustable via Windows XP GUI.
5. Low-cost, compact size.

Regards,
Trent Jackson

Luciano
- 21st February 2007, 10:03
Hi,

See this URL:
(Schematics of the first version of Bitscope in PDF files).
http://www.bitscope.com/design/

The used ADC:

TLC5540: 8-Bit High-Speed Analog-to-Digital Converter
Sample Rate (max) 40MSPS

http://focus.ti.com/docs/prod/folders/print/tlc5540.html
http://focus.ti.com/lit/ds/symlink/tlc5540.pdf

Price about 5 USD:
http://www.digikey.com

* * * *

If you need an USB oscilloscope: (USB powered).
http://www.bitscope.com/product/BS50/

Made in AUSTRALIA.

Best regards,

Luciano

mat janssen
- 21st February 2007, 10:13
This (http://www.tiepie.com/uk/product-selection/) firma has also complete units.
I use one of them and I am very satisfied with it.

T.Jackson
- 21st February 2007, 10:45
Hi,

See this URL:
(Schematics of the first version of Bitscope in PDF files).
http://www.bitscope.com/design/

The used ADC:

TLC5540: 8-Bit High-Speed Analog-to-Digital Converter
Sample Rate (max) 40MSPS

http://focus.ti.com/docs/prod/folders/print/tlc5540.html
http://focus.ti.com/lit/ds/symlink/tlc5540.pdf

Price about 5 USD:
http://www.digikey.com

* * * *

If you need an USB oscilloscope: (USB powered).
http://www.bitscope.com/product/BS50/

Made in AUSTRALIA.

Best regards,

Luciano

Bitscope appears excellent. I like everything except for the Windows UI. Too past date. Bitscope, in terms of price is comparable to a good quality brand new 20MHz CRO. Too expensive. TLC5540 has some nice specs. Price seems good too. Thanks for bringing it to my attention. DIY USB scope for under $100 in kit form, can it be done?

Regards,
Trent Jackson

Luciano
- 21st February 2007, 11:03
Hi,

You need an FPGA to build a digital oscilloscope.

The acquired ADC data goes from the ADC to the RAM under the
control of the logic implemented in the FPGA. (The acquired
data is stored into the RAM without the microcontroller).

Best regards,

Luciano

T.Jackson
- 21st February 2007, 11:47
,

You need an FPGA to build a digital oscilloscope.

The acquired ADC data goes from the ADC to the RAM under the
control of the logic implemented in the FPGA. (The acquired
data is stored into the RAM without the microcontroller).

Best regards,

Luciano

Hi,
Thanks for your feedback on this. Do you think it would make a viable alternative in configuring a fast enough PIC to fetch data from the ADC and then place it in RAM. Something running at 48MHz should handle it?

Best regards,
Trent Jackson

Luciano
- 21st February 2007, 12:30
Hi,

You need a microcontroller with an external memory bus.
Even with an external memory bus, the oscilloscope will be
slow or better said just a toy. My assumption here is
that you need an oscilloscope for projects where
microcontrollers are involved. If you need an oscilloscope
for audio signals then go ahead, it will be fast enough.

Try to calculate how fast your oscilloscope could be.

Best regards,

Luciano

T.Jackson
- 21st February 2007, 14:05
Hi,

You need a microcontroller with an external memory bus.
Even with an external memory bus, the oscilloscope will be
slow or better said just a toy. My assumption here is
that you need an oscilloscope for projects where
microcontrollers are involved. If you need an oscilloscope
for audio signals then go ahead, it will be fast enough.

Try to calculate how fast your oscilloscope could be.

Best regards,

Luciano

For the hobby end user, most test gear is a toy. In my opinion even Bitscope falls into this category. It's not uncommon nowadays for service techs to be using 500MHz + DSOs. Of course an extreme overkill for any enthusiast and not something that you would ever really consider unless there was some considerable financial gain to be made from it from either generating new work or speeding up the process of your current service. If you don’t work with 500MHz gear then chances are you don’t need it.

SRAM: 20nS or thereabout
ADC: 40MSP/s

The upper limitation is the RAM. (1 / 20nS) = 50MSP/s

*Anything greater than this is like trying to generate free power. Or, more commonly an amplifier that supposedly puts out 200WRMS when the DC rails are only good for 100W. Like duh, did I just get ripped off or what…

*The million dollar question I guess is this. Without using too much black magic in the software for interlacing and periodical guess work, how many samples of a waveform is considered to be sufficient analysis? Sure with 40MSP/s you could take one sample of a 40MHz sine wave every second. Won’t look like much of a sine wave on the screen though. If you allowed say 20 samples of every cycle then this might suffice. (40MSP/s / 20) = 2 MHz. Undoubtedly there must be the presence of some host software magic some where a long the line. Hmm, is my DSO really 20MHz or is there just a whole heap of black magic in the software making a lot of assumptions?

Best Regards,
Trent Jackson

Luciano
- 21st February 2007, 14:52
Hi,

Bandwidth vs Sample Rate:
http://www.bitscope.com/design/hardware/convertor/?p=bandwidth

* * *

High speed S-RAMs: 12 ns
http://www.cypress.com

Best regards,

Luciano

PJALM
- 25th February 2007, 21:13
Here is a very simple one I found that uses a 18F4550.

http://ostry.w.szu.pl/miniscope.php?lang=en

They also have some more complex models as well but this one includes everything and its free.

malc-c
- 25th February 2007, 22:25
Here is a very simple one I found that uses a 18F4550.

http://ostry.w.szu.pl/miniscope.php?lang=en

They also have some more complex models as well but this one includes everything and its free.

OK downloaded the exe, browsed the files etc... but there is no scematic. It states on the website
Project of digital storage oscilloscope, hardware is just PIC18F4550 and few passive components.

Browsing the site there is an updated miniscope2 which shows a PCB which has a bit more than a few descrete components but the chips look too small to be a 18F4550 (assuming its a 40 pin device)

http://ostry.w.szu.pl/other_foto/oscyloskop2/100_0670.jpg

Do you still have the schematic and can you post it here or provide a link to where it can be downloaded from ?

EDIT - just re-read the bit about the ver2 -Based on AT91SAM7S64 microcontroller. - Doh !

T.Jackson
- 26th February 2007, 03:44
Here is a very simple one I found that uses a 18F4550.

http://ostry.w.szu.pl/miniscope.php?lang=en

They also have some more complex models as well but this one includes everything and its free.

Hi

The sample rate of 25kSPS won't allow for much. Won't even cover the audio spectrum. (25kSPS / 10) = 2.5KHz. For some half-decent performance, at least half a dozen or so chips are required. Analog front-end using an OPAMP, discrete ADC (at least capable of 2MSP/s), SRAM - 32KB, address counter IC, micro controller to shuffle the sampled data to the host - (PC in this case), calibrated time base’s - micro controller won't be fast enough to set sample rate or address the SRAM. Big job to come up with some decent goods. Doubt I’ll bother if I can’t get at least 1MHz of solid bandwidth.

Best Regards,

Trent Jackson

T.Jackson
- 26th February 2007, 06:56
Using a PIC18f4550 @40MHz and an analog front-end - here's my calculated guess at what to expect if things are done right. Internal ADC conversion time: (2 - 3) uS, assuming a source impedance < 200 ohms. 1 / say 2.5uS = 250kSP/S Allow most of the internal RAM for buffering. 2KB? Time taken to fill RAM? At least a few cycles. Knock off say another (2 - 3) uS from the sample rate?. At best, very best - my guess is something like 100kSP/S. Useable bandwidth of about 10KHz without any software magic in the Windows UI.

However, I reckon the author of Bitscope would manage to squeeze about (200 - 300) Khz out of this arrangement...

Here's how I think he does it: (waveform is all there but scattered)

1. Fill RAM with samples (using fastest time base.)
2. Retrieve samples from RAM & send to PC.
3. Buffer samples.
4. Analyze / sort samples (not too sure of the algorithm.)
5. Render and apply anti-aliasing to waveform.

With step 4 it might be as simple as looking for consistencies of samples and ignoring them. But what I do know for sure is that it works because the waveform is actually all there, but it’s scattered. Parts of it might be in the first few hundred samples while the rest of it might be residing in the last few thousand.

Am I kind of on the right path?, anyone care to add?

Best regards,

Trent Jackson

T.Jackson
- 27th February 2007, 12:12
This is real good. This guy has used a PIC 16f675 to make a fully self-contained CRO. For about $5 you can build this thing that simply just plugs into any spare composite video in on your TV. Bandwidth is only a few KHz, but for $5 could you really complain?

Even more notable is that he has also reinvented the game Pong using nothing more than a 16f675!
(*Very scary)

http://members.chello.nl/r.dekker49/uscope/uscope_e.html

Best Regards,

Trent Jackson

mister_e
- 28th February 2007, 00:12
maybe i have some eyes problem... but it use a 12F675 which make it, by far, more impressive...

Amazing what we can do with ONLY 1K of code and a 8 pin PIC...

T.Jackson
- 28th February 2007, 02:13
Right you are. It's uses a 12f675. I think I must be the one with an eye problem. All round very impressive indeed.

Trent Jackson

peu
- 27th March 2007, 15:46
did you guys saw this one: http://www.semifluid.com/?cat=9 ?


Pablo

rosesun
- 30th October 2007, 14:29
Hi can anybody tell me the displaying algorithm of a digital storage oscilloscope?
I am trying to build a oscilloscope using a FPGA. Okay I have stored the samples from ADC output to FPGA SDRAM. Now what techniques or algorithms can I use to display the samples stored in a VGA monitor.
Are there any special techinque which can be used to manipulate the stored sampled data and finally display in VGA monitor...
Please anybody help me

tenaja
- 30th October 2007, 17:03
One of the recent magazines had a 2-part series on this. Don't remember which one off hand, but it was either EPE, Circuit Cellar, or Nuts & Volts.

rosesun
- 1st November 2007, 15:13
I searched all the 3 sites, but couldn't find anything about it dude....
can anyone help me out

srspinho
- 1st November 2007, 16:03
Hi friends,

the PC Scope project was published on Everyday Practical Electronics ( http://www.epemag.com ) on August 2007 and September 2007 ( US$ 5,00 each electronic copy - PDF )

Regards.

Sérgio Pinheiro

mister_e
- 14th December 2007, 22:42
i BOUGHT a PoScope... really nice tool for the price... i miss my USBee DX so far...

T.Jackson
- 15th December 2007, 02:41
i BOUGHT a PoScope... really nice tool for the price... i miss my USBee DX so far...

Mister_e,

When you manage to source out a 500MHz Tektronix digital scope w/ colour LCD screen & PC link -- then become excited :)

Darrel Taylor
- 15th December 2007, 03:29
500Mhz Color DSO ?

A little Overkill for PIC work.

And I get excited when I buy something inexpensive that does exactly what I need.
<br>

T.Jackson
- 15th December 2007, 04:18
500Mhz Color DSO ?

A little Overkill for PIC work.

And I get excited when I buy something inexpensive that does exactly what I need.
<br>

I admit it -- I was spoilt in my last job having a Tektronix DSO. Had colour screen, direct readouts for RMS, PP, cursors and so on ... In fact, it was an overkill for the circuits that it was primarily used on (mostly RF on the 27MHz band) However, I believe it aided in speedy repairs. The old golden rule of thumb with CRO's is; it's better to have bandwidth of 5x that of what you expect to measure. A 500MHz CRO isn't suitable for anywhere near 500MHz work unfortunately.

Darrel Taylor
- 15th December 2007, 04:29
I always get confused with that.

I'd have thought a 500Mhz DSO would have accounted for the oversampling and expressed it as a 2G samples/second.

So that the "bandwidth" is actually 500Mhz.
<br>

T.Jackson
- 15th December 2007, 04:36
Through software interpolation I think you'd be able to measure a repetitive waveform @500MHz, but for a one shot events I fail to see how.

T.Jackson
- 15th December 2007, 04:58
@500MHz with 2G samples / second -- that's only 4 sample points. Without black magic, how in the world could you capture much with that? (might suffice in purely the digital domain, certainly won't capture glitches though)

Darrel Taylor
- 15th December 2007, 05:41
that's only 4 sample points. Without black magic, how in the world could you capture much with that?

I don't really know. But I thought if the "Golden Rule" of 5x would work,
maybe silver was ok too.

And I guess I'm also trying to figure out what it would take to do the original post.

Assuming you want a 5Mhz "Bandwidth". Which way do you mean?
5Mhz bandwidth? Or 5M samples/sec?
<br>

T.Jackson
- 15th December 2007, 06:00
I don't really know. But I thought if the "Golden Rule" of 5x would work,
maybe silver was ok too.

And I guess I'm also trying to figure out what it would take to do the original post.

Assuming you want a 5Mhz "Bandwidth". Which way do you mean?
5Mhz bandwidth? Or 5M samples/sec?
<br>

When I say x5 -- I generally mean that, if you consider 100MHz to be your highest point of measurement, then ideally you'd probably be best of with a 500MHz scope. I think though however, this old saying is more applicable to analogue scopes than anything.

5MHz bandwidth for a DIY scope? -- personally, I'd be chasing 20M samples / second or more.

T.Jackson
- 15th December 2007, 06:59
But without complex software algorithms (that I don't know enough about yet) -- I estimate the usable bandwidth to be about 1MHz @ 20M samples / second.

T.Jackson
- 15th December 2007, 07:31
This statement has a lot to do with it I feel ...

The fundamental AC waveform is the sine wave, a square wave is made up of a multitude of many, many, sine waves. We certainly have a square wave @ 500MHz w/ 2g sample / second.

Question is; how do we extract it?

T.Jackson
- 15th December 2007, 08:35
Qualified engineers like; Melanie & Jerson should have little difficulty in answering this.

T.Jackson
- 15th December 2007, 14:10
Maybe trade secret? :|

Jerson
- 15th December 2007, 14:52
Qualified engineers like; Melanie & Jerson should have little difficulty in answering this.

Trent,

I got into this thread a little too late. However, I do not understand the question you're asking here.
BTW : I have used a Parallax USB based scope in one of my designs and more recently a Velleman scope. Their bandwidth was stated to be 20MHz, but the highest frequency we could reasonably see would be around 100KHz IIRC. Its been a while since I did this, so my information may be of the mark. The 20Msamples/sec happened to be the sample rate. For repetitive signals, it becomes easy to reconstruct the waveform with higher resolution by staggering the sample points wrt the zero crossing of the waveform. However, the low cost PC scopes that I have used did not seem to have this feature and just took snapshots.
This seemed to be the pattern for acquisition
Pre Samples -> Trigger -> Samples -> Ready is signalled -> display is refreshed -> repeat the cycle

T.Jackson
- 15th December 2007, 15:20
Trent,

I got into this thread a little too late. However, I do not understand the question you're asking here. For repetitive signals, it becomes easy to reconstruct the waveform with higher resolution by staggering the sample points wrt the zero crossing of the waveform.


BitScope manages to pull off measuring one shot events @ 20MHz with only 40M samples. See; http://www.bitscope.com/design/

So, I guess this is ultimately my question; how do they do it? How in the world can a complex waveform be captured at 20MHz with only 40M samples?

Bitscope can measure a sinusoidal waveform well & truly beyond its sampling rate. Apparently, the waveform is actually all there as far as the ADC & software is concerned. This leaves me with a lot of question & much confusion.

Jerson
- 15th December 2007, 15:48
BitScope manages to pull off measuring one shot events @ 20MHz with only 40M samples. See; http://www.bitscope.com/design/

So, I guess this is ultimately my question; how do they do it? How in the world can a complex waveform be captured at 20MHz with only 40M samples?

What they are trying to state is the Nyquist criterion; where a frequency can be represented by at least 2 points on the wave. So, 40 mega samples can actually capture a frequency of 20MHz max; with a caveat - the frequencies must be in sync or you will see aliasing. And no matter what, you cannot *fill in the gaps* if you have only 2 samples in one cycle.

I would reckon that the bitscope could capture with reasonable faithfulness an aperiodic wave @40Ms/sec uptil about 40/8 = 5MHz. Obviously, it will be better to have more samples to fill the gaps; thats where the sub-sampling term comes in - this is suitable only for periodic waveforms. The nearest possibility without sub-sampling is B-spline interpolation for single shot data.

Luciano
- 15th December 2007, 16:39
Hi,

See this application note.

Agilent (HP) Application Note 1587

Evaluating Oscilloscope Sample Rates vs.Sampling Fidelity:
How to Make the Most Accurate Digital Measurements
http://cp.literature.agilent.com/litweb/pdf/5989-5732EN.pdf

Best regards,

Luciano

T.Jackson
- 16th December 2007, 03:20
Thanks Jerson & Luciano,

My mind is certainly clearer today than it was yesterday about it. If I do develop a scope, one of my main objectives will definitely be in giving it some no-nonsense specifications.

mister_e
- 16th December 2007, 10:44
Scope bandwith and their and sampling pouet pouet have nothing to do, nothing in common. Not yet, zip zero nada.

I have a 60MHz scope here... 1GS/s sampling! another 40Mz... 2GS/s

just the algorithm behind... not much.

500MHz scope??? WTF are you doing with it? Sure it has nothing usefull for MCus job...even a dual trace 20MHz do the job pretty well.

For RF my ol' COM120B still do the job pretty well.

T.Jackson
- 16th December 2007, 14:10
Pointless doing a project like this, this is what I'd be up against; http://cgi.ebay.com.au/150MS-s-PC-Based-USB-digital-storage-oscilloscope-2150_W0QQitemZ280182266227QQihZ018QQcategoryZ45008 QQcmdZViewItem

Cost about the same amount to DIY a project like this, and the specs wouldn't be a tenth as good.