Print This Post Print This Post

A Versatile Crystal Calibrator

Build The Hackit & Bodge Crystal Calibrator

Hackit & Bodge Crystal Calibrator - completed prototype

Hackit & Bodge Crystal Calibrator - completed prototype

A while ago, I played around with changing the transmit and receive frequencies of a cheap FM Wireless Microphone rig. The only equipment I had was a trusty old Alnico scanner bought in the nineties. Although this was sufficient (or so I thought) for the testing of the altered transmitter frequency, the experience demonstrated to me that the workshop is now almost completely devoid of any ‘Radio’ gear – my main interests now being in audio, music, and embedded microcontroller development. This is a complete contrast to my early days, when the bedroom was a minefield of old valve radio and TV chassis, in various states of repair, and a good collection of home-built test equipment.

My current project is a PIC-based frequency-counter using PIC18F26K20, and this has reached the stage where testing the accuracy of the firmware was necessary – what better excuse then, to put together a cheap and cheerful collection of crystals and dividers to aid this?

The usual arrangement for a calibrator is something that gives out marker spikes at 100KHz intervals as far up into the radio spectrum as possible, but this seemed a little lame, and I wanted something to give a wide range of fundamental frequencies, together with a reasonable set of division ratios. Also I didn’t want to spend any money if possible, which meant implementing the unit using existing ’stock’ items where possible.

A while ago, a good friend gave me, amongst other electronic goodies, a few sets of push-button switches based on the now-obsolete profile of the E-Switch TA-222. In amongst these was one bank of four individually-latching double-pole change-over, and another bank of six single-latching double-pole change-over. I decided to implement a selectable binary divide by 1-16 with the 1st bank, and selection of fundamental, division by N, and further division by 2,4,8 and 16 with the second bank.
Since a picture is supposed to be worth a thousand words, the above may be hopefully clarified by taking a look at the schematic below. (click it for a larger image in a separate window)

Hackit & Bodge Crystal Calibrator Schematic

Hackit & Bodge Crystal Calibrator Schematic - click for full size image


S1 thru S4 enable a pre-settable division of 1-16, where all buttons out is division by 16, all buttons in division by 15, and division 1-14 with all combinations of buttons in-between. Meanwhile, on the second bank of switches, S5 selects the output of the oscillator directly, S6 selects the output of the binary divider arrangement just discussed, and S7-S10 select further progressive divisions by 2.
On the left of the schematic, provision is made for the installation of up to six crystals, with associated capacitors, which can be selected via an off-board double-pole six-way switch, connected via the pin headers. The oscillator uses a couple of HCMOS NAND gates, and RESET for the counter is provided for by two more dual-input NAND gates and a combination of a 4-input NAND gate, together with a diode-based AND gate.
Two important design criteria need to be implemented here, the first of which is that the final output signal must be switchable from either Q3 of IC1A, or from the RESET signal coming from IC2B, pin 6. The second criteria is that RESET must be driven actively in divide-by-N mode, but held low for division by 16.
Now I know this could be achieved in many ways, but I present this solution using what I had, not what might have been better. As it is, the real stars of the show are undoubtably the individually-latching switches, which provide an intuitive, tactile, and visual means of selecting the division ratio.
The output of the circuit is taken to two 50ohm BNC connectors, and via the unused portion of the 4-input NAND gate, provides and alternative inverted output. For long cable runs, a suitable good quality line-driver should be added – in practise, I didn’t find the expense necessary.

If, like me when I see a switch arrangement, you immediately go cross-eyed, let me talk you through the arrangement of banks S1-S4.
First thing is that the column of switches on the left control the RESET criteria, whilst the column on the right select the output to be used.

Let’s take the RESET criteria selection first. The CLR (pin 2) on IC1A needs to be taken logical HIGH to reset the counter, and held logical LOW for counts to take place.
Observing the switches as they are shown in the schematic (no switch depressed) it will be seen that all 4 inputs of IC4A will be held HIGH by the current though each of the diodes D1 through D4. Since this is a NAND gate, it’s output will be logical LOW. This will force the output of NAND gate IC2A HIGH, thus sending the output of IC2B (and hence CLR) to a logical LOW, enabling full operation of the counter with no programmed resets.
A full division of 16 of the ocillator will take place and the output Q3 of IC1A will be routed to the second counter and switch S5.

Now consider the situation when one of the switches is depressed. Immediately, the selected switch will no longer hold the respective input on IC4A HIGH, so it’s output will go HIGH, the diode kathode connected to the depressed switch will now connect with the respective output on the 1st counter IC1A, and this will pull LOW pin 1 of IC2A, forcing it’s output HIGH, and thus forcing CLR to go LOW. When the counter is incremented to the point that the selected diode connection goes HIGH, then CLR will go HIGH, resetting the counter. This is true for all combinations of switches, thus we are able to select division from 1 to 16.
When any switch is depressed, the output for the second counter is always taken from the RESET signal itself.

Before drafting the schematic, I decided against the ‘normal’ representation of binary numbers with the switches, and plumped for the more intuitive divide by progressive powers of two arrangement which fits the format of the second bank. So to divide by 10, S2 and S4 are depressed, giving 0101, rather than 1010. In the photo of the completed unit above, note that switches B and D are depressed, the rotary crystal selector is on 3, and the final division is 16. Since I have a 16MHz crystal at position 3, the unit is currently pumping out a 100KHz square wave.

Construction
An absolute must is that the unit be completely enclosed in a metal case or box – I used my favourite 99 pence sandwich tin. (details later) Running the unit exposed is capable of creating havoc for anyone trying to listen to the radio close by – the unit effectively silences my FM set when switched to certain ranges.
I ’scoped the PCB track at various points, including both the power and GND rails, and small spikes were evident on these too. The worst of these were corrected by soldering a short bridge between two points of the GND track. (see photo later) I had anticipated problems with the (longish) connecting leads from the rotary switch to the crystal bank, but these fears were unfounded – note that the maximum frequency crystal I installed was 24MHz.

The switches I used are now marked as ‘obsolete’ by Mouser et al, but there are similarly designed units on the market, and the Eagle project is included should you wish to change these. The knobs for the switches were home-made from 8mm Delrin rod. Each knob is 12.54mm (1/2inch) long, and has a 4.5mm diameter blind hole 6mm deep drilled in one end. These are a tight friction fit on the switches, no glueing was needed. Note that I designed the printed circuit 1st, then used this as a guide for my front panel design. Once the switches are soldered to the PCB, the whole assembly is mounted to the inside of the box on 20mm stand-offs, threaded M3 at the front, with small 2.5mm self-tapping screws through the switch fixing brackets.

The rather wobbly side panel of the tin box was strengthened with an external piece of aluminium cut to size. A small 2.1mm DC jack socket, with 100nF decoupling capacitor and crowbar diode, together with a ferrite bead, routes the 5 volt supply to the board. I also fitted a 3mm LED in series with a 330ohm resistor as a power indicator.

NOTE possible resistor value change required.
On certain frequencies I noticed that with S4 depressed, the actual division was 9, rather than 8. This was due to droop on the 4k7 resistor connected to pin 1 of IC2A. I reduced this to 2K2 and the problem disappeared.
The value of the decoupling capacitors C13,C14 and C15 is 100nF. I used a 22uF 15v electrolytic for C16. The values of the capacitors in the crystal bank, will of course be chosen to match the characteristics of each crystal. I chose 33pF for most of these, intending to tweak the values later if special accuracy is required.

Hackit & Bodge Crystal Calibrator PCB - foil

Hackit & Bodge Crystal Calibrator PCB - foil


Hackit & Bodge Crystal Calibrator PCB - components

Hackit & Bodge Crystal Calibrator PCB - components


Crystal Calibrator PCB - links

Crystal Calibrator PCB - links


Short GND bridging link reduced power-line scat significantly

Short GND bridging link reduced power-line scat significantly

As mentioned above, the enclosure for the unit is a sandwich tin purchsed for £0.99 (GBP) at BM. (here in the UK) (External dimensions: (Imperial) 7.8 inches X 5.1 inches X 2.6 inches; (Metric) 200mm X 130mm X 66mm)
I made a front panel/drill template using Front Panel Designer and this is shown below:

The Hackit & Bodge Crystal Calibrator Front Panel

The Hackit & Bodge Crystal Calibrator Front Panel

Wiring the Crystal Selector Switch
The body contacts of the switch should be as close as possible to the crystal bank. There is sufficient space between the second bank of push-button switches and the crystal bank for a small bracket – I haven’t marked these fixing holes, as your arrangement may differ.

I prepared for wiring the switch with Kynar wire.

I prepared for wiring the switch with Kynar wire.


I populated only 5 of the crystal positions, with the intention of mounting a small socket to accept ‘one-offs’ at a later date.
Wired up and ready to go.

Wired up and ready to go.


Close-up of DIV/2 switch bank

Close-up of DIV/2 switch bank


Close-up of divide-by-N switches

Close-up of divide-by-N switches

Close-up of DC power jack showing crowbar diode.

Close-up of DC power jack showing crowbar diode.

Crystal Calibrator driving prototype Frequency Counter

Crystal Calibrator driving prototype Frequency Counter

Downloads
The Front Panel Designer project is here: http://joebrown.org.uk/images/CrystalCalib/CrystalCalib.FPL
A full-size image file of the front panel is here: http://joebrown.org.uk/images/CrystalCalib/CrystalCalibFPL.JPG
A zip of the Eagle schematic and board is here: http://joebrown.org.uk/images/CrystalCalib/CrysCalibEagle.zip
Full size images of the printed circuit board are here: http://joebrown.org.uk/images/CrystalCalib/CrystalCalib_foil.PNG
and here: http://joebrown.org.uk/images/CrystalCalib/CrystalCalib_components.PNG

Suppliers.
ESR can supply all electronic components, crystals and knobs, the rotary switch, PCB materials etc., with the exception of the push switches.
The box was purchased from BM, here in the UK.
The Delrin rod I used is available from Bay Plastics, here in the North-East of the UK, at: http://www.bayplastics.co.uk/

Copy the code below to your web site.
x 
  • Share/Bookmark
Create PDF    Send article as PDF   

You must be logged in to post a comment.