GPS disciplined OCXO project

V

VK2RK

Guest
Moving on into the next design, a GPS disciplined OCXO using a UBLOX GPS module along with a bunch of ripple counters and a PLL chip
The frequency divider part could be used as a standalone device to provide 10, 5, 1 MHz with just one 74HC390, using two will provide a 10KHz signal to compare with the 10KHz from the GPS module and provide a phase lock, at least in theory.. Stay tuned as I go down this rabbit hole.

GPS-OCXO.jpg

GPS .jpg
 
V

VK2RK

Guest
Further developed the design and created artwork for prototype

GPS-OCXO.jpg

GPS-OCXO_PCB.jpg
 
J

Josh

Guest
I remember seeing a rather inspired design that used a the 10Mhz through a by ten divider into the reset input of a HC4046 and i think the GPS 1PPS output was feed into the set, the result was a pulse which duration was the phase of the PPS relative to the 1MHz clock. The HC4046 output was feed into a external charge hold circuit for an microcontroller adc. I though that was a really clever way to get the phase drift information to a high degree at a high rate. Maybe you can use the idea.
 
V

VK2RK

Guest
I remember seeing a rather inspired design that used a the 10Mhz through a by ten divider into the reset input of a HC4046 and i think the GPS 1PPS output was feed into the set, the result was a pulse which duration was the phase of the PPS relative to the 1MHz clock. The HC4046 output was feed into a external charge hold circuit for an microcontroller adc. I though that was a really clever way to get the phase drift information to a high degree at a high rate. Maybe you can use the idea.
Been thinking on similar lines, hence the choice of phase comparator that include the two D type flipflops and not just exclusive OR's
The Jitter from the GPS module that is a function of both the internal divider based on a 38KHz internal clock and Satellite timing differences I estimate to be in the range of 400 pS to a worst case occasional of 5nS, I don't have any equipment to more accurately measure the jitter or evaluate in more detail, thus by making some assumptions and using integration technique that I can apply in the Low pass filter to the OCXO control voltage, so here I can average out any jitter causing no correction to the control voltage only that of actual frequency drift. At least that is the plan. Also note that now I can select either 100 or 10 KHz as a reference, this to test my assumption, if the integration averaging works I should be able to increase the reference frequency. Time will tell.

All the design so far has been theoretical, the board has been ordered along with the IC's, I did hope to test my theory on a PLL chip but I cant get one locally, all answers will be found on the prototype, hopefully emerge from the rabbit hole.

I am attaching the final drawing and PCB
GPS-OCXO_PCB.jpg

GPS-OCXO.jpg
 
Last edited by a moderator:
J

Josh

Guest
there is a program to use with gpsdo's called lady heather.
http://www.ke5fx.com/heather/readme.htm

strickly speaking it does not have to be a gpsdo, but just hooking up the serial nema stream to it can give you some very useful data about gps related uncertainly.
 
V

VK2RK

Guest
The project is coming to an end, only left is a suitable container (Box)
The Arduino code gave me some headaches, its been some time since I wrote any code in C particular to the Arduino, this with having forgotten of some of the rabbit holes to be found with millis() macro along with buffer overflow on the virtual com port, several days of hair loss took place.
Now with lock ups overcome here is the video showing the functionality of the device.

Only part I did not film is the GPS module hardware failure that shows as a message on the screen followed with a reboot after approximately 10 seconds.

 

VK2RK

Active member
GPS Disciplined OCXO Parts List (Price listed are approximate)


Hardware
PCB 1 $10.00
GPS Module 1 eBay https://www.ebay.com.au/itm/402807251139 $20.00
OCXO 1 eBay https://www.ebay.com.au/itm/332389156868 $10.00
Project Box 1 eBay https://www.ebay.com.au/itm/363140568029 $20.00
Regulator 1 eBay https://www.ebay.com.au/itm/393378668946 $4.00
SMA socket 4 eBay $4.00
DC Socket 1 eBay or Jaycar $2.00
LED Red 3mm 1 Jaycar $0.50
LED Blue 3mm 1 Jaycar $0.50
Battery Holder 1 eBay $0.50

Integrated circuits Jaycar does not have all. Source eBay or others
74HC390, 2 $4.00
74HC4046 1 $2.00
74HC14 1 $1.00
CD4001 1 $1.00

Resistors Metal Film 1%
100K 2 Jaycar pack of 8 $0.85
1K5 1 Jaycar pack of 8 $0.85
1K0 2 Jaycar pack of 8 $0.85
R51 6 Jaycar pack of 8 $0.85

Capacitors
100uF 16V Tantalum 1 $0.20
10nF Ceramic 7 $2.50
100nF Ceramic 4 $1.50
270pF Ceramic 2 $1.50
470pF Ceramic 3 $1.50
1000pF Ceramic 1 $0.50
2700pF Ceramic 2 $1.00
4700pF Ceramic 1 $0.50

If you find any problems sourcing any parts please contact me, chances are I will have some on hand.

The Arduino controlled LCD requires the Nano and the LCD to be added to the list
LCD must be I2C type.(16x2)

Any issues just contact me.
GPS_)CXO.jpg


When you assemble this project the first thing to do is to install the DC socket and the regulator board.
Placing a voltmeter on the 100 uF electrolitic capacitor pads, adjust the regulator for 5 Volts

Failure will over-voltage the Oven Controlled Oascillator and damage it.
 
Last edited:

BillC

Active member
Hi Rob congratulations on your project, a very handy instrument to have in the workshop. I will start building one soon as I get a chance. Regards Bill.
 

VK2RK

Active member
After my bad experience a couple of years ago having had my work stolen, I have been reluctant to post and publish any work or code I created.
Overcoming my paranoia I have decided to publish the Arduino code on here.
Some of you will appreciate the time and effort that goes into creating this stuff, all I ask is that permission is sought out of respect, maybe even the acknowledgment of the creator. Not a lot to ask.

This is the code you need for the OCXO project
Note that your display may have a different address requiring to be matched in the code, or the display will not work, and if your Arduino IDE does not have installed the mentioned libraries in the code, will not compile.

I also am including an I2C scanner that will detect for you the LCD display address.

There could be a newer version coming later using an OLED display, once it's done and debugged will also get posted on here .

Thanks
 

Attachments

Last edited:

VK2RK

Active member
Not sure when I started with this project, I think about three months ago, getting parts has been a real issue with the long delays due to Covid with deliveries.
But in the end I achieved the goal to produce a cheap easy to construct GPS disciplined reference with very low gitter with short term stability of 0.3 PPB (0.003Hz)
The Images show three types of designs;
One with a LCD display using an Arduino Nano
One as a standalone reference
One as an HP frequency counter internal replacement of the oscillator , offering GPS locked or internal oven controlled if when no GPS signal available.
The original design used the Ublox Neo N8M GPS module, this is becoming hard to get with a cost of $20 to $30 so decided to source the cheaper Ublox Neo 7, testing this module resulted in no difference to the obtained accuracy.
IMAG4004-20211224-082213642.jpg
IMAG4006-20211224-082211756.jpg
IMAG4005-20211224-082212658.jpg
 

Attachments

Last edited:

VK2RK

Active member
Design changes (Improved lock - Lower jitter)

In the quest to mitigate jitter in the original design the phase lock would take place at a point within the satellite signal period, this process requires considerable period to to achieve an average control voltage that required a very slow (Long time constant filter)

Further testing on three units showed that I could achieve the same wanted (jitter) result with the phase coincidence taking place at the raising edge of the satellite signal.
What I originally observed was changes taking place either from multi pathing or the actual inserted error by the military, the GPS module division jitter is not the real issue.

The changes are as follows

The 100K resistor on pin 13 of the 74HC4046 is replaced with a 33K. Pin 5 and pin 6 on CD4006 are to be lifted or cut disabling this portion of the chip, bridge pin 5 and 6 with solder, the change in the filter sets the time constant phases to about 90 Deg (25%) of each other after the raising edge of the reference signal , as the jitter is on the reference signal moving the raising edge at about 5 nS this delay tends to mask the GPS module jitter be it from the module or the introduced inaccuracy of the GPS signal.

This modification will result in a faster phase lock taking place once the oven is at temperature,

New version of the PCB are on order that include the above modification, old boards can still be used, the main difference is the inverter not been used that on the new boards is assigned another task.

Edit: Fixed error (Not 45 deg but 90)
 
Last edited:

VK3ZYZ

Moderator
Staff member
You got me interested in this Rob.
So, as I found my Neo-7 GPS board today, I thought I'd try to learn a bit about how they work.
Here is my attempt so far..

I started off with a 2x16 LCD, an Arduino Pro Mini, and one of Josh's proto boards.
GPS_2x16LCD.jpg

But then a 4x20 LCD fit the proto board holes.
GPS_4x20LCD.jpg

GPS_4x20LCD_back.jpg

And my code outputs 1Mhz ok :)
1MhxOut.jpg

It is still early times as yet, but a good start I think.
Thanks for the idea.
I may get back to it some time soon.
 

Attachments

Last edited:

VK2RK

Active member
You got me interested in this Rob.
So, as I found my Neo-7 GPS board today, I though I'd try to learn a bit about how they work.
Good stuff Denys
As I pointed out in one other of my posts the use of the Neo programmable divider for a final output frequency is not a good idea as the output will have jitter (Something I worked very hard to mitigate in my design) This jitter is the consequence of the internal oscillator frequency of 48 MHz.

Here is a quote from a post in eevblog.com (https://www.eevblog.com/forum/metrology/neo-7m-output-frequency-issue/)
Quote
"As there are people using the cheapo ebay NEO-7M modules for generating 0.25Hz-10MHz frequencies (off the 1pps pin) here are some measurements how the Period of the output signal looks like.
Measurements done with a diy system, still some measurement jitter inside (<100ps rms), subject to an improvement..
The measurement confirms some concerns on a "large jitter" with 10MHz freq people try to use as a cheapo standard.
Based on my current understanding the frequencies which are not 48MHz/integer are a "nogo".

PS: The vertical scale is the sample's "period in picoseconds", the horizontal is the sample number.
Around 1000 samples/sec.
" End Quote

Trust me if I could have found a simpler method to achieve what I did I would have used it already.
The other point I make is that to asses the measure of stability and drift along with jitter one has to have instrument that have a resolution 10 times better than the final target measure.
Note that the instrument I have designed has a stability better that 3 PPB (+/- 1.5PPB) with ultra low jitter bordering Allan Noise

Concluding if you seek a signal that has a degree of known error and this is acceptable for the intended application then what you are doing is fine.
All other designs that use the Ublox GPS module mitigate the issues I pointed out either in using an ovenised or Temperature compensated Oscillator producing the final frequency, some do it better than others as the Trimble system ( In my opinion the best) that compensates for man introduced errors or path errors.

In your sketch I note you are using "#include <SoftwareSerial.h>" This library is buggy, causes stack overflow and corrupts the code causing a lock up, I spent a lot of time in locating what was causing my code to crash, use this library instead "#include <AltSoftSerial.h>"
You will need to install it into your libraries of the IDE

There is more to this than seen at first.
 
Last edited:

VK3ZYZ

Moderator
Staff member
No doubt all correct Rob.
I may progress with this to fix it, but as it is, the signal is so much better that anything I had before.
My eventual aim is to get a real good 5Mhz source for my Fluke 6160B synthesizer .
It is a neat machine, having 2 ranges.
Low = 1Mhz to 12Mhz in 0.1Hz steps. (I think that should be 16Mhz, but the book says 12Mhz))
High = 10Mhz to 160Mhz in 1Hz steps.
At the moment, it is not working. The power supply failed few years ago and I fixed it, but something has died again.
1644271551682.png
 

VK2RK

Active member
My eventual aim is to get a real good 5Mhz source for my Fluke 6160B synthesizer .
That is what I provide with what I have designed 10MHz, 5MHz and 1MHz Sinusoidal outputs with harmonics greater than -60dB down
not sure why you wish to re-invent the wheel...
If it's about exploring the traps and rabbit holes then that is another matter.

IMAG4099-20220208-093037490.jpg
 
Last edited:

VK3ZYZ

Moderator
Staff member
I don't really want to reinvent it, just have a play.
Next, I have to find just where I put the OCXO and check to see if the parts I have would suit your design.
Another case of "in a safe place".......
Also, I need to open the synth and look at what is in it as I think I'd like to install it all inside its case.
A rack cabinet would be a good idea to clean up my shed a bit too.
 
Top