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
----------------------------------------------------------------------------------------------------
Today 21 Nov 2014, my Instructable crossed 100000 Views!
At this Milestone I am happy to share all the source files (C, .Net & Python) at:
https://github.com/ajoyraman/USB_Matchbox_Scope
-----------------------------------------------------------------------------------------------------
I wish to acknowledge the inputs from the following designs which have led to this optimized solution:
DPScope SE - the simplest real oscilloscope/logic analyzer on the planet, by womai, https://www.instructables.com/id/DPScope-SE-the-si...
DPScope - Build Your Own USB/PC-Based Oscilloscope,by womai
https://www.instructables.com/id/DPScope-Build-You...
LCS-1M - A Full-Featured, Low-Cost Hobby Oscilloscope,by womai
https://www.instructables.com/id/LCS-1M-A-Full-Fea...
PC SOUND-CARD SCOPE INTERFACE FACILITATES DC RESTORATION, by me
https://www.instructables.com/id/PC-SOUND-CARD-SCO...
Universal Analog Hardware Testbench, by me
https://www.instructables.com/id/Universal-Analog-...
Analog Experiments Anywhere,by me
https://www.instructables.com/id/Analog-Experiment...
Two-Channel PC Based Oscilloscope USB, by Gaurav Chaudhary
http://www.circuitvalley.com/2011/07/two-channel-...
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.
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
In order to economize on the cost of an enclosure while still providing an aesthetic unit the Aj_Scope2 is enclosed in a large size cardboard matchbox enclosure.
The USB connection to the PC is on one end while the Audio-Jack for the signals to be monitored is on the other.
A ‘Busy’ LED is provided on one corner at the top and a ‘Reset’ switch is provided diagonally opposite.
The ‘Reset’ switch provides a restart of the micro-controller is the worst-case of hang-up. This typically occurs when the operator selects a trigger threshold which is out of limits with respect to the waveform being observed. If the Aj_Scope2 is operated correctly this switch is seldom used.
Figure 15, Shows the USB Interface.
The FDTI FT232R forms a single chip minimum component count interface between the PC USB port and the micro-controller serial-link Rx-Data and Tx-Data pins. As all the circuitry in self contained only one capacitor C8 needs to be added for the 3.3V generation.
Power to the rest of the circuitry is fed from the USB connector.
On connection to the PC USB port , the device is enumerated as a Virtual Com Port (VCP) and the corresponding drivers are loaded by the OS. As the Aj_Scope2 draws approximately 150mA the device has been programmed to indicate a 200mA device.
Figure 16, Shows the Analog Input Interface for Ch1 (this is duplicated for Ch2)
An input potential divider with a ratio 4:1 is formed by resistors R2: (R3+R7+R8+R9), 820k: 205k. The input impedance of this divider is therefore 1.025 Meg Ohm. Capacitors C9 and C10 are added so as to compensate for any input capacitance of the MCP6S22.
OC1 a PWM output of the micro-controller is filtered in two stages by R9/C15 and R8/C14 and produces a DC offset voltage at the junction of R7/R8 based on the duty cycle of the PWM. This offset voltage is initialized to produce a fixed VDD/2 voltage at the output of the MCP6S22 which is then changed by the Ch1 offset voltage slider around this value. The PWM voltage is suitably adjusted for different gain settings.
The MCP6S22 is connected to the micro-controller through an SPI interface in order to setup the gain values 1/2/5.
VOUT at Pin 1 of the MCP6S22 is fed as an analog input to the microcontroller within a working range 0-VDD. This output is potential divided by 2 using R1/R4 and fed as an input to the internal comparator CMP3 of the microcontroller. This voltage is used for the trigger function.
Figure 16a, Shows the Processor Circuit
The dsPic30F2020 is powered from the USB bus.
A reset switch is provided at the MCLR pin.
A 16MHz crystal is connected across OSC1/OSC2 and sets up the processor clock.
RE0 to RE3 form the SPI interface to the two PGAs.
OC1 and OC2 for the PWM signals setting the offset voltages for Ch1 and Ch2. U1ARX and U1ATX are connected to the USB to Serial converter FT232R.
A Vref of 3.3V is connected to the analog inputs AN2/AN3 and is used to compensate for ADC scale-factor change with variation in VDD.
Finally the PGA outputs are connected to AN0/AN1 and CMP3A/CMP3B.
Under software control the microcontroller A/D converts the Ch1/Ch2 inputs at fixed intervals and stores them in internal memory before transferring them to the host PC.
When not in auto mode the start of the conversion sequence is determined by comparing an internally generated trigger reference voltage with the voltages at CMP3A/CMP3B.
LED D1 flashes during the initialization and acquisition process indicating that the processor is busy. No commands are initiated during this phase.
Figure 17 shows the overall circuit.
The USB Oscilloscope is a highly optimized design and uses only five Integrated circuits to achieve the total functionality.
U4 the dsPic30F2020 is the micro-controller
U3 & U5 are the Programmable gain amplifiers MCP6S22
U2 is the USB to serial converter FT232R
and U1 is a 3.3 V , LM1117 regulator used as a voltage reference
42 other components make up the connectors , switch and passive components.
The overall cost of the BOM is 940 Indian Rupees or an equivalent of $ 15.
Integrated Circuits
The Integrated Circuits were sourced from element14 as per the following details
Manufacturer: FTDI
Order Code: 1146032
Manufacturer Part No: FT232RL
FTDI - FT232RL - IC, USB TO UART, SMD, 28SSOP
Manufacturer: MICROCHIP
Order Code: 1439475
Manufacturer Part No: MCP6S22-I/SN
MICROCHIP - MCP6S22-I/SN - PGA, 2CH, 12MHZ, SPI, SMD, SOIC8
Manufacturer: MICROCHIP
Order Code: 1297281
Manufacturer Part No: DSPIC30F2020-30I/SP
MICROCHIP- 16BIT DSP12K FLASH, 512B RAM, DIP28
Manufacturer: TEXAS INSTRUMENTS
Order Code: 2148396
Manufacturer Part No: LM1117MPX-3.3/NOPB.
TEXAS INSTRUMENTS - LM1117MPX-3.3/NOPB. - VOLTAGE REGULATOR IC
------------------------------------------------------------------------------------------------------------------------------------------
Warning & Disclaimer:
All content provided here is for informational purposes only. I make no representations as to the accuracy or completeness of any information. I will not be liable for any errors or omissions in this information. I will not be liable for any losses, injuries, or damages from the display or use of this information including software.