EEVblog Electronics Community Forum
Electronics => Projects, Designs, and Technical Stuff => Topic started by: wolfalex on December 11, 2016, 10:51:04 am
-
Hello,
I set myself the goal to build a jellybean parts PLL from scratch on my breadboard for fun and learning purposes. I did not want to use a single inductor and therefore I used a relaxation VCO. Granted the
performance of this PLL is poor in comparison what you can get by simply spending some bucks on a finished integrated circuit but still it will be functional and a good showcase of how all the blocks work together.
It is fun and I thought I want to share this experience with you :) Maybe it inspires somebody. See the attached pictures for the circuitry, results and so on.
My next step will be to get rid of the jellybean parts and to use opamps from today to see how far I can go with the frequency, performance and so on :)
-
Attached is the picture of the breadboard setup and also a plot of the VCO transfer function.
-
Last but not least some scope plots from operation. Please let me know what you think :)
-
Based on your post, you really loves electronic , it's a nice conceptual work, not so useful but very didactic congratulation :-+
-
Hello ebclr,
Thank you very much for your feedback and your kind words. I am really happy that my post seems to show how much I like electronics :) I actually learned a lot doing this small circuit, and it is a lot of fun seeing
the behaviour of the circuit if the loop filter is not right or something is wrong. In this case the time behaviour looked almost like a mechanical mass & spring system bouncing around.
As you have noted the circuit is probably not very useful today for daily work, but it also shows how difficult it must have been 30-40 years ago for an engineer at HP building the 3325A function generator with
frequencies up in the 20 MHz range using only parts the had at this point in time.
-
I was doing this 30 years ago with a CD4046 and I nearly have one orgasm when the PLL locked for the 1st time
One thing that i guess will be very fun is to implement A PLL like you did but on a psoc, using the Cpu to set a USB controlled Frequency generator
You will learn a lot on this chalange
http://www.cypress.com/documentation/development-kitsboards/cy8ckit-043-psoc-4-m-series-prototyping-kit (http://www.cypress.com/documentation/development-kitsboards/cy8ckit-043-psoc-4-m-series-prototyping-kit)
http://www.cypress.com/products/32-bit-arm-cortex-m-psoc (http://www.cypress.com/products/32-bit-arm-cortex-m-psoc)
http://www.cypress.com/video-library/PSoC/psoc-4-m-series/108366 (http://www.cypress.com/video-library/PSoC/psoc-4-m-series/108366)
-
Thanks for the links. Unfortunetly I am not able to use this thing right now, I am lacking the necessary skills until now |O
I have so much plans and ideas but unfortunetly not enough time. My next planned steps for this circuit are:
* Add a sine-signal output, this will be my first attempt of building an analog triangle-> sine waveshaper circuit; I think it is a cool concept and unfortunetly not so much people learn it today
* Try to increase the maximum VCO output frequency by changing the opamp from LM324 to something fast; Also replace the VCO opamp based comparator with a proper comparator -> again more speed
* Add an AT89S52 microcontroller with RS232 and use it to generate a user setable clock input reference frequency via serial port; this gives me stability of the XTAL, and a user setable frequency
* Probably I will also try to build a Delay-Locked loop, I have the phase frequency detector already; what I will need is a proper delay element; Then I will be able to show how to generate multiple rectangular
signals with a certain phase shift between them
> I was doing this 30 years ago with a CD4046 and I nearly have one orgasm when the PLL locked for the 1st time
Using the CD4046 will be the next step after I find probably out that I do not reach the necessary high frequencies with the discret parts :) Yes, it was a great feeling and moment when I saw that my setup actually locks. As long as nobody measures the phase noise performance of this thing :-DD
-
This data sheet will have some guidelines for you
https://www.intersil.com/content/dam/Intersil/documents/icl8/icl8038.pdf (https://www.intersil.com/content/dam/Intersil/documents/icl8/icl8038.pdf)
Forget 89C52 opt for http://www.cypress.com/products/psoc-3 (http://www.cypress.com/products/psoc-3) that is a 8051 with some analogue or silabs 8051
http://www.silabs.com/products/mcu/8-bit/Pages/8-bit-microcontrollers.aspx (http://www.silabs.com/products/mcu/8-bit/Pages/8-bit-microcontrollers.aspx)
Both are easyr to program faster and cheaper than 89C51
-
As you have noted the circuit is probably not very useful today for daily work, but it also shows how difficult it must have been 30-40 years ago for an engineer at HP building the 3325A function generator with frequencies up in the 20 MHz range using only parts the had at this point in time.
I would have actually considered it a fairly trivial exercise in the past with the difficulty being that it requires a lot of separate circuit functions making it questionably reliable and economic. I was going to suggest that you look at how old function generators implemented phase locking but since you brought up the HP3325A, that would have been superfluous.
Jim Williams wrote a number of application notes like Linear Technology application note 14 on this subject including many about linearizing crude but high performance voltage to frequency converters using precision frequency to voltage converters which you may want to check out. I think one of the old National Semiconductor application notes discusses an easy way to solve the problem caused by loop gain changes with frequency when using a charge pump.
I have been thinking about designing an all analog phase lock loop for a GPSDO with a switched capacitor based charge pump to allow a long time constant without leakage problems. Reasonable settling time would require a time constant change.
If you want a higher performance but unusual VCO design to try, design an LC oscillator where the inductance is controlled by saturating the inductor with a separate current driven winding. They used to make special cores for this but equivalents can be found today.
-
Not necessarily any more jellybean than the CD4046, but a couple things I came across recently you might find interesting:
Page 28-29 of a LM3900 app note collection: http://www.ti.com/lit/an/snoa653/snoa653.pdf (http://www.ti.com/lit/an/snoa653/snoa653.pdf)
Page 21-22 of the LM13700 datasheet: http://www.ti.com/lit/ds/symlink/lm13700.pdf (http://www.ti.com/lit/ds/symlink/lm13700.pdf)
-
@mmagin: Thank you very much for the application notes. I will have a look at them.
@David Hess: Yesterday I finally sat down a little bit to look into the 3325A service manual to find out how the generate the sine wave. It is really interesting that the use two sine generators and a mixer + LPF to generate the final output signal. At least now I know why the 3325A has so much circuitry inside...
The last weeks I was continuing from time to time to experiment with the VCO circuit shown before. The first thing I did was to replace the opamp schmitt-trigger with a proper comparator and to swap the integrator opamp as well. I found that a TL972 + a LM393 gives me a maximum frequency around 230 kHz. Problem is that for low control voltages the circuit stops to work properly and stops oscillating. I think the problem is that the input common mode voltage range for the TL972 does not go down to 0 Volts. What I also found is that the maximum possible frequency is still limited by the performance of the comparator.
So I tried a LT1016 ultrafast comparator instead. In this way I was able to almost reach 1 MHz output frequency. What I also established was that the LT1016 is a beast, and that combining the LT1016 and a breadboard is not a good idea :) This part is just so incredibly fast that you can end up with all sorts of parasitic problems.
I was also the first time experimenting with sine shaper circuits. Like TI shows for example in the application note "AN-263". Just a bunch of resistors and diodes... but I was still pleased with the result, although there is a broad range between bad and good quality sine signals. The attached pictures show the time signals (input triangle, output sine signal), and the triangle input signal and output sine signal after doing a FFT.
I think the biggest drawback of the sine shaper with diodes is that the input signal amplitude of the triangle signal has to be very constant vs. frequency, because otherwise the signal shape will change too much vs. frequency.
-
Fun, fun, fun, I like it! :-+
It's the kind of thing I do myself sometimes, but unfortunately seldom find the time for.
What I really appreciate is your loop filter and the "pump-up, pump-down" current drive for it from the PFD. Some try to copy the passive filter from the 4046 datasheet, which will not work in a type-2 PLL.
My personal preference is the active integrator-type loop filter (which inverts, though).
Well done.
-
Hi Benta,
thank you very much :) The problem with the time sounds almost too familiar ;) I must confess that I did not derive the loop filter component values in a scientific manner, but instead I derived it by using trail-and-error : ^-^ It was interesting to see that the simple current sources worked so well in the final circuit.