Author Topic: Hantek 6022BE 20MHz USB DSO  (Read 584451 times)

0 Members and 2 Guests are viewing this topic.

Offline swkim01

  • Newbie
  • Posts: 2
  • Country: kr
Re: Hantek 6022BE 20MHz USB DSO
« Reply #1000 on: March 28, 2017, 08:05:55 am »
I added some functions for 6022BE to the following repository, which is based on openhantek master branch. You can adjust samplerate and use software triggering on Linux.

https://github.com/swkim01/openhantek

 - Support 48, 24, 16, 8, 4, 2, 1 M and 500, 200, 100 k Hz samplerates with modded firmware by jhoenicke.
 - Support software trigger by detecting rising or falling edge of signal. Use software trigger item on the trigger menu. For trigger level, adjust left arrow on the right-side of the graph.
 - Note that I dropped first 1000 samples due to unstable/unusual reading.
 
The following users thanked this post: momus

Offline momus

  • Newbie
  • Posts: 3
Re: Hantek 6022BE 20MHz USB DSO
« Reply #1001 on: April 02, 2017, 11:34:07 am »
I added some functions for 6022BE to the following repository, which is based on openhantek master branch. You can adjust samplerate and use software triggering on Linux.

https://github.com/swkim01/openhantek

 - Support 48, 24, 16, 8, 4, 2, 1 M and 500, 200, 100 k Hz samplerates with modded firmware by jhoenicke.
 - Support software trigger by detecting rising or falling edge of signal. Use software trigger item on the trigger menu. For trigger level, adjust left arrow on the right-side of the graph.
 - Note that I dropped first 1000 samples due to unstable/unusual reading.

If you could compile a working windows binary, that would be great ! I have a laptop on debian jessie, but without qt5, I cannot easily try compiling your fork...
Anyways thanks !



Edit : Finally, I forgot to be stupid 5 minutes, and managed to compile and install your OpenHantek fork, and the udev rule correctly.
Triggering kind of works, but it's still very jerky...

Interface was quite sluggish at first. A lot better with the correct graphic card driver installed.
« Last Edit: April 04, 2017, 03:10:49 pm by momus »
 

Offline chemary

  • Contributor
  • Posts: 6
Re: Hantek 6022BE 20MHz USB DSO
« Reply #1002 on: April 04, 2017, 10:18:27 pm »
Hi, I'm using Open6022BE v1.0 beta PR19 on Windows 8.1 and I was very happy with the job done by RichardK, but since I installed my network printer I can not open it, if I uninstall the printer the problem goes, but I need the printer, anybody knows how to solve the problem?
 

Offline N9XYP

  • Contributor
  • Posts: 13
  • Country: us
Re: Hantek 6022BE 20MHz USB DSO
« Reply #1003 on: April 05, 2017, 06:12:59 am »
swkim01
     
       I tried to build your openhantek and it failed  at Qt5widgets. Not sure how to trouble shoot this, noob with Linux (Ubuntu 32 bit). I have been using my scope under windows just fine but my desktop isn't very portable and I would like to use this in the field.

terminal window output
Code: [Select]
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at openhantek/CMakeLists.txt:3 (find_package):
  By not providing "FindQt5Widgets.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "Qt5Widgets", but CMake did not find one.

  Could not find a package configuration file provided by "Qt5Widgets" with
  any of the following names:

    Qt5WidgetsConfig.cmake
    qt5widgets-config.cmake

  Add the installation prefix of "Qt5Widgets" to CMAKE_PREFIX_PATH or set
  "Qt5Widgets_DIR" to a directory containing one of the above files.  If
  "Qt5Widgets" provides a separate development package or SDK, be sure it has
  been installed.


-- Configuring incomplete, errors occurred!
See also "/home/michael/Downloads/openhantek-master/build/CMakeFiles/CMakeOutput.log".

Thanks
 

Offline swkim01

  • Newbie
  • Posts: 2
  • Country: kr
Re: Hantek 6022BE 20MHz USB DSO
« Reply #1004 on: April 06, 2017, 07:44:27 am »
Edit : Finally, I forgot to be stupid 5 minutes, and managed to compile and install your OpenHantek fork, and the udev rule correctly.
Triggering kind of works, but it's still very jerky...
This software triggering is simple(line 104-143 at https://github.com/swkim01/openhantek/blob/master/openhantek/src/glgenerator.cpp), so you can change it more reliably. If it still jerky, try to adjust slope direction and trigger level within signal range.

Code: [Select]
...
CMake Error at openhantek/CMakeLists.txt:3 (find_package):
  By not providing "FindQt5Widgets.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "Qt5Widgets", but CMake did not find one.

  Could not find a package configuration file provided by "Qt5Widgets" with
  any of the following names:

    Qt5WidgetsConfig.cmake
    qt5widgets-config.cmake

  Add the installation prefix of "Qt5Widgets" to CMAKE_PREFIX_PATH or set
  "Qt5Widgets_DIR" to a directory containing one of the above files.  If
  "Qt5Widgets" provides a separate development package or SDK, be sure it has
  been installed.


-- Configuring incomplete, errors occurred!
See also "/home/michael/Downloads/openhantek-master/build/CMakeFiles/CMakeOutput.log".
Did you install qt5 sdk or qtbase5-dev package? Try to install it by following command:
Code: [Select]
$ sudo apt-get install qtbase5-dev

 

Offline N9XYP

  • Contributor
  • Posts: 13
  • Country: us
Re: Hantek 6022BE 20MHz USB DSO
« Reply #1005 on: April 06, 2017, 09:07:53 am »
It looks like I installed the wrong qt package.  |O

Now I am getting another error that REPLACE requires 4 arguments (this is the line string(REPLACE "\n" " " DESCRIBE_STATUS ${DESCRIBE_STATUS})

Code: [Select]
michael@Studiom:~/Downloads/openhantek-master/build$ cmake ../
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenGL: /usr/lib/i386-linux-gnu/libGL.so 
-- Found libusb: /usr/lib/i386-linux-gnu/libusb-1.0.so 
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE 
-- Found FFTW: /usr/lib/i386-linux-gnu/libfftw3.so 
CMake Error at cmake/CPackInfos.cmake:28 (string):
  string sub-command REPLACE requires at least four arguments.
Call Stack (most recent call first):
  CMakeLists.txt:30 (include)


CMake Error at cmake/CPackInfos.cmake:29 (string):
  string sub-command REPLACE requires at least four arguments.
Call Stack (most recent call first):
  CMakeLists.txt:30 (include)


CMake Error at cmake/CPackInfos.cmake:30 (string):
  string sub-command REPLACE requires at least four arguments.
Call Stack (most recent call first):
  CMakeLists.txt:30 (include)


CMake Error at cmake/CPackInfos.cmake:31 (string):
  string sub-command REPLACE requires at least four arguments.
Call Stack (most recent call first):
  CMakeLists.txt:30 (include)


CMake Error at cmake/CPackInfos.cmake:32 (list):
  list GET given empty list
Call Stack (most recent call first):
  CMakeLists.txt:30 (include)


-- Configuring incomplete, errors occurred!

Thanks for putting up with me
 

Offline KimBP

  • Newbie
  • Posts: 2
  • Country: dk
Re: Hantek 6022BE 20MHz USB DSO
« Reply #1006 on: April 14, 2017, 02:21:42 pm »
Hi

I've been through the entire thread now. Learned a lot about limitations on this device. Great reverse engineering to all of you.

Following might be more relevant in other forums but now the openhantek is mentioned here ...

I have to use it at my ubuntu laptop and ended up choosing openhantek (master branch from swkim01) (commit: 73c58a5279efb58b56df417a40749ab9d4582132)

From sha256sum's of the firmware I deduce the firmware added to the openhantek repositiory comes from https://github.com/jhoenicke/Hantek6022API.git PyHT6022/HantekFirmware/modded/mod_fw_01.ihex (commit: 65fbf736bf71dc65ffaee2145393daba22ad0281)

swkim01 claims SW triggering is working fine, but I must admit I still haven't seen any stable triggering yet.

See my 'badtrigger' image with phosphor showing how unstable it is. (Source is the 1Khz reference provided by the scope)
Also notice how the topline in 'badtrigger' tells me timebase is 1.024ms (default when choosing 1MS/s) - I manually wrote 200us in the Timebase field (seems like the 200us is the value being used)

I furthermore see strange behavior on Timebase being changed when I change samplerate. Anyone else having this experience?

The timebase-change image is result of incrementing samplerate in 'badtrigger from 1 to 2 MS/s. See how Timebase is changed from 200us to 512us.
« Last Edit: April 14, 2017, 02:23:54 pm by KimBP »
 

Offline KimBP

  • Newbie
  • Posts: 2
  • Country: dk
Re: Hantek 6022BE 20MHz USB DSO
« Reply #1007 on: April 15, 2017, 11:45:08 am »
I have a fix for the unstable SW triggering while using openhantek.

For now you can pick it at github.com:KimBP/openhantek.git branch 6022be_trigger but hopefully swkim01 will pull it so we don't have too many branches to keep an eye on
 

Offline daybyter

  • Frequent Contributor
  • **
  • Posts: 396
  • Country: de
Re: Hantek 6022BE 20MHz USB DSO
« Reply #1008 on: April 15, 2017, 08:21:43 pm »
I thought the jhoenicke firmware used lower sampling rates to avoid the trigger misses? It seems, you use the same samplerates as the hantek firmware?
 

Offline daybyter

  • Frequent Contributor
  • **
  • Posts: 396
  • Country: de
Re: Hantek 6022BE 20MHz USB DSO
« Reply #1009 on: April 16, 2017, 06:47:34 pm »
Trying to run OpenHantek in a Debian Jessie VirtualBox. Got it compiled, but when I start it, I get lots of errors like:

============================
20:35:51.289: Sending bulk command: 07 00 0c 00 00 00 00 00
Sending bulk command 07 failed: Pipe error
20:35:51.290: Sending control command b4: ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00
Sending control command b4 failed: Pipe error
20:35:51.293: Sending control command b5: 00 04 08 fd 20 40 ef 01 00 00 00 00 00 00 00 00 00
Sending control command b5 failed: Pipe error
20:35:51.312: Received 20480 B of sampling data
20:35:51.325: Sending bulk command: 07 00 0c 00 00 00 00 00
Sending bulk command 07 failed: Pipe error
============================

I googled and found that it could be a permissions problem? Changed the permissions in the udev rule to 666, but that didn't help so far.

Thanks in advance for any hints,
Andreas

PS: is there a probe setting (x1/x10) in OpenHantek?
« Last Edit: April 17, 2017, 03:54:56 am by daybyter »
 

Offline daybyter

  • Frequent Contributor
  • **
  • Posts: 396
  • Country: de
Re: Hantek 6022BE 20MHz USB DSO
« Reply #1010 on: April 17, 2017, 09:05:54 pm »
So I'm still trying to understand the problem with those pipe errors. Seems like I'm not the only one with these problems:

https://github.com/OpenHantek/openhantek/issues/7#issuecomment-255551632

So I'm currently reading in openhantek/src/hantek/types.h
and
..../types.c

As I understand it there message b4 would be CONTROL_SETOFFSET, b5 would be CONTROL_SETRELAYS and 07 would be BulkSetGain .

Now my first idea is, that the scope hardware doesn't support these functions, so the application should never send these commands?

Could it be, that the app recognized a different model and therefore sends wrong commands?
 

Offline Plech

  • Newbie
  • Posts: 1
Re: Hantek 6022BE 20MHz USB DSO
« Reply #1011 on: April 20, 2017, 11:08:57 am »
Hi everyone! I'm using the Open6022BE software from RichardK, but I'm getting some problems with the time division option. When analysing a slow signal with a time division of 500ms - 1s the software starts to become slow as hell. Anyone has the same problem? I have already tested in two different PC and nothing.  The original Hantek's software V1.0.5 has the same problem.
 

Offline daybyter

  • Frequent Contributor
  • **
  • Posts: 396
  • Country: de
Re: Hantek 6022BE 20MHz USB DSO
« Reply #1012 on: April 22, 2017, 11:28:33 pm »
Maybe you have to wait until the 1 MB buffer is filled?

PS: Linux users: there is some progress on OpenHantek + 6022b* over the last days. Would be cool if some of you would give the current sources a try and give some feedback.

https://github.com/OpenHantek/openhantek/issues/7
 

Offline raich

  • Contributor
  • Posts: 8
  • Country: fr
Re: Hantek 6022BE 20MHz USB DSO
« Reply #1013 on: April 28, 2017, 10:28:41 am »
I am working on openhantek for the 6022be currently. In fact the problem with the pipe is simply that the command codes sent to the hardware by the program are wrong!
I am on this since 3 months now and I slowly get something that one day may be usable. I started off with the latest version of D. Graeff which comes in 2 versions: the original openhantek and a new branch in which he has re-written the GUI in qml and separated hardware access from the GUI code. He also implemented a demo device on which most of the GUI facilities can be tested. Unfortunately this new GUI is incomplete! I therefore tried to keep the separation of the hardware code and his demo device (which I modified) but use the original GUI.
You can find the code at  https://github.com/ucc-electronics/openhantek
This is really work in progress and I cannot guaranty that it will even compile but if you are curious...
Current state:
Demo device working. It has 2 channels of which the first one is a +- 1V, 1kHz sine wave and the second one a 0-1V 1 kHz square wave. When you start the program with no device connected then you can still run this demo device. I added some code to have a random start of the signal, which will allow to test triggering.
If you have the scope connected but the firmware is not loaded you get a dialog window allowing you to upload the firmware and start the scope. It will tell you which type of firmware is loaded. For the moment I am only working on the Hantek firmware but J. Hönickes firmware can also be loaded.
So this is supposed to work:
  • upload of firmware (the code is changed such the .ihx files can be uploaded
  • trace readout and display
  • change of gain
  • change of time base implying change of sample rate
Still missing: triggering
If interested, please give it a try and tell me your impression but please keep in mind that this is under very active development.
Cheers Uli
 

Offline daybyter

  • Frequent Contributor
  • **
  • Posts: 396
  • Country: de
Re: Hantek 6022BE 20MHz USB DSO
« Reply #1014 on: April 28, 2017, 09:05:28 pm »
Uli, those pipe errors are already fixed in the current OpenHantek trunk. Download those sources again, before you fix errors, that are already fixed.

I just worked with it for an hour, or so, without much trouble. Got some X errors and at one point, the software was unwilling to fetch the samples from the scope. Had to restart the VM then.

The triggering is still not really usable, so I usually work with single triggering and press 'start' several times, until the part of the trace, that I need.

But all in all it's already usable for hobby work, I'd say. Once the triggering becomes really stable, it would be a real alternative to the windows software.
 

Offline softfoot

  • Contributor
  • Posts: 12
  • Country: gb
Re: Hantek 6022BE 20MHz USB DSO
« Reply #1015 on: May 22, 2017, 10:14:26 am »
Is there a schematic for the 6022BE ?? If so can someone point me in the right direction.
Many thanks
Dave

Update --- It seems that the 6022BE is "out of stock" or "remaining stock is faulty" according to 3 different eBay shops so it may be academic. Just my luck !!
« Last Edit: May 23, 2017, 09:19:38 am by softfoot »
Grumpy Old Software/Hardware Engineering Git
Dave
 

Offline Hernexto

  • Contributor
  • Posts: 5
Re: Hantek 6022BE 20MHz USB DSO
« Reply #1016 on: May 25, 2017, 10:47:22 am »
Hello everyone, been a while since I have poked in here... I have some free time coming up and I want to hammer away some more Bugs, GUI and Measure in particular...

If anyone would like to compile a list of known Bugs either new or previously mentioned on the last release and how to replicate them it would be helpful :P

In regards to the Measurement problems, if anyone can get some screenshot comparisons between correct stock software measurement and incorrect Open6022 measurement that would be a great help!

I had to reverse engineer the Measurement code from the original DLL and there might be some data loss in converting between data types...

Also, I was made aware of a GUI/INI bug where changed waveform colors wouldn't be restored after closing and reopening the program, I fixed that today and when I get some more bugs fixed I'll compile a new build for everyone with updated source.

It's a pitty I see your availability right now (only more than 1 year late  |O ).

As a programmer I would like to fix some bugs but C is not one of my languages (and I hate pointers which you probably must use)

In case in the future you can do something the most annoying bugs I found are:

- when you change timedivision scale sometimes doesn't work well: seems to not clear previous capture data or do it at that moment
- small top graph doesn't work well (specially when you change time division) and position indicator 'jumps' in a bizarre way
- switching from auto-manual-single shot sometimes doesn't work well (doesn't starts capturing) and if play utton doesn't work you must switch to auto.
- I don't have too much experience on scopes but... auto is always capturing, and manual mode shouldn't update only when a new signal comes so it overwrites the actual one?

In general (you saved my scope because original software... well you know) it works good, only seems to need a good setup/initialization every time user changes values in the interface.
I will use it again on the following days, I will try to be more explicit.

Thanks for your job!!
 

Offline Merlyn

  • Contributor
  • Posts: 29
Re: Hantek 6022BE 20MHz USB DSO
« Reply #1017 on: June 08, 2017, 11:01:29 am »
Hi,

I'm using my 6022BE exclusively for checking audio amplifiers' output wave form. I'm mostly an analog guy so forgive me these 2 stupid questions:
1/ Is it possible to include in the software a power output measuring function. It's going to be very convenient if one could choose the load at which the amp is tested (maybe from a menu?) like 2, 4, 8 or 16 Ohms and then the software could calculate the power?
2/ Is it possible to include measuring the total THD of the amp in percent (sine wave). Not spectrum analyzer just total THD?
 

Offline Pavlines

  • Newbie
  • Posts: 1
  • Country: ru
Re: Hantek 6022BE 20MHz USB DSO
« Reply #1018 on: June 16, 2017, 08:20:49 pm »
Hello everybody! RichardK, can you give a circuit of the changes in your DSO. Replaced and installed items. I want to reduce the noise at the input. Because I'm tired of false triggers.
 

Offline murgui

  • Newbie
  • Posts: 1
  • Country: es
Re: Hantek 6022BE 20MHz USB DSO
« Reply #1019 on: July 26, 2017, 04:05:46 pm »
Hi guys, I just spent a few hours reading the whole post. This is a small summary, mainly from the first 25 pages. After that, RichardK didn't have time and so the development change to just some lone wolves trying to keep working.

The great RichardK developed some awesome software for the 6022BE (which I think is completely compatible with BL version). He has no longer the time for working on it but uploaded his last version here in previous pages.

In addition, a user manual has been created mainly by the user Matchless.

I uploaded both files to a GDrive so everybody can download it easily.

https://drive.google.com/open?id=0ByGmeCSG-XbINGNlT0RMNW9la3M

Something that hasn't been commented here, mainly because it's a BE post and not a BL post is the fact that the BL logic analyzer is compatible with Saleae software, which is really good.

A Spanish video explaining the procedure can be found here:



Link to the software in the description.

I hope this small commentary helps somebody intimidated of the 41 pages.

Nic.
 

Offline b_force

  • Super Contributor
  • ***
  • Posts: 1180
  • Country: 00
    • One World Concepts
Re: Hantek 6022BE 20MHz USB DSO
« Reply #1020 on: July 30, 2017, 02:32:08 pm »
Hi,

I'm using my 6022BE exclusively for checking audio amplifiers' output wave form. I'm mostly an analog guy so forgive me these 2 stupid questions:
1/ Is it possible to include in the software a power output measuring function. It's going to be very convenient if one could choose the load at which the amp is tested (maybe from a menu?) like 2, 4, 8 or 16 Ohms and then the software could calculate the power?
2/ Is it possible to include measuring the total THD of the amp in percent (sine wave). Not spectrum analyzer just total THD?
I would rather use a very design (USB) soundcard for that.
"If you can't explain it simply (or at all), you don't understand it well enough." A. Einstein

http://www.oneworldconcepts.com/ | http://www.soundprojects.com
 

Offline andreas_electro

  • Newbie
  • Posts: 1
  • Country: de
Re: Hantek 6022BE 20MHz USB DSO
« Reply #1021 on: August 19, 2017, 12:05:18 pm »
I'm quite happy with the 6022BE after finding PC SCOPE 2016 Software from Fabio1963 (see page 39). Stable Triggerpoint even when triggering a sweep (1MHz...5MHz square wave).
The main limitations of 6022BE are:
- Only a few pre-trigger samples available. ?: Needs change in the MCU firmware - anyone inside this topic yet?
- No AC Mode. What would be the best place to introduce a capacitor? Between first AD8065 (U12/9) and second (U11/7) together with a 74HC4051 to bypass it.
- 10V/div to 0.1V/div. There could be a bigger range if the second AD8065 is changed to an inverting amplifier with input signal moved to the - input of AD8065. No idea if this is a big hurt to the S/N ratio? Any analog specialist to discuss? I think of a 20mV/div mode (x50) and a 100V/div (x 0.1). The + input of the op-amp can be used to adjust/compensate an offset voltage and maybe safe the AC-mode.

Besides that I like the HW. The S/N is ok for me and I will not invest in shielding/capacitors yet.

Cheers,
Andreas

« Last Edit: August 20, 2017, 12:55:10 pm by andreas_electro »
 

Offline robca

  • Contributor
  • Posts: 19
Re: Hantek 6022BE 20MHz USB DSO
« Reply #1022 on: September 07, 2017, 12:30:26 am »
I just noticed that as of June, Sigrok added full 6022BE and 6022BL support: https://sigrok.org/blog/major-sigrok-releases-libsigrok-libsigrokdecode-fx2lafw-sigrok-cli-pulseview

That means Linux support as well...
 

Offline isquicha

  • Newbie
  • Posts: 2
  • Country: br
Re: Hantek 6022BE 20MHz USB DSO
« Reply #1023 on: September 13, 2017, 02:37:23 am »
Hello.
I did not have time to read the whole post, but I think this has not yet been commented on.
I just got my 6022BL, everything is working fine, but the hantek software is very limited.
I downloaded the Istrustar software (http://english.instrustar.com/download_detail.asp?nid=1570).
The software is great !!!!
But if I'm on the forum, I have problems:
How do I get Hantek to work on Istrustar software (they have practically the same oscilloscopes, just change the name)?
I tried to copy and paste the Hantek drivers in the Istrustar software folder, rename the files, uninstall the Hantek driver and try the Instrustar, but nothing worked.
Anyone have any ideas on what should I do?
 

Offline Hernexto

  • Contributor
  • Posts: 5
Re: Hantek 6022BE 20MHz USB DSO
« Reply #1024 on: September 15, 2017, 12:20:45 am »
Isquicha, some places say they are similar only by outside.
Will be impossible to make it to work.

And pulseview (sigrok) doesn't want to detect my 6022BE... :(

I have so many drivers lying around... :-0
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf