DPScope SE - the simplest real oscilloscope/logic analyzer on the planet by womai
Contest WinnerFeatured
se_front.jpg
se_inside.jpg
dpscope_se_software.png
dpscope_se_fft_display.png
DPScope SE - logic analyzer.png
dpscope_se_datalogger_mode.png
dpscope_se_dmm_display.png
dpscope_se_measurements.png
The DPScope SE is the result of a challenge I set for myself – to build a practically usable oscilloscope with a minimum amount of components and for minimum cost. The practical benefit is of course that this is an instrument that I hope will be interesting to many teachers, students and hobbyists looking for an affordable, simple tool for their electronics work.
There were a few basic requirements for whatever circuit I came up to justify the “practically usable” label: There are quite a few simple “sort of an oscilloscope” type circuits out on the web, but all I know fall short in one or more respects:

• Only one input channel  – very often one must display one signal in relation to another (e.g. clock and data, or input vs. output) or trigger on a signal different from the one to be displayed, and this needs at least two channels.
• No reasonable protection against overvoltage at the input.
• Very limited range of input voltages (e.g. just 0…5V) and no adjustable input amplification or attenuation.
• Only usable for very slow signals because of limited sample rate (a few kSa/sc) and/or low bandwidth (a few kHz).
• Non-standard input impedance – standard scope probes need 1 MOhm. Input stage not frequency compensated (limits bandwidth to a few kHz at best).
• Use of exotic, obsolete or unnecessarily expensive components.
• Unnecessarily complex circuit especially given the limited performance.

With the DPScope SE I tried to address all these issues. Of course the end result can never compete with a professional Tektronix or Agilent scope costing hundred times more, but it is still good for a large number of applications.
To minimize cost some preliminary considerations set the general direction:

• Try to integrate as much of the scope hardware into a single chip.
• The instrument should use a PC for control and display – saves the cost of a dedicated LCD display (while providing unmatched resolution and processing power) and front panel control knobs and buttons.
• Connection should be through USB (fast and today’s standard – legacy serial port connection require USB converters which again adds cost since most new PCs don’t even have RS-232 ports anymore).
• Power to be provided through USB connection – saves the cost of a wall-wart power supply.
• Be very careful about adding components and be diligent looking for low-cost, easily available components.
• Don’t use hard-to-solder, fine pitch components so the scope can be distributed as a self-assembly kit anybody can build.

In the end I was able to squeeze almost everything onto a single microcontroller (a Microchip PIC18F14K50) – acquisition control, capture memory, USB interface, digital-to-analog converters (ADC), trigger circuitry and trigger threshold generation. The only major block outside is the analog frontend – and even this is just one quad op-amp chip and a number of resistors and capacitors.

If you have any questions or feedback, do not hesitate to contact us:

Email: support@dpscope.com
Webpage: http://www.dpscope.com
 
Remove these adsRemove these ads by Signing Up

Step 1: Circuit Overview

se_circuit_overview.png
The picture on this page shows the complete oscilloscope schematic. We will dive into each section in detail later, but first let’s get a broad overview.

Don't worry if the schematic seems too small and does not show any details: Click on the "i" in the top left corner to get to a page where you can download the full-sized image.

The signals to be displayed enter on the left side. There are two input channels, their design is identical. First the signals get attenuated to make sure they do not exceed the range of the op-amp or the ADCs (0…5V). The attenuator has very high impedance and also acts as protection against excessive voltage at the inputs, together with the clamping diodes.

A low impedance divider provides some fixed offset to shift the input signal up, that way positive as well as negative voltages can be measured.

The signal then continues to the amplifier stage, consisting of two op-amps (both on the same physical op-amp chip). The first one acts as a simple unity gain buffer, the second stage provides 10x amplification.

Finally the signal enters the microcontroller where it gets digitized. The scope can change its voltage resolution by selecting which version of the signal to use – the one from the unit-gain buffer (for large input signals) or the 10x amplified version (for small signals).

The microcontroller captures the signal – the acquisition parameters (sample speed, voltage scaling, trigger setup come from the controlling PC) and sends the data back to the PC for display.

There is also a logic analyzer port – four digital inputs into the microcontroller.

Finally, the USB interface transmits data between microcontroller and PC and also provides power to the whole circuit.
rcottle2 says: Apr 28, 2013. 7:56 AM
very well thought out design which saved me endless hours doing it myself half as well

many thanks Rick
dieferman says: Dec 16, 2012. 1:06 PM
Really Nice Project !!!!
Thanks For Sharing !!!!
.... I'll Be Buying Your Kit Soon !!!!
idayham says: Sep 22, 2012. 7:11 PM
thanksssssssssssssss
iman123 says: Jul 31, 2012. 5:24 PM
Womai, can you provide more info on the logic analyzer portion of the project. I'd like to know about the triggering aspect in particular. It would be nice to be able to trigger on a particular hex code, for instance. (I2C or SPI)
womai (author) says: Aug 1, 2012. 12:49 AM
Triggering is fairly basic. I use the "interrupt on change" feature of the PIC. I.e. you get an interrupt whenever the state of a particular pin changes and then have to check whether the state is now "low" or "high". That way the scope can trigger in either a rising or a falling edge. The advantage is very fast, stable reaction time since the interrupt gets generated by dedicated logic, not in a software polling loop.

I have not implemented triggering on a full pattern. You'd probably want to allow trigger masks that comprise two subsequent samples, and mask them accordingly. E.g. masks X01X and X11X (where X means "don't care") would tell the scope to trigger on "rising edge on channel 2 and logic high on channel 3". Or masks XXXX and 0011 would mean to trigger on the vector "channels 1 and 2 are low, channels 3 and 4 are high". I had been playing with such a scheme, but even with clever logic operations I got nowhere close to 1 MSa/sec, that's why I abandoned the scheme. This is a place where I'd go for an implementation in hardwired logic (e.g. 74xx gates or a CPLD/FPGA) instead.
womai (author) says: Aug 1, 2012. 6:07 AM
If you want to trigger on the start bit of an I2C transmission, here is a simple circuit you can use:

http://www.i2cchip.com/monitoring_i2c_bus.html

The output then acts as the trigger for the scope.
ooger says: May 6, 2012. 1:42 PM
Is the software to run the scope made with LabVIEW?
womai (author) says: May 7, 2012. 10:20 PM
No, it's written in Visual Basic (VB) 6 Professional.
frugalguy says: May 7, 2012. 8:00 PM
Very nice. A couple of typos (I think) in the Input Stage description:

(C11 + C_par) / C19 = R1 / R3 should read (C11 + C_par) / C12 = R1 / R3

R1 is rated to a static load of at least 100V or 200V (depending on specific model), so this gives good headroom compared to the specified input signal range (25V peak). I think that should say D1.
womai (author) says: May 7, 2012. 10:16 PM
Thanks for pointing out the mistake in the formula.

As for the second one, it is indeed the resistor R1 that is the limiting factor, since it gets 90% of the applied input voltage, while D1 and D2 only see 1/10th, so their voltage rating (also > 100V) is largely irrelevant.
ajoyraman says: May 7, 2012. 12:03 AM
Excellent Piece of Work & a very clear Instructable , My Compliments !

I am currently using a Sound Card oscilloscope with a custom interface:

http://www.instructables.com/id/PC-SOUND-CARD-SCOPE-INTERFACE-FACILITATES-DC-RESTO/

The Sound card samples at 49KSa/sec and the PC displays wave-forms up to 4Khz .

I have a fundamental question:

You state that "The maximum achievable sample rate is just above 50 kSa/sec. (For finer resolutions the scope uses equivalent time sampling, up to 2 MSa/sec equivalent sample rate)."

Can you explain how you are able to display 20Khz and 39Khz wave-forms ?

Would Love to hear from you and possibly go in for your  DPScope SE kit

Best  Wishes,

Ajoy Raman
womai (author) says: May 7, 2012. 1:24 AM
As long as the signal you want to display is repetitive with respect to some trigger (can be the signal itself, i.e. a periodic wave), you can get an "equivalent time" picture put together from several (or many) partial acquisitions. E.g. just taking one sample per trigger, each time with a slightly larger delay after the trigger. I describe this in more detail in the DPScope SE technical description on my webpage (http://www.dpscope.com --> DPScope SE --> Downloads), or read about it in the Tektronix app note "XYZs of Oscilloscopes" on the same page. The increment can be much smaller than the fastest real-time (single-shot) sample rate. For the DPScope SE the smallest such increment is 0.5us, for an equivalent time sample rate of 2 MSa/sec. Thus the ability to show a >20 kHz signal. Without interpolation you need about 8-10x oversampling for useful display, so 2 MSa/sec means ~250 kHz usable analog bandwidth.
ajoyraman says: May 7, 2012. 7:04 AM
Thank You for the Lucid Reply and the Tek application brief !

Best Wishes,

Ajoy Raman
schmitta says: May 7, 2012. 6:13 AM
Very nice and very cool. I was floored when I saw it was a kit. May get one just for fun.
gjken says: May 7, 2012. 1:11 AM
This is a great project. I've been considering the purchase of a PC scope for some time but the prices always seemto high to justify for hobby use. This is a winner so I placed my order for the kit just now!
Treknology says: May 6, 2012. 8:51 AM
Two challenges that I propose:

Make a quad-scan device with higher bandwidth (100MHz)
Seeing as the whole thing is powered from one USB port, I'm waiting for an entire laptop that can be powered on 5V 0.5A.

:)
womai (author) says: May 6, 2012. 12:05 PM
What's your budget? :-) 100 MHz / 4 channels is certainly doable from a technical point of view (although it may need a bit more than 500mA), but the cost would exceed the prize of a good off-the-shelf instruments like e.g. a Rigol 1052E which you can find for under $400 nowadays... This is why I concentrate on building scopes for the super-low budget minded, where there is not a whole lot of choice.
Treknology says: May 6, 2012. 11:08 PM
I was being facetious. When I look through the other "Oscilloscope" 'ibles, yours is by far one of the easiest, safest, and fairly quickly built as well.
womai (author) says: May 6, 2012. 11:26 PM
I took it that way but probably came across too serious! And one day I'll build a 10 GHz version with all through-hole part :-)
juliadee says: May 6, 2012. 5:50 PM
Nicely done. But despite your arguments about it being educational hardware-wise, I'd have to agree with farldarm that without source code it is more of an advertisement than an instructable.
Azayles says: May 6, 2012. 2:19 PM
This is brilliant, Wolfgang!
I don't know if you remember, but I bought one of the previous versions from you just over two years ago now, and it continues to serve me VERY well!
It's up there with my multimeter and my component analyser as one of THE most used tools on my work bench.
I wonder how small you could make this with SMT parts? Now THERE'S a challenge :D Matchbox DSO anybody? :P
womai (author) says: May 6, 2012. 7:38 AM
Sure, SMD components would allow for a VERY compact design (go for 0201 components if you want :-) But I guess many hobbyists would be scared away by that... this is why I deliberately kept everything large-pitch through-hole.

You could place components on both sides of the board to make it even smaller. The limiting factor would likely be the BNC and USB connectors.
Azayles says: May 6, 2012. 3:10 PM
Indeed, it would be crazy difficult with SMTs, tried that myself before! These people who use skillets and hotplates for reflow work make it look so easy :( (I'm pointing at you, Ladyada! :P)
I was just looking at the support forums, too. There's some intriguing threads there, like isolating the scope from the computer using opto isolators. may have to try that one.
wa7jos says: May 6, 2012. 9:07 AM
Don't let SMD parts scare you away. It's the way the world is going, and many parts are only available in those packages, so if the DIY'er wants to stay in business, we need to learn to adapt.
I taught a class to our ham radio club last year demonstrating that it isn't that hard to work with SMD. You don't need all that reflow apparatus unless you are doing production quantities. I used to design VERY large and complex PCB's and my prototypes were built by hand using nothing more than a soldering iron.
Here are the essential items to do SMD by hand:
A good temperature controlled soldering station with a TINY tip. I prefer the Metcal, but they're pricey, unless you can find a used one, which I did for $80.
Some form of magnification. You can get by with a head mounted visor, or work your way up to a bench mounted stereo microscope.
small tools including a couple of different shapes of tweezers for parts placement.
VERY small solder. If you look, you can find small quantities on eBay and elsewhere. You need something smaller than 0.015".
Solder wick - for fixing the boo-boos. Sometimes it is easier to lay down too much solder and then take some back. Solder wick and good visibility allow you to do that.
And the final item that is ESSENTIAL is a flux pen. Apply flux liberally to the pads immediately before placing the part with tweezers. The flux is a bit sticky and keeps the parts from sliding away, but it is amazing what a difference it makes to solder flow. You can tin the soldering iron tip and touch it to the component lead and pad, and it flows instantly.
I've used parts down to 0201, but for home hobby use, I mostly use 0603. Small enough to keep things compact, but large enough to see what I'm doing!
These techniques will allow you to hand solder ANY SMD device except BGA's.
Azayles says: May 6, 2012. 5:12 PM
One day I'll pick up the SMT reigns and have another go. One day :P
The last time I tried I completely ruined an FTDI chip before I learned of the solder wick trick. That bit looks SO easy. Also drag soldering!
Once I sort my workspace out and maybe upgrade some of my tools, perhaps I'll have another go. Maybe start with some SMT kits from Sparkfun or something.

It's definitely something I want to get into :) particularly as you mention the industry is heading that way anyway, and all the nicest flavoured chips, like that pesky FTDI part, are only available in SMT.
womai (author) says: May 6, 2012. 11:55 AM
Yeah, I'm resonably skilled with SMD myself so I know it is doable (although reworking multi-pin ICs does need a hot-air soldering station and a selection of different size adapters), but from experience I can tell you almost any beginner or intermediate electronics hobbyist shies away from it. Just look at the list of equipment you mention yourself and imagine pushing this to someone who is loath to spend more than $20 on components...
Azayles says: May 6, 2012. 7:16 PM
Indeed, very true! The cost of different tools can mount up, particularly if you already have things like a solder iron, but it's not temperature controlled. Luckily I have things like solder wick and a flux pen. I'd love to get a hot air gun, but haven't been able to find an affordable one.
Oh and to the hobbyists who can work with BGA and QFN chips, my hat goes off to you all!
jsz28 says: Apr 30, 2012. 7:36 PM
Excellent instructable!! now only if someone could make an instructable for an arbitrary waveform generator I'd be golden!
BlueMittens says: May 6, 2012. 12:06 PM
http://www.instructables.com/id/Function-Generator/
womai (author) says: May 6, 2012. 12:51 PM
Just saw that instructable yesterday. Very nice design and very clear explanation. Would be a good addition for anyone with a DPScope.
womai (author) says: May 1, 2012. 12:19 AM
Actually that's a possible follow-up project. The logic analyzer port also feeds out power (5V) and ground and can transmit serial data on the external trigger pin. So I can use it as a simple expansion slot to attach and control a little AWG board - USB communication and power then comes through the scope, thus almost not additional effort on the hardware side except for the AWG itself.
MrMike says: May 6, 2012. 12:45 PM
I built one of these (before the logic analyzer option was added) well over a year ago just to keep in my general trouble shooting box. It works great for its intended purpose and has served me well. Since I generally have my laptop with me, it adds a 'deck of cards' sized box to the load.

A few specific comments:
1) This scope does not replace my Yokogawa dl850, Dewetron or Tek scopes - however these are in the $20k-$50k range
2) One 10X probe for the above mentioned (4-16 channel devices) cost more than this box - e.g. a good clamp-on Amp probe is in the $5k range
3) You can build it in under an hour
4) You can buy 'an oscilloscope on a chip' for about $50, but then have to package it and look at a 1" screen
5) Wolfgang gives you an excellent overview of design and operation of the hardware and provides software to implement the functions on a laptop.

A few general comments:
1) Use 10X probes - they lower the loading on your test circuit (use care on FET's - all probes add gate charge)
2) A component list is provided. Shop it around an see if you can buy all of the parts for <80% of the total. Make / have made the PCB, case, front end chip, micro + 50 small parts.
3) The source code is not provided. I can understand this and consider it as IP, and that is not free.




womai (author) says: May 6, 2012. 12:50 PM
Thanks for the detailed comments! Just to avoid confusion, the DPScope SE is not a DPScope with logic analyzer added. It really is a very different design. In a nutshelld, even easier to build, has less components, lower cost, and adds logic analyzer functionality, but on the other hand the DPScope has quite a bit higher bandwidth (3x) and sample rate (10x).
tundrawolf says: May 6, 2012. 7:28 AM
This is an excellent 'able. is there any way to provide better protection from possible using a probe of the improper attenuation and having a surge result?
womai (author) says: May 6, 2012. 12:01 PM
To avoid any lawsuits the spec says 25V (so nobody can get fried even when things do go wrong). That said, the input is designed to withstand at least 100 Volts (most likely even more), that gives a good amount of safety margin. In any case, if you muck around with anything over 25V (even more above 100-200V) it's mandatory that you know what you are doing, take all necessary safety precautions, and double- & triple-check things before applying power. This instrument is geared towards beginners, who shouldn't work with anything resembling high voltage anyway!

As for additional (optical) isolation between scope and PC, check out the "User Projects" section of the DPScope webboard which has a nice, complete project for that from a user.
hailster says: May 6, 2012. 7:20 AM
The self assembly kit is no longer available, the only one available is fully assembled and tested.
Will the kit be available in the future?
womai (author) says: May 6, 2012. 7:33 AM
Guess you looked at the DPScope (as opposed to the DPScope SE). The DPScope SE kit is definitively available:

http://www.dpscope.com/buy_it_se.html
cpotoso says: Apr 30, 2012. 6:51 PM
Very nice! Compact and well done.
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!