0% found this document useful (0 votes)
269 views44 pages

Dpscope - Build Your Own Usb/Pc-Based Oscilloscope: Instructables

This document describes how to build a USB/PC-based oscilloscope called the DPScope. It has two input channels, a bandwidth of over 1.3 MHz, and can sample signals at up to 20 million samples per second. The design uses a dsPIC30F2020 microcontroller which integrates the analog-to-digital converters, sample logic, trigger control, memory, and USB interface into a single chip. This allows it to be built with around 50 components and have a compact size of 4.5" x 2.6" x 1.2". The document provides specifications, discusses key features, and presents the circuit schematic in sections to explain its design.

Uploaded by

uimarin14
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
269 views44 pages

Dpscope - Build Your Own Usb/Pc-Based Oscilloscope: Instructables

This document describes how to build a USB/PC-based oscilloscope called the DPScope. It has two input channels, a bandwidth of over 1.3 MHz, and can sample signals at up to 20 million samples per second. The design uses a dsPIC30F2020 microcontroller which integrates the analog-to-digital converters, sample logic, trigger control, memory, and USB interface into a single chip. This allows it to be built with around 50 components and have a compact size of 4.5" x 2.6" x 1.2". The document provides specifications, discusses key features, and presents the circuit schematic in sections to explain its design.

Uploaded by

uimarin14
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

instructables

DPScope - Build Your Own USB/PC-Based Oscilloscope

by womai

If you have questions, feel free to contact me directly You might also want to visit my DPScope website at:
at Webpage: http://dpscope.freevar.com/

Email: mailto:[email protected] From there you can also download the PC software,
([email protected]) user manual and a lot of other documentation.

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 1


Step 1: Instrument Specifications

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 2


Below you see the speci cations of the instruments. If O set adjustment: yes
you are familiar with oscilloscopes you will see that
the DPScope has pretty much all the features you'd Ho riz o nt a l (t im e ) s ca le :
expect from a decent lower-end instrument.
Max. sample rate (single shot): 1 MSample/sec
If you aren't a number freak, feel free to skip this Max. sample rate (repetitive signals): 20 MSamples/sec
page as fast as you can :-)
Timebase settings (scope mode): 0.5 usec/div ... 1
On the next page I'll discuss a few of the key sec/div
speci cations. Timebase settings (datalogger/roll mode): 0.5 sec/div
... 1 hr/div
Input :
Trig g e r:
Number of channels: 2
Analog bandwidth: > 1.3 MHz Trigger source: CH1, CH2, auto (free run)
Input impedance: 1 MOhm || 15 pF Trigger polarity: rising edge, falling edge
Probe connection: BNC Trigger noise reject: yes (selectable)
Usable probe types: Standard 1:1, 1:10, 1:20 probes Pre-trigger capability (i.e. can show what happened
before the trigger event): 0 - 20 divisions
Ve rt ica l (v o lt a g e ) s ca le : Post-trigger delay (delayed scan, to look at the
signal long after the trigger event but with high
Vertical sensitivity (20 divisions): resolution): 0 - 200 divisions
- 5 mV/div to 1 V/div (1:1 probe)
- 50 mV/div to 10 V/div (1:10 probe) Acquis it io n:
- 100 mV/div to 20 V/div (1:20 probe)
Record length (normal mode): 200 points/channel
Vertical o set: 0 - 20 divisions Record length (FFT mode): 400 points/channel
Max. screen refresh rate: up to 40+ frames/sec
Maximum voltage range Datalogger mode (roll mode): yes (data can be logged
-12V ... 20V (1:1 probe) to le in real time)
-120V ... +200V (1:10 probe)
-240V ... +400V (1:20 probe) D is pla y :

Probe compensation: yes (2 kHz calibration output) Real-time FFT: yes

FFT lters: Rectangular, Hanning, Hamming,


Blackman
Averaging: yes (2 / 5 / 10 / 20 / 50 / 100)
X-Y mode: yes
Display styles (can be combined): Points, Vectors
(Lines), In nite Persistence

Time and level measurements: yes (using cursors)

S a v e & Re s t o re :

Waveform export (e.g. to Excel):yes (CSV format)

Save/restore of scope setups: yes

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 3


PC S o f t w a re :

PC connection: USB, 500 kbaud


PC software: Windows 2000, XP (SP3), Vista, 7
Minimum screen size: 800 x 600 pixel

M e cha nica l co ns t ruct io n:

Power supply: through USB (5V / 250mA)


(external supply 7.5 - 9V / 300mA optional)

Approx. size (in enclosure): 4.5" x 2.6" x 1.2" (114 mm x


66 mm x 31 mm)

Component count: ~50


Solder connections to make: ~200
Required skill level for assembly: moderate; only
through-hole components and DIP
packages (no surface mount or ne pitch parts)
Printed circuit board: Professional printed circuit
board with corrosion-resistant, gold-plated pads and
contacts (not cheap solder nish), with silkscreen
to denote component locations.

Enclosure: Sturdy ABS plastic enclosure with custom


glass- ber front- and back-panel, silkscreen. All
holes pre-drilled - no drilling required.

Microcontroller and USB interface: Fully pre-


programmed; no programming required

Step 2: Key Specs

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 4


As promised, here a short discussion some of the - RS-232 (115 kHz)
DPScope's key features: - one-wire
- SPI (as long as <= 1 MHz)
First, it is a two-channel instrument. This is a very
important feature. Many low-end oscilloscopes o er The capture rate is a very important measure as well;
only a single channel, which is a severe handicap: It it needs to be fast enough so ideally you instantly any
doesn't allow you to look at two signals in relation to changes on the signal or to the scope settings - this
each other (e.g. clock signal and data signal), e.g. to makes for a very responsive feel during practical use
see which one changes rst and by how much. It also of the scope. Now that means it should at least be
prevents you from triggering on a signal di erent around 15 - 20 records per second (your eye isn't
from the one you want to look at. Thus I consider two much faster than that anyway). The DPScope manages
channels an absolute must for any serious to do around 35 - 40 frames/sec (assuming a
oscilloscope; everything else is a toy, not a real su ciently fast timebase setting), so passes that
instrument. criterion easily.

Second, the bandwidth - the DPScope has about 1.3 The DPScope also o ers a datalogger mode (roll
MHz. While that may sound small compared to "big mode) for slow sample rates (between 10 samples/sec
iron" scopes, it actually is quite usable for a large and 1 sample/hour); in that mode the waveform
variety of tasks (in parentheses I show the continuously scrolls to the left, and you can record it
approximate maximum frequency in the particular directly into a le. That's very useful to record slow-
application): varying signals, e.g. temperature.

- audio (20 kHz) But now let's dive into the design, and start with some
- infrared remote control signals (38 kHz) pictures!
- ultrasound (200 kHz)
- servo signals (a few kHz)
- bio signals, medical instruments (< 100 Hz)
- I2C (1 MHz)

Step 3: Design Overview

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 5


Below is a block diagram of the oscilloscope. The process and the storage of the converted data in the
architecture is fairly traditional; the input signals are capture memory. The trigger circuitry decides when to
conditioned in the analog frontend which depending start the sample process.
on the signal levels either attenuates them or
ampli es them, and can also add o set. All this is The controller takes care of setting signal gains and
necessary to make optimum use of the xed voltage o set, setting up the sample logic, selecting trigger
range that the analog-to-digital converters can source, trigger level, and trigger polarity, and
convert into digital information. communicating the the PC.

The analog-to-digital converters (ADCs) take the As you can see, the dsPIC30F2020 microcontroller
analog signals and convert them into digital allows to implement most of it without external
numbers. The sample logic controls the sampling circuitry - controller, memory, sample logic,

analog-to-digital converter (ADC), trigger and trigger USB interface to the PC as well as power supply for
level control all reside within a single chip. This makes the scope are provided by the FTDI232R serial-to-USB
the design very compact, inexpensive, and easy to converter cable - again a very user-friendly solution
build. since there is nothing to assemble.

Step 4: Circuit Schematic

Below is the full schematic. If you aren't an experienced electrical engineer it may seem daunting at rst, but we'll
break it down into easier-to-digest subsections in the following few slides.

If you want to get the schematic with better resolution (which is much easier to read), you can download it in PDF
format.

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 6


Step 5: Input Stage / Analog Frontend (part 1)

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 7


The microncontroller's analog-to-digital converters divider (C19 and C6). The reason for adding the
(ADCs) have a xed input range of 0 to 5V. Signals capacitive divider is the fact that the protection
smaller than that range will have reduced resolution, diodes (D1 and D2) as well as the input of the op-amp
and larger signals will get clipped. Since the input (OP1.1) have some unavoidable parasitic capacitance
signal that the scope is supposed to measure can in the order of a few pF. With only R1 and R2 this
span a wide range from quite small to quite large, we would create a low-pass R-C lter (the divider feeding
need an input stage that can attenuate and/or the parasitic capacitance which would need some
amplify the incoming signal to make it suitable for the time to charge up), severely limiting the achievable
ADC. The circuit shown here is for channel 1, but bandwidth.
channel 2 looks identical.
Quick estimate: output impedance of the divider is R1
First, the incoming signal is attenuated by a factor of || R2 = 187 kOhm, parasitic C_par maybe 20 pF, that
4. This increases the maximum voltage range to 20V. would give a time constant of 187k * 20p = 3.74us and
Since the subsequent circuits cannot deal with a bandwidth of just 0.35/3.74 = approx. 90 kHz). This is
negative voltage (to keep the circuit simple, the scope much too low for our scope!
has only a single +5V supply and no negative supply),
the only way to measure negative signals is to shift The solution - if you can't beat them, join them.
them up with a programmable o set voltage Adding the capacitive divider and adjusting it to the
(between 0 and 4 V) provided by a digital-to-analog same division ratio (1:4) as the resistive divider makes
converter (shown later). This way the scope can the frequency response at from DC to light (at least
display voltages between -12V and +20V max with a in theory - but close enough for our purpose). The
1:1 probe (-120V to +200V with a 1:10 probe - but be necessary condition is:
VERY CAREFUL whenever working with such high
voltages!). (C6 + C_par) / C19 = R1 / R2

The o set is fed in on the bottom of the voltage Adjustment is done with C19. Since nothing comes for
divider (between C12 - which bu ers fast transients - free in life, it's not surprising there is a price to pay -
and R2). the capacitive divider causes the scope's input
impedance to drop for higher frequencies. Still this is
The input divider deserves some further a worthwhile tradeo and thus such a compensation
consideration. It is a so-called compensated can be found in virtually every oscilloscope.
attenuator and consists of a combination of a xed
ohmic divider (R1 and R2) and an adjustable capacitive

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 8


Step 6: Input Stage / Analog Frontend (part 2)

The two diodes (D1, D2) act as input protection, MHz, which is more than su cient for the bu er
clipping any signals to the preampli er that exceed stage (gain = 1, so BW = 10 MHz), but marginal for the
either +5V or 0V by more than one diode drop. They gain=10 stage (OP1.2) - we can only expect ~1 MHz of
need to be fast-switching (both in bandwidth here, and the other stages (bu er stage,
conduction as well as in recovery) and have low input PGA, ADC inside the microcontroller) will further
capacitance. On the other hand, given the high input reduce that number somewhat. For that reason I
resistance value (750 kOhm) they don't need to shunt added C14 which increases the gain at higher
a lot of current even at large frequencies. It is chosen so that the gain increase
overvoltages at the scope input. starts approximately at the frequency where
otherwise the gain would start to drop o , that way
The signal is then fed into a simple op-amp follower the at gain region is extended to higher frequencies.
stage (OP1.1, which is one of the four op-amps inside On my prototypes I measured a gain-stage bandwidth
the Microchip MCP6024). This bu ering is also of around 800 kHz without this compensation but
necessary because the following stage (the MCP6S22 almost 1.3 MHz with C14 in place - quite some bang
p rogrammable-g ain a mpli er or PGA) does not react (50% improvement) at virtually no cost! Its e ect is
kindly to an input source with too high an impedance also clearly visible - much faster settling transitions -
- wild oscillations would be the result (yes, I tried and when using the scope to look at a fast-rising square
it is true!). The input divider's output impedance wave. Ideally C14 would be adjustable, but its value is
(R1||R2) is around 187 kOhm while the PGA requires a not overly critical so I stuck with xed 100pF which
source impedance of less than 1 kOhm. was very close to the optimum I determined
experimentally as well as by simulating the stage with
The bu ered signal drives one of the PGA's inputs Microchip's free Spice tool. If C14 were too larger,
(CH0) directly, and also feeds the input of a 1:10 gain overshoot would occur.
stage that produces a signal ampli ed by 10, which in
turn goes to CH1 of the PGA. That way the PGA can The resistor trimmer (VR1) is here to allow minor o set
choose between less pre-ampli cation for large input adjustments in the high-gain path. The main reason
signals, and large ampli cation for small signals. The for this is leakage current through the clamp diodes
PGA has a speci ed bandwidth (not gain-bandwidth (D1, D2) which introduces a small positive o set onto
product!) of between 2 and 12 MHz (depending on the signal. This o set is small, but becomes noticeable
ampli cation setting), so we are in safe territory here; when multiplied by 10. (VR1 also impacts the exact
the scope actually uses only gain settings of 1, 2, 5, gain, but the e ect is small enough to be ignored (less
and 10 - according to my experiments higher settings than 1%), especially when compared to the tolerances
(up to gain = 32 would be possible) are quite sensitive of the gain-setting resistors (R7, R8).
and tend to exhibit excessive noise (an indication that
oscillation may not be far away).

The MCP6024 has a gain-bandwidth product of 10

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 9


Step 7: Input Stage / Analog Frontend (part 3)

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 10


The signal now arrives at the previously mentioned comparator inside the dsPIC. This comparator creates
programmable-gain ampli er (PGA), a Microchip an interrupt whenever the input voltage crosses a
MCP6S22. Such a PGA is a beautiful device because it certain, programmable threshold in a pre-de ned
allows us to change the direction (rising or falling signal level, respectively;
channel gain (ampli cation) without any moving this is also called a rising - or falling - edge). The
parts like relays. This reduces cost, component count, threshold voltage is generated by a 10-bit digital-to-
size, and improves reliability (no mechanical wear-out) analog converter (DAC) inside the dsPIC (it's amazing
at the same time. The only reason I can see why this how much peripherals Microchip has put inside a
isn't more widely used in other oscilloscopes is that single, inexpensive microcontroller - all this reduces
there aren't many PGAs available for very high cost and complexity of the scope a lot). Since the DAC
bandwidths (several 100 MHz or even GHz). But for can only produce up to 2.5V (i.e. half the maximum
the DPScope with it's design goal of 1 MHz or maybe signal level), the easiest solution was to divide the
slightly above this is just what the doctor ordered - incoming signal by two with a voltage divider (R14
the PGA's minimum speci ed gain is 2 MHz. and R15). That way the trigger threshold can be set
anywhere within the incoming signal range.
Since the two selectable inputs of the PGA are fed
with signals di ering by a factor of 10, with the PGA Finally, on the right you see the external 12-bit digital-
we can e ectively choose a total ampli cation of 1, 2, to-analog converter (DAC, a Microchip MCP4822)
5, 10, 20, 50, and 100 only use gain settings 1, 2, 5, andwhich sets the o set for the input signal. It has two
10. independent output channels, one used for each of
the two scope input channels. The microcontroller
The microcontroller controls the PGA through a drives the DAC through the SPI interface as well (the
standard SPI interface consisting of three signal lines - dsPIC uses the chip selecty (CS) line of the respective
clock, data, and chip select. device - DAC, PGA1 or PGA2 - to determine which
device is getting the SPI data at any given time).
The output of the PGA feeds the analog-to-digital
converter (ADC) inside the dsPIC microcontroller. It
also drives into a second input which goes to a

Step 8: Microcontroller

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 11


The Microcontroller is the heart of the DPScope. It is a technique in the Tektronix application note "The XYZ
16-bit Microchip dsPIC30F2020 which has a lot of of oscillscopes".
desirable features: Not only is it blazingly fast (it runs
32 MIPS on a 128 MHz clock - this is very slightly The second great feature of this microcontroller is a
outside spec - max. 120 MHz - but works perfectly set of comparators with nely controllable threshold
ne) and comes in a hobbyist-friendly DIP package; (10 bit resolution); most other Microchip devices have
since it is geared towards digital signal processing or only very coarse compare threshold steps. These
DSP (that's where the "ds" in the name comes from) it comparators are all we need to implement a full-
also has a bunch of useful mixed-signal periphery blown scope trigger with adjustable threshold and
already built in: selectable edge polarity (rising or falling edge,
respectively), which cuts down on overall component
First and most important, it has an analog-to-digital count and thus cost and complexity.
converter that can acquire samples at 2
MSamples/sec. At least that's what the spec seems to The only sore point with this dsPIC is its small RAM
say at rst glance. The reality is - it can acquire two size - just 512 bytes. Some of that is taken up by
channels simultaneously at 1 MSample/sec each, and program overhead (e.g. global variables, parameter
the Microchip marketing guys simply added those stack and so on), and it was a challenge to get at least
two numbers... anyway, that's perfectly ne for us 200 bytes per channel (actually 205, since this works
because we need two channels anyway. The ADC has a out to 410 points for FFT - where only one channel as
resolution of 10 bits, but in order to maximize acquired at a time - and 410 is 4/5 of the 512 points
acquisition speed and reduce memory requirements needed for the FFT, which makes interpolating it to
only the upper 8 bits get used (i.e. one byte per 512 points fairly straightforward); a future version of
sample). The reason for using a 128 MHz clock is the the scope may use a di erent dsPIC device (but right
same - at that speed the dsPIC is just barely fast now there isn't any that has all the other features,
enough to repeatedly sample two channels and store runs at 5V, and is available in DIP package). Adding
the data into internal memory at 1 MHz sample rate. external RAM is not an option either - rst, it would
add cost and complexity, second, the dpPIC does not
The analog bandwidth of the ADC is well above 1 have enough output pins to control it, and third, at
MHz, so it's not a limiting factor in the signal chain. maximum sample rate there is no time for additional
For sample rates faster than 1 MSample/sec - up to 20 control tasks anyway. But 200 points is good enough
MSamples/sec - the DPScope employs a technique for a full display, and in most applications the
called "equivalent time sampling" - basically it runs at DPScope's delayed trigger capability provides exactly
1 MSample/sec real sample rate and acquires only a the same functionality that a longer capture memory
subset of the data points at each sweep, and then would.
overlays two or more subsequent sweeps (each with
slightly increased start delay after the trigger) for a Finally, the dsPIC supports SPI and USART
composite picture with higher e ective timing communication, which it uses to control the other
resolution. You can read more details about this devices in the DPScope (adjustable gain ampli ers,

o set DAC) and communicate with the PC,


respectively.

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 12


Step 9: USB Interface, Power Supply

The connection to the PC is very straightforward. The design.


DPScope uses a USB-to-serial converter cable from
FTDI. This cable has a FT232R chip built into the USB The converter cable also makes the USB port's 5V
connector and translates the USB data stream into a supply available. The DPScope needs about 250mA of
standard RS-232 asynchronous serial data stream supply current, a USB port can provide up to 500 mA,
(output levels on the serial side are TTL, not true RS- so the scope can get its power from the USB line and
232 - this is what the microcontroller needs anyway). does not need an external power supply. One word of
That way the scope does not have to deal with a caution though, some USB ports have rather large
complex USB interface but sends and receives data as variation in supply voltage (sometimes down to little
if the connection were a simple RS-232 link. more than 4V). In my experience this is mostly true
when connecting to an unpowered USB hub or when
On the PC side there is a driver that emulates a RS-232 many other power-hungry devices are connected to
connection as well, so the scope application only has the same USB hub, so try to avoid this. The DPScope
to deal with a standard serial connection, too. Data assumes a 5V supply and uses that as its voltage
transfer rate is still a respectable 500 kBaud (the reference, so while it will function even at lower
converter cable could go up to 1 Mbaud but the voltage, any deviation directly impacts its voltage
transmitted data volume is too small to really need accuracy. Some USB ports (laptops are notorious) are
full bandwidth - each record is approx. 0.5 KByte, so also quite noisy, this will show up as noise on the
even at 40 frames/sec this amounts to just 20 measured signals.
KByte/sec or around 200 kBaud average serial data
rate (note that each data byte needs a start bit and a If you are absolutely unable to provide close to 5V
stop bit, so for each byte actually 10 bits are sent). from USB, or the USB supply turns out to be too noisy,
then the DPScope allows to use an external power
The interface uses software handshaking (the scope supply (7.5V/500mA). All you need to do is add the
responds to each transmission from the PC with an regulator (REG, a simple 7805 linear regulator) and a
acknowledge packet), so while CTS and RTS are bu er capacitor (C5), hook up the power supply, and
physically connected - just in case a later revision set the jumper (PWR_SEL) to "external supply". REG
wants to use them - they are not used in the current and C5 are very generic types and should be available

in any hobby electronics store (and in any case are


most likely already in your drawer).

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 13


Step 10: Board Layout

Once I had the design complete - including a working the dsPIC microcontroller. On the right nally you
breadboard assembly of the prototype - it was time to have the USB cable connector and the power supply.
lay out a printed circuit board for the scope. I did both All the chips are placed in the same orientation (pin 1
the schematic capture as well as the board layout with is bottom left, notch is left) to minimize the chance
a design tool called Diptrace. This is quite a capable for assembly mistakes.
tool that also comes with great customer support -
the developers really listen to user feedback! - at a As for the trace layout, the ground plane is a solid
fraction of the price of so-called professional tools. In copper ll on the bottom plane - this minimizes
fact, they o er a free version that is restricted to two supply inductance and provides some shielding
copper layers and a maximum of 250 component pins against interference. The power supply traces are
- which is actually more than the DPScope layout made pretty wide (50 mil / 2.25mm) since they carry
needs (it has two layers but only about 200 pins). So considerable current, and again to minimize
you could do this design without paying a dime for inductance. With some exceptions the top ayer carries
the tool. the vertical traces, and the bottom layer the
horizontal traces.
The nal layout is shown below. You can see that I
placed the components in a logical order: To the left, Now let's see how to build up this scope in practice!
close to the BNC probe connectors, is the input
circuitry (attenuator, input ampli er, clampd diodes,
probe compensation). In the middle is the o set DAC
and the programmable gain ampli ers, follower by

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 14


Step 11: Assembly - Tools

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 15


- 14mm wrench (to fasten the BNC connectors to the
While the kit that is robust and simple to assemble, front panel)
there are some components that are sensitive to
mishandling, e.g. putting them in with wrong polarity, - Small Philips screwdriver (to adjust the trimmer
so please pay close attention to the description for resistors and for the enclosure
every step. Moderate soldering experience is required
(If you have never soldered before, there are many - Small non-metal screwdriver (to adjust the trimmer
good introductions to be found on the web, and you capacitors)
should probably practice a little bit before attemption
to put together a larger circuit like the DPScope).

You will need a few tools for the assembly:

The time required for putting the scope together will


depend on your experience – a seasoned hobbyist
should be able to do it in maybe two hours (I do it in
- Small soldering iron (about 17 Watts power) with 45 minutes but of course I know the component
su ciently ne tip locations by heart now), but if you are new to this it
will take longer.
- Solder wire

- Flat-nosed pliers (to bend component leads)

- Small wire cutter (to cut o component legs)

Step 12: Assembly Step 1: Unpacking the Kit


DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 16
Below you see the kit as it comes out of the box: not to drop any components.

• Probe cables We don’t need the probes and the USB cable right
now, so put them to the side for the moment.
• Enclosure, which holds all the small components

• FTDI USB cable

Unscrew the two screws on the bottom of the


enclosure and carefully lift the bottom – make sure

Step 13: Assembly Step 2: Components

Below you see all the components spread out. • The integrated circuits and the diode are sensitive to
Everything you need to build the oscilloscope is electrostatic discharge – it is good practice to use a
included. Please use the component list (on the next grounded wrist strap to avoid damage to them during
page) to verify that you have all the parts shown assembly, and to place all the components on an
below. antistatic surface. Don’t wear clothes that get easily
charged up (e.g. wool sweater).
Some general remarks:

• All components that are di cult to distinguish (e.g.


resistors) are clearly labeled with their respective
value (e.g. “100 pF”).

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 17


Step 14: Assembly Step 3 - Component List

Below is the list of components - you can see that there really aren't too many. The microcontroller is already pre-
programmed, so we'll only need to put it in and get going.

Step 15: Assembly Step 4 - Component Placement

Below is a picture showing the component placement on the board. This is the same as the layout picture, but with
only the top silkscreen marking visible. Such a print is useful to locate the di erent component positionsa during
assembly.

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 18


Step 16: Assembly Step 5: Installing the First Part - R19

Let’s start out with a simple part – resistor R19, which has 470 Ohm. All the other parts will get assembled in a very
similar way.

Find the resistor among all the parts – it is labeled with “470” (see picture below). On the printed circuit board (PCB)
locate the component outline labeled “R19”. Bend the resistor leads and stick them through the board. The nal
result is shown below.

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 19


Step 17: Assembly Step 6: Soldering the First Part

On the PCB bottom bend the component leads apart


– this will hold the resistor securely when you turn
over the PCB to solder it on.

To solder, touch the component lead (wire) with the Check the topside of the board – you should see
soldering iron and the solder wire at the same time. solder protruding a bit from the via holes – this shows
Surface tension will pull the solder into the via holes the holes are nicely lled with solder (see picture
automatically. Add enough solder so it completely lls below):
the hole and leaves a small “hill” of solder. Remove the
solder wire and the soldering iron but don’t move the
board before the solder has become completely solid
again. The solder joint should be shiny and bright.
Repeat for the other lead.

Step 18: Assembly Step 7: Next Components

Next is a pair of resistors – R7 and R10 (the 9.1 kOhm resistors, thus labeled with “9.1k”). Installation and soldering
works just like for R19. Below you see what the board looks like with them installed.

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 20


Step 19: Assembly Step 8: Remaining Resistors

Now lets nish up the resistors. We still got R2 and R4 The picture on the bottom shows the PCB populated
(249 kOhm), R1 and R3 (750 kOhm), and 8 pieces Of 1 with all the resistors.
kOhm resistors which are not labeled because they
are the last resistors left. Install the two pairs rst, and
then install the 1 kOhm resistors in all remaining
resistor outlines on the PCB (refer to the parts list if
nd out which resistor is which value).

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 21


Step 20: Assembly Step 9: Capacitors

Installing the capacitors works the same as for the to be put in with correct polarity. The negative side of
resistors. We have 5 di erent types: C6 and C11 C9 is clearly labeled with a white stripe and “-” (minus)
(ceramic, 47 pF), C14 and C15 (ceramic, 100 pF), C9 symbols – make sure you install it as shown in the
(electrolytic, 100 uF), C18 and C19 (trimmer), and 10 pictures below with this white strip facing inwards on
pieces of 0.1uF ceramic capacitors (not labeled the PCB!
because they are the only type left).

No t e : B e ca re f ul w he n ins t a lling C9 – it ha s

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 22


Step 21: Assembly Step 10: Diodes

Next in the row are the clamping diodes. These solder only one end of all diodes, then the other end –
components need more care than the resistors. this gives them enough time to cool down in the time
between.
• Make sure you insert them with correct polarity
(correct orientation); the negative end is denoted by a
black stripe around the diode body. The silkscreen
outline also shows a (white) stripe – this is the side the
black stripe must lie. Note that the orientation is not
the same for all diodes.

• Diodes are quite sensitive to heat. Thus try to


minimize soldering time. The best approach is to rst

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 23


Step 22: Assembly Step 11: Trimmers, Resonator, Jumper

A few more small components are left: The two scope’s power source; per default these are not
trimmers (VR1 and VR2, the blue blocks with the installed because the instrument gets its power
adjustment knob on the top), the ceramic resonator through the USB connection.
(X1), and the power selection jumper (PWR_SEL).
Install them as shown below and put t he re d
s ho rt ing blo ck o n t he jum pe r in t he po s it io n
indica t e d in t he z o o m e d- in pict ure (la be le d
“ US B”) ; this jumper is used to select the optional
external power supply & voltage regulator as the

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 24


Step 23: Assembly Step 12: First Socket

Now comes the rst socket – lets start with the 28-pin the corner pins as shown in the zoomed-in picture
one, which goes into the outline labeled “dsPIC” and below. The reasons is simple – two pins diagonally
will later hold the microcontroller. Be careful with its opposed will securely hold the socket in place, but
installation because once soldered down it is almost still allow you to make corrections.
impossible to remove. The best is to do it step by step:

(3) Press the socket onto the board and re-heat both
of these solder joint – this allows the socket to sit
ush against the board. Visually inspect the socket to
make sure this is really the case.

(1) Place the socket on the board as shown in the big


picture. Note the po s it io n o f t he no t ch on the left (4) Only now solder all the other pins.
side of the silkscreen outline – make sure to orient the
notch on the socket to the same side. This will make
installing the chip less error-prone.

(2) Turn the board around an s o lde r o nly t w o o f

Step 24: Assembly Step 13: Remaining Sockets

Now install the remaining sockets – one 14-pin and three 8-pin ones. Proceed in the same manner as for the rst
socket. Ag a in m a ke s ure a ll t he no t che s m a t ch t he s ilks cre e n o ut line (they are all on the left side in the
picture).

Below you see how the board should look like after this step.

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 25


Step 25: Assembly Step 14: BNC Connectors; Frontpanel

Snap the BNC connectors in place. Do n’ t s o lde r bottom (PCB) side, and the wide end – close to labels
t he m do w n y e t ! “CH1” and “CH2 – is on the top (away from the PCB).

Add the washers, the frontpanel, and nally the nuts.


Tighten the nuts by hand (not too strongly, just so the
frontpanel no longer moves freely).

No t e t ha t t he f ro nt pa ne l’s na rro w e nd –
clo s e t o t he “ DPS co pe ” la be l” – is o n t he

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 26


Step 26: Assembly Step 14: BNC Connectors; Frontpanel

Place the board with BNC connectors and frontpanel connectors in place.
into the enclosure as shown (into the deep half of the
enclosure).

Only now solder the BNC connectors onto the board –


start with the clamped-in feet, and nish with the
Make sure the board ts and sits loosely on – but does signal wires. The clamped feet will need a lot of solder
not push too hard against – the stando s inside the to fully ll up the mounting holes – don’t be shy,
enclosure. If necessary loosen the nuts a bit so the because that’s the only thing holding the PCB in place.
connectors can move against the frontpanel.

Tighten the nuts again su ciently to hold the BNC

Step 27: Assembly Step 15: LED Indicator

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 27


Remove the frontpanel again. Take the LED (light over-tighten them, damaging the connectors threads!
emitting diode) and bend its legs by 90 degrees as
shown in the picture. Fit it into the board. M a ke s ure
t he s ho rt le g o f t he LED g o e s int o t he s ide
w he re t he s ilks cre e n circle ha s it s no t ch
( a t t e ne d s ide ) . The diode body also has a notch at The frontpanel now holds the LED securely in place.
the same side. Turn the board around and solder the LED’s legs onto
the board.

Now put on the frontpanel – the LED must go


through the center hole. Put on the nuts again and
tighten them down with a wrench. Be careful not to

Step 28: Assembly Step 16: IC Installation

Now it’s time to install the ICs (integrated circuits). No t e 2: T he re a re t w o di e re nt t y pe s o f t he


There are ve of them. 8 - pin ICs – m a ke s ure y o u ins t a ll t he m in t he
co rre ct lo ca t io ns a s s ho w n in t he pict ure
be lo w. Installing them in the wrong place (or the
wrong orientation) will destroy them when you power
up the oscilloscope. You can distinguish the chips by
No t e 1: M a ke s ure t o put t he chips o n in t he the labels printed on them (two are labeled MCP6S22,
co rre ct o rie nt a t io n. Each chip has a notch on one one is labeled MCP4822).
end – this notch must go on top of the notch in the
silkscreen outline (and the notch in the socket if you
installed those correctly!).

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 28


Step 29: Assembly Step 17: USB Cable

Take the USB cable out of its antistatic bag and feed Orange (org)
its wire ends through the hole in the backpanel plate.
Secure the cable binder tightly around the cable – Green (grn)
this will act as a stress relief so the cable can’t pull on
the solder joints later. Snap o the protruding part of Brown (brn)
the cable binder.
Black (blk)
The cable has 6 wires in 6 di erent colors. Solder them
into the respective hole of J3 (all holes have labels
indicating the proper color, as shown in the zoomed
insert). The sequence from top to bottom is:

Red (red)

Yellow (yel)

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 29


Step 30: Assembly Step 18: Probe Calibration Output

Take the two hookup cables and solder them into the
board and onto the solder pads on the backpanel as Put the two terminal turrets (not shown) into the
shown. holes and solder them on. The long part of the turret
points to the outside of the backpanel.

Make sure to connect the hole labeled “CAL” with the


backpanel pad going to the “CAL” hole on the
backpanel, and the same for “GND”.

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 30


Step 31: Assembly Step 19: Putting It All Together

Now put the board back into the enclosure box, and snap in frontpanel and backpanel.

Congratulations – your oscilloscope is fully assembled!

Step 32: Assembly Step 20: Software Installation

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 31


If you haven’t already done so, go to the DPScope should get a screen message when that happens.
website ( http://www.dpscope.com ) and download:

The DPScope’s frontpanel LED should blink a few


• The oscilloscope software times and then stay on. The blinking should last for
about one second total. If that’s the case then your
• The FTDI USB driver oscilloscope has just passed the rst functional test!

• The USB driver installation guide

No t e 1: The DPScope software needs a screen


resolution of at least 1024 x 768 pixels.
First install the USB driver – follow the installation
guide for that. Note that the installer will actually
install two di erent drivers on your computer, i.e. go
through two installation cycles. Make sure to
complete both of them. No t e 2: It is recommended to connect the DPScope
to a USB port of your computer itself, or to a powered
USB hub. Unpowered hubs tend to have large voltage
drops, and the DPScope’s level accuracy is dependent
on a steady 5V supply voltage from the USB. You can
Then install the DPScope software as well (unpack the test the voltage by connecting a voltmeter to the pins
les and click on Setup.exe). labeled “+” and “-” on the expansion header (bottom
right on the PCB).

Attach the DPScope to a free USB port on your


computer. Wait for a minute or two to give the
computer time to recognize the new instrument (you

Step 33: Assembly Step 21: Software Start

Launch the DPScope software. It should look like the picture below. Press the “Run” button – the two scope traces
should come alive.

Attach the two probe cables to the BNC connectors (CH1 and CH2 on the frontpanel).
DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 32
Now we need to make two simple adjustments to optimize the scope performance.

Step 34: Assembly Step 22: Offset Adjustment

• In the “Vertical” menu change the scale for both With a small screwdriver you can now adjust the
channels to 20mV/div. o sets of the two channels:

• In the “Acquisition” menu change the averaging to • Adjusting the two blue square trimmers (VR1 and
“Avg 10”. VR2) will move the respective trace (red = CH1 and
blue = CH2) up and down.

• In the “Levels” menu move the sliders “CH1” and


“CH2” to the middle. The ground level indicators (blue • Adjust the trimmers so the red trace is exactly at the
and red arrow on the left in the waveform display) will height of the red arrow on the left, and the blue trace
be in the middle as well. is exactly at the height of the blue arrow. Done!

• Short the probes, i.e. connect red grabber and black


grabber together.

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 33


Step 35: Assembly Step 22: Offset Adjustment

Below you see the scope display before (left) and after (right) correct o set adjustment.

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 34


Step 36: Assembly Step 23: Probe Compensation

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 35


• In the “Vertical” menu change the scale for both • With a small non-metal screwdriver you can now
channels to 1V/div. adjust the probe compensation capacitors (C18 and
C19, respectively).
• In the “Acquisition” menu leave the averaging at “Avg
10”.
• On the right side you see examples for
overcompensated, undercompensated, and
• In the “Levels” menu move the sliders “CH1” and compensated probes.
“CH2” a bit below the middle.

• The adjustment is correct when the displayed signals


• Connect the probes to the calibration outputs on the are nice square waves with sharp corners, i.e. when
back side of the oscilloscope: there is neither overshoot (sharp peaks after each
transitions) nor slow settling (rounded edges).
– Red grabber connects to “CAL” post

– Black grabber connects to “GND” post • At the same time, you have tested the scope’s
acquisition circuitry.

• In the DPScope window on your PC select Utilities à


Probe Compensation. A small window with
instructions will pop up.

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 36


Step 37: Scope Software

The DPScope is controlled by the DPScope software Another mode is the X-Y-mode where you plot one
running on the PC. The user interface gives you full signal versus the other (instead of both signals versus
access to all the features of the DPScope like time). This allows quick characterization of
horizontal and vertical resolution, trigger settings, components and phase shifts.
acquisition settings (e.g. averaging, pre- and
posttrigger range), and so on. For a detailed description you should download the
DPScope User Manual.
One neat feature is the FFT (frequency display) mode -
in this mode the software performs a real-time F ast Attached below are a few screenshots that show the
F ourier T ransform (FFT) on the data, so you see the DPScope in action.
frequency spectrum of the signal(s). This is a great
tool e.g. to pinpoint small periodic noise that would
be di cult to see in the normal scope display, and
also to acquire an intuitive feel for the frequency
domain.

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 37


Step 38: All Done!

Now put the bottom cover on the instrument and user manual, drivers, and other documentation.
screw it shut with the four Philips screws.
If you still have questions do not hesitate to contact
Co ng ra t ula t io ns , y o u ha v e s ucce s s f ully me at mailto:[email protected]
a s s e m ble d, s e t up a nd t e s t e d y o ur ne w ([email protected])
o s cillo s co pe !
Webpage: http://dpscope.freevar.com
From there you can also download the PC software,

Hi womai! Very nice job, I'm going to use the analog part in my own project, thank you. Am I
missing something or the input part lacks low pass filter and the oscilloscope is prone to aliasing
noise?
Yes, that's correct. That was a conscious decision for the sake of simplicity. The way the firmware
works it would have to be a variable-bandwidth filter (adding a lot of complexity), or if using one for
the full usable bandwidth then the software would have to do the necessary downsampling and
filtering, to which the specific microcontroller used lacks the necessary resources (mainly memory -
I pretty much use every available bit of it and then some).

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 38


can i have the code of the pic microcontroller.
PS my email is [email protected]
I plan to expand input voltage with similar atenuator, but how safe it is for DAC outputs? Maybe
diodes will clamp overvoltage, but in some cases..?
In principle, this is absolutely doable. But you need to be careful that not only the resistors, but also
the capacitors of the attenuator have a sufficiently high voltage rating. The components I uses are
rated to at least 100V which is safely above the maximum allowed input voltage of 25V. One issue
is that with very high attenuation the upper capacitance becomes very small and thus susceptible
to any parasitic stray capacitances.

A safer bet would be to use a 1:10 or even a 1:100 scope probe and leave the input attenuator
unchanged.
Nice project though, I was wondering if it was possible to eliminate the use of trimmer cap, C19. As
they are not easily avaialable. Thanks.
If your requirements for waveform fidelity are moderate you could replace it with a fixed ceramic
capacitor. You may have to try with a couple values to find the right one. Should be around 18pF,
so you may want to get 16pF, 18pF, 20pF and 22pF. Decide by doing the calibration procedure,
only replacing the fixed caps instead of trimming the trimmer capacitor. No need to solder each one
in place during the tryout, pressing it into the via holes should be sufficient.
Hai Sir,
Great job. Can you send me the source code. my mail id "[email protected]".
Hello
I have a query to make it possible to create Oscilloscope By Arduino UNO and have a fast
analogRead can read the signal with high speed for 200KHZ.
If possible, it helps me to accomplish it
Is it possible to give me an example of this is a small program showing the action of ADC fast to
take the sample of 200KHZ
This email is [email protected]
Thank
I am sorry but I do not have any experience on the Arduino - my scopes use "bare" Microchip PIC
and dsPIC microcontrollers, while the Arduino is based on an Atmel microcontroller, so even a
completely different architecture. There is an Arduino based oscilloscope project on Instructables
though, you may want to search for that one.
Hello
Is it possible to give me the source code file or my HEX file DPScope SE?
on email [email protected]
Thank you
Great job, where can i find PCB layout??

Guys,where I can find PCB layout ?

hey womai, Ihave a doubt in your analog frontend part. u have given 2 inputs to the PGA, the one
on channel 2 is amplified by 10. So for eg if the input is 5V, the ch 2 i/p will be 50V. Now according
to the MCP6s22 datasheet, the i/p pins should not hv vtg greater than VDD+0.3V or else the
device might get damaged. How is your design avoiding that?

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 39


First, the voltage into the buffer opamp is limited by the calmping diode to between 0V and 5V
(actually, maximum one diode drop below/above thos values). The output of the buffer opamp can
conly swing rail to rail, i.e. will never go beyond 0V and 5V, so the following device input (of the
PGA) will never see values outside that range. The 10x gain is only true if the input to the 10x
stage is small enough, larger values get clipped.
thanks

Nice! Good job!

Hi, I've added your project to the "Make Your Own Oscilloscope!" Collection
This is the link If you are interested:
https://www.instructables.com/id/Make-Your-Own-Osci...
It would be useful to me if the program was available for Linux.

This runs just fine on Wine. There is no reason to make a Linux version of the program.

Are you volunteering to convert it to Linux? :-)

The original is written in Visual Basic 6, so quite Windows specific - so I'm afraid it would be more
a complete re-write rather than a quick conversion. I do get occasional requests for Linux or
MacOS versions, but given my limited time for my hobbies I prefer to develop new instruments
rather than spend a lot of time to serve a IMHO still niche market... - most people have access to
some Windows PC or laptop when needed.

Over the years I had several people wanting/offering to convert some of my software to other
platforms, despite my warnings about the time and effort required. Not surprisingly (to me) after
initial enthusiasm (along the lines, "... all I'll have to do is...", "...and then I'll quickly...") none of
them produced anything in the end, so my enthusiasm in this regard is a bit muted ;-)
If it is a very simple program, there is a possibility that it will run in WINE for Linux.

can you give me source code of VB6 for this software?


thanks before.
Unfortunately the program is a bit more advanced than what I could write, but maybe someone
could write a cross platform (possibly java based) version eventually.
hai womai thanks for nice job. but where is the source code of pic

http://www.kakasoft.com/usb-security/how-to-password-protect-usb-on-windows.html
The analog bandwidth would be just about sufficient. You won't see nice square edges (rather
rounded ones) but it will be enough to see what data is sent and how the clock edges align to the
data.

The more important question is whether your signals are (or can be made) repetitive. This is
because the single-shot sample rate is limited to 1 MSample/sec, i.e. just a single sample per bit
period at 1 MHz. This would NOT be sufficient to capture the waveforms. But if they are repetitive
you can use the equivalent time (where the waveform is put together from several acquisitions,
each slightly delayed in time) which can go to an (equivalent) sample rate of 20 MSa/sec - so 20
samples per bit interval.
Hi,

With 1.3MHz bandwidth limit, can the said device actually capture 1MHz I2C and SPI cos they are
DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 40
square waves with much higher bandwidth. Please do correct me if I am wrong.

Thanks
Hello Friends,
i have mad this project now i need source cod for PIC30F..
please help me for this at ([email protected]) for my own scope
Hello Friends,
i have mad this project now i need source cod for PIC30F..
please help me for this at ([email protected])
Hi this design is bit complicated for a beginner

if some body want a easy design then check this link


http://microembeded.blogspot.com/2011/07/two-channel-pcbased-oscilloscope-usb.html
One other thing I noticed is that the design you refer to lacks any sort of input protection (series
resistor, clamp diodes) in front of the first amplifier. So any overvoltage risks to kill the input stage
and worst case make it straight back into the computer. (In comparison, the DPScope has a large
input resistor in front of a pair of clamp diodes, protecting the scope and the computer for inputs up
to ~ +/-200V static input - 10x the official max input range - and much more for short pulses like
electrostatic discharges).
Interesting project! Altough it seems limited to +/-5V input range.

I am actually working on a much simplified scope myself: about as easy as it can get, it uses just
two chips, one PIC (USB capable, but not the 2550) and one op-amp - yet offers USB connectivity
(power and data), two channels, variable gain (max. range +/-25V), standard 1 MOhm input
impedance, analog bandwidth of ~300 kHz and sample rate up to 2 MSa/sec (for repetitive
signals), FFT mode, as well as a 4-channel logic analyzer mode.

The new design (tentatively called DPScope SE) will not replace the existing one (which has much
higher bandwidth and sample rate) but complement it. I already have the hardware (with custom
printed circuit board, not just breadboarded) up and running, and the PC software is ~70%
complete.

Stay tuned!
when will be ur AWG??
atleast send circuit diagram
I had to put the AWG on the back burner for the moment. I have the full schematic but still need to
breadboard the full circuit in the real world and develop firmware and PC software. I don't want to
publish a circuit that hasn't been thoroughly tested first...

The "no-frills oscilloscope" is well on its way - the prototype is working fine and being tested and
the software developed as we speak. Don't expect it to replace the DPScope though.
How do I obtain this kit?

Go to the DPScope webpage http://www.dpscope.com --> "Buy It" tab

There should be flash storage in the scope so that when you plug it in it installs the program.
I got a question for someone who knows about osciliscopes, I saw one at a flea market, on the
outside it looked good, it is about 30 years old, what are the chances of it working or being fixable?
Most nicely explained project. Could there be another projects ?
Best wiches.
DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 41
Carlos Ahumada
Santiago de Chile
Yes, there will be. Right now I am working on a simple AWG (arbitrary waveform generator) and a
very simple, no-frills oscilloscope (much less capable than the DPScope but also even lower cost).
The AWG should make a nice complement to the DPScope.

Both instruments will use the PC for control and display, just like the DPScope. The challenge here
is to reduce component cost to absolute minimum. Microchip has a couple low-end, low-cost (a
third of the price of a 18F2550 or 18F4550) USB-capable microcontrollers that will be fun to work
with. Right now I'm waiting for the development board for them.

Stay tuned!
Hi there,

I am working on a PIC project right now with the PIC18F4550. Would it be possible for you to send
me your C++ code for the oscillator, ADC, and SPI communication?
[email protected]

Thanks!
Kurt
This scope is based on the 16-bit dsPIC30F2020, which has a very different architecture compared
to the 8-bit PIC18F series, so that won't help you much.

For PIC18F series development I use MIkroelektronika's MikroC compiler and development
boards. The compiler (2K limited demo download is free) comes with a few examples for the
18F4550 - just use these as a starting point, they should work right out of the box (they did for me).
They use an external 8 MHz crystal and run the core at 48 MHz (maximum possible) which is
probably what you want to do (USB needs exactly 48 MHz anyway). MikroC has native libraries for
ADC and SPI - very easy to use - so there isn't any clever code I could share for that. E.g. adc
read is my_var = adc_read(channel)

If you are interested in USB using the 18F4550, go to the MikroE web forum and search for "USB"
and author "womai" - I posted a full example (including VB6 source code for the PC side).
Wow, Im about 4 mos into building electronic projects, and I have yet to see such amazing detailed
instructions for a project! You put a lot of thought into this. I will definitely be pick your self
assembly up as soon as my Solder skills are better.
Although I cannot but marvel at the quality of your work, I could not bring myself to give you a good
rating, or even consider buying your kit.

I have been a member of Instructables for quite some time and even before that, I would pop in to
check on some project or another and trust me it's not the first time I see someone advertising their
work. And believe me I am totally fine with that. As a matter of fact, I believe that if one can profit
from a great design and/or personal work, it's not bad at all, as long as there are willing customers.

To be honest, I expected many more reactions in the comments so far, since I've seen people get
upset for less obvious advertisement. But in most other cases, as I recall, the 'ibles were enough to
complete the project without having to buy something from a specific someone.

In your case, you repeatedly refused to give the firmware and the circuit layout when asked and
sometimes you did not even bother to answer.
DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 42
I know that if I were more skilled in electronics and mc programming, I would work something out
on my own, as you pointed out (using a proto-board for example).

Again, I am not giving you fault here, I just expected a little more honesty from your side. You could
have stated in the beginning that this is an 'ible to build a very specific kit, as others have done.
"Build your own" is a bit misleading don't you think? If I were to follow this 'ible, I would be building
*your* USB/PC-Based Oscilloscope, not mine.

I have no intention of being offensive or anything, so I apologize beforehand if my comment upset


you, I just thought I should give my two cents.

No offense taken. Two things I'd like to comment on though:

First, I don't agree with "you did not even bother to answer". If you read through the list of
comments, I make an effort to always comprehensively answer whatever question - technical or
otherwise - somebody has. A few - not many - of the comments though were not questions at all,
for all can tell these individuals only wished to express their opinion but did not really seek any
response or comment from my side. They are of course entitled to their opinion, so I let them stand
as-is.

Second, I do think there is a lot to learn from this project even if you have no intention of getting the
board or kit. The whole hardware design - as well as the high-level software design - is
documented and explained in detail - so you get a proven, usable analog frontend - a variable gain
amplifier chain with ove a MHz of bandwidth - for free (of better design quality than many low-end
commercial scopes have as I can assure you), as well as a good idea how a real digital sampling
scope works. In fact I personally know about more than one person who copied all or part of the
analog portion for his/her own project. I have seen many other instructables where the total amount
of usable information was quite a bit less than this alone.

Finally, I have published a fully open scope design as well - including firmware, board layout and
so on, which everybody is free to use if so desired, so overall I do feel I contribute to this
community in the way intended:

https://www.instructables.com/id/LCS-1M-A-Full-Featured-Low-Cost-Hobby-Oscillosc/

Regards,

womai
Thank you very much for taking the time to answer. I never said though, you are not contributing to
this community, I assure that would be horrible on my part. I do get your point. I might have
exaggerated a little and for that I must apologize.

Thank you for the link to your other project. Again (with my little experience in electronics) I cannot
but admire the design.

I sincerely hope you were not offended or in any other way annoyed by my comment. I just
expressed what was in my head at the time of reading.

If you like to get a quick and easy start in electronics, have a look at the Picaxe microcontroller (on
which my other scope project is based). www.picaxe.co.uk - typical times - for an absolute
beginner! - to get up and running and have e.g. an LED blinking is normally measured in minutes,
DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 43
not hours or days (no kidding). That's what go me started with microcontrollers and re-started with
electronics a few years back. There is a very beginner friendly support forum for any questions you
may have.

And no, I don't get any kickbacks from them ;-)


Thanks! I was considering the Andruino, but I am sure this one would be much simpler for a
beginner like me :)

Much appreciated!
The Arduino is very nice platform with a large community. But IMHO the Picaxe has a much easier
learning curve for an absolute beginner. The basic circuitry is the Picaxe, two resistors for the
program download connection to the PC (using a serial cable or a USB-to-serial converter cable),
and potentially one 0.1uF capacitor between power and ground. Can't beat that in terms of
simplicity! It's also very inexpensive - just a few $ will get you there.

The good thing is, once you got you feet wet with the Picaxe (and gained some experience with
general electronics while working with it), moving over (or up) to any other platform (Arduino, bare
PIC or Atmel or any other microcontroller) will be much easier as all the basic concepts stay the
same.
I use visual c# to display my scope screen , your screen is 40+ frames/sec , do you feel your
screen flicker ? in my code I use timer to update my ADC data and set timer to 4ms interval , I feel
my screen flicker very fast :

private void timer1_Tick(object sender, EventArgs e)


{
Graphics g = pictureBox1.CreateGraphics(); // pictureBox1 is picture that
display grid
pictureBox1.Refresh();
// function to display adc data;

DPScope - Build Your Own USB/PC-Based Oscilloscope: Page 44

You might also like