chipKIT® Development Platform

Inspired by Arduino™


Created Wed, 20 Nov 2013 20:21:32 +0000 by majenko


Wed, 20 Nov 2013 20:21:32 +0000

This week's bit of fun for me is making my own DSO (Digital Storage Oscilloscope).

I started with a PIC32MX695F512L overclocked to 120MHz (cus I'm just a speed whore), to which I attached a 3.2" 320x240 TFT touch screen.

Then I decided to design myself a nice front-end to the ADC, including a fully differential op-amp buffer with selectable 1x / 10x gain, and adjustable offset voltage (MCP4822 DAC). That means I can measure negative voltages and have them scaled and moved up to the positive voltage area for sampling. All good fun ;)

Then I also added 328KB of SPI SRAM to my board as well. No idea why right now, it just seemed a good idea at the time. I'm not actively using it right now, but it might come in handy for a storage buffer at some time in the future. The TFT also has an SD card slot on it, but again I'm not actively using it right now, though it is wired up.

After playing with it for a while I finally decided to put it into a box last night. It's an old reclaimed project box, with a couple of bits of SRBP to form the front and back panels. A couple of BNC connectors and I was good to go. Then I decided that it really needed some rotary encoders, so I added them.

And while all this was going on, which has been on and off for a few weeks now, I have been writing the software for it.

The ADC is managed manually by my own code - not using analogRead() - and is fully timer/interrupt driven at up to 200Ksps, so it can sample up to 100KHz. I'd like to push it faster at some point, but it's fast enough for me right now.

It has two modes of operation - normal scope mode, and spectrum analyzer. AC coupling is available, and is done 100% in software rather than switching in capacitors. I'm doing it by sampling a whole buffer-load of data, calculating the average voltage for the whole waveform, than subtracting that from each point. Works a treat.

It's all menu driven, with the TFT's touch screen giving most of the control interface. The encoders control things like the sample rate (time base) and volts per division.

And of course, here's the pretty pictures: [attachment=2]small_sine.jpg[/attachment] [attachment=1]small_freq.jpg[/attachment] [attachment=0]small_menu.jpg[/attachment]


Wed, 20 Nov 2013 20:30:08 +0000

Plans for the future include adding a second channel (there is software support, just no front end hardware), expanding the amps to give a greater range of amp/attenuate, and maybe even creating a signal source facility too.

I really need to design it as a proper PCB (it's a bundle of wires and proto boards at the moment) so I can get it all fitting right - the amp system alone fills an entire Arduino prototype shield.

And here's a little video of it in action: [url][/url]


Wed, 20 Nov 2013 21:21:08 +0000

Great project!

Will this be a M-T product or will you post the code & schematic at some point?

How many "bucks" (or EU equivalent) do you have invested to date?



Wed, 20 Nov 2013 21:33:38 +0000

It's just a personal project. Yes, I'll post a schematic (when I have one). It's "evolved" and I designed the circuit whilst building the circuit ;)

The most complex bit is the amplifier front-end - each channel is 3 op-amps plus an analog switch and associated passives, and an MCP4822 DAC.

I have no idea how much it has cost me so far. Probably somewhere in the region of about $30, but then some stuff, like the box, I already had. The TFT is a cheap one from eBay, but needed a special one, so is a little more than some - it's got a parallel interface, not SPI, and is driven by the Parallel Master Port for lightning quick screen refreshes. The PIC32 is a free sample from Microchip :twisted: and the rest of the chips I had in my bits box.


Fri, 22 Nov 2013 22:50:18 +0000

I bet you are excited to get your hands on some samples of the future PIC32 for your project. 200 MHz with a DSP enhanced core.

If you haven't seen them yet: [url][/url]


Fri, 22 Nov 2013 23:31:25 +0000

I bet you are excited to get your hands on some samples of the future PIC32 for your project. 200 MHz with a DSP enhanced core. If you haven't seen them yet: [url][/url]

You mean like these 5 I have sat on my desk waiting for some breakout boards to arrive from china...?


Fri, 22 Nov 2013 23:44:55 +0000

Ah, very nice:) I of course will expect to see some videos of an upgraded DSO with one in it, haha.

You must have an in to get samples so soon.


Sat, 11 Jan 2014 23:18:09 +0000


Any update on your DSO project?

What do you expect the BW to be with your over-clocking?

Thanks, James