DSO138 Oscilloscope Kit Guide
DSO138 Oscilloscope Kit Guide
By Steven Vagts
Z-100 LifeLine
Insert, Issue #133
Designed as a training oscilloscope, the DSO138 contains only the basic oscilloscope
functions with no fancy features. The heart of the DSO138 is a Cortex-M3 ARM processor
(STM32F103C8). It uses a 2.4" TFT LCD (320 X 240 dot matrix, 262K colors) that
displays crisp and clear waveforms.
Simplicity in structure and easiness in assembly and operation are the main highlights
of the design. For these purposes, DSO138 uses mostly through-hole parts, and the kit
can be purchased with the surface mount parts already installed. The MCU for both
configurations has already been pre-programmed and no reprogramming is required.
As both the kit and assembled versions could be purchased for the same price, I
elected to purchase the assembled version and this manual will therefore not cover
assembly. However, there are two excellent sources of on-line assembly instructions,
pictures, and schematic. They are from the websites of JYE Tech Ltd - [Link]
and from Jean-Matthieu Dechriste of IoT Experiments at [Link]/dso138-
assembly/.
The DSO138 is partially open-sourced, which opens the possibility for users to add
different features or develop new applications on the hardware.
DSO138 Features:
Vertical
Number of Channel: 1
Analog Bandwidth: 0 - 200KHz
Sensitivity: 10mV/Division - 5V/Division
Resolution: 12 bits
Input Impedance: 1M ohm / 20pF
Max Input Voltage: 50Vpk (1x probe)
Coupling: DC, AC, GND
Horizontal
Max Real-time
Sampling Rate: 1MSa/second
Timebase: 10us/Div - 500s/Div
Record Length: 1024 points
Trigger
Trigger Modes: Auto, Normal, and Single
Trigger Types: Rising/falling edge
Trigger Position: ½ of buffer size fixed
Display
2.4" color TFT LCD with 320x240 resolution
Power Supply
Supply Voltage: 9Vdc (8-12Vdc acceptable, Do NOT exceed 12Vdc)
Supply Current: 120mA
Barrel Size: 2.1mm x 5.5mm x 9.5mm
Physical
Dimensions: 4.6 x 3 x 0.6" (117mm x 76mm x 15mm)
Weight: 2.5 Ounces (70g) (without probe)
Power:
ATTENTION:
Both the assembled product and the kit include instructions and a color schematic.
Note: Before beginning construction, identify and compare the parts you received with
the enclosed parts list. I also suggest that you check those parts that you can with
an ohmmeter and capacitor checker, if they are available. All parts are new; however,
in other China kits that I have constructed, I found I was missing a 3-pin header and
had an extra push button switch. I also found a shorted capacitor and a resistor
included in one kit of the wrong value. A little extra time here to check components
now, will save considerable time trying to troubleshoot a malfunctioning assembly.
Assembly Procedures:
- Begin assembly by inspecting the bare board. Get a feel for the layout of the
parts, part numbers, and what is going to go where. The component side is the side
with the silk screening, and while there may be some silk screening on the solder
side, for our small kits, all the parts will be installed on the component side of the
circuit board.
- I always suggest installing those components with the lowest vertical profile
first. This keeps the circuit board flat and stable for as long as possible during the
assembly and soldering process. So, start with any surface mounted components, while
the board is empty and most stable.
- Using a spare cotton towel under the circuit board helps protect the work
surface and stabilize the board during soldering.
- All the solder pins on this board are adequately separated, however, if you
accidently create a solder bridge across 2 or 3 pins, place solder wick over the
solder bridge and carefully heat the wick only until solder flows into the wick. Take
care not to overheat the component!
- While you can install components one at a time, I recommend installing all
like components at the same time. For example, insert all the resistors, bending the
leads slightly to keep them in place. For a small project such as this, the group
method ensures that all of the resistors are of the correct value, used correctly and
in their proper location, BEFORE soldering any in place! When you have found that all
is as it should be, turn the board over and solder all the leads at once, clipping off
the excess leads as you go.
- When all the parts have been installed, it is time to visually check your work
looking for solder bridges, parts with cold solder joints (meaning a poor connection,
not having the same appearance of smooth solder flow as the other solder joints), or
open, unsoldered joints. If you have an ohmmeter, check joints near each other for
shorts.
- Finally, clean the solder side of the board. Many use a special flux cleaner
product to clean the soldering side. Personally, I check each solder connection and
use a fine screwdriver or dental pick to scrape away any flux residue, then use a
slightly moistened toothbrush to remove the scraped residue. Do NOT get moisture on
any sensitive parts, such as switches, sockets, the display circuitry, etc.
- The assembled units I received did not have step 20, the Test Signal Ring
installed. This step is unnecessary, as you can just touch the red signal-in lead
directly to either test pad of J2 for the square wave signal. If you would rather have
a wire to attach to, you will need to install one yourself.
- Another difference noted between the kit described and my assembled unit is
that the ‘Trigged’ LED may be either red or green.
Calibration:
Whether you assembled the kit, or bought one already assembled, you should check the
calibration. Because there is always some capacitance between the scope input and the
ground probe, the unit needs to be calibrated to achieve better measurement results
for high frequency signals. If you change probes or probe cables to something of a
different length, this becomes particularly important. The calibration can be easily
done with the help of the built-in test signal at jumper J2.
The procedures are included with the kit, with color pictures, but in case you lost
your instructions or the web sites are removed, I have included them here with a few
pictures of my own:
Calibration Procedures:
1. Set the [SEN1] switch to 0.1V and [SEN2] switch to X5.
2. Set the [CPL] switch to AC or DC.
3. Connect the red clip to the test signal terminal, J2, near the power
connector in the upper right corner of the unit. Leave the black ground clip un-
connected.
4. Adjust Timebase to 0.2ms. You should see a square waveform similar to that
shown in the following photos. If the trace is not stable, adjust the Trigger Level
(the pink triangle in the right screen border) until you get a stable display.
5. Turn the trimmer capacitor, C4, with a small non-metallic screwdriver, so
that the waveform displays a sharp right angle in the upper and lower left corners
(leading edge) of the square wave. Too much and a spike will appear at the leading
edge of the waveform. Not enough and the leading edge will appear rounded.
Note: These trimmer capacitors rotate through 360 degrees, generally giving two
locations where the setting will be correct; one while increasing capacitance, the
other while decreasing capacitance. Either location will be fine.
6. Set the [SEN1] switch to 1V and [SEN2] switch to X1. Leave all other settings
unchanged.
7. Adjust the trimmer capacitor, C6, with a small non-metallic screwdriver, so
that the waveform displays a sharp right angle in the upper and lower left corners
(leading edge) of the square wave.
The first pictures show the affect of the trimmer capacitors on the waveform and at
what point the waveform has a right angle leading edge.
Connections and Controls:
Most oscilloscopes have two types of input coupling to handle both alternating current
and direct current signals. Typically, a switch lets you select AC or DC to suit your
measurement needs. When you set an input to DC coupling, the oscilloscope displays
both AC and DC signals, although AC signals may pose a problem. By switching to AC
coupling, the scope displays only AC signals; this simplifies measuring certain
electronic circuits.
DC Coupling
The DC coupling setting provides a direct electrical path into the scope. It accepts
all types of signals, including unchanging DC voltages, time-varying DC voltages, AC,
and combinations of AC and DC. In the last case, technicians call it an AC signal with
a DC offset. Sometimes, DC offsets can be bothersome; the total signal voltage may
push the signal waveform past the top or bottom of the display, hiding the parts you
want to see. However, under most other circumstances, DC coupling is all you need.
AC Coupling
With AC coupling, the oscilloscope’s input has a capacitor in the signal path,
removing DC offset from any mixed signal and letting you see the AC part more easily.
For example, some transistor and vacuum-tube amplifiers have a significant DC offset;
removing it with AC coupling helps you troubleshoot these circuits. Although it is
most helpful with mixed signals, AC coupling also works with pure AC signals. Because
it blocks DC, it is not suitable for DC signals.
GND Coupling
When GND is selected, the scope input is isolated from the input signal and is
connected to ground (0V input), disabling the waveform.
[SEN1]: The [SEN1] switch adjusts the Input sensitivity between 1V, 0.1V, and 10mV
(0.01V) scale. The oscilloscope’s display is divided into dotted boxes, with each
dotted box representing a division. The vertical scale represents the signal strength
in volts; the horizontal scale represents time in seconds (more on this later). So,
each box vertically represents the signal strength selected; 1 volt per division
(dotted box) if 1V is selected. Each division is further divided by 5 marks and each
dot represents 0.2 of a division on the display. Always start on the 1V scale, and
select lower until the signal waveform fills as much of the display as possible,
without losing the top or the bottom of the waveform. This improves the accuracy of
signal measurements. Example: If the upper trace covers 2 divisions and 2 marks above
that, on the 1V scale, the signal would be 2.4 volts peak; and if the signal were
symmetric (the same above and below the center, brighter horizontal line on the
display), the signal would be 4.8 volts peak to peak.
[SEN2]: The [SEN2] switch also adjusts the Input sensitivity, but uses the settings
X5, X2 and X1. Some oscilloscopes use 5x or 10x probes that reduce the signal 5 times
or 10 times. This switch performs the same function, allowing the oscilloscope to
handle higher voltage signals. X1 feeds the Input directly (Times 1), and the signals
selected by [SEN1] are as set (that is, a 1V signal is 1 volt/division). X2 feeds the
Input divided by 2, so each division is doubled (that is, a 2 volt signal is scaled to
only 1 division and each display division is 2 volts). Likewise X5 divides the signal
by 5 and 1 division on the display becomes 5 volts.
[OK]: Along the right edge, from the top, the [OK] push button freezes waveform
refresh, entering the HOLD state. The HOLD state allows you to freeze the waveform
while you study it and take voltage readings. Pressing it again will unfreeze the
waveform. Pressing and holding the [OK] button for about 2 seconds will turn ON or OFF
the on-screen display of measurements including: Vmax, Vmin, Vavr, Vpp, Vrms,
Frequency, Cycle, Pulse Width, and Duty Cycle. Note: You must have the Timebase active
(within a blue box) for this function to work.
[+] & [-]: The [+] and [-] parameter adjustment push buttons are used to adjust the
parameters selected by the [SEL] Select push button, the next button down.
[SEL]: The [SEL] Parameter Selection push button selects the parameter to be adjusted.
The selected parameter is highlighted. It will be discussed in great detail later.
[RESET]: The Reset button at the lower right performs a system reset and re-boots the
oscilloscope.
0V Line Alignment
Sometimes you may find the 0V line (the trace corresponding to 0V input voltage) does
not match with the VPOS indicator at the screen’s left margin. This can easily be
fixed by performing the “0V Line Alignment” function.
< First, set the Couple Switch [CPL] to the GND position.
< Press the [SEL] button to make the VPOS indicator highlighted (blue)
< Hold down the [OK] button for about 2 seconds.
< The trace will align to the VPOS indicator when you release the [OK]
button.
Note: You may see some residue mismatch remains at the highest sensitivity settings.
This is normal.
Note: While this capability was listed as a feature on nearly every website I checked,
I could NOT get this feature to work using any combination of switch presses. If
someone has found this to work, please contact me so that I can publish an update to
this capability.
Oscilloscope Waveform Display:
The waveform displayed on an oscilloscope is nothing more than a waveform’s voltage
over time. Hence the vertical axis shows the voltage (discussed earlier), and the
horizontal axis represents time, generally in fractions of a second.
And while most waveforms are repetitive, such as the sine wave AC (Alternating
Current) electrical power in our homes, the audio signal in our radios, or the picture
signal in our televisions, some can be single-shot, like closing a switch in a
circuit. All these signals are nothing more than a voltage value over time. However,
unless there is some way to tell an oscilloscope where or when to begin displaying a
repetitive waveform, the resulting signal is a very confusing changing measure of that
voltage over time.
Oscilloscope Triggering
Most oscilloscopes offer various types of trigger functions. Edge triggering is the
most basic and common type, but threshold triggering is another type of trigger
function that is offered both in analog and digital oscilloscopes.
However, our simple oscilloscope can only trigger on a voltage that we set. Triggers
are events that indicate signal voltage crossing a set level (i.e. trigger level)
along a specified direction (i.e. trigger slope, rising or falling).
Auto Mode - In Auto Mode our oscilloscope will perform display refresh no matter
if triggers happen or not. When triggers are detected, the waveform display will be
displayed with reference to trigger points. Otherwise, it will display whatever
waveform is detected, but at random reference points.
Normal Mode - In Normal Mode our oscilloscope will only perform display refresh
when there are triggers. If no triggers happen, the waveform display will stay
unchanged.
Single Mode - In Single Mode our oscilloscope works in Normal Mode, except that
the display will enter HOLD state after a trigger has been detected and the waveform
display has been updated.
Note: Both Normal and Single Modes are useful for capturing sparse or single
waveforms.
Note: The LED at the bottom-right corner (labeled ‘Triggered’ above, or ‘Trigged’ on
the board) is the trigger indicator. It blinks when triggers are detected.
DSO138 Oscilloscope Operation:
Operation is simple, but will take some getting used to. There is no ON/OFF switch.
Plug in the 5-9Vdc power supply or a 9v battery (you may need to construct or modify a
2-pin adapter) and the device turns ON. The DSO138 Oscilloscope will display two
screens while powering up (booting):
And then display whatever waveform that may be present at the Oscilloscope’s Input.
With my old analog oscilloscope, I just had to adjust a few knobs and I was in
business. However, with this and I guess most, if not all, digital units, you need to
select the parameter you wish to adjust, then adjust it with the up & down controls,
and select the next parameter. On this oscilloscope you find the Parameter Select
[SEL] button located at the lower right edge of the board.
This important button gives you the ability to change the several screen display
parameters. Each press of the [SEL] button changes the screen display parameter to the
next parameter in a counterclockwise direction. As each parameter is selected, that
parameter turns to a blue color or is placed in a blue box.
We will begin with the Timebase at the bottom center of the screen.
Where us is microseconds, ms is
milliseconds, and s is seconds.
Trigger Mode: The Trigger Mode, [AUTO], [NORM], or [SING], is displayed in pink on the
bottom row of the display any time a Trigger Mode has been set. When selected, Trigger
Mode appears pink in a blue box.
Trigger Slope: A Trigger Slope symbol (rising or falling) will be displayed in the
lower right corner of the display to show the desired slope of the trigger. When
selected, the Trigger Slope symbol appears pink in a blue box.
Trigger Level Indicator: In addition to the Trigger Level Readout displayed in the
upper right corner of the screen, a Trigger Level Indicator (triangle marker) is
displayed in the right margin of the screen at the appropriate voltage selected. When
selected, the Trigger Level Indicator (triangle marker along the right edge of the
screen) changes color from pink to blue. The Trigger Level Readout in the top right
corner of the screen remains pink, but will change to display the trigger level we
have selected.
Horizontal Position Indicator: Located at the top center of the screen display, the
Horizontal Position can be adjusted along the horizontal axis so the first point the
waveform curve crossing the horizontal centerline is at the left margin of the
display. This permits easier calculation along the horizontal (Time) axis for
determining period, or frequency of the waveform. One cycle period occurs from the
first crossing of the center horizontal axis (set at the left margin, either up or
down) to the next time the curve crosses the horizontal axis while headed in the same
direction. When selected, the Horizontal Position Indicator (the long, thick bar in
the center of a long line representing the horizontal axis) at the top center of the
display will change color from green to blue. Pressing the [+] or [-] Parameter
Adjustment buttons will move the waveform left or right until the waveform is
beginning at the desired place at the display’s left edge.
Vertical Position Indicator: Located at the left edge of the display screen, the
Vertical Position Indicator is a triangle in the left margin of the display and can be
adjusted up or down in an attempt to be able to see the entire waveform. If the
waveform is still too tall to see, change [SEN1] or [SEN2]. When selected, the
Vertical Position Indicator (triangle marker along the left edge of the screen)
changes color from yellow to blue. Pressing the [+] or [-] Parameter Adjustment
buttons will move the waveform up or down until both the top and bottom of the
waveform can be seen at the same time.
The next press of the Select Switch brings us back to the Timebase parameter.
However, we still have a few remaining display parameters around the screen:
Oscilloscope Mode: The Oscilloscope Mode is at the top left corner of the screen. It
will display HOLD in orange or Running in green and alternates between the two
settings when the [OK] button is pressed.
Trigger Level Readout: Located in the top right corner of the screen, the Trigger
Level Readout reflects the voltage level selected by adjustment of the Trigger Level
Indicator in the right margin of the display screen.
Couple Mode: The Couple Mode is displayed in the bottom left corner of the display. It
is set by the [CPL] switch to DC, AC, or GND (Ground). Please see the [CPL] switch
discussion above for further information on oscilloscope coupling.
Sensitivity (V/div): The Sensitivity of the vertical axis, as set by [SEN1] and
[SEN2], is displayed in the bottom left corner of the display. The sensitivity is
adjusted to show as much of the waveform vertically as possible, the goal being to
display the waveform as tall as possible without cutting off the top or the bottom.
You can adjust the Vertical Position Indicator, using the [SEL] button and [+] or [-]
Adjustment buttons, to move the waveform up or down as needed.
Triggered LED: A ‘Trigged’ LED at the bottom edge of the board will light any time
that the Trigger Level has been reached and the new waveform displayed.
What is a Waveform?
Most waveforms are repetitive. For example, a sine wave (such as 120VAC house voltage)
crosses the horizontal axis in a positive direction, then at the positive peak, starts
down again, crosses the axis and heads to a negative peak, where it starts heading up
again to cross the axis for a second time, but in a positive direction again. A half
cycle covers just the positive side (upper part of the curve) or the negative side
(lower part of the curve). The entire cycle or period of the wave is the length of
time to cover both the positive AND the negative part of the curve (to the exact same
position in the next cycle). It does not matter which part of the curve is first
(negative or positive), nor does it matter if the negative portion has the same
appearance as the positive portion, as long as the period covers both segments of the
curve. Also, the cycle can begin at any point in the curve to the next corresponding
similar point in the curve.
As another example, the period or cycle of the wave in our picture showing the
oscilloscope controls, is the time between each negative peak (the wave has both
positive going and negative going signal, but need not actually go negative in
voltage), and the waveform is similar at each of these points.
The oscilloscope allows us to measure a waveform using a time scale (the horizontal
axis) with the scale determined by the Timebase, measured in us (microsceonds), ms
(milliseconds) or s (seconds). The cycle mentioned above is called the period of the
wave. From the period of a wave, we can determine the wave’s frequency, using the
formula:
Similarly:
Period = 1/Frequency or Period (seconds) = 1/Hertz
Period (mseconds) = 1/Khertz
Period (useconds) = 1/Mhertz
For example, let us try out our new oscilloscope with some of our previous kits:
As you can see, I’m using our DL4YHF2 Frequency Counter, our XR2206 Function Generator
(set for a 40.5 KHz square wave), and our new DSO138 Oscilloscope to show the
waveform. However, when I first put this circuit together, I was very disappointed
with the DL4YHF2 Frequency Counter. While the oscilloscope showed that the waveform
was nicely square and stable, the frequency counter would not stabilize, if I got a
frequency at all. Yet when I used the frequency counter to test an oscillator, it was
nicely stable at the correct value.
Looking at the circuit diagram for the DL4YHF Frequency Counter, I saw that the
circuit for the crystal & oscillator tester used a 0.1 uF capacitor to eliminate any
unwanted DC voltage. But for the input of external frequencies, a capacitor was not
included. Perhaps a cyclic DC voltage was confusing the counter? So, on a whim, I
included the 0.1 uF capacitor at the output of the generator.
The capacitor fixed the unstable counter, as you can see - a nice solid 40.508 KHz
display, but the waveform was distorted by the charging and discharging capacitor.
When I moved the capacitor to the input of the frequency counter, between the input
jack and the circuit board, both the counter and the oscilloscope were happy. I have
corrected the DL4YHF2 article to reflect this new information.
Regarding the frequency and period? As you can see, the frequency is 40.508 KHz and
from the oscilloscope with the Timebase on the 10us scale, we get about 24.7us.
Our formula shows:
But, the DSO138 Scope has the capability to report these measurements and more,
automatically! I saved this capability for last, because I did not believe that such a
low priced piece of test equipment could provide this. Here is an example of 25KHz.
I’m sorry I forgot to set the waveform horizontally for getting the period in our
photo, but our calculations show that at 25KHz, our period should be about 40us.
Here’s a closeup of the wave and the automatic measurements:
Final Considerations:
When viewing large signals you may have noticed glitches on the waveform - left photo.
This is caused by excessive loading of U2B by the potential divider R6/7/8. The
solution is easy: Replace R6, R7 and R8 with resistors ten times greater in value,
i.e. R6 = 3k, R7 = 1.8k, R8 = 1.2k. The right photo shows the waveform after the
modification.
Note: I found this modification on the internet, with a few other modifications. I
have performed this mod and the photo showing the measurements on the display was
taken after the mod was complete. The new resistors are not popular sizes and the old
resistors were a pain to remove. So, I do not consider the improvement in the waveform
was worth the effort, especially if you do not have excellent soldering skills.
Acrylic Case:
Once the calibration is complete, you are ready to go. There is an excellent acrylic
case available on line for about $15.00 that provides a finished look to the project
and provides some protection for the exposed parts. As before, IoT experiments
provides excellent assembly procedures at:
[Link]/dso138-acrylic-case/
While this capability was listed as a feature on nearly every website I checked, I
could NOT get this feature to work using any combination of switch presses. If someone
has found this to work, please contact me so that I can publish an update to this
capability.
If you have any comments, corrections, changes, or thoughts, feel free to contact me
at:
Email: z100lifeline@[Link]