Aj Scope2 Tech-Manual
Aj Scope2 Tech-Manual
Aj_Scope2
Technical Manual
www.ajoyraman.in
Aj_Scope2 Technical Manual
1. Introduction:
This is a brief manual containing relevant technical data required for understanding
construction and use of the Aj_Scope2 unit.
This unit is designed as a ‘Do-It-Yourself’ (DIY) teaching aid for budding engineers,
electronic enthusiasts and hobbyists.
All content provided in this document is for informational purposes only. The owner of
this document makes no representations as to the accuracy or completeness of any
information. The owner will not be liable for any errors or omissions in this information.
The owner will not be liable for any losses, injuries, or damages from the display or use
of this information including software.
3. 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 Offset
+12.5V to -12.5V +7.50V to -12.50V Gain 1
+6.25V to - 6.25V -6.25V to +13.75V Gain 2
+2.50V to -2.50V -2.50V to +17.50V Gain 5
www.ajoyraman.in Page 1 of 25
Aj_Scope2 Technical Manual
Sampling Rate
1 Mbps to 20 Mbps 1 uses/sample to ETS Mode
0.05usec/sample (repetitive signals)
10bps to 500 kbps 100ms/sample to Normal Mode
2uses/sample
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 / Virtual Com Port
Python 2.6/2.7 115200 bps
Power Supply USB +5V , 150 mA
VDD VDD
+5V
SERIAL I/O
PC USB PORT
D- FT232R dsPIC30F2020
USB-INTERFACE DATA ACQUISITION BUSY LED
D+ ADC COMP ADC COMP
VDD VDD
GND
MCP6S22 MCP6S22
SPI
PGA PGA
CH1 IN
GND
CH2 IN
GND
www.ajoyraman.in Page 2 of 25
Aj_Scope2 Technical Manual
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 four 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:
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 first PIC microcontroller implements the following 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
www.ajoyraman.in Page 3 of 25
Aj_Scope2 Technical Manual
Both Microsoft Windows and Linux based GUI software have been developed to
interface with the Aj_Scope2 via the USB port of a PC.
A Visual Basic .Net 2.0 based GUI program is used to control the functions of the
Aj_Scope2. An Aj_Scope.exe along with associated ZedGraph.dll and FTDI USB driver
files has been tested for compatibility with Windows XP and Windows 7 with .Net 2.0.
Alternatively a Python based GUI program can be used to control the functions of the
Aj_Scope2. An 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.
*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
www.ajoyraman.in Page 4 of 25
Aj_Scope2 Technical Manual
Figure 3, GUI
The GUI based Windows software on the Host PC permits checking for available COM
ports and connecting to the port on which the hardware is connected. Once connected
the hardware unit responds with a ready signal.
Display and trigger modes, sampling rate, channel gains, channel offset trigger offset
and number of samples can be set using the simple controls.
The RUN button initiates the signal capture single, repetitive or over-plotted.
Initially signals can be acquired in auto / single mode after with suitable changes can be
made in the gain and offsets and a trigger level set. Repeat mode can now be used for
continuous display of the signals. Display of Ch1/Ch2 is possible with trigger by either
Ch1 or Ch2.
www.ajoyraman.in Page 5 of 25
Aj_Scope2 Technical Manual
Data can be stored in a .csv file using the SAVE option. Further processing can be
carried out in MS EXCEL.
www.ajoyraman.in Page 6 of 25
Aj_Scope2 Technical Manual
A DFT (discrete furrier transform) can be carried out to show the frequency spectrum of
captured waveforms.
www.ajoyraman.in Page 7 of 25
Aj_Scope2 Technical Manual
www.ajoyraman.in Page 8 of 25
Aj_Scope2 Technical Manual
The cursor is toggled on/off with the right mouse button and the cursor choice toggled
red/blue using the mouse left button. The parameter values are displayed on the top
right-hand corner of the display.
Image zoom, pan and save mode are provided by the Python Tkinter Toolbar.
www.ajoyraman.in Page 9 of 25
Aj_Scope2 Technical Manual
www.ajoyraman.in Page 10 of 25
Aj_Scope2 Technical Manual
6. Aj_Scope2 Unit:
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.
www.ajoyraman.in Page 11 of 25
Aj_Scope2 Technical Manual
7. Circuit Diagrams:
The circuit of the Aj_Scope2 has been optimized for the minimum components
meeting the overall system requirements. The details of each circuit are as follows:
20
TO MICRO-CONTROLLER
VCC
VCC
CON1
U1RX
TO PC
1 16 1
2 USBMINUS TXD
3
4 15 5
USBPLUS RXD
USB-B U1TX
17 14
3V3 OUT CBUS3
C8
AGND
TEST
GND
GND
0.1uF GND
26
25
21
18
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.
www.ajoyraman.in Page 12 of 25
Aj_Scope2 Technical Manual
VCC
8
U3
VCC
C9 27pF AN0
2 1
CH0 VOUT
R1
3 7 1K
CH1 SCK SCLK
CH1 IN R2 6
R3 SDI SDATA
820K
100K 5 R4 CMP3
GND
CS CS1 1K
C10
100pF R7
MCP6S22
4
CH1 RET 100K
R8 R9
2.2K 3.3K
C14 OC1
1.0uF C15
0.1uF
Figure 16, Showing the Analog Input Interface for Ch1 (duplicated for Ch2)
www.ajoyraman.in Page 13 of 25
Aj_Scope2 Technical Manual
+5V
SW1
RESET R5 R6
10K 150
C11
13
20
28
0.1uf U4 47uf
1
VDD
VDD
AVDD
MCLR
CH1
2 12
AN0 U1ARX U1RX
3 11
AN1 U1ATX U1TX
CH2 4 9 C16 22pf
AN2 OSC1
VREF
5
AN3 Y1 16MHz
dsPIC30F2020
CH1/2
6 10
CMP3A OSC2
C18 22pf
7 22
CMP3B RE4
CH2/2 R17
26 21
SCLK RE0 RE5 150
25 15
SDATA RE1 OC1 OC1
24 14
CS1 RE2 OC2 OC2 D1
23 18 LED
CS2 RE3 PGC
AVSS
16 17
VSS
VSS
RA9 PGD
19
27
8
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.
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 3V is connected to the analog inputs AN2/AN3 and is used to compensate for
ADC scale-factor change with variation in VDD.
www.ajoyraman.in Page 14 of 25
Aj_Scope2 Technical Manual
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.
www.ajoyraman.in Page 15 of 25
Aj_Scope2 Technical Manual
U1 U2
LM1117
20
4
3 2
VCC
VCC
VIN VOUT VREF CON1
ADJ
C1 C2 C3 C4 C5 C6 C7 1 16 1
U1RX TXD USBMINUS 2
3
FT232R
100uF 0.1uF 0.1uF 0.1uF 0.1uF 10uF 0.1uF
5 15 4
1
U1TX RXD USBPLUS
+5V
14 17 USB-B
CBUS3 3V3 OUT
AGND
TEST
U3 C8
GND
GND
GND
VCC
C9 27pF 0.1uF
2 1
CH0 VOUT
18
21
25
26
7
R1
3 7 1K
CH1 SCK SCLK
R2 6
R3 SDI SDATA
820K +5V
100K 5 R4
GND
CON2 CS CS1 1K
SW1
1 C10 RESET R6
2 R5
100pF R7
MCP6S22
4
3 10K 150
100K C11
4
5 R8 R9 C13
C12 0.1uf
OC1
13
20
28
2.2K 3.3K 0.1uf U4 47uf
C14
JACK 1.0uF C15 1
VDD
VDD
AVDD
0.1uF MCLR
+5V 2 12
AN0 U1ARX U1RX
3 11
AN1 U1ATX U1TX
C16 22pf
8
U5 4 9
AN2 OSC1
VCC
C17 VREF
dsPIC30F2020
27pF 5
AN3 Y1 16MHz
2 1
CH0 VOUT 6 10
R10 CMP3A OSC2
C18 22pf
3 7 1K 7 22
CH1 SCK SCLK CMP3B RE4
R11 6 26 21 R17
R12 SDI SDATA SCLK RE0 RE5 150
820K
100K 5 R13 25 15
GND
AVSS
16 17
R16
VSS
VSS
R15 RA9 PGD
OC2
2.2K 3.3K
C20
C21
19
27
1.0uF
8
0.1uF
Fig 17 SCOPE2 SCHEMATIC
18 AUG 2013
www.ajoyraman.in Page 16 of 25
Aj_Scope2 Technical Manual
8. Bill of materials
BILL OF MATERIALS
www.ajoyraman.in Page 17 of 25
Aj_Scope2 Technical Manual
www.ajoyraman.in Page 18 of 25
Aj_Scope2 Technical Manual
www.ajoyraman.in Page 19 of 25
Aj_Scope2 Technical Manual
www.ajoyraman.in Page 20 of 25
Aj_Scope2 Technical Manual
www.ajoyraman.in Page 21 of 25
Aj_Scope2 Technical Manual
www.ajoyraman.in Page 22 of 25
Aj_Scope2 Technical Manual
Step 10 Modify Reset switch to vertical position and prepare heat sink plate. Add heat
sink compound over the processor IC.
www.ajoyraman.in Page 23 of 25
Aj_Scope2 Technical Manual
www.ajoyraman.in Page 24 of 25
Aj_Scope2 Technical Manual
11. Appendices
12. Summary
This document provides essential information for fabrication and operation of the
Aj_Scope2 unit.
www.ajoyraman.in Page 25 of 25
5 4 3 2 1
U1 U2
LM1117
20
4
3 2
VCC
VCC
VIN VOUT VREF CON1
ADJ
D C1 C2 C4 C5 C6 C7 D
C3 1 16
U1RX TXD USBMINUS 2
10uF 0.1uF 3
FT232R
100uF 0.1uF 0.1uF 0.1uF 0.1uF
4
1
U1TX 5 RXD USBPLUS 15
+5V
14 17
USB-B
CBUS3 3V3 OUT
AGND
TEST
U3 C8
GND
GND
GND
VCC
C9 27pF 0.1uF
2 1
18
21
25
26
CH0 VOUT
7
R1
3 7 1K
CH1 SCK SCLK
C R2 6 C
R3 SDI SDATA
820K +5V
100K 5 R4
GND
CON2 CS CS1 1K
SW1
1 C10 RESET R6
2 R5
100pF R7
4
3
100K
MCP6S22 10K C11
150
4
5 R8 R9 C13
C12 0.1uf
OC1
13
20
28
2.2K 3.3K 0.1uf U4 47uf
C14
JACK 1.0uF C15
1
VDD
VDD
AVDD
0.1uF MCLR
+5V 2 12
AN0 U1ARX U1RX
3 AN1 U1ATX 11 U1TX
C16 22pf
8
B B
U5 4 9
AN2 OSC1
VCC
C17 VREF
27pF
dsPIC30F2020
5 AN3 Y1 16MHz
2 CH0 VOUT 1
6 CMP3A OSC2 10
R10
C18 22pf
3 7 1K 7 22
CH1 SCK SCLK CMP3B RE4
R11 R17
SDI 6 SDATA SCLK 26 RE0 RE5 21
820K R12 150
100K 5 R13 25 15
GND
100K
MCP6S22 CS2 23 RE3 PGC 18 LED
AVSS
R16 16 17
VSS
VSS
R15 RA9 PGD
A A
OC2
2.2K 3.3K
C20
19
27
1.0uF C21
8
0.1uF
Fig 17 SCOPE2 SCHEMATIC
18 AUG 2013
5 4 3 2 1
5 4 3 2 1
U1 U2
LM1117
20
4
3 2
VCC
VCC
VIN VOUT VREF CON1
ADJ
D C1 C2 C4 C5 C6 C7 D
C3 1 16
U1RX TXD USBMINUS 2
10uF 0.1uF 3
FT232R
100uF 0.1uF 0.1uF 0.1uF 0.1uF
4
1
U1TX 5 RXD USBPLUS 15
+5V
14 17
USB-B
CBUS3 3V3 OUT
AGND
TEST
U3 C8
GND
GND
GND
VCC
C9 27pF 0.1uF
2 1
18
21
25
26
CH0 VOUT
7
R1
3 7 1K
CH1 SCK SCLK
C R2 6 C
R3 SDI SDATA
820K +5V
100K 5 R4
GND
CON2 CS CS1 1K
SW1
1 C10 RESET R6
2 R5
100pF R7
4
3
100K
MCP6S22 10K C11
150
4
5 R8 R9 C13
C12 0.1uf
OC1
13
20
28
2.2K 3.3K 0.1uf U4 47uf
C14
JACK 1.0uF C15
1
VDD
VDD
AVDD
0.1uF MCLR
+5V 2 12
AN0 U1ARX U1RX
3 AN1 U1ATX 11 U1TX
C16 22pf
8
B B
U5 4 9
AN2 OSC1
VCC
C17 VREF
27pF
dsPIC30F2020
5 AN3 Y1 16MHz
2 CH0 VOUT 1
6 CMP3A OSC2 10
R10
C18 22pf
3 7 1K 7 22
CH1 SCK SCLK CMP3B RE4
R11 R17
SDI 6 SDATA SCLK 26 RE0 RE5 21
820K R12 150
100K 5 R13 25 15
GND
100K
MCP6S22 CS2 23 RE3 PGC 18 LED
AVSS
R16 16 17
VSS
VSS
R15 RA9 PGD
A A
OC2
2.2K 3.3K
C20
19
27
1.0uF C21
8
0.1uF
Fig 17 SCOPE2 SCHEMATIC
18 AUG 2013
5 4 3 2 1
Scope2 PCB 1:1 Top-Mirrored
Scope 2 PCB 1:1 Bottom