0% found this document useful (0 votes)
459 views17 pages

Input Voltages Outside The Safe Range of 35 V Can Lead To Permanent Damage!

The digital storage scope Hantek6022BE allows measuring two voltage channels (CH1 and CH2) with an input range of ±5 V. It samples the input signals with an 8-bit ADC at a selectable sampling rate between 10 kS/s and 30 MS/s and transfers the data to a PC via USB. The open source program OpenHantek6022 allows using the scope functionality under Linux and other operating systems.

Uploaded by

wilmaraf
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)
459 views17 pages

Input Voltages Outside The Safe Range of 35 V Can Lead To Permanent Damage!

The digital storage scope Hantek6022BE allows measuring two voltage channels (CH1 and CH2) with an input range of ±5 V. It samples the input signals with an 8-bit ADC at a selectable sampling rate between 10 kS/s and 30 MS/s and transfers the data to a PC via USB. The open source program OpenHantek6022 allows using the scope functionality under Linux and other operating systems.

Uploaded by

wilmaraf
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/ 17

The digital storage scope Hantek6022BE (as well as the similar Hantek 6022BL) allows to

measure two voltage channels CH1 (yellow) and CH2 (blue).


The input impedance is 1 MΩ || 25 pF (a typical value for scope inputs).
The measurable input signal range is ±5 V.
Input voltages outside the safe range of ± 35 V can lead to permanent damage!

The calibration output (blue, right side) delivers a square wave 0 V / 2 V @ 1 kHz that can be
used to adjust the frequency compensation of 10X probes.
The frequency can be varied between 50 Hz and 100 kHz to deliver a versatile test signal.

Each input section contains an 8-bit ADC (analog to digital converter) that allows to sample
the input voltage at a chosen sampling rate (10 kS/s ... 30 MS/s) and to transfer the digital
value to the PC via USB where it will be processed and displayed.
The Hantek6022 uses USB 2.0 high-speed transfer. It must be connected directly to the PC
without an USB hub in between. Make sure that the device does not share its high-speed bus
with other devices, this can be checked with the Linux commands lsusb; lsusb -t.

The device is powered over USB with a typical current consumption of less than 500 mA, so a
good quality USB 2.0 cable is sufficient, no need to use the strange red/black Y-cable.

The program OpenHantek6022 allows the usage of the scope under the Linux operating
system. The development and test platform is Debian stable.

OpenHantek6022 requires a recent Linux system with libusb-1.0, libfftw3 and the Qt libraries.
It compiles also under RPi, FreeBSD, MacOSX and Windows, but these systems are untested.

Fork me on GitHub! https://github.com/OpenHantek/OpenHantek6022

This document describes program version 3.1.2, subject to change without notice.

OpenHantek6022 User Manual 1/17 2020-07-29


Starting OpenHantek6022

The executable program is named OpenHantek.


It is installed in the directory /usr/bin (Linux),
so it can be called directly from a terminal or via
the menu entry OpenHantek.

The hardware of Hantek DSO6022 contain a


Cypress EzUSB processor that controls the data
sampling and the USB transfer. The device does
not contain a flash, the firmware must be loaded
into the RAM at the 1st program start after
powering the device.
The uploaded firmware is lost after switching off
the scope or disconnecting the USB, so the device
can never be bricked.

After starting the program, it searches for a


supported device by checking the USB VID/PID
of all connected USB devices.
DSO-6022BE: VID 0x04B4 PID 0x6022
DSO-6022BL: VID 0x04B4 PID 0x602A
DSO-2020: VID 0x04B4 PID 0x2020
DDS120: VID 0x8102 PID 0x8102

If a scope is found, the firmware will be


uploaded and changes the VID to 0x04B5.
The PID of the DSO-6022BE/BL doesn't change.
The DSO-2020 changes its PID to 0x6022 and
the DDS120 changes its PID to 0x0120.
If the firmware is uploaded successfully, the LED left of the CH1 connector blinks red.

If the upload takes more than 30 s, please close the window and restart the program.

This can happen in rare cases when another


high speed USB device is on the same USB bus.
If this happens, use another USB port of the
computer or disconnect the other device.

The scope should be connected alone to a


HS-USB bus in order to work undisturbed.

Under Linux you can check this with:


lsusb; lsusb -t

If the device is ready to use, the scope program


starts automatically.

Follow the Quick Start Guide to get a feeling for the program or start your real measuring job.
OpenHantek6022 User Manual 2/17 2020-07-29
Demo Mode

You can explore the look and feel of the program even without having the scope
hardware available, just click the Demo Mode button on the Select device window
or start the program as: OpenHantek --demoMode

This demo mode provides a sawtooth and a square voltage. You can play with gain,
timebase and trigger settings, check out the spectrum of the signals or export the
data as *.cvs, *.pdf or *.png file.

OpenHantek6022 User Manual 3/17 2020-07-29


Quick Start Guide

Use one of the two supplied probes and connect it to


CH1.

Switch the red slider on the probe into the 1X position.

Connect the hook of the probe tip to the left calibration out connector.

Connect the alligator clamp of the probe to the right calibration out connector.

The scope will show a yellow square wave trace.

If the trace isn't stable drag the small yellow arrow on the right of the trace a
little bit up, so that it is positioned in the middle of the trace.

The trace will snap into position and the top left red TR will turn into green TR .

Play a little with the settings to gain experience.


Detailed descriptions of all features can be found on the following pages.

OpenHantek6022 User Manual 4/17 2020-07-29


Using OpenHantek6022
The OpenHantek6022 program resembles the typical view of a real hardware oscilloscope, so
anyone who has experience with scopes (including analog CRT devices) should be able to
operate it.
Those who lack this experience should keep in mind that a scope is a complex measuring
instrument, so a basic understanding of how it works is required to perform correct
measurements.

The program version, device type and firmware version are displayed in the top line of the
window. This information helps when reporting issues or supposing enhancements.

The scope functions can be controlled by the four sections (marked orange) on the right:
• Voltage
• Horizontal
• Trigger
• Spectrum.

The selected settings are automatically saved when you exit and restored the next time you
start the program.

OpenHantek6022 User Manual 5/17 2020-07-29


Voltage
Both channels measure the voltage related to GND.
GND is directly connected also to the PC and to the main's
GND so never ever connect GND of the scope to other
voltages as it can destroy the scope and the PC!
This is not a limitation of this device but typical for most
scopes, even for much more expensive ones.
Each channel can be selected or deselected by ticking CH1 or
CH2. Input signal polarity can be Inverted.
AC/DC coupling can be selected if the scope's HW supports this
feature (→ Help menu entry AC Modification).
The vertical position of the trace can be changed
by dragging the name label left of the trace.
The default colors of the traces CH1 and CH2 correspond to the channel colors
yellow and blue on the front of the scope hardware.
The maximum measurable input signal range is -5 V … +5 V, values outside this range are
clipped (shown as minimum or maximum value).
Input voltages outside the safe range of ±35 V can lead to permanent damage!
Each channel has an amplifier with selectable gain that allows the amplification of the input
signal by the factor 1X, 2X, 5X or 10X, the available input voltage range decreases accordingly
from ±5 V to ±2.5 V, ±1 V and ±500 mV.
Input sensitivity per division can be selected from 20 mV/div up to 5 V/div (1/2/5 steps) by the
control field, e.g. 2 V.
The display's height is 8 div, marked with horizontal dotted lines on the screen.
The two supplied Hantek probes allow a signal attenuation of 1/10, so the possible
maximum input voltage range is increased ten times to ±50 V (e.g. 12 V input will be
measured by the scope as 1.2 V). The probe attenuation box eases the usage of this x10
range by multiplying the displayed value by 10 (the measured example value of 1.2 V from
above will be displayed correctly as 12 V). To support a variety of different probes, you can
type in any attenuation factor 1..1000 or simply scroll up/down.
The MATH channel (purple color) allows simple calculations with measured signals:
• CH1+CH2, CH1-CH2, CH2-CH1, CH1*CH2, CH1 AC, CH2 AC
The subtract functions allow the measurement of voltages between two points in a circuit by
measuring both with CH1 and CH2 and subtracting the values.
Math mode CH1*CH2 can be used to calculate the momentary power as product of voltage
and current (when current is measured with a 1 Ω shunt in the GND line then 1 V in MATH
display equates a power of 1 W). Or you can use a current probe and scale accordingly.
The AC modes calculate the AC component of a channel by averaging over the sampled
signal and subtracting this value from the samples, leaving only AC.
The scope also calculates typical values of each active channel and displays them in the
colored bottom lines, the values from left to right are:
Channel name, AC/DC coupling or math mode, voltage range, spectrum range,
Peak-to-peak voltage (Vpp), True RMS voltage ( i.e. sqrt( DC² + AC² ) ), DC voltage (average),
AC voltage, AC displayed as dB and finally the signal frequency.
A red channel marking (e.g. CH1) warns when the input signal exceeds the channel's physical
input range and clipping has occurred.

OpenHantek6022 User Manual 6/17 2020-07-29


Horizontal
The displayed time range of the trace can be selected by Timebase
between 10 ns/div and 100 ms/div in 1/2/5 steps. The display's
width is 10 div, marked with vertical dotted lines on the screen.
The optimal Samplerate will be selected automatically but the user
can also change this manually within the realistic range. The
maximum sample rate is 15 MS/s when sampling two channels.
If only CH1 is used, the maximum sample rate doubles to 30 MS/s.
The effective sample size used for display, calculations and export is
always 20 kS. For (effective) sample rates lower or equal 10 MS/s a 2
to 200 times oversampling is used, i.e. to get 20 kS @ 1 MS/s the scope samples 200 kS @
10 MS/s and averages over 10 samples each to decrease the noise floor by 10..20 dB. This
increase the effective resolution of the 8-bit ADC to almost 10..12 bit at low speed operation.
(Each 4X oversampling adds one bit, 4X → 9 bit, 16X→10 bit, 64X→11 bit, 256x → 12 bit…).
→ https://www.silabs.com/documents/public/application-notes/an118.pdf

The Frequencybase setting selects the resolution of the spectrum in Hz/div.

An overview of all settings is also visible top right of


the trace window.

Format selects T-Y (i.e. normal scope display, voltage (Y) over time (X))
or X-Y (CH1 = X, CH2 = Y), the horizontal position on the screen can be changed by dragging
the trigger marker on the top, the vertical position on the screen can be changed by
dragging channel CH2 left of the traces window.

Calibration out selects the frequency of the calibration output (a 2 Vpp square wave) on the
right of the scope, set to 1 kHz at each program start. The frequency can be selected
between 50 Hz .. 100 kHz in 1/2/5 steps. This can be used as a simple signal generator. The
output signal is created by software, so at high frequencies a phase jitter may occur (±250ns).

Two Markers (vertical lines, marked with 1 and 2) allow to measure time as well as frequency
of the traces by dragging the lines. New markers can be positioned also by click and drag
inside the trace window. <Double click> creates two markers with a distance of 10% of the
screen width, allowing a 10x zoom. <Control> decreases the distance to 1% → 100x zoom,
<Shift> centers the markers around the trigger position. Both modifiers can be combined.
<Right double click> moves the markers out of the way to the left and right screen margins.
<Scroll wheel> moves both markers left/right, <Ctrl scroll wheel> changes their distance.

- The digital Phosphor function (sine waves icon) simulates a slow fade out of
traces to detect short events (shortcut <P>).
- The Histogram (gaussian bell icon) shows the probability density function of the
signal voltage at the right to identify hidden structures of the signal. (<H>).
- The Zoom function (magnifying glass icon) displays a new window below the
main window with zoomed time range equating the markers distance (<Z>).
- The Measure function (drafting compass icon) opens an extra section and allows
measurement of time or frequency span and levels (<M>).

OpenHantek6022 User Manual 7/17 2020-07-29


Trigger
Triggering allows to display a stationary trace by fixing a rising or
falling Slope of the signal of the selected Source channel to a
defined position on the screen. The triggering is done in software
by searching for the trigger condition in the sampled values and
skipping the necessary amount of leading samples to position the
trace accordingly.

Trigger Mode can be:


• Roll - display a free running trace (useful for slow timebases - due to the omission of
the software triggering the display is refreshed permanently in real-time)
• Auto - display a running trace even if no trigger point is detected
• Normal - display no trace without active trigger, hold the last triggered trace
• Single - display a new triggered trace every time the space bar is pressed

The play/pause icon   (top left) starts and stops the display during Auto and Normal mode.
The keyboard shortcuts <Spacebar> or <Pause> or the key <S> also work as Start / Stop.
If the <Spacebar> does not work under Windows, you should use the other alternatives.
The refresh icon (key <R>) clears the screen and starts a new trace in roll mode.

Trigger Source can be


• CH1, CH2 – Triggers on 1st active slope, even on fast spikes or glitches.
• CH1 smooth, CH2 smooth – Triggers on „stable“ slope only, ignores fast spikes.

Trigger Slope:
• ↗ Triggers on rising slope
• ↘ Triggers on falling slope
• ⤨ Triggers alternatively on rising and falling slope

The trigger level (voltage) can be selected by dragging the small


colored (e.g. yellow) arrow to the right of the recording window.
The trigger position on the screen can be selected by dragging the
colored (e.g. yellow) arrow at the top of the window.

Trigger status (TR = triggered, TR = not triggered), source, slope, voltage level and horizontal
position are displayed in the upper left corner of the trace window followed by the pulse
width of the triggered pulse and the following pulse in opposite direction and the duty cycle.

Trigger Slope ⤨:
Triggers on alternating slopes.
Can be used together with
digital phosphor to show a
kind of eye diagram, either
triggered on the signal itself
or by a stable trigger signal
on the other scope channel.

OpenHantek6022 User Manual 8/17 2020-07-29


Spectrum
The program calculates the voltage spectrum of the three channels
using the discrete FFT and displays the results if enabled.
The displayed values are shown as dBV (0 dBV equals 1 V rms).

The applied Window function as well as the reference point


for the spectrum calculation can be changed in this menu:
Oscilloscope / Settings / Spectrum

Typical window functions are Hann (raised cosine), Gauss or Flat top. The Hann window has
the best frequency selectivity (narrowest bandwidth) while the Flat top window allows
accurate amplitude measurements. Gauss window characteristic is in between.
The Flat top window is typically employed on data where frequency peaks are distinct and
well separated from each other (e.g. for harmonic distortion measurements).
If the frequency peaks are not guaranteed to be well separated, the Hann window is
preferred because it is less likely to cause individual peaks to be lost in the spectrum.
Other different window functions are available for the curious user.
The frequency range of the spectrum can be selected in the Horizontal section, minimum
frequency is always zero, the maximum frequency is limited to the Nyquist frequency, this is
half the sampling rate.
A lower sampling rate yields a narrower frequency lobe and increases the selectivity while a
higher sampling rate allows to display a wider frequency range at the cost of less selectivity.

Important: Sampling a signal with spectral components above the Nyquist frequency leads
to aliasing, i.e. the higher spectral components are mirrored into the low frequency range.
This is not a limitation of this device, but should be considered when looking at the spectrum.

The default Reference level of 0 dBV converts a 1 V rms sinusoidal signal into a displayed
0 dB amplitude frequency peak.
Professional audio measurements typically use dBu (aka. dBm @ 600 Ω load):
0 dBu = 0 dBm = 0.775 V rms which corresponds to a reference level of -2.2 dBV.
Conversely, for RF with a 50 Ω load, 0 dBm equates approximately 0.224 volts:
0 dBm = 0.224 V corresponds to a reference level of -13 dBV.
The Minimum magnitude setting hides the noise floor and calms the display;
all spectral components below this level are not displayed.

OpenHantek6022 User Manual 9/17 2020-07-29


Zoom function

The zoom function (magnifying glass icon, shortcut key <Z>) opens a second
window below the main window with an enlarged time range corresponding to
the distance between the markers (1 & 2).

New markers can be positioned by click and drag inside the (un-zoomed) trace window.
A <double click> (left) creates two markers close to each other with a distance of 10% of the
screen width, thus defining a zoom rate of 10, <ctrl double click> defines zoom = 100.
The shift modifier centres the markers around the trigger point.
The <scroll wheel> moves both markers left / right, <ctrl scroll wheel> changes their distance.

OpenHantek6022 User Manual 10/17 2020-07-29


Cursor Measurements

The measurement function (drafting compass icon, shortcut <M>) allows to


measure voltage or spectral amplitude as well as time or frequency intervals of
one or more displayed tracks.

Select the trace (e.g. SP1), set it to ON (clicking on the ON/OFF text toggles its state) and draw
a (yellow) rectangle (red circle) to measure e.g. frequency and magnitude difference.

You can also draw another (blue) rectangle (purple circle) to measure a different trace.

OpenHantek6022 User Manual 11/17 2020-07-29


Settings
The program behaviour can be chosen in Oscilloscope / Settings / Scope menu:

Horizontal
If you want to measure very slow
signals the slowest possible
timebase can be increased up to
10 s/div (this shows 100 s on the
screen).
Be patient, in AUTO or NORMAL
mode the scope will not refresh the
trace on screen unless a full block is
captured, in ROLL mode the screen
is updated permanently.
Longer hold-off time between captured frames allows to lower the CPU load, while
faster sampling improves the triggering on rare events.

Graph

Interpolation mode can be either Off or Linear :

Off displays only the real sampled points, difficult to detect when only a few points
are displayed, this happens with fast time base settings, e.g. at 50 ns/div.
Linear connects these points by straight lines, showing an continuous time curve.

Digital phosphor depth defines the numbers of fading previous traces on the screen.

Export zoomed screen in double height is applied to exported hardcopy images as


shown on the next page.

Measurement cursors position can be either left or right of the scope's screen.

The program Configuration can be chosen in Oscilloscope / Settings / Scope menu:

The scope's state is automatically preserved between sessions. The automatic save
can be disabled, e.g. to start always with a predefined setup.

It is also possible to discard all user settings and restart the next time with default
settings.

If you have modified the HW of the scope to support AC coupling (see detailed info in
the Help menu), tick the box here to use this function after the next restart.

OpenHantek6022 User Manual 12/17 2020-07-29


Data Export

The Export CSV function allows to store the measured


samples and the resulting spectral values as a *.csv file
(comma separated values).

All 20000 voltage samples as well as all 10001 calculated


spectral components of all active channels are stored.

The values are stored as SI basic units:


seconds, volts, hertz and dB.

The field separator, usually a comma, is automatically


changed to a semicolon for countries where the comma
is used as the decimal separator, e.g. Germany.

The Screenshot function captures the program window as


a *.png picture (*.jpg is also possible) or a *.pdf file.

The Hardcopy function creates an image/pdf of the scope


screen in printer colors, that are optimized for print on paper.

A zoomed screen is scaled to


double height, configuration:
Oscilloscope/Settings/Scope

The Print function sends the hardcopy screen content directly to the printer in pdf format.

OpenHantek6022 User Manual 13/17 2020-07-29


Appearance

OpenHantek6022 provides translations for French, German, Italian, Portuguese, Russian and
Spanish. The French, German, Russian and Spanish translations are complete, the other
languages are work in progress.

OpenHantek6022 automatically adapts to the used light or dark system theme.

The colors of the traces on the screen as


well as the exported png / pdf documents
can be adjusted individually in the menu
Oscilloscope / Settings / Colors.

OpenHantek6022 User Manual 14/17 2020-07-29


Command line options
OpenHantek6022 offers these command line options:
Usage: OpenHantek [options]

Options:
-h, --help Displays this help.
-v, --version Displays version information.
-d, --demoMode Demo mode without scope HW
-e, --useGLES Use OpenGL ES instead of OpenGL
--useGLSL120 Force OpenGL SL version 1.20
--useGLSL150 Force OpenGL SL version 1.50
-i, --international Show the international interface, do not translate

The –use… options allow to force a different OpenGL version than the automatically
detected (e.g. in case of display artifacts).

Tips and Tricks for the Experienced User


Under Linux the program tries to get a higher real-time priority to yield a slightly
better USB allocation, especially at high sampling rates (30 MS/s for one channel,
15MS/s for two channels). To make this possible, the user must be a member of a
real-time group. This could be the group audio, for example, if you are performing
professional audio processing with JACK.
1. set limits in /etc/security/limits.d:
@audio - rtprio 90
2. add user to the group, e.g. audio:
usermod -a -G audio <your_user_name>

But you can also set the limits for your user only:
1. set limits in /etc/security/limits.d:
<your_user_name> - rtprio 90

These settings work best when you're using a realtime-kernel, e.g. the debian
package linux-image-rt-amd64. But also the recent standard kernels allow to set
higher priority and better scheduling if enabled for your user.

OpenHantek6022 User Manual 15/17 2020-07-29


Hantek6022 Analog Front End (One Channel)

The input signal Vin is divided 1:10 by a frequency compensated resistors R27/17 and R31/21.
Clamping diode A7 limits Ve to ±5 V (equates Vin = ±50 V). U11/7 together with the analog
multiplexer amplifies Ve by 1X, 2X, 5X or 10X (Vout).

Vout is fed into the ADC AD9288 that measures the


difference between Ain and /Ain and converts the
difference input voltage range -512 mV .. +512 mV
into digital values 0x00 .. 0xFF (0 V equates 0x80).

Unfortunately Hantek decided to operate the ADC far


out of spec with a common mode voltage Vc = 0 V,
which is contrary to the data sheet requirement for the
common mode voltage:

Vc = 0.3  x  Vd – 0.2  V .. 0.3  x  Vd + 0.2  V,


with Vd = 3  V → Vc = 2.7  V .. 3.1  V

Probably due to this misdesign the first 1000..1500 samples of a measured block are
unstable, OpenHantek6022 bypasses this behavior by sampling more values and dropping
the first ~2000.

Another bad design decision by Hantek was that the oscilloscope does not support AC
coupling of input signals – but you can modify the hardware yourself.
A short AC modification howto is available via the Help menu or from github:
https://github.com/OpenHantek/OpenHantek6022/blob/master/docs/HANTEK6022_AC_Modification.pdf

OpenHantek6022 User Manual 16/17 2020-07-29


Hantek6022 Digital Back End

The Hantek6022 (BE & BL) backend is built around the EzUSB processor CY7C68013A that
handles USB communication, ADC timing, front-end channel gain setting and also generates
the calibration output signal. Hantek 6022BE and 6022BL (in scope mode) differ slightly in the
use of the processor pins (different BL pins in green), but otherwise work identically.

EzUSB does not store the user firmware permanently in flash memory, it must be uploaded
to RAM each time the unit is turned on. The program OpenHantek6022 checks if the correct
firmware version is loaded. In case it detects no FW or a wrong FW version (e.g. because of
using the scope with sigrok or the original Hantek software before) the correct firmware will
be uploaded automatically. If no device is detected, disconnect / reconnect the USB plug.

OpenHantek6022 User Manual 17/17 2020-07-29

You might also like