OpenHantek / openhantek

OpenHantek is a DSO software for Hantek (Voltcraft/Darkwire/Protek/Acetech) USB digital signal oscilloscopes
http://openhantek.org/
GNU General Public License v3.0
774 stars 200 forks source link

No frequency measurement #76

Open kulkarniniraj opened 7 years ago

kulkarniniraj commented 7 years ago

I am analyzing a PWM output filtered through RC filter. Resulting sine wave of around 1.4 KHz have poor quality, but still a reasonable shape. On enabling spectrum, I can see a distinct peak at around 1.4 KHz, but the output always shows 0 Hz. Attached screen-shot out .

dendvz commented 7 years ago

Probably I do know the answer: DataAnalyzer::run() fails to detect the 1st peak of autocorrelation function if mean value is not subtracted from data samples before FFT. Your screenshot says that CH1 has AC coupling, but in fact Hantek 6022 does not support it. There is a 0Hz bias seen on frequency plot, hence it is DC-coupled. Just insert a capacitor (at least 1uF) between PWM output and the probe.

Screenshot below demonstrates correlator failure (CH1 is biased - frequency measurement failed, for CH2 the capacitor is inserted - frequency measurement succeeded). frequency

davidgraeff commented 7 years ago

I wonder if there should be an FAQ section about OpenHanteks limitations, linked from main readme.

dendvz commented 6 years ago

@davidgraeff I believe you can remove the labels and close issue as fixed. PRs #123 and #125 also improved frequency measurement. Measurements with 6022BE built-in generator look promising, I have to resurrect my generator and capture new screenshot for final proof. Stay tuned!

dendvz commented 6 years ago

Nope, the frequency measurement still does not work for the ~80% duty cycle square wave. For now, documentation solution looks appropriate. Frequency measurement depends on: