Step 35:

Step 36: Contact

I hope you liked this Instructable. I always like to hear from people - questions, suggestions, constructive criticism, whatever. To contact me, use ...

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.

I am trying to write firmware for my own PIC18 - USB oscilloscope and I was wondering if you had knowledge of any good resources that might help me get started? I have never written firmware/drivers before. My idea is to do something similar to what you have done here, meaning eventually writing a Windows app that controls the operation of the device. Also, if your firmware is available somewhere, if would appreciate if you could point me to it.

I've just assembled one! Took me roughly one hour of work, and after installing the software, plugging it and calibrating as described in the doc, the damn thing just started working no questions asked :)

Vcc=5V like for the rest of the circuitry. The op-amps are rail-to-rail input as well as output (meaning they accept input voltages from 0 to Vcc) and their output can swing to within a few mV of 0V and Vcc. This makes them very simple to use.

Is there a way to make either DPScope or DPScope SE work on Mac or Linux machines? What is different when using the SE in logic analyzer mode? Can you get all of the same functionality with the DPScope with its faster reading?

The DPScope SE has significantly lower specs regarding bandwidth and sample rate compared to the DPScope. The latter lacks the logic analyzer functionality though. A more detailed discussion of the differences is here:

Hi , I am doing my first experiments with electronics and am in the middle of buliding onetesla.com project ... they say to test you are better of with an oscilloscope ... Will this cope have the speed and voltage range required to test my project? Sorry but I ma so new I dont really know how to check this out for myself

I must admit I only did a cursory check of the project, but it being a tesla coil means it works with high voltages. I would NOT recommend a USB based scope to be used with such high voltages as any mistake will risk frying your PC...

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)

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.

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.

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.

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!

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.

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

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.

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.

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.

One day I'll pick up the SMT reigns and have another go. One day :PThe 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.