Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No frequency measurement #76

Open
kulkarniniraj opened this issue Sep 6, 2017 · 4 comments
Open

No frequency measurement #76

kulkarniniraj opened this issue Sep 6, 2017 · 4 comments

Comments

@kulkarniniraj
Copy link

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
Copy link
Contributor

dendvz commented Nov 23, 2017

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
Copy link
Member

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

@dendvz
Copy link
Contributor

dendvz commented Dec 25, 2017

@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
Copy link
Contributor

dendvz commented Dec 26, 2017

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:

  • presence of DC bias in a signal
  • window function chosen for spectrum analysis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants