Author Topic: Budget GPSDO - complete  (Read 30621 times)

0 Members and 3 Guests are viewing this topic.

Offline MIS42NTopic starter

  • Frequent Contributor
  • **
  • Posts: 511
  • Country: au
Budget GPSDO - complete
« on: February 25, 2021, 01:47:30 am »
I have been working on this project for a few months, and was not intending to make it public until it was finished. But when is anything 'finished'?

I was posting bits and pieces in the lars GPSDO threadhttps://www.eevblog.com/forum/projects/lars-diy-gpsdo-with-arduino-and-1ns-resolution-tic/, and was encouraged to start a new thread.

At first I didn't like the idea - half finished - not very professional. Then again someone may find it interesting. The process of preparing a document was constructive, it forced me to consider the choices made and also to solidify ideas for future developments. So here it is [wall] warts and all.

NOTE: *** This project is complete. See message #68 for GitHub link ***
« Last Edit: February 13, 2023, 03:12:59 am by MIS42N »
 
The following users thanked this post: Bryan, felixd, trobbins, electrolust, enut11, videobelu, Jacon, spostma, PA0KTF, Johnny B Good

Offline MIS42NTopic starter

  • Frequent Contributor
  • **
  • Posts: 511
  • Country: au
Budget GPSDO - a work in progress - Update
« Reply #1 on: April 04, 2021, 03:18:13 am »
Built a second GPSDO based on the circuit published in the .PDF attached to the first post. Two variations:
(1) the power supply is a 7.8V wall wart, the board supply is via a 7805. The 7.8V is also sent to the line driver/receiver system. In V1 the driver/receiver had a separate supply. V2 has one supply for the whole system.
(2) An output to a BNC connector was added. This used a 74HC04 hex inverter, one inverter buffers the OCXO output and feeds it to both the microprocessor and to the other 5 inverters. These are paralleled to drive the BNC output.

The V2 oscillator is still 'burning in'. It is ageing at a calculated 5 ppb/day, about 10 times the rate in the specifications (the specification is after 1 month running). This initially was enough to unsettle the control algorithm. The design target is to maintain 10MHz+-0.01Hz, this was maintained most of the time, interspersed with corrections of up to +-0.5Hz to sync the phase. This is due to the algorithm using a linear interpolation of the data. To detect ageing requires a quadratic interpolation. I didn't implement the quadratic interpolation as it requires higher precision than the arithmetic provides.

Instead a sanity check was added to the algorithm to stop the wild corrections. In the day since it was put in, it was only used once. The ageing has slowed to the point where the control algorithm is working as intended and the +-0.01Hz limit has been achieved. It will be interesting to see how the OCXO behaves after a few days running.

The output is not yet categorised. It should be a square wave of around 2V p-p into 50 ohm. As a crude test it was used as the reference for an SDR, proving that there is some output and as far as we could see it was 10MHz. A search is on to find someone with decent test gear. Anyone in Newcastle NSW following this thread and willing to help?

The validity of using the line driver/receiver was proved. Another driver/receiver pair were constructed and used to drive a 30 meter CAT 6 Ethernet cable. The GPS antenna was placed on a garden shed roof, the GPSDO set up in a lounge room. The GPSDO parses the NMEA data and does the checksum to detect corruption. There were no errors.

There are now (annoyingly) four avenues of investigation:
(1) V3 using the same oscillator and a precision voltage source for the control voltage
(2) V4 using a higher spec oscillator
(3) A different control algorithm. (i) to handle measurement periods > 30 minutes (ii) to calculate more frequently (iii) maybe calculate ageing.
(4) A 10MHz to 49.152MHz converter, suitable to be the reference for an ICOM tranceiver.

At the moment, (4) is the focus until the V2 output is verified as usable.

Modified circuit and picture attached:

The picture shows power input top left, GPS input top, serial output top right.
 
The following users thanked this post: videobelu

Offline spostma

  • Regular Contributor
  • *
  • Posts: 118
  • Country: nl
Re: Budget GPSDO - a work in progress
« Reply #2 on: April 15, 2021, 10:29:12 pm »
beautiful work!
Great that you did that all in 100% PIC assembly,
and that you use all PIC resources so efficiently  - I love that too...
Are you willing to share your source code?
 

Offline MIS42NTopic starter

  • Frequent Contributor
  • **
  • Posts: 511
  • Country: au
Re: Budget GPSDO - a work in progress
« Reply #3 on: April 16, 2021, 01:12:15 pm »
beautiful work!
Great that you did that all in 100% PIC assembly,
and that you use all PIC resources so efficiently  - I love that too...
Are you willing to share your source code?
Thank you.

I put the current source at http://www.cashin.net/gpsdo.asm. It is a work in progress, so it will probably be out of date next week but I'll leave it there. It is not a 100% reliable web server so if you can't get it first try, wait and try again. You will need MPLAB X IDE v5.35 to see it properly, v5.35 is not the current MPLAB X version. They discontinued support for MPASM (the compiler) after v5.35 and there isn't a good replacement (that I have found). It can still be downloaded from the Microchip website https://www.microchip.com/en-us/development-tools-tools-and-software/mplab-ecosystem-downloads-archive

The source is a bit haphazard and the comments are meant for me so I can get back to it and remember what I did. If you want to rip some of it but not sure what it does, feel free to ask. I am rather pleased with the software UART to receive the 9600baud NMEA, I haven't seen a dropped message yet. It was a devious way of interfacing with a 3.3V device without a level shifter, and also freed up the real RX for user input.

It may seem odd that I chose a PIC processor with USB, but don't use the USB part. I looked at the specification and decided it did all the things I wanted, so bought it. Now I've got a few, no point in researching a different one.
 
The following users thanked this post: videobelu, audiotubes

Offline MIS42NTopic starter

  • Frequent Contributor
  • **
  • Posts: 511
  • Country: au
Re: Budget GPSDO - a work in progress
« Reply #4 on: May 20, 2021, 06:06:05 am »
Time for an update:

The second GPSDO (mentioned in Reply #1), which was ageing quickly at the start, settled down after a week. It was taken to a lab to look at the output, the 74HC04 circuit put out a useful square wave a bit less than 3V p-p into 50 ohm. A spectrum analyzer showed nothing bad, just harmonics as expected from a square wave. So it is classified as a success. Although it reliably held to better than 10MHz +- 0.01Hz (i.e. less than 1ppb error) it didn't perform as well as the first build. It showed more sensitivity to temperature, and since the main difference between the two was the power supply, this is thought to be the cause.

An amateur radio operator mentioned that they liked equipment that ran from a nominal 12V, tolerant enough to run off a charged battery. This presented a problem as the OCXO runs off 5V, so a drop of up to 9V was required. A simple buck converter based on the MP1484EN chip was purchased, sold as the Mini-360 Dc-Dc Buck Converter. It has a pot to adjust the output from 18V to about 1V. This proved very touchy, hard to set within a few % of 5V. This was supplied with 12V from a wall wart.

Since GPSDO #2 was a proven system, GPSDO #1 was modified to use the new power supply. This was not very successful, mostly better than 1ppb but wandering more than GPSDO #2. Since the only change was the power supply, this added more evidence to the idea the power supply is a factor.

I theorised that the main effect of power supply variations was to vary the control voltage. The OCXO is supposed to be tolerant of small supply voltage changes, so a circuit was drawn up to buffer the PWM output of the PIC through a pair of FETs supplied from a MAX6350 precision voltage source. This was an annoying complication, so the current draw of the PIC was tested. It was about 5mA which is well within the supply capacity of the MAX, so in theory the PIC can be supplied by the MAX and the buffer is not required.

So a GPSDO #3 circuit was laid out and about to be constructed when I realised that GPSDO #1 had been set up with a jumper to supply +5 to the PIC. Remove the jumper, supply the output of the MAX (on a breadboard) to the in circuit programming connector and see what happens. So far it looks like a winner. If it proves satisfactory in the long term, GPSDO #3 will be the last prototype using the OSC5A2B02. The circuit is already laid out in KiCad, just need to see if the buck converter does the job. It may be possible to remove the pot and replace it with a fixed resistor, there appears to be pads to do it.
 

Offline MIS42NTopic starter

  • Frequent Contributor
  • **
  • Posts: 511
  • Country: au
Re: Budget GPSDO - a work in progress
« Reply #5 on: May 27, 2021, 11:22:34 am »
The buck converter to drop 12V to 5V (described as Mini-360 DC-DC Buck Converter Step Down Module) proved unworkable. I think it was designed for higher currents than I am drawing (about 200mA). I tested it with a 10Ω resistor and it was quite stable (although very fiddly to set the voltage) at 5V and 500mA. But in the prototype the voltage was jumping around. To continue testing with the processor supplied by a MAX6350 precision voltage supply, a 7805 with heatsink was used to get the 5V for the rest of the circuit from 12V. It generates more heat than the rest of the circuit, very annoying.

The tests were satisfactory, after a few days the frequency errors were less than 1 part in 10E-10. There was still a variation but it didn't seen to be temperature dependent. Part of the circuit was breadboard with leads everywhere, may have been a problem.

On the strength of the success, prototype #3 has been constructed, with the processor supplied by a MAX6350. It was going to use the '7805 on a heatsink' supply for 5V to the rest of the board, but for a trial a cigarette plug to USB adapter is being used to see how it performs. It is more stable than the Mini-360, with lower dissipation solution than the 7805.

It is currently 'burning in' the OCXO (yet another OSC5A2B02) and already better than 1 part in 10E-9.

I had not expected power supply to be an issue. So far the trials have been:
(1) GPSDO running from 5V with GPS module attached to the board - fail, couldn't get enough signal in the house
(2) added an antenna, partial success but inconvenient location
(3) Separate the GPSDO and GPS by using a line driver and receiver to get NMEA and 1pps. GPSDO still using 5V, the rest on another 8V supply. Very successful, stable GPSDO and good GPS signals.
(4) Another GPSDO with a single 8V supply, 5V coming from a 7805 on a heatsink. Not as good as (3)
Decided (maybe foolishly) that the supply should be 12V. From here on, line driver/receiver and GPS unit get 5V from 12V via their own 7805 (not heatsinked).
(5) original GPSDO supplied by buck converter - disaster
(6) original GPSDO with a single 12V supply, 5V coming from a 7805 on a heatsink. About as successful as (4) but needs to get rid of too much heat.
(7) Modify (6) to supply 5V to the processor via a MAX6350, the remainder from the 7805. An improvement over (4) and (6) but still not quite as good as (3)
(8 ) GPSDO #3, single 12V supply, 5V to the processor via a MAX6350, the rest of the circuit from a car to USB converter. Looking good.

I think the 12V to 5V via a buck converter is still the way to go (except for the processor, it needs a very stable voltage). I don't really want to be designing my own (a whole new area of pain) but if the supply is to be a generic 12V (even a car battery at 13.x Volt) then the other option is a hot heatsink, and that will have its own problems (and waste 60% of the supply).

Still a work in progress.
 

Offline MIS42NTopic starter

  • Frequent Contributor
  • **
  • Posts: 511
  • Country: au
Re: Budget GPSDO - a work in progress
« Reply #6 on: May 29, 2021, 07:52:38 am »
I read a bit about buck converters. The problem with the Mini-360 DC-DC Buck Converter Step Down Module is the inductor, it is 10μH. The recommended operation is to have current ripple through the inductor of 30% or less than the current draw. With 10μH and low current the ripple is 100% (i.e. for a portion of the time there is no current through the inductor). I'm guessing that isn't allowing the IC to regulate properly. A hot iron dropped the inductor off, should be able to replace it with a 100μH inductor with a 600mA rating. Just need to order some.

The latest thinking is to have the buck converter output something about 8.5V and a linear regulator (7805) with a heat sink to supply 5V. The MAX6350 should also operate from 8.5V. This will allow input voltage to be anywhere between 10 and 18V, covering the 12V lab supply and 11 to 13.x supply from a car battery. Makes the sizing of a heat sink for the 7805 a bit easier, and the output of the buck converter doesn't have to be down to the nearest 100mV.
 

Offline AndrewBCN

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: fr
LM317T to reduce 12V to regulated, low-ripple 8V
« Reply #7 on: May 29, 2021, 09:21:09 am »
Hello MIS42N,
You may want to investigate the use of an LM317T instead of a switching regulator, to reduce 11V to 13V input to a well-regulated, low-ripple 8V that would then supply your LM7805T and your precision regulator. The LM317T is quite inexpensive but has better dynamic characteristics than the LM78XX series.
 

Offline MIS42NTopic starter

  • Frequent Contributor
  • **
  • Posts: 511
  • Country: au
Re: LM317T to reduce 12V to regulated, low-ripple 8V
« Reply #8 on: May 29, 2021, 11:22:11 am »
Hello MIS42N,
You may want to investigate the use of an LM317T instead of a switching regulator, to reduce 11V to 13V input to a well-regulated, low-ripple 8V that would then supply your LM7805T and your precision regulator. The LM317T is quite inexpensive but has better dynamic characteristics than the LM78XX series.
A good idea and I was tempted to go down that path.

I am trying to get away from generating too much waste heat. My test on the buck converter with a 500mA load (5V from 12V into 10Ω) was OK, only slight voltage change over a couple of days. And it was quite cool even though the resistor was too hot to touch (not overloaded though, it is rated 5W). And since I bought 10 of the little things, I want them to work. Just about everything these days uses switch mode supplies of some sort, the best result I have so far was a circuit soldered onto a 5V wall wart. So it should be possible. Even the dodgy USB from cigarette lighter appears to work OK as a 5V source but it is more expensive.

The buck converter was less than $1 and a replacement 100μH inductor a few cents. Now I know what the problem is, I want to give it a go even if it is a failure.

In the meantime, I've started coding a new control algorithm. It is supposed to be adaptive and cater for measurement periods from 3 seconds to days, and do ageing compensation. It is simpler than the one I use currently, but hopefully works better. The current one is only capable of calculating corrections to 5 parts in 10E-11 so I don't know if the OCXO can do better. I also have a DOXCO that, if the algorithm works, can use the same software.



 

Offline AndrewBCN

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: fr
Re: Budget GPSDO - a work in progress
« Reply #9 on: May 29, 2021, 04:12:35 pm »
Hi MIS42N,
If I may, I would suggest these three informative videos:

EEVblog #90 - Linear and LDO regulators and Switch Mode Power Supply Tutorial


EEVblog #594 - How To Measure Power Supply Ripple & Noise


EEVBlog #1116 - How to Remove Power Supply Ripple


A $1 buck converter will likely have several tens to several hundreds millivolts of high-frequency noise on its output, which neither the 7805T nor your precision regulator will be able to remove, as explained in video #1116, here: https://youtu.be/wopmEyZKnYo?t=196



 

Offline MIS42NTopic starter

  • Frequent Contributor
  • **
  • Posts: 511
  • Country: au
Re: Budget GPSDO - a work in progress
« Reply #10 on: May 30, 2021, 05:11:56 am »
 

Offline MIS42NTopic starter

  • Frequent Contributor
  • **
  • Posts: 511
  • Country: au
Re: Budget GPSDO - a work in progress
« Reply #11 on: June 28, 2021, 12:36:21 pm »
This has been on the back burner for a while, made some changes recently so time for another update:
The control algorithm is completely rewritten, nothing like the original. It appears to work well. Although it calculates an ageing compensation, this is not implemented. The OCXO is not stable enough that ageing is significant (I'm trying to figure why).

The algorithm starts trying to discipline the oscillator when OCXO frequency is off by about 10Hz. This only happens during warm up. Once disciplining starts, the OCXO delivers an average of 10 million cycles every second. I think that's equivalent to a PLL lock, and the algorithm won't let go (lose lock?) after that. As described in the pdf (reference in the first post, I should write an update), the OCXO is allowed to 'free run' with a fixed control voltage until the difference between the 1pps arrival and the completion of the last 10 million cycles reaches a limit. A different fixed voltage is applied to bring the difference to zero. Once a voltage has been set, over time the difference limit is reduced. The limits are in a table, currently it is around 150ns at 196 seconds (a frequency error of less than 1E-9 or 0.01Hz) and reduces to about 25ns after 6 hours (a very unlikely 1E-12).

My design criteria was 1E-9, every GPSDO I've built achieves that after about 15 minutes.  I'm trying to push that consistently below 1E-10 but it is proving elusive. The current rig seems to have inherited some quantum DNA, attempts to measure things causes changes. I shall persevere.

Which brings a question? Should I just stop developing more complex solutions to solve smaller problems and commit the original design to PCB?
Pros: It works - 5V and a decent GPS signal in, 10MHz+-0.01Hz square wave 3V p-p into 50Ω out. Visual indication by flashing LED that it is running within spec. Cheap - any GPS that provides a solid 1pps and NMEA data, less than $20 parts, 5V wall wart.
Cons: The requirement for a solid 1pps can be more expensive than the rest of the kit. Could have earthing problems (easily disturbed).

The current rig runs off 12V. I replaced the 10μH with 100μH in the buck converter, added a 2500μF electrolytic to the output, set it to 8.5V and use a 7805 to drop that to 5V for the OCXO. This appears to be quite stable. The 7805 heat sink is warm but not uncomfortable.  I think I have earth loops. The rig is spread over 3 prototyping boards, putting all 3 in a cake tin seemed to make an improvement. I am awaiting a few parts from China, ordered May, expected delivery now August. Slow progress. Maybe time to start the DOXCO version, I have the parts.
 

Offline MIS42NTopic starter

  • Frequent Contributor
  • **
  • Posts: 511
  • Country: au
Re: Budget GPSDO - a work in progress
« Reply #12 on: August 21, 2021, 04:00:34 am »
I decided I should pursue the original concept - a budget GPSDO using minimal parts. A PCB has been designed (with help from Tim - many thanks) and submitted for production. The concept is the user supplies the ancillary components, which may be sufficient for some people. For the more ambitious, the ancillary components may be repurposed and the PCB consigned to the back of a dusty drawer.

The power supply requirements are flexible. The board can be fitted with a micro USB B socket, allowing the use of a phone charger. Alternatively, a barrel connector can be fitted, there is space for a voltage regulator such as a 7805 and some filter components if required. The regulator is at the board edge so various sized heatsinks can be used, or the regulator could be bolted to a case (if the user supplies one).

The circuit requires a GPS module producing 1pps and and NMEA serial data at 9600 baud. The processor can handle either 5V or 3.3V. Optionally the NMEA data can be changed to 4800 baud by changing the software. This should cover most of the modules available.

In theory, this is enough to get a working system. Functionality is indicated by a single LED which provides indication of OCXO failure, satellites in view (prior to getting a fix), fix but not locked. Locked but not in specification (i.e. 1 part in 10E-9) and locked and in spec.

However, this may not be sufficient for setting the system up. A basic user interface is provided through a 9600 baud TTL serial link. This can give more information and can pass through the NMEA data from the GPS module. To use the serial data, the user would need to provide an interface such as a serial to RS232 converter (e.g. using a MAX232 or similar) or a serial to USB (e.g. FT232). Two useful programs are PuTTY and VisualGPS. VisualGPS 'decodes' the NMEA data and shows the number and signal strength of satellites in view, along with other useful data. PuTTY is a terminal emulator and allows keyboard input of the few user option. One option is to switch from the NMEA data and view the second by second deviation of the 1pps from the OCXO.

More when the PCBs arrive.
 
The following users thanked this post: trobbins

Offline MIS42NTopic starter

  • Frequent Contributor
  • **
  • Posts: 511
  • Country: au
Re: Budget GPSDO - a work in progress
« Reply #13 on: September 04, 2021, 12:34:29 am »
Getting excited. Both the PCB and the additional parts to make multiple kits are in transit. Given Covid delays, ETA is unknown but I figure I'll be populating and testing a PCB within the week.

As detailed earlier, my method of discipline is to let the oscillator run without varying the control voltage, and correct when the oscillator and 1pps diverge by some amount. It appears from reading about other GPSDOs that nobody else does this. This may be because I didn't understand PID control 10 years back and so started down a different track.

After reading about Allan deviation (and finally understanding it), it was clear if the corrections were left too long, the Allan deviation would suffer. So the discipline algorithm has been modified. If no limit correction has occurred, a correction is done after 3*2^9 seconds (1536 seconds or 25 minutes 36 seconds) regardless of the calculated divergence. Most literature indicates a time of about 20 minutes is good, but the way the algorithm works it is locked into periods of 3*2^n.

The trials are encouraging. Here is the result for a day (Local time is UTC+10 hours so starting around 8a.m.):

 Time 215156 UTC. Ctrl 1.9929890 0.026 ppb FFFA
 Time 221732 UTC. Ctrl 1.9927896 -0.186 ppb FD45
 Time 224308 UTC. Ctrl 1.9928470 0.054 ppb 0039
 Time 230844 UTC. Ctrl 1.9927377 -0.102 ppb FF41
 Time 233004 UTC. Ctrl 1.9929316 0.181 ppb 007C
 Time 234141 UTC. Ctrl 1.9928122 -0.111 ppb FFE4
 Time 000301 UTC. Ctrl 1.9929325 0.112 ppb 0006
 Time 002837 UTC. Ctrl 1.9929182 -0.013 ppb 0088
 Time 005413 UTC. Ctrl 1.9929514 0.031 ppb 0065
 Time 010307 UTC. Ctrl 1.9929243 -0.025 ppb FFFD
 Time 012843 UTC. Ctrl 1.9929175 -0.006 ppb 001B
 Time 015419 UTC. Ctrl 1.9929203 0.003 ppb 0050
 Time 021539 UTC. Ctrl 1.9930906 0.159 ppb 0013
 Time 023244 UTC. Ctrl 1.9929929 -0.091 ppb FFCF
 Time 025404 UTC. Ctrl 1.9931175 0.116 ppb 0073
 Time 030205 UTC. Ctrl 1.9930299 -0.082 ppb FFF1
 Time 032741 UTC. Ctrl 1.9930659 0.034 ppb FFFF
 Time 035317 UTC. Ctrl 1.9930683 0.002 ppb FFF7
 Time 041853 UTC. Ctrl 1.9930726 0.004 ppb FFDA
 Time 044429 UTC. Ctrl 1.9931517 0.074 ppb 00EE
 Time 050549 UTC. Ctrl 1.9930177 -0.125 ppb 000C
 Time 051825 UTC. Ctrl 1.9931312 0.106 ppb 0011
 Time 053945 UTC. Ctrl 1.9930854 -0.043 ppb 0057
 Time 055233 UTC. Ctrl 1.9930430 -0.040 ppb 003E
 Time 061419 UTC. Ctrl 1.9930937 0.047 ppb FFF7
 Time 063955 UTC. Ctrl 1.9930552 -0.036 ppb 0047
 Time 070531 UTC. Ctrl 1.9930851 0.028 ppb 0002
 Time 073107 UTC. Ctrl 1.9930393 -0.043 ppb 0024
 Time 075643 UTC. Ctrl 1.9930580 0.017 ppb 0074
 Time 082219 UTC. Ctrl 1.9929936 -0.060 ppb FF63
 Time 084755 UTC. Ctrl 1.9929991 0.005 ppb 002F
 Time 091331 UTC. Ctrl 1.9930119 0.012 ppb FFC7
 Time 093907 UTC. Ctrl 1.9930058 -0.006 ppb FFEE
 Time 100443 UTC. Ctrl 1.9930003 -0.005 ppb 003F
 Time 103019 UTC. Ctrl 1.9929517 -0.045 ppb FF2F
 Time 105555 UTC. Ctrl 1.9929710 0.018 ppb FFFD
 Time 112131 UTC. Ctrl 1.9929276 -0.040 ppb 0060
 Time 114251 UTC. Ctrl 1.9928550 -0.068 ppb FFF2
 Time 120545 UTC. Ctrl 1.9929130 0.054 ppb 0033
 Time 123121 UTC. Ctrl 1.9928443 -0.064 ppb FF84
 Time 125657 UTC. Ctrl 1.9928440 0.000 ppb FF6C
 Time 132233 UTC. Ctrl 1.9928376 -0.006 ppb FFC0
 Time 134809 UTC. Ctrl 1.9928110 -0.025 ppb FEE3
 Time 141345 UTC. Ctrl 1.9928421 0.029 ppb FF94
 Time 143921 UTC. Ctrl 1.9927606 -0.076 ppb FFA6
 Time 150041 UTC. Ctrl 1.9926767 -0.078 ppb 000A
 Time 151830 UTC. Ctrl 1.9927258 0.046 ppb FFEB
 Time 154406 UTC. Ctrl 1.9926865 -0.037 ppb FFF8
 Time 160942 UTC. Ctrl 1.9926660 -0.019 ppb FFF3
 Time 163518 UTC. Ctrl 1.9926037 -0.058 ppb FF96
 Time 170054 UTC. Ctrl 1.9926187 0.014 ppb FF1C
 Time 172630 UTC. Ctrl 1.9926230 0.004 ppb FFF3
 Time 175206 UTC. Ctrl 1.9925515 -0.067 ppb FEE9
 Time 181742 UTC. Ctrl 1.9925549 0.003 ppb FF73
 Time 184318 UTC. Ctrl 1.9924801 -0.070 ppb FF22
 Time 190854 UTC. Ctrl 1.9924627 -0.016 ppb FFF9
 Time 193430 UTC. Ctrl 1.9924227 -0.037 ppb FFF5
 Time 200006 UTC. Ctrl 1.9923839 -0.036 ppb FF95
 Time 202542 UTC. Ctrl 1.9924783 0.088 ppb 0081
 Time 205118 UTC. Ctrl 1.9924581 -0.019 ppb 007E
 Time 211654 UTC. Ctrl 1.9924542 -0.004 ppb 000B
 Time 214230 UTC. Ctrl 1.9924725 0.017 ppb 006B
 Time 220806 UTC. Ctrl 1.9924288 -0.041 ppb FF53


The figures indicate a slow downward movement of the control voltage, presumably to compensate for ageing. The OCXO was turned on less than a week ago. This is overlaid with a rise during the day which is presumably temperature related.

The four characters at the end are for debugging. It is a hexadecimal representation of frequency drift during the measurement period. With a constant control voltage and a perfect oscillator, this should be zero. I am thinking of putting in some compensation for this, but it is not worth it while temperature effects (which are basically unpredictable) are more than ageing effects. Maybe if the software is used in a different hardware platform, it will become relevant.

The design aim was to have an oscillator that delivers 10MHz+-0.01Hz (i.e. 1ppb or less). As can be seen, most of the time it is an order of magnitude better. Cheering 8).
 
The following users thanked this post: oilburner, trobbins, spostma

Offline MIS42NTopic starter

  • Frequent Contributor
  • **
  • Posts: 511
  • Country: au
Re: Budget GPSDO - a work in progress
« Reply #14 on: September 09, 2021, 09:49:40 am »
The PCBs and multiple parts arrived. A GPSDO was assembled and connected up to GPS. It worked!! For a while ...

It took nearly 3 hours to assemble. I am not an experienced kit builder, so maybe I should have expected it. Soldering looked good, nothing showing up on the multimeter to worry about, power on. Attached the PICkit 3 and programmed successfully. Sailed through the 3 hour calibration, started to settle into run mode, then serial output stopped. I had noted that serial input from the user wasn't acknowledged, what was wrong?

What was wrong was an oversight on my part. There are no markings on the PCB to show which connector pin does what (should this prove popular, will be fixed in the next run of boards). I had wired the serial input/output incorrectly and it looks like it fried the PIC UART. The system continued to run minus serial output and after a while the LED indicated it had settled to better than 10MHz+-0.01Hz, (the target error of less that 1 part in 10E9). But with no serial output, that was all that could be said. Success of a sort.

Fortunately or unfortunately whichever way you looks at it, it looks like the PIC serial port failed rather than the serial/USB converter. After the disaster, the converter was hooked up to an older GPSDO (carefully, correctly) and is working. Fortunately because I only have one serial/USB converter, but several spare PIC16F1455 processors. Unfortunately as now I have to figure out how to remove and replace a 14 pin part without damaging the PCB.

It looks like a kit can be created for about $16AU+postage (remembering a kit does not include a power supply, a GPS receiver, and the (optional) serial/USB adapter and case). A kit is the PCB, OCXO (OSC5A2B02), PIC16F1455, 74HC04, Panel mount BNC connector, resistors, capacitors, and pin connector strip. I was hoping to include a micro USB connector for power but these are in transit. For testing I supplied power through a barrel connector (the PCB also has provision for it) but I don't have spares of them. A builder could attach wires direct to the board, maybe with a USB A plug. I may include the LED I ordered, it works but not very bright. The LEDs I used before were cannibalised from solar powered Christmas lights and they were much brighter. Maybe one of those can go in, they come in strings of hundreds, just need to remove the wires.

So it's close, folks. I'd like to replace the PIC on the board, test again with serial output working. Report back in a day or two. I've ordered what is claimed to be a NEO-7 module marked BOAR, the O looking like a paw print. I believe these have a preamp for the patch antenna, may get reasonable reception indoors. All in the interests of experimentation.

The system being tested in the last post was turned off to allow this test. That test revealed the system is sensitive to temperature changes. This explains a problem I was having a few weeks back, the system is set up not far from a thermostatically controlled heater. As the heater cycled on and off, it was reflected in the processor raising and lowering the control voltage. I thought at first it was electrical interference but not so. Is it worth doing something about it? probably not. This is a budget build and it meets the specification under normal circumstances (even heaters turning on and off).
 

Offline MIS42NTopic starter

  • Frequent Contributor
  • **
  • Posts: 511
  • Country: au
Re: Budget GPSDO - a work in progress
« Reply #15 on: September 13, 2021, 12:04:21 pm »
PIC replaced, system works. I have written up a brief description in the attached pdf.

I have been experimenting with antenna position to determine the difference in performance between good and poor reception. The answer is - huge. With good reception the system often runs the full 25 minutes between adjustments, and all adjustments are frequency changes of less than 0.001Hz. With the antenna positioned on a downstairs window ledge, adjustments were frequent and sometimes more than 0.01Hz.

Is there anybody interested in a kit to construct the GPSDO module? I have several spare PCBs and all the parts to populate the board except for power supply options. That may be a personal preference so best left to the individual. I think this will only be for people in Australia, I haven't done anything like this before so I am assuming I can just post a parcel. I also haven't collected money, I guess PayPal can do that. I am pretty confident the cost including postage will be about $20.

If you are interested, or have questions, you can use the little email symbol to the left of this post to send me an email.

Regarding GPS reception, my solution was to mount the GPS receiver remotely and use a line driver/receiver to bring the signal to the GPSDO via Ethernet cable. This required no changes to the GPSDO. The receiver has an active antenna that is sitting on a roof. This was done because I had the antenna, and the receiver didn't have a patch antenna. I am thinking I'll try a receiver with a patch antenna inside a bit of plastic pipe for weather protection. On paper, a GPS module with patch antenna using the line driver/receiver option is cheaper than buying an active antenna, and can be mounted a lot further away (I've tested it to 30 meters). Is anybody interested in the outcome of this experiment?



 
 
The following users thanked this post: oilburner, trobbins, enut11, de_light

Offline intabits

  • Frequent Contributor
  • **
  • Posts: 319
  • Country: au
Re: Budget GPSDO - a work in progress
« Reply #16 on: September 13, 2021, 06:42:58 pm »
A bit of a side-track to your project, but may be of interest to you.

Are you aware of this Silicon Chip project from October 2018: "GPS-synched Frequency Reference"?
https://www.siliconchip.com.au/Issue/2018/October/GPS-synched+Frequency+Reference+Pt.1

They made their own ovenized oscillator (40MHz), which I found appealing since its based on all new parts, so multiple units can be made consistently without being bound to whatever used/surplus items are available from ebay and other sources.

But it also uses a PIC (which I don't like - can't even spell it), though I expect that would not be a problem for you, which is why I bring this up.   

I'm working on my version of the project, using just its ovenized oscillator, and an Arduino. I haven't touched it in quite a while, but look forward to getting back into it. I stated a thread on it a while ago:-
https://www.eevblog.com/forum/projects/yep-its-another-gpsdo-early-development-results/msg2129818/#msg2129818

I had to make my own counter and associated bodgery, as the Nano can't count count at 40MHz, but the PIC they used can.
So you might be able to just swap out your oscillator and PWM DAC for the SC oscillator section. (and rewrite most of your code :()   

(To handle the 40MHz, I might look into the blue pill STM32-based modules when I revisit my project...)
« Last Edit: September 13, 2021, 06:45:54 pm by intabits »
 
The following users thanked this post: MIS42N

Offline MIS42NTopic starter

  • Frequent Contributor
  • **
  • Posts: 511
  • Country: au
Re: Budget GPSDO - a work in progress
« Reply #17 on: September 13, 2021, 10:59:09 pm »
A bit of a side-track to your project, but may be of interest to you.

Are you aware of this Silicon Chip project from October 2018: "GPS-synched Frequency Reference"?
https://www.siliconchip.com.au/Issue/2018/October/GPS-synched+Frequency+Reference+Pt.1
Thanks for the heads up. I subscribe to SC so have seen the article. I think that project was what started me thinking. They published another GPSDO many years ago that used a PIC16F628A to do reporting but had a pile of digital chips to do the disciplining. At the time I decided to make a GPSDO using the PIC16F628A as the controller and I think it was published in circuit ideas a few years ago (long story). It was too complex and the PIC didn't have enough resources to do a good job.

I use the used OSC5A2B02 because they are very cheap for something with respectable specifications. There are plenty of sellers, for various prices. I came across a site where I could buy them in bulk for less than $4 each, but I have enough to build a few kits already. They are also available as a new item but the used ones perform well.

If you look at the specs for the SC project, it talks of an accuracy of +-100 ppb after 30 minutes. I am not happy if I see accuracy worse than 1ppb, usually achieved within 15 minutes. With a good GPS signal long runtime and stable temperatures, 0.1ppb is normal. That's 100 to 1000 times better.

And the philosophy of this project is different. It is more a building block than a complete unit. Just the backpack of the SC project will cost around 4 times this project. There's nothing stopping someone attaching something like a Raspberry Pi to the serial port to drive the user interface. With the NMEA pass through ability, anything in that stream is available. Tack a board to the output 10MHz to do whatever else is needed. Lots of circuits for distribution amps, square to sine filters etc. available.

Good luck with your Nano project. Certainly easier to program than the PIC, but as you are finding out there are reasons I went with the PIC.
 

Offline GigaJoe

  • Frequent Contributor
  • **
  • Posts: 485
  • Country: ca
Re: Budget GPSDO - a work in progress
« Reply #18 on: September 14, 2021, 12:42:43 am »
I may suggest create a box , from Expanded polystyrene , Styrofoam, and isolate quartz inside. it would be much stable and consume 1/4 of original mA (from over 100 mA in my case was around 20-25 mA).

usually it takes around a week to stabilized , then do adjustment.
 
The following users thanked this post: MIS42N

Offline MIS42NTopic starter

  • Frequent Contributor
  • **
  • Posts: 511
  • Country: au
Re: Budget GPSDO - a work in progress
« Reply #19 on: September 14, 2021, 05:09:15 am »
I may suggest create a box , from Expanded polystyrene , Styrofoam, and isolate quartz inside. it would be much stable and consume 1/4 of original mA (from over 100 mA in my case was around 20-25 mA).

usually it takes around a week to stabilized , then do adjustment.
Good thoughts if you are looking for more accuracy or worried about overheating power supplies. Maybe a bit wasted on this project, it is intended as a 'try before you spend money on an upmarket GPSDO' module. I think most people will find it works just fine if they are using it as the standard for calibrating other instruments, or as the source frequency for a transceiver (1Hz error at 1GHz is not too bad).
 

Offline GigaJoe

  • Frequent Contributor
  • **
  • Posts: 485
  • Country: ca
Re: Budget GPSDO - a work in progress
« Reply #20 on: September 14, 2021, 09:40:42 pm »
your crystal  SC cut - quite stable.
one thing ... you need to be certain that on output "ADC"  there should be very stable output, to avoid jitter.
 
The following users thanked this post: MIS42N

Offline MIS42NTopic starter

  • Frequent Contributor
  • **
  • Posts: 511
  • Country: au
Re: Budget GPSDO - a work in progress
« Reply #21 on: September 14, 2021, 10:58:53 pm »
your crystal  SC cut - quite stable.
one thing ... you need to be certain that on output "ADC"  there should be very stable output, to avoid jitter.
It does seem a good crystal. I've now used 4 second hand ones, the quoted control voltage is 0 to 4V with the aim to be correct frequency at 2V. The ones I've used vary between 1.8 and 2.1 so plenty of life in them. They are more sensitive than the expensive crystals at 0.1V/Hz. A Morion MV89 is 1V/Hz which makes it 10 times less sensitive to unwanted control voltage changes. You get what you pay for.

I don't understand your reference to ADC. The circuit uses a PWM (pulse width modulator) with a lot of filtering to remove the artifacts. Is that what you meant?
 

Offline GigaJoe

  • Frequent Contributor
  • **
  • Posts: 485
  • Country: ca
Re: Budget GPSDO - a work in progress
« Reply #22 on: September 15, 2021, 12:03:59 am »
yes, filtering, maybe increase RC value

one of thing , i did was not only do PWM as voltage source , but also inject pulses for a small correction.
so channel 1 do pwm , a second channel adding pulses (possible to do with lower amplitude ) at lower rate for a fine adjustment, therefore increase precision
 

Offline MIS42NTopic starter

  • Frequent Contributor
  • **
  • Posts: 511
  • Country: au
Re: Budget GPSDO - a work in progress
« Reply #23 on: September 15, 2021, 02:46:39 am »
yes, filtering, maybe increase RC value
I did an LTspice simulation of the filter I use (have you looked at Documentation02.pdf attached to post #15?). It has about 300 microvolt ripple at the first 10uF capacitor, under a microvolt by the second 10uF and too small to measure on the third. No more filtering required.
one of thing , i did was not only do PWM as voltage source , but also inject pulses for a small correction.
so channel 1 do pwm , a second channel adding pulses (possible to do with lower amplitude ) at lower rate for a fine adjustment, therefore increase precision
I dither the PWM to emulate 24-bit DAC. The voltage steps are less than a microvolt. No second output required. This code is executed at 40KHz to vary the PWM pulse width on every pulse.
Code: [Select]
BANKSEL PWM
MOVF    PWM,W   ; Add the least significant
ADDWF   Dithr,F   ; 14 bits of PWM to Dithr
MOVF    PWM+1,W
ANDLW   0x3F ; truncate to top 6 of 14 bits
ADDWFC Dithr+1,W
MOVWF Dithr+1
ANDLW 0x40 ; isolate possible carry out
XORWF Dithr+1,F ; remove it from Dithr
ADDWF PWM+1 ; now the most significant 10 bits
MOVWF   PWM2DCL ; bits 0-5 ignored
CLRW
ADDWFC PWM+2,W
MOVWF   PWM2DCH ; and store it as top 8 bits of next pulse width
 

Offline GigaJoe

  • Frequent Contributor
  • **
  • Posts: 485
  • Country: ca
Re: Budget GPSDO - a work in progress
« Reply #24 on: September 15, 2021, 04:38:26 am »
but filtering mostly depend on load of filter , would it be make sense to add opamp , between the filter and the control pin ?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf