DIY jellybean parts PLL - Page 1
Forum section: electronics / projects

author: wolfalex
author_rank: Regular Contributor
timestamp: December 11, 2016, 10:51:04 am
content: 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 theperformance 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 youMaybe 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

author: wolfalex
author_rank: Regular Contributor
timestamp: December 11, 2016, 10:53:54 am
content: Attached is the picture of the breadboard setup and also a plot of the VCO transfer function.

author: wolfalex
author_rank: Regular Contributor
timestamp: December 11, 2016, 10:55:55 am
content: Last but not least some scope plots from operation. Please let me know what you think

author: ebclr
author_rank: Super Contributor
timestamp: December 11, 2016, 11:18:38 am
content: Based on your post, you really loves electronic , it's a nice conceptual work, not so useful but very didactic congratulation

author: wolfalex
author_rank: Regular Contributor
timestamp: December 11, 2016, 11:38:21 am
content: 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 electronicsI actually learned a lot doing this small circuit, and it is a lot of fun seeingthe 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 withfrequencies up in the 20 MHz range using only parts the had at this point in time.

author: ebclr
author_rank: Super Contributor
timestamp: December 11, 2016, 11:43:11 am
content: I was doing this 30 years ago with a CD4046 and I nearly have one orgasm when the PLL locked for the 1st timeOne 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 generatorYou will learn a lot on this chalangehttp://www.cypress.com/documentation/development-kitsboards/cy8ckit-043-psoc-4-m-series-prototyping-kithttp://www.cypress.com/products/32-bit-arm-cortex-m-psochttp://www.cypress.com/video-library/PSoC/psoc-4-m-series/108366

author: wolfalex
author_rank: Regular Contributor
timestamp: December 11, 2016, 11:57:24 am
content: Thanks for the links. Unfortunetly I am not able to use this thing right now, I am lacking the necessary skills until nowI 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 rectangularsignals 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 timeUsing the CD4046 will be the next step after I find probably out that I do not reach the necessary high frequencies with the discret partsYes, 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

author: ebclr
author_rank: Super Contributor
timestamp: December 11, 2016, 12:03:38 pm
content: This data sheet will have some guidelines for youhttps://www.intersil.com/content/dam/Intersil/documents/icl8/icl8038.pdfForget 89C52 opt forhttp://www.cypress.com/products/psoc-3that is a 8051 with some analogue or silabs 8051http://www.silabs.com/products/mcu/8-bit/Pages/8-bit-microcontrollers.aspxBoth are easyr to program faster and cheaper than 89C51

author: David Hess
author_rank: Super Contributor
timestamp: December 12, 2016, 05:00:06 am
content: Quote from: wolfalex on December 11, 2016, 11:38:21 amI 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.

author: mmagin
author_rank: Frequent Contributor
timestamp: December 15, 2016, 12:38:46 am
content: 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.pdfPage 21-22 of the LM13700 datasheet:http://www.ti.com/lit/ds/symlink/lm13700.pdf

author: wolfalex
author_rank: Regular Contributor
timestamp: February 20, 2017, 09:35:30 pm
content: @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 ideaThis 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.

author: Benta
author_rank: Super Contributor
timestamp: February 20, 2017, 09:58:34 pm
content: 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 willnotwork in a type-2 PLL.My personal preference is the active integrator-type loop filter (which inverts, though).Well done.

author: wolfalex
author_rank: Regular Contributor
timestamp: February 27, 2017, 10:12:53 pm
content: Hi Benta,thank you very muchThe problem with the time sounds almost too familiarI 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.