PLL Synthesizer with LMX2306

I'm not going to do this anymore. Building a haystack circuit with SMD components is just... evil. Next time I'll make a PCB... I'll spare you the details of getting it to work. Took me two full days!

OK, so what was it again I wanted to do? I needed a small, synthesized transmitter capable of outputting 10-100 mW of power to jam any portables in the near vicinity. The detecting mechanism is still to be engineered, but the transmitter (totally illegal for use wherever on this earth) is functional.

First I started with the VCO. I used a tuner from a VCR to get the parts: two BFR540 transistors (BFR93A might be a good alternative but I didn't test this) from the antenna amplifier and two BB132 hyperabrupt varactors (varicap diodes) from the frontend. The rest of the Philips UV1216 tuner was discarded. Playing with component values a bit I came up with a working, tunable transmitter. Inspiration was found on a Swedish site (from which the LMX2306 chips were acquired). The VCO is a bit touchy, not wanting to start with the tuning voltage sitting at zero, but some tweaking got is going more or less. The tuning range is now 85-110 MHz and the power output at 5.0 V varies between 14 and 16 dBm. Oddly enough, the low end also has the lowest power, probably due to losses in the varactors. The tuning range however is impressive, from only 0 to 5 volts!

So I had a working VCO. That was easy being a hardware engineer. Controlling the PLL synthesizer is another story. Oh, how I long to the old days of DIL chips and DIP switches! Tuning tables in 2732 EPROMs... Living in the 21st century has its advantages in the form of a cute single chip synthesizer and a single chip microcontroller. The micro is my favorite Microchip device, the PIC16F628A. As the requirements for the stability and performance are minimal I decided to use its on-chip RC oscillator as reference for the PLL. This gives a OSC IN of 1 MHz. Bad idea! This oscillator is so noisy it creates more noise in the VCO signal than it will jam! It is also gruesome for stability. This will get fixed using a cheap external crystal of 4 MHz. Later.

It took me two more days to get the assembly code for the controller going. It took me quite a bit of time to figure out the setting of the configuration bits (VCO polarity is a fun one!). But eventually I got lock!Right now all it does is stepping from 107.9 MHz down to 87.2 MHz in 0.1 MHz steps. The software is straightforward: first the declarations etc, then initializing the PLL (function register and reference counter). I had some examples from the nice Swede but I discovered that the tuning value could be expressed by just one byte and three bits. This made the stepping easy to implement. Of course the code is riddled with ugly kludges, but then again, whose isn't?!?

Anyway, stay "tuned" for the project to finish. Todo: make a PCB (the reflow oven is waiting!), a detector and a light show using a couple of LEDs.

Update 27 November 2007:
I fixed the crap performance by indeed using a cheapo 4 MHz crystal. These can be had for next to nothing, and greatly improves the accuracy (not that I really need that) and the noise level in the signal (which is what it was all about in the first place). The PIC16F628A doesn't seem to have an internal oscillator calibration value, but that doesn't matter anymore now anyway. Also, I now can use different chips like the 'F84 or the 'F628. I did have to change the assembly a bit, since the reference frequency is now 4 instead of 1 MHz, as well as the two capacitors associated with the crystal and the capacitive coupling to the PLL.

The spectrum nicely shows the output frequency stepping every 100 kHz. It just happened that the step time turned out to be 0.3 s.










Update 9 December 2007:
I'm getting somewhere. I've figured out how to modulate the VCO, and also that when I use 13 kHz for a pilot tone it is almost impossible to detect, due to the deemphasis. While almost inaudible and thus preferable the high frequencies get attenuated by about 20 dB, leaving all but nothing to detect. So I chose 3.4 kHz, which is located just inside the slope of the deemphasis. Now it is detectable and high enough to be inconspicous. Especially because it lasts only 0.1 seconds.

The lightshow also is functional now. Just a few dumb bits being set and reset, depending on what is shown on the three LEDs. Boring stuff, but really pretty. Getting the PIC to read its PORTA proved trickier. Took me a while to figure out that the comparators, which are enabled by default (whoever came up with that stupid idea?!?) have to be disabled by SETTING the appropriate bits in CMCON register. That was unexpected, and judging by the comments found on the internet I'm not the only one being caught out with this "feature"! As it turns out, I need it after all. The input amplifier for the detector is trickier than I thought, and needs some serious design. The signal conditioning necessary is much more than expected, and this cannot be delegated to the PIC. What can be delegated is the comparator. Setting the right bits in CMCON even enables me to incorporate Schmitt-trigger action on the input, greatly improving reliability. I hope...

The source is now at version 0.22. Other things fixed are the tuning: it now goes to 87.5 MHz (this version is fixed at 107.9 MHz), the interrupts are included to generate the modulation frequency and some other minor stuff. Now if only I could display it in nicely colorized html...

Update 12 December 2007:
I scanned the modified schematic which shows the situation as it is now. Added: the Blinkenlichten, the mic amp and the interface with the comparator of the PIC. The software (now at 0.30) still needs to be tested. As is the listen input.

Back to the homepage


Amsterdam, 12 December 2007