OpenHantek / OpenHantek6022

OpenHantek6022 is a DSO software for Hantek USB digital signal oscilloscopes 6022BE / BL. Development OS is Debian Linux, but the program also works on FreeBSD, MacOS, RaspberryPi and Windows. No support for non-Linux related issues unless a volunteer steps in!
GNU General Public License v3.0
853 stars 150 forks source link

Displayed signal jumps up when sampling with 30MS/s #63

Closed pedropedro closed 4 years ago

pedropedro commented 4 years ago

Hi Ho-Ro,

please see attached screenshot. Setting the sampling to anything (allowed) below 30MS/s yields the calibration signal base (lowest peak value) displayed exactly at the CH1 level, i.e. -500mV in this test. Just selecting the 30MS/s pushes the displayed signal up by ~ 50mV, so the signal base lies at ~ -450mV. Just selecting any different sampling rate returns the signal base back to the CH1 level ( -500mV). No other difference visible.

Computer environment :

Scope device :

OH6022-3 0 2-FW0204 Samplerate

Ho-Ro commented 4 years ago

The offset of the ADC changes when clocked with >= 30 MHz; the EEPROM of the Hantek6022 contains separate offset (as well as gain) calibration values for slow sample rates < 30 MS/s and high sample rates >= 30 MS/s. Have you calibrated the scope recently? Due to the brain-dead hardware of the Hantek scope the offset can drift over time. OpenHantek uses the extended calibration values (created by the python calibration program) that allow to drop the offset to a sub-digit level.

Ho-Ro commented 4 years ago

@pedropedro: I cannot follow up unless you provide some more info.

pedropedro commented 4 years ago

No, I did not calibrate the scope in my (current) Linux VM. I started first with a WinXP VM with the original Hantek software, where I tried the menu function Utility\Calibrate - no feedback from the software. But when I understand it right, that calibration (? when there was one at all) does not matter, OpenHantek in the new Linux VM "flashes" the scope at every boot from scratch.

Ho-Ro commented 4 years ago

The calibration values for the scope are stored permanently in the small EEPROM, while the firmware is "flashed" into the RAM on every start of the program. There is also the possibility to create a calibration file that takes priority over the EEPROM calibration.

pedropedro commented 4 years ago

OK, my mistake. After running python3 calibrate.py -ce the picture got better - sample rate != 30MS/s => rock stable 0V for the calibration signal (half the period ;-), for 30MS/s is the signal jump only ~ 5mV now, means 10x better. Merci !