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.
I wish to acknowledge the inputs from the following designs which have led to this optimized solution:
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
Step 1: Specifications
Analog bandwidth (Small Signal), 12/6/7 MHz ,For Gain 1/2/5
Input impedance 1 Meg Ohm
Input connection 3 mm Audio Jack
+6.25V to – 6.25V, Gain 2
+2.50V to -2.50V, Gain 5
-6.25V to +13.75V, Gain 2
-2.50V to +17.50V, Gain 5
Sampling Rate
10bps to 500 kbps, 100ms/sample to 2uses/sample , Normal Mode
Trigger
Trigger Polarity
Trigger Range
+6.25V to – 6.25V, Gain 2
+2.50V to -2.50V, Gain 5
Display Modes
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
Save Modes
PC Software
Power Supply
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:
• 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.
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.
• 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.
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