Home > other >  With variable frequency wave amplitude and wave number algorithm
With variable frequency wave amplitude and wave number algorithm

Time:10-01

Want to take advantage of the M16 microcontroller detecting waveform of 30-800 hz wave amplitude and wave number and digital tube display algorithm and programming the main train of thought

CodePudding user response:

The AD sampling - & gt; Fast Fourier transform - & gt; Results; Stm32 is the official library of Fourier transform, implementation will be easier, faster, other microcontroller without libraries, oneself use C implementation Fourier algorithm, on the other hand, AD sampling speed also want to keep up with, Nyquist sampling theorem.

CodePudding user response:

What kind of waveform is?

CodePudding user response:

Sine wave,,,

CodePudding user response:

Will signal clipping or attenuation, and determine the magnification, and then by a rectifier bridge, use more than 3 k sampling frequency sampling into memory,
Then the number of zero, and the maximum value

CodePudding user response:

Adc and FFT, the perfect solution, don't understand the reference I write blog, don't need to understand the algorithm,

CodePudding user response:

The two input signals to the point, a counter, along the count, rising and falling as a result, the number of peaks and troughs, divided by 2 is frequency,
Another even the ADC, cooperate with counter, rise along to fall between the maximum of the cycle, falling edge to the rising edge for the period between the minimum, two is the difference between the amplitude of this cycle,

CodePudding user response:

The difference between the two is the cycle amplitude, the count is done automatically, the maximum and the minimum amplitude is o, So easy!

CodePudding user response:

Directly in the analog input port of the comparator function, count, so slow signal, unnecessary with high-speed operation analysis,

Personal advice
  • Related