Oscilloscope Mk 1 Designs
Sunday, 07 September 2008 15:04

Following the interest garnered by the article I posted to this site about my USB oscilloscope design, I have decided to release the designs under an open-source Creative Commons licence.

Creative Commons License

Please note: To do this you are going to need to be reasonably competent in electronics, and capable of diagnosing the device to ensure everything's 'OK' before plugging it into your prized computer with all your precious data on. I accept no liability and offer no guarantees!

The downloads for this project can be found at the bottom of the page. 


Schematics and PCB

The electronics for this were designed using CadSoft's EAGLE software package, and updated using version 5. You can download the freeware version to view the files and alter the circuit layout, however because it is multi-sheet the schematic will need a paid version to be edited.

Manufacture

There are many different board houses who now offer relatively low-cost one-off or prototype PCB production (see CadSoft's site for those that will accept EAGLE files, or Gerber plots can be created from within EAGLE for those that don't). Essentially you need to find one that can cope with a track/gap width accuracy of 0.2mm (8 thousandths of an inch) or better, to cope with the surface mount devices in the design.

When it comes to populating the board those fine-pitched surface mount components will come back to bite you! Many board houses also provide a prototype assembly service which may be worth considering. In the UK a £50 setup charge is typically levied so getting them to mount the worst 7 ICs is likely to cost you £60-£70, but may well be worth putting up with.

The alternative is to solder them yourself, which is possible and is how I've tended to do it. Both times I have been fortunate enough to be able to borrow a binocular microscope, but at the least you will need a good pair of magnifiers. Then arm yourself with some solder paste and the finest soldering iron bit that you can buy. Lay down a line of solder paste around the edge of the IC footprint (you don't need to worry about it being across the pads). Place the IC down and line it up (use a pair of tweezers, or a screwdriver with a blob of "blu-tack" on the end is great for square packages) then heat two opposite corner pins to fix the chip in place. Now go around the chip carefully heating each pin in turn. You will find that as you heat the pin the little spheres of solder in the paste are drawn up towards the pin, leaving very little solder behind after you've done all the pins, and what is left can easily be brushed out of the way.

HINT: I have found that the low-pass anti-aliasing filter is not really useful in the context of an oscilloscope design. You would therefore be advised not to fit R8, R11, C9, C26, C27, L2, L3, L4 and to bridge solder-jumper SJ1 from pad 3 to 2. To compensate for the loss of attenuation from the filter change R6 to a 1K precision resistor.

Set the potentiometer R13 to somewhere in the middle of its range (exactly where doesn't matter at this point). Once you've completed the setup and plugged it into the software you will want to adjust R13 to adjust the voltage offset.

PIC Programming

The design includes a PIC microcontroller (16F690) which plays a simple supervisory role, loading in settings sent down from the computer over the USB and clocking them into the control registers on the CPLD. The header JP2 on the PCB is a standard layout ICSP connector, which is used to program the PIC from either Microchip's free MPLAB software, Hi-Tech's HI-TIDE or one of the PIC programs from this site in conjunction with an appropriate programmer.

CPLD Programming

The majority of the work in the oscilloscope is done by a Xilinx programmable logic IC (a XCR3128XL CoolRunner 2 CPLD). This was done using Xilinx's free WebPack version of their ISE software (I used version 7) using a combination of schematic entry and some VHDL code.

The CPLD is programmed using a JTAG header (JP1) with Xilinx's standard JTAG pin-out. If you have a PC, the patience to download the software (it's several gigabytes!) and a programmer (Xilinx has a simple parallel port design on its web site somewhere) then this is probably the most reliable way to program the chip.

USB Controller Configuration

The final task with the hardware is to configure the USB controller IC. The good news is that no special programmer is needed and the software is free. The bad news for some is that a copy of Windows is needed (to investigate other techniques see FTDI's web site).

First install the Windows drivers from here: http://www.ftdichip.com/Drivers/D2XX.htm (you'll need to do this to run the Oscilloscope anyway (if you're planning to use it on Windows!) then install FTDI's MProg software from here: http://www.ftdichip.com/Resources/Utilities/MProg3.0_Setup.exe

Finally plug the oscilloscope into a USB port (you may want to do some other tests on it before doing this and blowing up your computer - don't worry that really shouldn't happen) then load the config file (see "Oscilloscope FT245R.ept.zip" at the bottom of the page) into the MProg program and click the lightning bolt icon to 'program all existing devices' (Note: You may want to ensure you don't have any other devices plugged in which may be using FTDI's USB controllers!).

Windows should then go through the 'found new hardware' malarky announcing that its found a 'USB Oscilloscope'. Congratulations, you're almost there!!

Software


If you're using a different computer to run the scope or you didn't do so in the step above, then you need to install the appropriate D2XX drivers from FTDI's web site http://www.ftdichip.com/Drivers/D2XX.htm

Finally install the software (downloads below) and run it. Click the little circular arrows button to discover all connected scopes - and enjoy!

Finally

If you follow this through and succeed then congratulations, and please let me know including any feedback you have on these instructions. If you make any alterations to the design please bear in mind the conditions of the license, and I would be grateful if you could supply either the new designs or a link to them so that I can offer them here.

Attachments:
Download this file (Oscilloscope FT245R.ept.zip)Oscilloscope FT245R.ept.zip[FT245R USB Controller config file (for MProg)]0 Kb15/04/10 18:27
Download this file (Oscilloscope Logic.zip)Oscilloscope Logic.zip[Pre-compiled CPLD Logic Files (JED/XSVF)]10 Kb14/03/09 22:22
Download this file (Oscilloscope_BOM_RevB.xls)Oscilloscope_BOM_RevB.xls[Bill of materials (Excel) - UK Suppliers]75 Kb14/03/09 22:05
Download this file (Osc_EAGLE_files.zip)Osc_EAGLE_files.zip[Schematics and Board Layout (EAGLE)]582 Kb14/03/09 22:05
Download this file (Osc_PIC_Firmware.hex.zip)Osc_PIC_Firmware.hex.zip[Pre-compiled HEX file (for PIC)]0 Kb14/03/09 22:07
Download this file (Osc_PIC_source.zip)Osc_PIC_source.zip[PIC Firmware Source Files]2 Kb14/03/09 22:07
Download this file (Osc_Prog_Logic.pdf)Osc_Prog_Logic.pdf[Logic schematics & design (PDF)]143 Kb14/03/09 22:13
Download this file (Osc_RB_Source.zip)Osc_RB_Source.zip[Software source (REALbasic)]322 Kb15/04/10 20:45
Download this file (Osc_Software_MacIntel.zip)Osc_Software_MacIntel.zip[Oscilloscope Software (Mac Intel)]1443 Kb14/03/09 22:17