To be able to compare two frequencies we first need to convert a frequency to a voltage.
One might just use an RC filter .... but at 1Hz thats not feasable.
So i came up with a different approach.

I take the positive part of the squarewave output, and charge a capacitor. On the negative half i discharge it.
Higher frequency = less time to charge = lower voltage
Lower frequency = more time to charge = higher voltage
Easy, right?

On the output we get this.
Now we average this output with another I-controller integrator.

No we do the same thing with our reference frequency
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.