8 years, 1 month ago.

10KHz phase comparator to make a phase locked loop

I need to compare the phase of two 1KHz signals (square) and produce a control voltage, centred when in phase, 1.5v or there about.

Is it possible to do this? Effectively I'm wanting to make a phase locked loop.

I can use part of a 74HC4046, but trying to reduce parts count in my circuit. Ideally I would like to compare a 10MHz signal with the 1KHz signal, not sure if I can accurately divide that down without clocking the MCU directly with the 10MHz signal. I can use a small 8 pin PIC chip to divide the 10MHz to 1KHz but it would make sense to clock the MCU with the 10MHz source, changing the clock set up to do this.

I can run and compare both frequencies at 10MHz but not sure if the MCU would be fast enough.

It has to exact to control a VCXO.

Any suggestions or should I just stick with external components.

1 Answer

8 years, 1 month ago.

Depending on the board you like to use, I guess most running at 48MHz or above will be fast enough to accept 10MHz on their external count input for their timers if you disable things like anti-glitch filters. Then you can simply wait till it counts till 10000, and you have divided it to 1kHz.

It should definately be possible without external components, getting the loop properly locked might be a larger problem though :).

I got that loop locking, its a bit like trying to balance an egg on the end of pencil, takes about 30 seconds to get a solid lock on a 10MHz VCXO at 100KHz sampling. A bit more work to do yet. 100KHz is the upper limit using an interrupt to trigger a counter and can't get a decent phase lock, but I only need a frequency lock so no worries.

posted by Paul Staron 27 Mar 2016