Tiny GPSDO

by throbscottle in Circuits > Electronics

5843 Views, 8 Favorites, 0 Comments

Tiny GPSDO

testing1.jpg

This fairly simple to build device is an accurate frequency standard which you can use to calibrate other equipment, or use as a general purpose signal source, albeit with very limited outputs.

This Instructable is incomplete! I just haven't had chance to re-do the PCB layouts or make a better loop filter. It's presented as is in the sincere hope that you will find something to learn here.

We live in a world where many things are required to be exact, but nothing truly is. There is only a diminishing range of error which can be achieved. This applies to the frequency of a signal. My 522KHz won't be the same as your 522KHz. We can both set them to be the same using a frequency counter, but that itself is only as accurate as it's internal oscillator, which has to be calibrated against something else, often by a specialist service at specialist prices.

Fortunately for us tinkerers, there are a number of atomic clocks which are fairly easy to get a standard from, and the most accessible at the time of writing is GPS.

GPSDO stands for Global Positioning System Disciplined Oscillator, in case you didn't know.

I wanted to build a GPSDO as a frequency calibration standard, which itself does not need calibration, because it self calibrates from the GPS signal as time goes on. The reason I wanted such a device is to calibrate an old frequency counter and even older oscilloscope. It can also be used in place of the frequency counter's internal standard. I'm quite sure as time goes on I will use it for lots of other things too!

This GPSDO has 10 outputs:

  • 4x 10MHz sine wave (50 ohm back-terminated)
  • 2x 10MHz square wave (TTL)
  • 2x 5MHz square wave (TTL)
  • 2x 1MHz square wave (TTL)

These are the most commonly used standards. If some other frequency is needed it's a simple matter to divide down one of these using flip-flops.

The unit presented here comprises

  • 10MHz OCXO (oven controlled crystal oscillator) which has a voltage control input for tuning (so really it is a VCOCXO)
  • GPS module bought from eBay with U-Blox Neo 7 chip
  • Control and output circuits
  • Power supplies
  • Case, connectors, mounting hardware etc.

It needs to be plugged in to the mains for a few hours to charge it's memory backup battery, at least once a year, or the GPS module will forget its settings.

I've used the term "GPS" throughout this instructable because everybody is familiar with it, even though there are a number of satellite navigation systems with different names. Collectively the correct term is GNSS (Global Navigation Satellite System).

There is a very good reason it's called a "GPSDO" and not a "GNSSDO". Just try singing "G.N.S.S.D.O." to the tune of D.I.S.C.O by Ottawan. Difficult, huh?

You can see it's not really tiny is size. I just decided to start calling my projects "Tiny".

NB this is a work in progress. I built it quite a while ago and still need to make some adjustments, most notably to the loop filter, and LED power connections. Because of these it's not actually stable yet.

My own build of this project is slightly different to how a stand-alone version would be, as it shares a 19" case with my frequency counter. The differences are that I provided a pass-through mains outlet cable at the back so only 1 cable is needed for the 2 devices, and one of the 10MHz TTL outputs is connected at the back so the frequency counter can use it instead of it's internal standard. I'd already bought a RP-SMA pigtail by mistake so I used this instead of a BNC socket for this connection and used an RP-SMA edge connector for this connection to the PCB. I also had the luxury of a large chassis to assemble the unit on.

The photos look slightly different because I made a couple of mistakes with the board. Corrected layout supplied here!

How to Fry Your Oscillator... (a Word of Warning)

inside.jpg
roasted.jpg

I bought this used Trimble 65256 OCXO from an eBay seller, who sold it as a 12v device. The long white sticker has another part number, 57964-05.

With hindsight, I wonder if the the "-05" part of this number refers to the real operating voltage.

After running the oscillator on 12v for a while, I accidentally knocked it, and it stopped working. When I opened up the case (using a heat gun), I found a horrible burnt mess under one of the transistors which had come disconnected, as you can see. It had actually burnt part-way through the PCB. Amazingly, when I tested the transistor, it was ok, and after I soldered it back in place the oscillator worked just fine, but the transistor still got really hot.

I tried turning down the voltage, and found it works perfectly well on 5v and doesn't get scorched in the process. So this unit was sold as being for the wrong voltage. (After this I soldered the casing back together)

So a word to the wise, don't trust the seller's description if buying one of these things on eBay! Try to operate it at a low voltage first and just use the first standard voltage (eg, 5, 6, 12, 24) it's stable at. Unless you have more accurate information of course.

Parts List

OCXO.jpg
gps-antenna.jpg
gps-module.jpg
SMA-edge.jpg

You don't need many parts for this project!

Note: the small bipolar transistors come under the heading of "any small transistor will do" but you may find some work better than others. I eventually used one marked "1L" which is probably BC848 and another marked ... which might be ...

  • 1x GPS module with U-Blox chip. Get one that has a socket for a remote antenna, a USB connector, PPS output and eeprom. The one I got has an on-board voltage regulator so it will run on 5v, but the U-Blox chips run on 2.7v to 3.6v so if there's no onboard regulator you need to add a regulator for it. When I got mine, the Neo 7 was the newest version available as an "eBay module", but the Neo 8 is widely available now.
    • U-Blox refer to their devices as "modules", but I've used the word "chip" so as not to cause confusion with the assembled module.
  • USB cable to program the module
  • OCXO. I used a Trimble 65256, but you can use any 10MHz OCXO or TCXO (temperature compensated crystal oscillator, which is a little less stable but a lot cheaper) with an adjustment pin. If you get one with a TTL output you won't be able to have a sine output unless you build quite a big filter. Be very careful to check the operating voltage!
    • If you get an OCXO without a built in reference, you will also need to get a 2.5v (or thereabouts) reference. It doesn't need to be super-accurate, but mount it physically close to the oscillator for thermal stability.
  • 1x 74HC4046 (PLL)
  • 1x 74HC14 (hex Schmidt trigger inverter)
  • 1x 74HC164 (SIPO shift register)
  • 1x 74HC74 (dual D type flip-flop)
  • 2x Exar CLC2007IMP8MTR dual op-amp (other types are also suitable but may be more expensive)
  • 2x 6.8uF capacitors. I used TAJA685K020R made by AVX (20v tantalum with 1206 footprint)
  • 1x LM358
  • 2x NPN such as MMBT3904
  • 1x PNP such as MMBT3906 (surface mount versions of 2N3904 and 2N3906)
  • 2x LL4148 (surface mount version of 1N4148) or similar small diode
  • 1x Logic level P-MOS such as AO3407
  • 4x assorted LED's
  • Assorted resistors and capacitors
  • 6.2V 0.5W zener
  • 4A 50V bridge rectifier
  • 7805 voltage regulator
  • LM350T voltage regulator (though you could use a 7805 if you add an extra pass transistor to it)
  • 0.22 ohm 1W resistor
  • 4700uF capacitor
  • 1k preset (I used a long horizontal multi-turn one, but a normal one would be fine)
  • Transformer. I used a transformer which I dismantled from an old portable stereo, which has a 12v winding.The core measures 26mm x 41mm x 49mm, I don't have a power rating for it, but guess it's under 12VA and is somewhat under-rated for this project.
  • 2.4v rechargeable battery (I used this 160mAH one, part number 525-849 from RS components)
  • SMA plug to SMA bulkhead socket extension (unless you plan to mount the GPS module directly on the panel)
  • 10x Edge mounting SMA sockets (I actually used 9 SMA + 1 RP-SMA because I'd already bought an RP-SMA extension by mistake)
  • 10x BNC sockets with SMA terminated pigtails (cheaper than buying the parts and making them) (I actually used 9 of these and 1 RP-SMA pigtail which I had previously bought by mistake. I put this at the rear to connect to the reference input of my frequency counter with which it shares a 19" case. I used an RP-SMA to BNC plug extension for this)
  • USB plug to USB bulkhead socket extension (optional)
  • (optional) external GPS antenna
  • U-Blox U-Center software, which you can download here

Optional off-air calibration components

  • SPDT Relay (I used type DS2E-M-DC5V reclaimed from old equipment)
  • PNP transistor such as MMBT3906
  • Multi-turn 1k preset
  • Assorted resistors and capacitors
  • 1x LED
  • Jumper for 2 pin header
  • Flyleads for setting up

The parts came from various sources but largely determined by cost. Most of the IC's, the LM350T and the battery came from RS Components in the UK, the connectors, OCXO and GPS module and P-MOS transistor were found on eBay, the other parts I already had, mainly from scrap.

When the OCXO is warming up the current is rather high for this transformer and the output drops, so that the power the regulator has to dissipate during this phase is reduced.

There's an argument to be made that you could use a wall-wart to power the GPSDO rather than having the transformer, and I believe this is how Trimble do theirs. The general thinking is that it would have to be quite old and have a standard transformer because the SMP's in modern ones can create quite a lot of electrical noise which we don't want in a precision signal source. However, it may be worth trying anyway, as there's plenty of filtering to get rid of noise and it's easy to add more.

How It Works

PSU-1.jpg
Main.png
Analogue.png

The OCXO is pretty accurate to start with, but it is "disciplined" by the GPS signal to make it even more accurate.

Main Section

The whole thing relies on a wonderful device called a phase locked loop (PLL). The particular one used here is the 74HC4046. Although a more modern device (with constant current) would offer easier loop filter calculations, I'm using what I've got. A problem I discovered with the 4046 is that it's VERY sensitive to supply voltage fluctuations. Even just turning on or off the LEDs affects it. For this reason a PCB re-design and power connections re-think is needed. Or a better PLL chip...

This chip compares the phase and frequency of two signals, and outputs an error voltage which represents the difference between them. When the two signals match, it also provides a signal which can be used light an LED so you know the unit is ready to use. This signal is used to charge a small capacitor, C19, which in turn keeps the Schmidt trigger inverter output low and the LED on. If the two signals become mis-matched, the capacitor is discharged and the LED turns off.

The PLL has a built in VCO (voltage controlled oscillator) which would normally be controlled by the error voltage and provide one of the two signals, but it's not used in this design, as the OCXO (or TCXO) is used instead.

The two signals are quite close in frequency to start with, before the error voltage adjusts the frequency of the oscillator and makes them match exactly.

The PLL has a "loop filter" consisting of R43, R44, C12 and C14. It's intended to have a long time constant to filter out some of the slow deviations in the signal from the GPS.

What I have read since building this project is that no passive loop filter will actually work with the 4046 and it must have an active one.

It would be nice if someone can design a better filter - the data sheet for the chip gives some formulas (which might be wrong) - I can just about manage to do complex numbers but they don't tell you what the real and imaginary parts are!

This GPSDO also has a function so that if it loses the GPS signal for some reason, it will switch to a control you have previously set up manually. In order for the PLL to not be controlled by the GPS chip's on-board oscillator, U8 is used as a detector. Using this, Q8 keeps the chip enabled as long as there is a signal. With no signal and the module programmed to go silent in this case, the chip is inhibited and it's "demout" output goes high impedance.

For this to work it's vitally important that the module is programmed to turn off it's output if the GPS signal is lost.

This on it's own will allow the oscillator to run at it's pre-set frequency, but I have included a relay, operated via Q9 and Q10 so that it is switched to a pre-set control voltage.

The OCXO has a built in 2.8v reference. This reference is very sensitive to loading, so it is buffered by U5, half of which is wired as a low noise buffer for the analogue amplifier reference. In case you change any of the capacitor values, you need to keep a certain ratio to maintain stability. So the value of R50 is given by (2*R46*(C52+C53+C19+C21+C22+C23))/C54. So if you don't build the analogue section for example, you will need to adjust R50 to 2k2.

The other half of the LM358 is also connected as a buffer which also gives a bit of a voltage boost (x1.43 approximately). This supplies the preset which sets the off-air control voltage. As the control voltage normally varies anyway there is no point in using a precise circuit here.

R62 to R67 are there to adjust the TTL output impedances to 50 ohms if this is required

C61 to C66 are there to compensate for the inductance of the output traces in case ringing is observed on the outputs. Adjust the values to get the flattest response

GPS

GPS chips have a standard output called "PPS" which stands for Pulse Per Second, which is exactly what normally comes out of it. One pulse every second. Actually due to atmospheric and other effects causing variations in the satellite signal (which can be over 24 hours) l, it's not always an exact second, but averaged over a long period of time it is as exact as can be.

The great thing about the U-Blox chips is that you can program them so that the PPS output provides a frequency signal rather than 1 PPS. It needs a little battery or it will forget it's programming (technically, the program isn't forgotten because it's still stored in the EEPROM, but the uBlox chip will forget that it's there). The battery in this design should keep the memory for a year. The charging current is very low so you don't have to worry about overcharging. For this reason it's a good idea to let it charge for 24 hours the first time the unit is turned on.

The frequency from the GPS chip is very precise because it's derived from the satellite signal, which is controlled by an atomic clock (actually four atomic clocks in each GPS satellite). Again due to atmospheric effects the signal will vary even though it's exact when averaged over a long period. It is the OCXO and PLL combination which does this averaging.

It's a fairly bad idea to program this output to 10MHz however, as the signal at this frequency is is very jittery (jitter is the same thing as phase noise but refers to digital signals. (In case you are confused, it means the cycles of the signal don't occur at exactly the same interval all the time)). The U-Blox data sheet advises it be programmed to a frequency which is an integer division of 48MHz, which will be a much cleaner signal.

So the first frequency which is easy to divide down from 10MHz and is also an integer division of 48MHz, is 1MHz. This is where the 74HC164 comes in, connected as a divide by 10 circuit for the OCXO output. I used a Schmitt trigger inverter (74HC14) to turn the sine wave output from the oscillator into a square wave for this divider.

The PLL compares the two 1MHz signals and produces a voltage which adjusts the frequency of the OCXO so that the 1MHz derived from it is the same as the average from the GPS module.

Since the output from the OCXO with a 50 ohm load is only 1v p-p, I added two resistors to centre the signal as optimally as I could in the 74HC14's input range. This is where it all goes a bit strange. I originally intended to use a Chebyshev filter at the input to the analogue amplifier, which would have reduced the oscillator's output to 1v p-p, so the resistors were necessary. Since I replaced the filter with a ferrite bead, the resistors probably aren't necessary anymore. However, I've left them in the schematic in case the oscillator experiences a 50 ohm load.

The variation in frequency from GPS is a affected by a number of different cycles which can have intervals of a few seconds or minutes, up to about 12 hours. We can't do anything about the really long variations, but the filter used here is good for about 30 minutes which takes care of most of the effects. A much more complex circuit would be required to take care of very long period variations.

PSU

There are 2 regulators, so that the OCXO power is well isolated from the power to the other circuits. This also makes it easy to change the supply voltage for the OCXO, as you only need to change the values of 2 resistors, possibly with a higher voltage transformer. The GPS and other circuits are also isolated from each other's power by small resistors and capacitors.

From the 7805 regulator, I provided separate outputs for the GPS, Digital and Analogue supplies, which are isolated by 10 ohm resistors and individual filter capacitors, and an output for the relay coil directly from the regulator.

Some OCXO's have an output which indicates when they are up to operating temperature, but this one does not. I like the idea of this indicator, therefore I included a current sensing circuit, which will light an LED when the current has dropped below a certain threshold. This works because the OCXO draws a lot more current whilst it is heating up than when it is at operating temperature. You will need to adjust this circuit if using a different OCXO. You don't need it if using a TCXO, which doesn't have an oven.

The small battery is required because the U-Blox chip forgets it's programming when power is removed. The eBay modules all have a high value capacitor which maintains the memory for half an hour or more, but for longer intervals a longer term supply is needed. The diode connected to the battery is to stop it supplying power back to the charging circuit. The 1k resistor between the battery and the module is to stop the module's 3v regulator from over-charging the battery. The current drawn to maintain the settings is very small so it only drops a fraction of a volt when discharging. You can also use a non-rechargeable battery (eg a 3v coin cell) in this position, but in this case you also need to disconnect the battery from the main supply or you risk it going bang. There is already a diode and series resistor present on the GPS module board so the voltage from it's regulator is reduced to less than the battery voltage, however for safety's sake it's better to remove one or both of these components if going the non-rechargeable route as the battery voltage will eventually drop to below this point.

Digital Outputs

I originally planned only 4 outputs, but decided to add more when I found a cheap means of providing the output sockets.

I used the 74HC164 to provide the 2x 1MHz outputs in addition to it's main role of providing the signal for the PLL. I chose 2 outputs which are 180° out of phase, with an inverter connected to one of them, resulting in outputs which are in phase. I couldn't detect the slight lag due to the inverter.

The 5MHz outputs are provided by dividing the 10MHz signal by 2 using a 74HC74. I originally intended only 1x 5MHz output, but added the second when I found cheap output sockets!

The 10MHz outputs are provided simply by connecting the oscillator's output to a pair of Schmitt trigger inverters.

Analogue Distribution Amplifier

The 4 buffer amplifiers for the sine outputs were chosen with cost in mind. It's much simpler than building amplifiers from discrete parts, and cheaper than some of the devices (such as current-feedback op-amps) commonly used in home built projects. If you are looking for alternative devices, video amplifiers are a cheaper alternative to wideband op-amps and can provide several outputs.

The input to the amplifier block is through a coupling capacitor, the value of which is kept low to keep out low frequencies, and a ferrite bead, which is intended to block high frequency harmonics which may be bouncing back from the digital circuits. It will work quite happily without the ferrite bead however. The amplifiers themselves have a 1nF capacitor each as the ground return path for the inverting input. This limits the low frequency gain which approaches unity as the frequency approaches DC.

I selected the ferrite bead from scrap by connecting various ones to ground through a 47 ohm resistor, and connecting one of the digital 10MHz outputs to it. I chose one which removed the most amount of "squareness" from the signal when measured with an oscilloscope across the 47 ohm resistor.

Originally I planned a Chebyshev filter at the input to the amplifier block, but eventually decided a ferrite bead was all that was needed.

A 15pF capacitor (you can use up to 22pF but don't go above that) in the feedback loop rolls off the high frequency response of the amplifiers, again for the sake of getting a clean signal (if you struggle to find a suitable capacitor for this position it's better to just leave it out)

The combined amplifier input impedance is approximately 50 ohms, which matches the 50 ohm output impedance of the oscillator and would cause it's 2v p-p output to drop to around 1v p-p, however the ferrite bead inhibits this effect to a greater or lesser extent, depending on what you have available.

Each amplifier has a gain of just over 2, which compensates for signal lost at the input and provides an output of around 2v p-p, terminated by a 47 ohm resistor, which combined with the impedance of the output capacitor makes about 50 ohms, so a 50 ohm load will case the voltage to drop to 1v p-p.

Since I don't have any 47 ohm resistors I used 2x 100 ohm resistors in parallel - so my output is actually a bit over 50 ohms.

Construction

proto.jpg
psu-pcb-green.jpg
IMG_2317.jpg
part-build1.jpg
part-build2.jpg
part-build3.jpg
part-build4.jpg
case1.jpg
case2.jpg
case3.jpg
gps-standoffs1.jpg
gps-standoffs2.jpg
assembly1.jpg
assembly2.jpg
assembly3.jpg
assembly4.jpg
assembly5.jpg
assembly6.jpg

I built the GPSDO on a chassis I made to fit inside half of a 19" case. Details of this are not provided as you will almost certainly be using a different case. Briefly, the chassis is steel, and has a couple of moveable bolts near the front so the fit inside the case can be adjusted. It has an aluminium back plate, and the front sockets are mounted directly on the front panel because I didn't feel up to making a backplane for it.

Cosmetic features

I used 3mm LED's for the status indicators, mounted in metal bezels, which suit the look of the shiny sockets. The power indicator is a 5mm LED, mounted in a bit of plastic tube which I glued to the back of the panel, so just the top of the LED projects through a 5mm hole in the panel.

I made sure the locking pins on the BNC sockets are all level. I did try making shaped holes to match the flat on the socket threads to stop them turning, but once pushed right in the flat misses the hole anyway which made my careful shaping pointless.

With hindsight, it would have been better to make a mounting panel to sit behind the front panel and fit the sockets to that, so they would just poke through the front panel.

Some basic principles need to be followed:

  1. Provide lots of de-coupling. This means that unwanted signals on the power supply have somewhere to go instead of where you don't want them! A 0.01uF ceramic capacitor across the supply pins of each IC does the job, as close to the IC as possible. Also provide a larger "bulk" capacitor across each power supply connector. It's worth noting that higher frequencies need smaller decoupling capacitors due the parasitic inductance of larger values. If you have space, use a combination of 100nF, 10nF and 100pF in parallel for the digital IC's.
  2. Keep connections as short as is practical. This is because a longer conductor acts like as an antenna, and will either receive or transmit a signal, again so it ends up where you don't want it. The higher the frequency, the more important this becomes. At high frequencies, the inductance of the connection also becomes important.
  3. For RF signals, the signal return path, even if it's through a ground plane, needs to be about the same length as the signal path and ideally also tracks it. No breaks in the ground plane!
  4. For mechanical reasons, pin headers don't like to be used singly. Even if you are only using 1 pin, fit a pair.
  5. If using single sided FR2, drill holes slightly small for pin headers and force them in. This way they will be much more sturdy when you mess about connecting and disconnecting things.
  6. This is an unusual project in that you want to keep heat in, to some extent, rather than venting it all to the outside. The caveat is that you don't want the ambient temperature (generated by components and the outside air) to be higher than the oscillator's operating temperature.
  7. If you are using the built-in GPS antenna on your module, it needs to have a view of the sky. So in this case you will need a case with a plastic top, or at least a plastic section in the top, or to locate the module outside the case somewhere.
  8. Keep AC power wiring away from all circuits. The idea is to keep the output as "clean" and jitter-free as possible.
  9. If you design your own PCB, there are 4 things to watch:
    • avoid having ground plane under the analogue output op-amps
    • prioritise keeping the connection short to the inverting inputs of the CLC2007 op-amps (manufacturers advice).
    • where you need vias, use lots. At least two per side-change for the RF output traces, and as many as you can reasonably fit in for the ground planes.
    • every signal needs a suitable return path. The ground plane looks like one big return, but it's important to imagine where the return connection from each signal goes back to it's originating device and find ways to shorten it if necessary. Don't be tempted to route ground return paths a long way round just to keep signal traces tidy.
  10. Allow plenty of air-flow for the parts that need to be cooled, namely the mains transformer and voltage regulators.

Notes

  • There are multiple de-coupling capacitors connected across the supply lines. Although they are electrically in parallel, they are connected near to the devices they are shown near to on the schematic.
  • Exar specify 6.8uF decoupling capacitors (in parallel with 0.1uF) for their op-amps, but not the type. I used tantalum. My test circuit worked quite happily without one, but I included them in the final build anyway.
  • C53 is shown as a leaded component but without the holes drilled in the board. You can use a surface mount capacitor for this or a normal one but with the leads soldered flat to the board rather than through it. This is because I wasn't quite sure what type I was going to use when I designed the board.
  • R6 needs to be at least 0.25W power rating
  • If you find the oscillator ready light too dim, adjust R6, but be careful not to make it too low or you can overheat the zener and the resistor.
  • The GPS battery connection is a 2 pin header, but only the + connection needs to be connected.
  • If you want a guide to making PCB's, there is plenty of information to be found on the 'net. I attempted to create a guide here which may be helpful.
  • I have changed a few details since taking the photos. PCB PDF's have been corrected. At some point I intend to re-build using the modified board, and will update the photos accordingly.

Build the PSU first, this then gives you the power supply to test other parts of the system before actually building it.

There are a couple of things to watch out for. R3 may well need be a different value depending on various factors. If you find the oscillator ready light not behaving as it should and you've explored the extremes of R4, this is the first one to change. Look at which extreme R4 is set to when you get the least wrong behaviour, and use that as a starting point. I had to double the value going from leaded components on a solderless breadboard to surface mount ones on a PCB.

The heatsink I used for IC3, the LM350, came from something I dismantled. It's actually a little small for the application so gets rather hotter than I'd like.

I made the PSU board shown in the photos and then found it had a couple of mistakes on it. I have supplied a layout for the corrected version.

I built the prototype circuit using perforated board - see photo. There is no reason not to use this style of construction for the complete build. I used smd chips, but if you are not used to them, through hole ones work just as well and are much easier to use for this style of construction if you choose to build the finished device this way. Most of the other components have wire leads. The thick wires in the photo are bare copper bus bars, and provide the Vcc and 0V connections. The chips are connected with magnet wire soldered directly to the pins. I returned all the ground connections to a single point at the OCXO ground, excepting the chips and associated components connected directly to the long ground bus bar. The prototype photo doesn't show the sine output amps connected as I was only testing and I didn't feel like working with the tiny MSOP package chips in such a crude environment, however I eventually did wire one up using 0.1mm magnet wire. If you do use this style of construction, it's highly advisable to get MSOP - DIL adapter boards for these chips, or to use different chips.

The PCB build is slightly more challenging as it is a double sided board with mostly SMD's, and has components on both sides. The PLL and all the digital chips are mounted with pin 1 towards the oscillator, and the Exar op-amps are mounted with pin 1 towards the edge of the board. There are a lot of vias which need to have short pieces of wire soldered through them, unless you are prepared to have the board manufactured, or to attempt through hole plating. Quite a lot of vias connect the top and bottom ground planes and are electrically identical, but don't be tempted to miss any of out as they are providing a signal path. Leaded components have been used in some places, so solder the leads on both sides of the board, at least in places where they connect to a track on each side.

(When I designed this board I didn't realise that one side should have a ground plane and the other side a power plane. So it has a ground plane on each side with power connections routed through. Having components on both sides makes it less straightforward, however.)

I used a short piece of RG178 to connect the 1MHz signal from the GPS module to the PCB, although any RF co-ax you have available should work fine since it's not a high enough frequency for it to be very important.

I mounted the GPS module using long bolts with stand-offs made from cut-off pieces of plastic tube taken from an old liquid hand-soap dispenser. They are fitted with plain washers between the tubes and the case, and spring washers between the nuts and the case.

This PCB is my first attempt at through hole plating! It seems to have worked reasonably well. For a detailed description of how I did it, see my PCB instructable here.

If you drill the holes in the board as close as possible to the diameter of the wire, you will find the vias much better "behaved" when you solder them. If attempting through hole plating don't do this however as the holes could end up too small if you need to put wires through any of them.

The power supply is built on a single sided board. The main board is easily converted to single sided if you use through hole components, as you can then route tracks under the components. It will however be somewhat larger in this case.

Be sure to provide an adequate heatsink for the LM350T. What happens here depends on the transformer you have, but with 12V input it will be dissipating up to 15W for the first few minutes after switch on, settling down to 5W in normal operation. So you need a heatsink adequate to dissipate the extra heat for a short length of time. A heatsink specified for 16°C per watt should be adequate. It will get quite hot at first but should eventually settle down to about 50°C. A bigger heatsink is generally a Good Thing.

Using a transformer which is a little under-powered will cause it to drop some voltage whilst the oscillator is heating up, so the regulator getting very hot during warm up isn't such an issue.

Last but by no means least is the mains wiring. I used an IEC socket and double pole switch, with the switch mounted at the back of the case next to the socket. There is an extra cable attached to split off power for the frequency counter which occupies the other half of the case.

Providing an earth connection is really important, both for electrical safety and to provide a signal return path to earth. If you are using a metal case, put a screw or bolt in it which has no other purpose than providing an earth connection, and connect all the earths to this using appropriately coloured wire (in the UK this is green and yellow). If there is paint where you fit this bolt, clean off enough to make a good connection to the case. In my case the earth connections are the one from the IEC socket connecting the mains, the one from the extra lead taking power out again, the ground plane of the main PCB (since it is mounted using insulated feet) and the case itself.

Programming the GPS

protocol-select.jpeg
config-select.jpeg
Neo7-config1.jpeg
reset-config.png
save-settings.jpeg

Connect the GPS module to a computer using a USB cable, in order to program it. The application is supplied in Windows and Android versions.

If you get a module without USB, you can still add a USB socket as the U-Blox chip has a USB connection. You can alternatively use a USB to serial converter module, or connect a serial port to the module's serial connections, although you would also need an RS232 level shifter in this case.

You can run the Windows version of the application on Linux, using wine, but you will need to download and install the Linux GPS driver. The module will appear as /dev/ttyACM0 when it's connected, to which you may need to create a symlink to a com port in ~/.wine/dosdevices. Depending on which version of wine you run the method for this varies. It may be simplest to manually create the link after the program is started. The new versions of wine should create the link automatically. You need to be a member of the group the /dev/ttyACM0 device belongs to. It seems to vary between distributions so use ls -l /dev to find this out.

With the program running, you can see a lot of information from the U-Blox chip. If not, check the "Receiver" menu for connection options. Make sure you set the correct protocol, otherwise you will be presented with a lot of configuration options which are not relevant. Do this before launching the configuration window.

Press Ctrl-F9 to bring up the configuration window. There are lots of options, but the main one you are interested is TPS (Timepulse 5)

Set the timepulse to "frequency" and enter 1 in the Hz box, set period to "duty cycle" and enter 0.0, so it's off all the time. This is the unlocked frequency, which you don't want to use. In the next set of boxes, set the frequency to 1000000, and the duty cycle to 50. This will cause it to generate a 1MHz square wave when it has a GPS signal, and the output to stay low when it doesn't.

You must disable the unlocked frequency because this is set by the chip's clock, not GPS, which is much less accurate than your OCXO!

Click "Send" at the bottom of the window after adjusting each setting. You can also click "Poll" to obtain the current settings.

If you find you've messed up and can't figure out what you've done wrong, the CFG option near the top of the window lets you reset everything.

Everything else you can leave as default, however you can tweak a few things to make the GPS more appropriate as a signal source rather than as a navigation aid, the most basic of these being to limit the range of satellites which are used to the ones more directly overhead. Use the Time Mode 2 setting for this.

After you have changed the settings you still need to save them. Select the CFG option, click the "save" radio button and "I2C EEPROM" from the list of devices (unless your module has one of the other ones of course), then click the send button.

The module is likely to be fitted with a high value capacitor, which should keep the settings for 20 - 30 minutes without power connected, so it's best to program it when it's connected to its backup battery, and make sure it's charged.

External Connections

usb-micro-b-plug-photo.jpg
usb-micro-b-plug.jpg
BNC-SMA.jpg

The unit has 10 outputs which need to be mounted on the front and/or rear panel, to supply the most commonly used reference frequencies. I put 9 outputs on the front and 1 on the back which is connected directly to the frequency counter with which the GPSDO shares a 19" case. I used a RP-SMA socket at the back since I'd already bought the extension by mistake.

It's a sad fact of life that 75 ohm connectors are much cheaper than 50 ohm ones, presumably due to the proliferation of video equipment. The standard for test equipment is generally 50 ohm however, and good practice dictates that all parts of the signal chain are matched impedance, although for this project it is not so important because the highest frequency is only 10MHz. I don't know if there could be issues due to the harmonic content of the TTL signals, if you mixed impedances, however you may experience some signal loss and more importantly, reflections.

Although the default choice of connector is 50 ohm BNC, as typically found on test equipment, there is no reason not to use something else, eg SMA.

I used SMA edge-mount connectors on the PCB to connect the leads for the external sockets. I chose these because it was cheaper to get the BNC sockets pre-wired with SMA terminated pigtails than to get bare solder sockets, an option which naturally led to using SMA connectors on the PCB itself.

A cheap/free source PCB mount BNC sockets is (if you can get them) old network cards which have a "10 base 2" (aka "thin ethernet") connection, if you like to recycle. If you can get the old cables they are also suitable to use as they should be 50 ohm.

If you have not made provision to use the GPS module's built in antenna, you will need to provide a connection to the outside. The module I used comes with a SMA socket, so I used a SMA plug to SMA bulkhead socket cable to bring this to the outside.

Once the initial configuration is done, access to the module's USB connector will only occasionally be needed, so there's no real reason to bring it to the outside. On the other hand, if for some reason you need to connect to the module regularly it's much better to not have to use the on-board connector. This also gives you an opportunity to change the connector type if you wish.

You can get USB extensions which have a panel mounting socket at one end, though they are rather long for this project as well as expensive, so I made my own. I bought some micro USB plugs and connected one to a bit of scrap USB cable, and connected the other end of the cable to a USB socket from an old printer. For most people it probably makes more sense to cut in half a ready made cable, and connect it to a USB peripheral socket. The socket must be of type B, mini B or micro B.

I mounted the socket on a small PCB along with a pin header, and fitted the cable with header connectors. I provided a hole in the board to fit a cable tie so the cable can be fastened to it, and two holes to attach to a bracket for mounting on the panel.

I carefully filed out a hold to poke the socket through, however in retrospect it would have been better to mount the socket just behind the panel and leave a slight overlap.

The correct connections for a mini or micro connector are:

Pin 1: Red, V+
Pin 2: White, D-
Pin 3: Green, D+
Pin 4: no connection
Pin 5: Black, V-

If you use a standard B type socket there are only 4 pins and pin 4 is black, V-. For a mini or micro socket, pin 4 is disconnected and pin 5 is V-

The socket is then attached to the back panel where it can be accessed through a small hole. I covered the hole to keep dust out as it should only rarely be used after the initial setup.

Setting Up

There are 2 things that need to be set up.

  1. The point at which the "oscillator ready" light comes on
  2. The "off air" oscillator control voltage

Oscillator ready light

Monitor the current being drawn by the oscillator as it warms up. Expect to see it start quite high, and go steadily down until at some point it starts going up again. This is the point at which the oscillator has reached its internal operating temperature, and is the point at which you want the light to come on. Adjust R4 so the light just comes on at this point. Disconnect the oscillator for a few minutes and reconnect it to confirm the setting.

If you adjust all the way to one end and it's still not coming on, increase the value of R21. If it's coming on too early, decrease the value of R21.

Off air mode

If your OCXO is brand new, it may be of no benefit to include this calibration circuit.

However, if you have a used one it is likely to have drifted away from it's original frequency, so pulling it in may be of benefit in case of times when there is no GPS signal.

The actual control voltage from the PLL varies over time, so this manual calibration can never match it for accuracy, however it should still be better than no control.

  1. Connect flyleads to the 2 pin header, PL20 and to 1 pin of PL21 and close the casing with the other ends of these leads sticking out so you can connect to them.
  2. Run the GPSDO for a couple of hours to ensure it is nice and stable, then measure the voltage at the oscillator's VC pin using the lead connected to PL21, and make a note of it (ideally you would monitor the voltage over a long period of time and find the average)
  3. Now disconnect the GPS antenna and wait for the unit to switch over to off-air mode.
  4. After a few minutes, check the voltage at the VC pin. If the difference in voltage is too small for you to measure, there is no reason to change it. Based on the resolution of a ten-turn preset, and assuming the reference voltage is around 2.8V, you should probably ignore a change of less than 28mV as this represents a tenth of a turn of the pot's shaft and becomes difficult to adjust precisely.
  5. Otherwise, connect the leads attached to PL20 together, and adjust the voltage at VC to match the voltage you wrote down previously.
  6. Remove the flyleads and fit a jumper across the pins of PL20.

In Use

The GPSDO is very simple to use

Position the unit where it can receive a GPS signal, or connect an external antenna.

It needs to be powered on for a while before it can be used, as it takes time for the oscillator to get up to operating temperature, for GPS to get a fix, and the control loop to stabilise. An hour or more is a good idea. You should also leave it connected to the mains for 24 hours when you first program the GPS module, in order to charge the battery.

So you want the following LED's to be on:

  • Power
  • Ready (the oscillator is up to temperature)
  • Fix (GPS has a satellite fix)
  • Lock (oscillator is disciplined by the GPS)

If there is no GPS fix there will be no lock and the PLL is disabled, so the oscillator will run at its factory setting, allowing for whatever drift has taken place during its lifetime (or at the frequency you set for off-air operation), so it's still pretty accurate. In this case the "Off Air" light will come on.

If the "Fix" light is flashing, it means the GPS module has lost its settings and needs to be re-programmed.

Connect a 50 ohm BNC cable from whatever output you want to use to whatever equipment you want to calibrate, or to run with the GPSDO as a clock source, and off you go.