DIY USB-Oscilloscope in a matchbox




I present a “BEST OF CLASS”, “Full-Featured”  DIY-USB OSCILLOSCOPE which is  “Truly DIY”.

My aim is to provide a cheap  Digital-Storage-Oscilloscope for Students,  Budding Engineers and the Hobbyist.

This USB-Oscilloscope could be part of the laboratory equipment in educational establishments.

Build this DIY-Oscilloscope for just $15

I wish to acknowledge the inputs from the following designs which have led to this optimized solution:
DIY USB-Oscilloscope in a matchbox

DPScope SE – the simplest real oscilloscope/logic analyzer on the planet, by womai, http://www.instructables.com/id/DPScope-SE-the-simplest-real-oscilloscopelogic-/

DPScope – Build Your Own USB/PC-Based Oscilloscope,by womai
http://www.instructables.com/id/DPScope-Build-Your-Own-USBPC-Based-Oscilloscope/

LCS-1M – A Full-Featured, Low-Cost Hobby Oscilloscope,by womai
http://www.instructables.com/id/LCS-1M-A-Full-Featured-Low-Cost-Hobby-Oscillosc/

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

Universal Analog Hardware Testbench, by me
http://www.instructables.com/id/Universal-Analog-Hardware-Testbench/

Analog Experiments Anywhere,by me
http://www.instructables.com/id/Analog-Experiments-Anywhere/

Two-Channel PC Based Oscilloscope USB, by Gaurav Chaudhary
http://www.circuitvalley.com/2011/07/two-channel-pcbased-oscilloscope-usb.html

Responding to comments and suggestions from many members :
I am sharing the micro-controller fuse .Hex file for the dsPIC30F2020.
The Host PC software has been written in both ‘Visual Basic.Net’ and open source ‘Python’ providing a cross-platform GUI based solution for both  Windows and Linux platforms.

Step 1: Specifications

Input

No of Channels Two
Analog bandwidth (Large Signal), 0.30/0.30/0.70 MHz ,For Gain 1/2/5
Analog bandwidth (Small Signal), 12/6/7 MHz ,For Gain 1/2/5
Input impedance 1 Meg Ohm
Input connection  3 mm Audio Jack
Vertical Scale 
+12.5V to -12.5V , Gain 1
+6.25V to – 6.25V, Gain 2
+2.50V to -2.50V,  Gain 5
Offset
 -12.5V to +7.50V ,  Gain 1
-6.25V to +13.75V, Gain 2
-2.50V to +17.50V,  Gain 5

Sampling Rate 

1 Mbps to 20  Mbps ,1 uses/sample to 0.05usec/sample ,ETS  Mode (repetitive signals)
10bps to 500 kbps, 100ms/sample to 2uses/sample , Normal Mode
READ  CambridgeIC gets design win Start-up

Trigger

Ch1 / Ch2 / Auto

Trigger Polarity

Rising / Falling edge

Trigger Range

+12.5V to -12.5V, Gain 1
+6.25V to – 6.25V, Gain 2
+2.50V to -2.50V,  Gain 5

Display Modes

Ch1 + Ch2  vs. time 200 Samples each
Ch1 vs. time 200 Samples
Ch2 vs. time 200 Samples
XY Ch1 + Ch2 vs. time 200 Samples each
DFT Ch1 400 Samples
DFT Ch2  400 Samples

Capture Modes 

Single / Repeat / Store

Save Modes

Data to CSV Fig to multiple formats

PC Software

VB.Net 2.0  / Python 2.6/2.7 Virtual Com Port 115200 bps

Power Supply

USB +5V , 150 mA

Step 2: Block Schematic and Function Description

Figure 1 shows the simplified block schematic of the system.

For ease of portability the unit is powered and controlled from the USB port of a PC.

The configuration is optimized so that only five integrated circuits all operating on a single +5V supply are required to provide the full functionality of this Digital Storage Oscilloscope.

The FT232R from FDTI is a USB to serial UART interface with advanced features providing:

• A single chip USB to asynchronous serial data transfer interface.
• With the entire USB protocol handled on the chip.
• A fully integrated 1024 bit EEPROM storing device descriptors and CBUS I/O configuration.
• With fully integrated USB termination resistors.
• A fully integrated clock generation with no external crystal required
• Output selection enabling glue-less interface to external MCU or FPGA.
• And data transfer rates from 300 baud to 3 Mega baud

This chip provides a minimum component count USB-Serial interface and is used to communicate with the host PC for enumeration as a USB to UART device setting up the Aj_Scope2 as a 200mA device and acts as the USB communication interface.

READ  Avnet Releases UltraZed-EV Starter Kit

The MCP6S22 devices are digitally controlled Programmable Gain Amplifiers (PGA) with high bandwidth and high input impedance controlled through a Serial-Peripheral-Interface (SPI). These devices provide the input interface between the dsPIC18F14K50 and dsPIC30F2020 and the external analog signals being monitored.

The dsPIC30F2020 micro-controller implements the main Oscilloscope Functions.

• Analog to Digital conversion of the CH1 and CH2 signal conditioned inputs at the required sampling rates
• Trigger interrupt handling
• Responding to serial commands from PC and sending back the acquired data.
• A  Busy signal is  also generated

The dsPIC30F2020 micro-controller is ideally suited to this task as it permits simultaneous 2-channel A/D conversion at rates up to 1Msps, has internal comparators which can handle the trigger functionality, provide PWM outputs which are used to set the input offset voltages and a SPI interface for controlling the PGAs.

A LM1117 3.3V regulator provides a Voltage reference which is used to compensate for the gain changes with varying USB +5V.

Step 3: Software on the PC Host

Both Microsoft Windows and Linux based GUI software have been developed to interface with the Aj_Scope2 via the USB port of a PC.

Visual Basic .Net Microsoft Windows Application Code

A Visual Basic .Net 2.0 based GUI program is used to control the functions of the Aj_Scope2.

The Aj_Scope.exe along with associated ZedGraph.dll and FTDI USB driver files have been tested for compatibility with Windows XP and Windows 7 with .Net 2.0.

* The FDTI VCP drivers can be downloaded from www.ftdichip.com/‎

Open Source Python Cross-Platform Application Code

Alternatively a Python based GUI program can be used to control the functions of the Aj_Scope2.

READ  Site enables detailed component comparisons

The  Aj_Scope.pyc python executable bit code provides a cross-platform application which has been tested using Python 2.7 on Windows XP and Windows 7 and on Debian 6.0 (“squeeze”)  and Debian 7.0 (“wheezy”) using Python 2.6 and Python 2.7 respectively.

The Python installation requires the following packages:
Tkinter, ttk, serial, glob, math, time, csv, numpy and matplotlib

*On Linux systems appropriate ‘chmod’ commands need to be executed as root for giving users permission to access the VCP port which is typically /dev/ttyUSB0

 

For more detail: DIY USB-Oscilloscope in a matchbox




Current Project / Post can also be found using:

  • diy usb oscilloscope
  • diy usb scope
  • make usb oscilloscope
  • oscilloscope in a matchbox

Leave a Comment

*
= 3 + 2

Read previous post:
Dremel’s New 3D Printer

EASY SETUP Start building in minutes! With easy to use software and a pre-installed extruder, setup is as simple as...

Close
Scroll to top