PLL Breadboard Issues

Feb 28, 2010 15 Replies

I bread boarded my PLL yesterday. I was able to get it to lock just fine on a multivibrator running at 33Hz. I was able to solve the jitter problem by using a very large value for C1 (1000u). However, when I attached my cameras to the loop, (one running at 22.2fps and the other running at 25fps) the loop would lock at a frequency slightly above the camera speed ~39Hz. The camera has a contact that closes ~5ms every frame advance. I tried using the contact to pull to ground, and to pull to rail. I got the same result either way. Any suggestions?



Thanks, Chris Maness


Which phase detector are you using?

An XOR can lock to ratios of numbers of the input signal like 2/3

A tristate phase frequency comparator is bothered by contact bounce.

Two camera's in line with different fps ? how do you expect it to lock properly?

o
y

I am using Comparator II for edge detection. Yes, there might be some bounce. How can I clean up the signal? Also, with the 33Hz multivibe there is a extremely low frequency FM'ing ~1/2Hz. Should I try a smaller C2 in combination with a bigger R3?

Correction: the 1000u is C2.

Thanks, Chris Maness

o
y

No, I have two cameras that I would use at different times. Not in series. I am designing the circuit because most small gauge film cameras run "wild" and I am designing the tape to slave off of the "wild" cameras at the expense of some pitch shifting. The design will ultimately convert the ~24Hz pulses to ~60Hz pulses with a proportional error. When the film is scanned in to a frame accurate file @ exactly 24fps, the tape (perforated tape with a film base) can be played back at exactly 24fps from a crystal reference. The end product is lip sync sound.

Thanks, Chris Maness

t
e
,

at

to

Any

e

Since you know the rough frequency you have options:

(1) A one shot that has a time a little over 1/2 the cycle time can be made so that is only accepts the switch closures that are about far enough apart.

(2) A few stages of HC14s connected one to the next by a low pass RC filter will add delay but will also take the bounces off.

(3) Your VCO can be running at a multiple of the input and you can use logic from the divide down counter to only allow edges at the right time through. Basically this would mean to use a flip flop that is cleared just before the time the edge is expected and gets clocked by the edge to go high.

ust

the

er,

that

ll to

=A0Any

e

ibe

I was thinking about #1 just using a NE555 for a one shot @ 1/2 a cycle. Also, the NE555 (1.5 cycle one shot) could be used with an AND gate to shut the output off when there is no signal from the camera. Starting to feel like all of this would be better done in software.

Thanks, Chris Maness

low pass filter the ref signal coming from the camera contacts, there may be bounce and the PLL is correctly locking to the "higher frequency" as it sees those extra edges.

Mark

o
y

That sounds like a good Idea. What would be a good cutoff frequency?

Chris

t
e
,

at

to

Any

I used a .06u and a 1k resistor for a LP filter and it increased the lock frequency. Strange. However, if I divide by another two I am close to the camera frequency (only 1 Hz off). Still testing it against my 33Hz multivibrator gives me 2112/2^6=3D33. The loop divider is running at 2^6=3D64, so working perfectly with the multivibe test circuit.

Regards, Chris Maness

just

the

=A0However,

that

pull to

=A0Any

You do not want a cutoff frequency but instead 74hc123 dual one shot=20 and a quad 2 input nand gate. The circuit is then in three parts a 10 ms debounce pair that cross = inhibit and an rs flip-flop made from two sections of the nand gate.

Waveforms: (|||| means switch bouncing)

in ___||||--------------||||||_______________||||||------

ss1 ___|----------|___________________________|-----------

ss2 _____________________|-----------|____________________

ff ___|-----------------|____________________|-----------

^^ ss1 inhibits ss2 ^^ ss1 inhibits ss2 ^^ ss2 inhibits ss1

^ ss1 sets ff ^ ss2 resets ff ^ss1 sets ff

Synchronized and nice and clean for the PFD.

That's a neat trick. If I understand the diagram correctly I think you'd need to invert the output of the one shots first though, since a NAND latch is active low. The other two gates in the package could be used for that.

st

he

r,

hat

l to

=A0Any

it

=A0 =A0^^ ss1 inhibits ss2

1

sets ff

One strange thing though is I am not seeing the bounce on my scope. I am not sure it is there unless it is beyond the frequency range of my scope. I will check it out a little more carefully tonight.

Chris

Take a look at the following solutions to severely bouncing inputs...

formatting link

formatting link
...Jim Thompson

| James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.

=A0 =A0 ...Jim Thompson

=A0 =A0| =A0 =A0mens =A0 =A0 |

=A0 | =A0 =A0 et =A0 =A0 =A0|

=A0|

=A0 =A0 =A0 |

My parts came today. I tried my design, and it locks solid on the right frequency finally. The new loop filter is awesome. Kudos to Helmut for his damped loop filter. Also, my NE555 debounce circuit fixed the frequency error problem. Yaaaah!

@Jan I will be trying your design next and see how it compares to mine in lock time.

Thanks All Chris Maness

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required