Budget GPSDO - complete - Page 1
Forum section: electronics / projects

author: MIS42N
author_rank: Frequent Contributor
timestamp: February 25, 2021, 01:47:30 am
content: EDIT 2025-04-11: *** This is a working project ***The repository for the project ishttps://sourceforge.net/projects/minimal-gpsdo/- there is a repository in GitHub but it is incomplete/out of date.I did say previously that the project is complete. However, there's always room for experimentation so let's say it is mature - will allow construction of a fully functional GPS from a few components with excellent performance for the price.ORIGINAL #1 post (if you are interested in the history).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  warts and all.

author: MIS42N
author_rank: Frequent Contributor
timestamp: April 04, 2021, 03:18:13 am
content: 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.

author: spostma
author_rank: Regular Contributor
timestamp: April 15, 2021, 10:29:12 pm
content: 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?

author: MIS42N
author_rank: Frequent Contributor
timestamp: April 16, 2021, 01:12:15 pm
content: Quote from: spostma on April 15, 2021, 10:29:12 pmThank you.I put the current source athttp://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 websitehttps://www.microchip.com/en-us/development-tools-tools-and-software/mplab-ecosystem-downloads-archiveThe 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.

author: MIS42N
author_rank: Frequent Contributor
timestamp: May 20, 2021, 06:06:05 am
content: 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.

author: MIS42N
author_rank: Frequent Contributor
timestamp: May 27, 2021, 11:22:34 am
content: 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.

author: MIS42N
author_rank: Frequent Contributor
timestamp: May 29, 2021, 07:52:38 am
content: 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.

author: AndrewBCN
author_rank: Frequent Contributor
timestamp: May 29, 2021, 09:21:09 am
content: 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.

author: MIS42N
author_rank: Frequent Contributor
timestamp: May 29, 2021, 11:22:11 am
content: Quote from: AndrewBCN on May 29, 2021, 09:21:09 amA 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.

author: AndrewBCN
author_rank: Frequent Contributor
timestamp: May 29, 2021, 04:12:35 pm
content: Hi MIS42N,If I may, I would suggest these three informative videos:EEVblog #90 - Linear and LDO regulators and Switch Mode Power Supply TutorialEEVblog #594 - How To Measure Power Supply Ripple & NoiseEEVBlog #1116 - How to Remove Power Supply RippleA $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

author: MIS42N
author_rank: Frequent Contributor
timestamp: May 30, 2021, 05:11:56 am
content: I worked my way through this - very interestinghttps://www.microchip.com/stellent/groups/SiteComm_sg/documents/Training_Tutorials/en528032.pdf

author: MIS42N
author_rank: Frequent Contributor
timestamp: June 28, 2021, 12:36:21 pm
content: 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.

author: MIS42N
author_rank: Frequent Contributor
timestamp: August 21, 2021, 04:00:34 am
content: 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.

author: MIS42N
author_rank: Frequent Contributor
timestamp: September 04, 2021, 12:34:29 am
content: 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 FFFATime 221732 UTC. Ctrl 1.9927896 -0.186 ppb FD45Time 224308 UTC. Ctrl 1.9928470 0.054 ppb 0039Time 230844 UTC. Ctrl 1.9927377 -0.102 ppb FF41Time 233004 UTC. Ctrl 1.9929316 0.181 ppb 007CTime 234141 UTC. Ctrl 1.9928122 -0.111 ppb FFE4Time 000301 UTC. Ctrl 1.9929325 0.112 ppb 0006Time 002837 UTC. Ctrl 1.9929182 -0.013 ppb 0088Time 005413 UTC. Ctrl 1.9929514 0.031 ppb 0065Time 010307 UTC. Ctrl 1.9929243 -0.025 ppb FFFDTime 012843 UTC. Ctrl 1.9929175 -0.006 ppb 001BTime 015419 UTC. Ctrl 1.9929203 0.003 ppb 0050Time 021539 UTC. Ctrl 1.9930906 0.159 ppb 0013Time 023244 UTC. Ctrl 1.9929929 -0.091 ppb FFCFTime 025404 UTC. Ctrl 1.9931175 0.116 ppb 0073Time 030205 UTC. Ctrl 1.9930299 -0.082 ppb FFF1Time 032741 UTC. Ctrl 1.9930659 0.034 ppb FFFFTime 035317 UTC. Ctrl 1.9930683 0.002 ppb FFF7Time 041853 UTC. Ctrl 1.9930726 0.004 ppb FFDATime 044429 UTC. Ctrl 1.9931517 0.074 ppb 00EETime 050549 UTC. Ctrl 1.9930177 -0.125 ppb 000CTime 051825 UTC. Ctrl 1.9931312 0.106 ppb 0011Time 053945 UTC. Ctrl 1.9930854 -0.043 ppb 0057Time 055233 UTC. Ctrl 1.9930430 -0.040 ppb 003ETime 061419 UTC. Ctrl 1.9930937 0.047 ppb FFF7Time 063955 UTC. Ctrl 1.9930552 -0.036 ppb 0047Time 070531 UTC. Ctrl 1.9930851 0.028 ppb 0002Time 073107 UTC. Ctrl 1.9930393 -0.043 ppb 0024Time 075643 UTC. Ctrl 1.9930580 0.017 ppb 0074Time 082219 UTC. Ctrl 1.9929936 -0.060 ppb FF63Time 084755 UTC. Ctrl 1.9929991 0.005 ppb 002FTime 091331 UTC. Ctrl 1.9930119 0.012 ppb FFC7Time 093907 UTC. Ctrl 1.9930058 -0.006 ppb FFEETime 100443 UTC. Ctrl 1.9930003 -0.005 ppb 003FTime 103019 UTC. Ctrl 1.9929517 -0.045 ppb FF2FTime 105555 UTC. Ctrl 1.9929710 0.018 ppb FFFDTime 112131 UTC. Ctrl 1.9929276 -0.040 ppb 0060Time 114251 UTC. Ctrl 1.9928550 -0.068 ppb FFF2Time 120545 UTC. Ctrl 1.9929130 0.054 ppb 0033Time 123121 UTC. Ctrl 1.9928443 -0.064 ppb FF84Time 125657 UTC. Ctrl 1.9928440 0.000 ppb FF6CTime 132233 UTC. Ctrl 1.9928376 -0.006 ppb FFC0Time 134809 UTC. Ctrl 1.9928110 -0.025 ppb FEE3Time 141345 UTC. Ctrl 1.9928421 0.029 ppb FF94Time 143921 UTC. Ctrl 1.9927606 -0.076 ppb FFA6Time 150041 UTC. Ctrl 1.9926767 -0.078 ppb 000ATime 151830 UTC. Ctrl 1.9927258 0.046 ppb FFEBTime 154406 UTC. Ctrl 1.9926865 -0.037 ppb FFF8Time 160942 UTC. Ctrl 1.9926660 -0.019 ppb FFF3Time 163518 UTC. Ctrl 1.9926037 -0.058 ppb FF96Time 170054 UTC. Ctrl 1.9926187 0.014 ppb FF1CTime 172630 UTC. Ctrl 1.9926230 0.004 ppb FFF3Time 175206 UTC. Ctrl 1.9925515 -0.067 ppb FEE9Time 181742 UTC. Ctrl 1.9925549 0.003 ppb FF73Time 184318 UTC. Ctrl 1.9924801 -0.070 ppb FF22Time 190854 UTC. Ctrl 1.9924627 -0.016 ppb FFF9Time 193430 UTC. Ctrl 1.9924227 -0.037 ppb FFF5Time 200006 UTC. Ctrl 1.9923839 -0.036 ppb FF95Time 202542 UTC. Ctrl 1.9924783 0.088 ppb 0081Time 205118 UTC. Ctrl 1.9924581 -0.019 ppb 007ETime 211654 UTC. Ctrl 1.9924542 -0.004 ppb 000BTime 214230 UTC. Ctrl 1.9924725 0.017 ppb 006BTime 220806 UTC. Ctrl 1.9924288 -0.041 ppb FF53The 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.

author: MIS42N
author_rank: Frequent Contributor
timestamp: September 09, 2021, 09:49:40 am
content: 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).

author: MIS42N
author_rank: Frequent Contributor
timestamp: September 13, 2021, 12:04:21 pm
content: 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?

author: intabits
author_rank: Frequent Contributor
timestamp: September 13, 2021, 06:42:58 pm
content: 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.1They 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/#msg2129818I 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...)

author: MIS42N
author_rank: Frequent Contributor
timestamp: September 13, 2021, 10:59:09 pm
content: Quote from: intabits on September 13, 2021, 06:42:58 pmThanks 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.

author: GigaJoe
author_rank: Frequent Contributor
timestamp: September 14, 2021, 12:42:43 am
content: 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.

author: MIS42N
author_rank: Frequent Contributor
timestamp: September 14, 2021, 05:09:15 am
content: Quote from: GigaJoe on September 14, 2021, 12:42:43 amGood 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).

author: GigaJoe
author_rank: Frequent Contributor
timestamp: September 14, 2021, 09:40:42 pm
content: 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.

author: MIS42N
author_rank: Frequent Contributor
timestamp: September 14, 2021, 10:58:53 pm
content: Quote from: GigaJoe on September 14, 2021, 09:40:42 pmIt 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?

author: GigaJoe
author_rank: Frequent Contributor
timestamp: September 15, 2021, 12:03:59 am
content: yes, filtering, maybe increase RC valueone 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

author: MIS42N
author_rank: Frequent Contributor
timestamp: September 15, 2021, 02:46:39 am
content: Quote from: GigaJoe on September 15, 2021, 12:03:59 amI 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.Quote from: GigaJoe on September 15, 2021, 12:03:59 amI 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:BANKSEL PWMMOVF PWM,W ; Add the least significantADDWF Dithr,F ; 14 bits of PWM to DithrMOVF PWM+1,WANDLW 0x3F ; truncate to top 6 of 14 bitsADDWFCDithr+1,WMOVWFDithr+1ANDLW0x40 ; isolate possible carry outXORWFDithr+1,F ; remove it from DithrADDWFPWM+1 ; now the most significant 10 bitsMOVWF PWM2DCL ; bits 0-5 ignoredCLRWADDWFCPWM+2,WMOVWF PWM2DCH ; and store it as top 8 bits of next pulse width

author: GigaJoe
author_rank: Frequent Contributor
timestamp: September 15, 2021, 04:38:26 am
content: but filtering mostly depend on load of filter , would it be make sense to add opamp , between the filter and the control pin ?

author: trobbins
author_rank: Frequent Contributor
timestamp: September 15, 2021, 05:34:07 am
content: MIS42N, I just received the pcb in the post - much appreciated. A few more parts to come in and I will be able to start the build and testingMy incentive was initially to just go for an OCXO, but then reading through the GPSDO options on this forum provided a relatively simple option to go one step beyond in certainty/calibration. For me this is related to a vintage Systron Donner counter with 0.1/1Hz display resolution, and a venerable HP3325A with control capability to 0.001Hz - both of which have just basic crystal oscillator internal references. So having a 10MHz GPSDO reference that can directly interface with the HP provides the ability to experience more 'zeroes' than I rightly have a need for (the >7 zeroes club), and for which I would never experience during the calibration of any other type of bench top equipment I'm ever likely to have.Cheers, Tim

author: MIS42N
author_rank: Frequent Contributor
timestamp: September 15, 2021, 06:12:03 am
content: Quote from: GigaJoe on September 15, 2021, 04:38:26 amThought of that. That is why there are only 1kΩ resistors between the 10µF capacitors and there are 3 capacitors (most designs I've seen have 2). The source is only 12kΩ (10+1+1), the OSC5A2B02 input impedance is quoted as >100kΩ. An op amp there has to be a good one. Easier to design it out.

author: GigaJoe
author_rank: Frequent Contributor
timestamp: September 15, 2021, 06:56:25 pm
content: curious, why opamp should be good one ?it basic follower , and approx +2V out , simple OP07 , will do it, ( i'm wonder , adding opamp together with ocxo in foam isolated box , eliminated temp and humidity on opamp )but if 100K then more troubles i guess ...

author: MIS42N
author_rank: Frequent Contributor
timestamp: September 19, 2021, 11:01:37 am
content: Is it time to rename this project Budget GPSDO - working?The circuit was run for a day in what I consider a worst case scenario. The GPS receiver was a NEO-6 with an active antenna. The active antenna was placed on a window ledge (inside the window) of a downstairs side window in a two storey residence. The house next door is less than a meter away so the sky view is a narrow strip of sky between the two buildings. The power supply was a 5V charger supplied with a Samsung tablet.VisualGPS was used to see what the GPS receiver was doing. It took quite a while to get a fix. After getting a fix, the number of usable signals was small, four or five satellited being common with one or two having a reading over 30 (signal to noise? - it's the figure in the NMEA data). In contrast, the antenna on the roof had 8 or 9 satellites over 30, some over 40.In the 24 hour test period the circuit was able to maintain the desired 1ppb accuracy (10MHz+-0.01Hz) most of the time. There was one wild excursion for about 4 minutes of about 0.2Hz. Apart from that, there were several minor deviations of less than 0.02Hz.This demonstrates that the unit is still usable in less than ideal circumstances. If a user was using the unit for calibrating another instrument, they would watch the LED and wait until it indicated the unit was within specification.

author: conrad550
author_rank: Newbie
timestamp: September 20, 2021, 05:19:51 am
content: I have a question. Why not just reprogram the Neo-6 with uBlox u-center software to put out a 10MHZ signal?

author: thinkfat
author_rank: Unknown
timestamp: September 20, 2021, 05:50:10 am
content: Because it is heavily jittering

author: AndrewBCN
author_rank: Frequent Contributor
timestamp: September 20, 2021, 06:40:52 am
content: Quote from: conrad550 on September 20, 2021, 05:19:51 amThe whole purpose of a GPS disciplined oscillator (aka GPSDO) is to combine the short term stability of an OCXO with the long term accuracy of the GPS signal.In the short term, for example over a 1 second interval, most GPS receivers exhibit jitter of around 100ns in their 1PPS signal, and the very same jitter is there when you reprogram them to "put out a 10MHz signal". 100ns is 1 period of a 10MHz signal meaning the Neo-6 10MHz signal would have a precision of +/- 1Hz, whereas the OCXO 10MHz can be adjusted to a precision of +/- 0.01Hz or even 0.001Hz. That's 100 or even 1000 times better.

author: iMo
author_rank: Super Contributor
timestamp: September 20, 2021, 06:50:59 am
content: With Neo 6/7/8 modules the output 1PPS has jitter at 10MHz caused by the internal frequency division mechanism (in order to get 10MHz output you have to divide by 4.8 and 4.8 is not an integer).The 1PPS output is "clean" when the output frequency is set to:freq_out = 48MHz/N, where N is integer, N=4, 5, 6, 7, 8..., 98.000.000Thus 12MHz, 9.6MHz, 8MHz, 6.8571MHz, 6MHz etc. output frequencies are ok.This issue has nothing to do with GPS.

author: MIS42N
author_rank: Frequent Contributor
timestamp: September 20, 2021, 09:04:26 am
content: Quote from: conrad550 on September 20, 2021, 05:19:51 amBecause that facility isn't available for Neo 6.Even if it was available, imo AndrewBCN and thinkfat are all correct. The 10MHz output of a GPS module has limitations. The purpose of a GPSDO is to remove the limitation.Each project has some starting point. The starting point of this project was to discipline an OCXO with as little extra circuitry as possible. It morphed to being at lowest cost, because less parts usually means less cost. So I am choosing the cheapest readily available components and try to get the best bang for buck. So I try working with the NEO 6.It seems successful. I created a few kits to populate the PCB (as shown in Documentation02.pdf). I can mail that in Australia for $20AU including the postage. Already dispatched one.

author: conrad550
author_rank: Newbie
timestamp: September 20, 2021, 10:37:02 pm
content: Thanks for the info. I don't need a 10MHZ ref. Any frequency will work for my calibration needs. Do the cloneGT-U7 and clone NEO 7/8 units have this capability?

author: MIS42N
author_rank: Frequent Contributor
timestamp: September 21, 2021, 02:19:57 am
content: Quote from: conrad550 on September 20, 2021, 10:37:02 pmI don't know. I know it is talked about in a few other topics on this site, but it wasn't relevant to what I'm doing so I didn't bookmark them. IIRC some clone modules work, most don't retain changes, some don't work at all. You'll have to do your homework.

author: MIS42N
author_rank: Frequent Contributor
timestamp: October 01, 2021, 11:34:37 am
content: A new challenge. The software is basically finished, I have flashed a few units with a PICkit3 and no problems. However it seems PICkit3 is not that common and people have trouble with that final step of getting the software into the PIC. At first I thought, well that's OK I'll just mail out a loaded PIC, no problem. But what if the software changes?Looking around, a few quite reputable companies (Bosch, Cisco, etc.) used Tera Term and Xmodem to update their software. Could this work for the PIC? Technically it seems so but I couldn't find an assembler implementation so I am writing one. So far, so good - the Xmodem logic has been implemented - the Tera Term Xmodem sends the PIC a file (which in the final version will be the hex file output by MPLAB X) and the PIC receives it. Tera Term thinks it has completed and so does the PIC. Now all that has to be done is decode the hex file (it is well documented), flash the program. Should keep me going for a week or two.I sent a unit to Silicon Chip magazine to see what they make of it. Also getting some good feedback on a few PCB improvements. The current version is V0.0, maybe there will be a V0.1 if there's enough interest.

author: de_light
author_rank: Regular Contributor
timestamp: October 06, 2021, 09:11:27 am
content: Quick update. I have received one of the trial kits from @MIS4N which came very quickly and well-packaged. After some struggles borrowing a Pickit programmer, I used an Arduino nano to flash the PIC which worked fine. I have installed it in a plastic Jiffy box available locally, but one of the suggestions I made was whether the board layout could be optimised a little and whether the board could fit in some readily available housing (Australia Jaycar jiffy boxes or an extruded aluminum housing or something).Total current draw is about 450mA when the OCXO is heating and this drops to about 250mA after a few minutes. I created a serial port outlet with a JST connector and this works well with PuTTY. The LED works well and clearly displays the operation. MIS4N has written a very comprehensive manual that is highly useful. I have an active antenna that has arrived today so hopefully can properly fire the device up.

author: de_light
author_rank: Regular Contributor
timestamp: October 28, 2021, 11:06:27 am
content: I'm pleased to say that this device works exactly as intended. I had a few hiccups along the way, mainly with supply of recycled NEO-6M devices from Aliexpress (poor soldering/shorted chips, shorted voltage regulators...you name it).Apart from that, the device works very well. It is sitting, stable, on my desktop. It does lose calibration a few times a day (been running 48 hours) but quickly regains it with the inbuilt algorithm. It also seems sensitive to the activation of other test devices (esp clock-driven) on the bench, so could do with some sort of shielding.Overall: excellent project. The fact that this is working for the price is mind-boggling. I feel this thread needs some traction.

author: HB9EVI
author_rank: Frequent Contributor
timestamp: October 28, 2021, 12:27:12 pm
content: Quote from: conrad550 on September 20, 2021, 10:37:02 pmneither the clones nor the NEO7 or NEO8 give a jitter-free signal @ 10MHz; and like the others said - a GPSDO is like the 'best of both worlds' - short term stability via OCXO and long term stability by disciplining it to GPS.the signals from those GPS modules may be accurate in frequency, but also jitter-free frequencies like 12MHz or 2MHz are not clean enough to be used as a reference clock for other devices, while most OCXO have a rather high spectral purity. you just have to watch out to not 'mess up' things when disciplining a OCXO

author: cdev
author_rank: Super Contributor
timestamp: October 28, 2021, 01:19:40 pm
content: One can buy a six pack of Navspark Mini, which is a very sensitive Skytraq dual GNSS GPS/Beidou board that has some unique connectivity options and is exceptionally sensitive, more sensitive than Ublox. It runs on a Leon 32 bit microprocessor some of which is made available to the user via an API. Anyway, when bought in a six pack the cost per GPS is around $6. They are very small, around the size of a dime. (The US's smallest coin.) They are provided in an eight pin DIP board. The current draw is around 35 ma or so (please double check) Its very modest. I have several of these and I use them for NTP timekeeping on my home network. They make excellent cheap timekeeping GPSs in "stationary" mode set via the Skytraq GPS Viewer program. They seem able to maintain time well even in the basement of my house with a amplified or passive antenna. Generally they do much better than he Ublox performance with weak signals. They are not a timing GPS and Sytraq takes care to make it clear that theyare not a timing GPS.I have two decent GPSDOS and would like to be able to compare them with their 1PPS output. Maybe a PIC would be the best way to do that. They all seem to be well synchronized on my oscilloscope. Unfortunately apart from a PIC eight digit counter I dont own a better frequency counter yet. I can likely using PICs leverage my existing equipment to make an accurate time and frequency measuring device given as I have a known decent 10 MHz frequency standard GPSDO, a Samsung- also a TruePosition (which I think is very likely to be as good or perhaps even better than the Samsung. But I dont know. . )I don't know what the additional older version Beidou sats that the Mini receives add to the mix. Maybe they add some improved accuracy in the vertical plane (altitude) (which is not inaccurate for me, the altitudes they return seems more accurate than the altitudes sometimes returned by other GPSs for me. I have never seen more than one Beidou sat in the sky here in the US using my Mini. But the path as plotted in the GPS Viewer program seems very stable, with very few if any cycle slips once the Sktraq Mini has fully settled down. (which improves over a few hours time, maybe even 24 hours.. for maximum accuracy you should always turn a GPS on as long as you can before you plan to use one. Most importantly, given even marginal antenna signal they seem to maintain a fix for months without any interruption or significant glitches in the 1PPS output. Also all Skytraq GPSs Ive used Venus 5, 6 and 8 ) are fairly configurable via GPS Viewer, on the Windows platform.. The Mini is Skytraq 6 family GPS it seems.. Which seems ideal for use with a GPSDO. Another person, maybe @jbeale or Dan Drown has written a fair bit on his blog about their PPS characteristics, and I think maybe has some additional code available on his github. A Gogle + github search on the Navspark Mini should find all of it.Anyway, for $6 they are hard perhaps impossible to match elsewhere. The skytraq is quite a bit more sensitive and its location output seems smoother and more consistently steady than any other low to mid price GPS Ive used. When used with NTP it seems as if I am doing about as accurate as NTP can measure. Very low jitter as reported by ntpq.

author: bingo600
author_rank: Super Contributor
timestamp: October 28, 2021, 01:38:59 pm
content: Quote from: cdev on October 28, 2021, 01:19:40 pmURL please/Bingo

author: cdev
author_rank: Super Contributor
timestamp: October 28, 2021, 01:45:09 pm
content: http://navspark.mybigcommerce.comYou may have to dig a bit to find it. I suspect that whatever frequencies can be generated using the Arduino like (Navspark is a family of Skytraq Venus GPSs that add additional capabilities that involve the 32 bit Leon CPU are not jitter-free signals. Others here know more about them than I, so I defer to them as to what they can do. .Some capabilities of the Leon Sparc-like CPU allow use of it for functionality, for example, MCU-like features, logging, geofencing, (doing math on the positioning results), RTKlib level accuracy down to a few mm (with other more costly GPS engines) I sincerely doubt produced time and frequency relevant signals would be free of the problems described above (shown by Ublox) without the use of an external quartz oscillator. They might be able to reduce the additional parts required to build a GPSDO in some creativge way, butI think the chance one could eliminate that need is likely zero.They have discussed this! (something other companies would never do, IMHO)To state the obvious,They dont want to kill sales of their timing GPS, which is a good one, and a good value for someone looking for a timing GPS to turn into a GPSDO.Like most timing GPSs its a bit more expensive, andproduces the correction signalsneeded for building a top notch timing solution. That's quite reasonable.They are a maker-friendly Taiwanese company that deserves our community's enthusiastic support.

author: bingo600
author_rank: Super Contributor
timestamp: October 28, 2021, 02:00:04 pm
content: I can get Ublox LEA-5T (Timing) for approx 8..9$ on ebayOlder lady but still Timing.Will have to look at this oneThanxBingo

author: cdev
author_rank: Super Contributor
timestamp: October 28, 2021, 02:06:41 pm
content: Where? I'd like to get one if its that cheap.Although my Samsung GPSDO contains an LEA6T internally.The fake M8N that I have although its a dual GNSS with both GPS and Glonass is really a fairly crappy GPS. The RTKKit but older Skytraq GPS I have (S1315F / Venus 8 series based) is superior to the Ublox in positional accuracy by a large margin. Even though it is only a single system (GPS) unit. I dont think its just different Kalman filter settings like some have implied.Its probably the lack of a TCXO on the (demonstrably counterfeit) Ublox.This is what I got for trying to save money.

author: cdev
author_rank: Super Contributor
timestamp: October 28, 2021, 02:15:42 pm
content: Basically the fake Ublox is useless for what I wanted it for. (RTKlib) I bet timing too. Maybe I will use it for a bedside clock.I think a few microseconds fast or slow there will make little difference.

author: cdev
author_rank: Super Contributor
timestamp: October 28, 2021, 02:27:48 pm
content: The cheaper units typically have just a single "time pulse" output which by default is set for (either) 2 Hz 50% duty cycle (bllinking light) OR 1 PPS. It could also be set to produce a fairly wide range of frequencies at other duty cycles (such as 50%) but its a dirty signal.The cheap M8N which I have doesn't even break out the 1 PPS properly. It sends a signal to an LED which (from memory) may be 2 Hz or 1 pps. People who want to use it for other stuff have to solder a wire to that pin. Also as I remember the DC supplied to the GPS has to be fairly clean for the GPS to work well. Glitchy DC results in terrible GPS problems.Quote from: MIS42N on September 21, 2021, 02:19:57 am

author: HB9EVI
author_rank: Frequent Contributor
timestamp: October 28, 2021, 03:03:00 pm
content: Quote from: cdev on October 28, 2021, 02:06:41 pmcannot confirm that from my experience. I built 2 GPSDOs, one with an NEO-7M and a more recent one with a NEO-M8N. they both work alike, with my measurement possibilities I cannot see a drift between the two. I constantly receive both GPS and GLONASS satellites with the M8N, together always between 12 and 16.and very likely both are just clones and not genuine Ubloxalthough I'm not using 1PPS but 1MHz to give on my PLLs as reference, while I divide the OCXOs by 10

author: cdev
author_rank: Super Contributor
timestamp: October 28, 2021, 09:20:19 pm
content: my m8n receives a lot of sats too, but the output plot jumps around a lot with lots of cycle slips. It seems to me. I'll have to record the traces and compare it to the aforementioned S1315F or even the mini.Maybe I'm wrong, this is just a seat of the pants guess. Something seems broken on the Ublox.It seems that Ublox doesn't ever completely stop jumping aroundeven when the antenna is in the clear and is totally stationary. WTF?I blamed this on the lck of TCXO - but maybe its something else.With the other GPSs I can lay out say a one meter square in my back yard and then move the GPS around the square and - it looks like a square. The tracks they generate can show you what side of a street you are on, or small turns, it records them. Same with trails and hiking. I record most of my GPS traces while hiking. Still seeking what is the best antenna for hiking.Whan the GPS is totally still the display becomes fairly stationary, almost.Yes, they work. Thank you.

author: MIS42N
author_rank: Frequent Contributor
timestamp: November 23, 2021, 12:00:26 am
content: No updates for a while because the design works. The current test rig has been running for over a month, the OCXO is not ageing much. The program update via Tera Term Xmodem is working in test. The output is usually within 1 part in 10E-10 of 10MHz as far as I can tell. I can't absolutely prove this because I haven't found a local standard better than this for comparison.I live in Newcastle, Australia - anyone reading this willing to help with calibration?Based on feedback from several people, there is room for improvement The following are under investigation:1) Design for an enclosure - I haven't figured what is a standard - UB2, UB3 etc sold by several suppliers but these are plastic. Are these a standard? If the user wants metal because they are putting the device in an electrically noisy situation are there UBx enclosures in metal? More research needed. Any advice?2) Sensitivity to external influences.- I notice when the TTL to USB converter is plugged into the PC it causes a glitch - probably an earth loop. I've done some experiments with 4N25 opto couplers, and that fixes the problem for less than $2. The plan is to incorporate them onto the PCB and have the USB TTL converter in the case with a micro USB connector exposed to connect by cable to PC USB.- power supply variations. I've tried various sources of 5V with "interesting" results. The new plan is to have a somewhat complex system using a buck converter to drop an external source (nominal 12V) to around 7V, then use separate 5V LDRs to feed the OCXO and the rest of the circuitry. Also a boost converter to kick the 7V up to (nominally) 15V to power a precision voltage supply from which the control voltage is derived. The 15V will also be used for 3). Awaiting deliveries of buck/boost from O/S at the moment.3) Use a line driver/receiver between the GPS module and the GPSDO, connected via Ethernet cable. I have been using this combination to get PPS and NMEA data from a GPS receiver near the roof (antenna on the roof) for over 6 months. It works flawlessly. Heaps of satellites received, HDOP below 1 over 99% of the time. The GPS and line driver to be supplied by a buck converter from the nominal 15V (see 2.). The rig at the moment uses a 5V regulator but this requires the full current between GPS receiver and GPSDO. This results in an offset voltage between driver and receiver due to voltage drop in the earth return. This has not proven to be a problem up to 20 meters, but not all cables are made equal. A buck converter runs cooler and reduces the offset voltage problem.A variant on this solution is to use one of the GPS modules with patch antenna inside a weatherproof enclosure, eliminating the need for an active antenna. Under construction at the moment.Provision to be made for those people who are able to mount the receiver inside the GPSDO. It is easy to leave out the line receiver and put the GPS module in its place.

author: trobbins
author_rank: Frequent Contributor
timestamp: January 13, 2022, 05:32:44 am
content: I was able to adjust the 10MHz varicap oscillator in my HP3325A synthesiser, and the 10MHz TCXO in my Systron Donner 6250A counter (circa 1975) to MIS24N's GPSDO over the last few days. I have the GPSDO showing it is within 0.01Hz of 10MHz (from a consistent 1 sec indicator flash, that only sometimes double flashes to show it is outside of 0.01Hz). I'm still waiting on some TTL to USB interfaces to look more closely at the detailed data available from the PIC. I have the two cheapest chinese Neo7M GPS receivers and confirmed the active antenna could see more than 8 sats. I'm just using a smps 5V plugpack for regulated rail, so nothing special for powering.The SD counter was initially about 9Hz high - it has a 1Hz resolution and now displays to 10MHz +/1 Hz. It powers up about 7-9Hz low and then settles after about 15 minutes.My HP3325A's oscillator is not crystal derived and a commanded 10MHz generates a slow drift with some cycling of a few Hz that averaged about +9Hz. So adjustment was more about moving the average to 10MHz. The 3325A has 0.1Hz command resolution, which can only really be used with the GPSDO as the external reference. The 3325A external ref takes in up to 10MHz, and accepts the GPSDO default signal level to achieve PLL sync. Using a scope to display the GPSDO output and a 9,999,999.9Hz commanded signal from the synced 3325A shows a nice slow roll between waveforms.Very happy and pleased with the outcome, and a big credit to MIS42N for all the development work, as preparation of the GPSDO module was somewhat of a breeze !

author: MIS42N
author_rank: Frequent Contributor
timestamp: February 04, 2022, 11:13:15 am
content: The not so budget GPSDO is now running with a purpose built power supply. It has a buck converter taking a nominal 12V and putting out 6.9V. In theory the input could be anywhere from 9V to 24V but only tested with around 12V. There are 3 devices using the 6.9V. The OCXO has a dedicated 5V regulator (LM1085). Another LM1085 supplies 5V to the rest of the circuit. The third device is a boost converter to deliver a nominal 12V to supply a precision voltage reference, a MAX6350.The PIC PWM is now buffered using a complementary FET pair 2N7000/BS250. The pair are supplied by the voltage reference to provide a stable control voltage.The PIC serial output is buffered by opto couplers 2 x 4N25.So how does it perform? At first it had trouble reliably delivering 10MHz +- 0.01Hz but this was using a 'new' scavenged OSC5A2B02 OCXO and it needed 'burning in'. After 2 weeks running it is mostly delivering 10MHz +- 0.001Hz and still improving.This justifies the use of the FET buffering. Previously the reported control voltage varied with temperature (and other factors). This was likely due to variations in the PWM output voltage which in turn is dependent on the supply. Now the only variation appears to be due to settling of the OCXO, about 400uV a day.The algorithm currently makes adjustments every 1536 seconds (if nothing causes it to take action earlier). In that time the OCXO is allowed to lose or gain up to one cycle, with adjustments designed to reverse the loss/gain in the next measurement period. Most measurement periods it is now less.Until now there has been no drift compensation. It looks like it is worth trying it now most other factors are controlled.The software was designed with the intent to handle both positive (increase control voltage increases frequency) and negative (increase control voltage decreases frequency) control. This was not previously tested. The FET buffer is effectively an inverter, the software handled it. Very satisfying.Next step is to see how the system behaves driving a better OCXO. I have a Morion MV89 to try. Also the current design can be committed to a PCB. The system is quite modular, for people who just want a basic GPSDO it will be simple to supply 5V and replace the power supply, opto coupler, FET buffer with wire links just leaving the original 'budget GPSDO' design.

author: trobbins
author_rank: Frequent Contributor
timestamp: March 06, 2022, 06:09:17 am
content: I've been able to set up two of MIS42N's GPSDO pcb assemblies, as well as connect each assembly to its own GPS receiver, and to view the rolling drift behaviour of the two trained 10MHz OCXO signals on a scope.It's very gratifying to see the two outputs in very close sync with little differential drift. One of the GPS receivers connects to an active antenna that can be easily placed where it can track at least 8 satellites. The other GPS receiver I have only has an on-board passive antenna and it sometimes struggles to track 7 satellites even when placed in the same outside location.Each GPSDO assembly has a TTL output that can be patched to a USB interface (I use an RS232 go-between) which then allows PuTTY to view the GPSDO diagnostics/status, or to pass through the NMEA signals to see the operating status of the GPS receiver on something like VisualGPSView (as per the photo).I'm not trying to achieve a lot better the 1ppb performance, so both GPSDO are simply powered direct from a 5V regulated smps plugpack, and the 6-8 satellite tracking is providing many minutes/cycle of scope roll, so nicely better than 1ppb (0.01Hz) differential error, and each GPSDO assembly has a flashing LED configured to indicate when error is within 1ppb, and a PuTTY connection confirms the actual ppb level is easily under 1.

author: MIS42N
author_rank: Frequent Contributor
timestamp: July 30, 2022, 01:26:15 pm
content: Although I haven't updated this for a while, the project has not been abandoned. A new PCB has been created incorporating suggestions from others and some ideas. It still uses the same basic circuit as the original PCB - i.e. PIC16F1455 controller, 74HC04 buffer, OSC5A2B02 oscillator. The main improvement is to isolate the OCXO electrically from the rest of the circuitry, as users have found the original system was sensitive to changes such as attaching a lead to the BNC socket. The isolation consists of opto couplers for the serial connection, control voltage buffering, and dual linear regulators - one for the OCXO, one for the rest of the circuitry. - previously the serial connection could have an earthing problem with the earth connected to a PC and also whatever was connected to the BNC, creating a possible loop.The power supply has changed from 5V to a nominal 12V, using a buck converter to drop this to around 7V to supply the two LDO regulators.Provision is made on the PCB for the option of a precision voltage source for the control voltage. The MAX6350 is quite expensive and not common so testing is being done to see if the benefit justifies the extra expense. Preliminary results say ... probably not. The option can be bypassed by running a jumper from the OCXO LDO to the control voltage buffer.Also allowance is made to add a line receiver and Ethernet socket if the GPS unit needs to be located remotely (a technique discussed in this topic some time ago).The PCB has been made narrower, and it is possible to shoehorn the buck converter, GPSDO circuit, GPS module into a UB3 jiffy box. Also the PCB has mounting holes for M3 screws.The software now incorporates the ability to update using the xmodem facility in teraterm, directly from a hex file. If the circuitry is in a box, this allows updates without opening the box. And does not require a PIC programmer.Attached is the nominal circuit used to create the PCB. It shows a line driver instead of a line receiver, the pins are the same and there didn't seem to be a receiver template. Also the opto couplers being used are 4N35, not 4N25, and the resistor values are different.

author: MIS42N
author_rank: Frequent Contributor
timestamp: August 08, 2022, 03:35:11 am
content: Fits OK in a UB3 Jiffy box (I can't find out if this is a size unique to Australia, or something international). The interconnects are 10cm jumper cables with female DuPont connectors. The buck converter is mounted on its side on the right of the interior photo. It is attached by solid copper wires scavenged from an earth wire. The unpopulated areas of the PCB are for alternate configurations.

author: MIS42N
author_rank: Frequent Contributor
timestamp: October 03, 2022, 11:27:30 am
content: I created a kit for sale in Australia for $55, all the parts for a working GPSDO except the 12V power supply, and the constructor supply an enclosure if they wanted one. That included a NEO-7 with active antenna on a 3m lead, USB/serial converter, and buck converter. And postage. A few people took up the offer and at least one has it running successfully.I was disappointed in the performance of the system with less than ideal antenna placement. I began testing with the antenna indoors near a window, with another building about a meter away. So quite a limited view of the sky. The performance was marginal, able to hold 10MHz±0.01Hz (i.e. 1 part per billion) most of the time but with occasional excursions into the 0.02Hz range. The disciplining algorithm was a quadratic fit to the data, so sensitive to frequency drift in the OCXO. But drift in the PPS signal from the GPS was being misinterpreted.So I reverted back to a least squares linear algorithm. I abandoned it a while back because the way I implemented it, it couldn't do better than ±0.005Hz because of limitations in the 32 bit arithmetic. The quadratic fit was implemented a different way so didn't have that limitation. Reworking the quadratic fit method to a linear fit kept the better resolution, and as a bonus can still provide long term frequency drift information that could be used for drift compensation.Results speak for themselves:The adjustments are made at 1536 second intervals (usually - sooner if the GPS gets out of hand, but it didn't in this 20 hour period). Mainly running better than 10MHz±1mHz

author: MIS42N
author_rank: Frequent Contributor
timestamp: October 11, 2022, 11:44:36 am
content: Built another testing GPSDO so I have one for testing extra hardware, the other for software.The hardware test rig has the UA9639 line receiver option so I can test with the GPS antenna on the roof, the GPS module under the eaves, many meters of Ethernet cable connecting to the GPSDO which is sitting next to my PC. The UA9639 is in a socket, so I can pull it and connect the GPS module to the GPSDO if needed (which is how the other GPSDO is set up - module is in the enclosure). Previous versions had the line receiver on a separate board with its own power supply, this PCB has the provision on the board - but untested until last week.The results are now very satisfactory. As usual, the new OCXO took nearly a week to settle. Now most corrections are less than 5 parts in 10^-11 at about 25 minute intervals. This is better than can be achieved with a 16 bit DAC [The OSC5A2B02 has a sensitivity of about 0.1V/Hz (1 part in 10^-7). A 16-bit DAC delivering 0-5V has around 1300 steps for 0.1V change. So 1 bit change is about 7 parts in 10^-11]. The programming effort to get a synthesized 24-bit DAC by dithering is paying off.The next hardware step is to add the precision 5V supply for the control voltage. There is some daily variation of the reported control voltage, which is probably related to temperature. The PCB also has provision for this, bypassed at the moment.The software mods are to include a drift compensation. Most OCXOs exhibit some small drift over time, this shows up as a small change in the control voltage. The idea is that after a while it will be the same each day, so knowing the change in one day the control could make small changes at regular intervals the next day. May not be worth it, but it is unlikely to have a negative impact. The processor is not working very hard, I think maybe 10% CPU and half the programming memory so might as well use a bit more.The other thing I would like to try is making compensation to the GPS readings. Yes, I could buy a timing module, but the basis of this project was to get maximum bang for buck. Either use the DOP (dilution of precision) figures to downgrade readings with bad DOP, or to find an average position and downgrade readings when the reported position is way off on the assumption the time will also be off. Or both?I am somewhat mystified by the lack of comments by others. Have I gone off into some backwater that is not that interesting? Way back I asked for comments and got a few - prefer 12V supply (tick), a PCB that has M3 mounting holes (tick) and fits a standard enclosure (tick). Maybe the PIC and assembler puts people off. Or is it the title - a work in progress. Well, it's truthful. My belief is an OCXO GPSDO can be as good or better than a rubidium standard. So far I've not encountered any brick walls that says it can't be done. So the story continues.

author: S57UUU
author_rank: Regular Contributor
timestamp: October 11, 2022, 02:59:38 pm
content: Don't worry if we are just lurking, keep up the good work!I am reading your posts with big interest, because I am also working on a GPSDO (in secret :-).Will publish all details on my webpage when done. Currently I am doing some experiments, like connecting two Trimble GPSDOs of the same type, to the same antenna (designed an amplified 4way GPS divider), and comparing their outputs, to exclude external errors (ionosphere, multipath ...), and see what the errors are in the receivers themselves, etc.Maybe one suggestion, based on what you write above, would be to record both position errors and control voltage variance for several days, and analyze the two for correlations.Marko Cebokli

author: spostma
author_rank: Regular Contributor
timestamp: October 11, 2022, 09:42:01 pm
content: As I do not need a very precise frequency standard yet,am following your project with interest and learning from your work.BTW, I love PICs. I respect all that you achieve in pure PIC ASM!

author: MIS42N
author_rank: Frequent Contributor
timestamp: October 11, 2022, 10:45:12 pm
content: Quote from: S57UUU on October 11, 2022, 02:59:38 pmI thought that too. The software was written to pass through the NMEA data or the control voltage but not both. So I added a debug function to do it. To distinguish between the two data streams, which come through the same serial connection, the NMEA data is sent with the high bit set. The ASCII character set uses 7 bits but the data is sent with 8 bits, so that 8th bit is used to split the data. It was a tricky bit of programming, the NMEA data originates in an interrupt handler, the control voltage data from the mainline. There is the possibility of an interrupt happening while the mainline is queuing a character, with the chance of a total stuff up. So the character queuing routine was rewritten to handle this. The enhanced PIC saves several registers when an interrupt happens, so the queuing routine uses only those. There is a pointer that needs updating, so interrupts are disabled while that happens. Seems to work OK.The combined data stream is separated by a BASIC script file on the PC. So that achieves the recording function. Analyzing is proving more difficult. With good GPS data, there isn't a lot to see. With not so good GPS data, the control voltage is pulled around and it is difficult to determine if the GPS data is bad or the control voltage has been pulled too far. I am having trouble getting my head around the problem - another 'work in progress'.A note to anyone designing their own GPSDO. The best design decision I made with GPSDO version 2 was to electrically isolate the OCXO as much as I could. It has its own linear regulator, the control voltage is buffered via a pair of FETs, the 74HC04 used for output is off another regulator. So the OCXO is not affected (much) by the processor, or loads being attached.It's good to know this is of interest to some people. Should I think about putting this up on GitHub? I haven't done it so far because I don't know how. Maybe I should know how.

author: MIS42N
author_rank: Frequent Contributor
timestamp: November 03, 2022, 10:28:41 am
content: The quest continues.The newly built GPSDO (same base PCB as the previous version) was run for a week, then shut down to fit the MAX6350 5V precision regulator. A few days later we went away for a week and I left the PC on, recording data from both GPSDOs.The software in the older GPSDO was modified to provide drift compensation. As noted before, this is probably a waste of time but it is now debugged and working. It is quite simple - the nominal control voltage (a 24 bit variable) is added every second to an accumulator (creating a 48 bit sum). This is subtracted from the accumulator for the previous day (at UTC 000000 - trivial information), the difference divided by 86400 to get the difference between the average voltage for the 2 days. The difference is multiplied by 65536 (2^16) then divided by 86400. The result is (the change in control voltage)*2^16 to be applied each second (multiply by 2^16 because it is much less than the least significant bit of the 24 bit number). That result is then added to a 16 bit variable every second, when the 16 bit variable overflows/underflows then the 24 bit control voltage is increased or decreased by 1. This usually happens at intervals of hundreds of seconds, each change equates to a frequency change of about 3 parts in 10^-13 so has almost no effect short term but over many minutes has a tiny effect which *may* be beneficial.Ten days of data was collected from the system with the precision regulator, the results are in the chart attached. The top line clearly shows when we came home, the voltage wiggles up and down for 3 days. This is likely due to daily temperature variation - while the house was empty it would be little affected by the weather outside, but once we opened a few windows and doors, the inside temperature would change more. Which leaves the question - is the gradual rise due to the house slowly warming, or is it oscillator drift. The good news is the regulation kept the oscillator 10MHz±1mHz for almost all the time, including when we were in the house.After changing from a quadratic to a linear curve fitting algorithm for averaging results, there was no need to take three successive averages of the phase errors, two would be enough. So the algorithm has been rewritten yet again, in the last few days, to use two averages. An explanation: if the two averages are A and B then B-A gives the phase change between the two averages. A phase change is caused by a frequency error. If the phase change is D, then the phase error at the end of the two measurement periods is (A+B)/2+D. Compensating for both should drive the oscillator to zero phase error with respect to the GPS. In reality there will be a residual at the end of the next measurement period so the process is repeated.The averaging is done over 2 periods of 2^n seconds, currently trialling n=10, two periods of 1024 seconds. Initial results are that this is a bit long, it gives the OCXO time to wander too much. The algorithm catches the wanders, but it is preferable to set the maximum period for least wander - a compromise between gathering enough data points to iron out second by second GPS variability, and allowing the OCXO too much leeway to wander off. The three point algorithm seemed OK with 3 periods of 512 seconds, so 2 periods of 512 seconds may be better.There isn't much to do now with this design. I believe it is as cheap as a GPSDO can be, and still produce 10MHz within 1 part per billion and verify it. There are many designs on the Internet, but I have not seen one that can measure its own performance the way this one does. Anyone can count cycles for 10,000 seconds and sayon averagethe design is producing 10MHz within a certain tolerance. But with a 16 bit DAC and corrections applied every few seconds or minutes, there is no way to verify the frequency at any point in time, except by comparison with a better standard (GPS locked rubidium or cesium).Further development is feasible (try to correlate GPS position errors with GPS 1pps errors) but is there a point? I have asked in the past if anyone has a use for better than 1 part per billion in a hobby situation but not received a sensible reply. So I am thinking in a month or two I'll close off this thread. Maybe with a report of some description. What do people want to know that I haven't already covered?

author: S57UUU
author_rank: Regular Contributor
timestamp: November 03, 2022, 04:30:22 pm
content: I am playing with radio astronomy and interferometry.http://lea.hamradio.si/~s57uuu/astro/sidi1_2/obs/dec-10.htmhttp://lea.hamradio.si/~s57uuu/astro/sidi1_2/index.htmSome day I would like to try VLBI, where accuracy beyond 1E-10 is desirable, especially on the higher frequencies. I hope to go down in the -12 range, using disciplined rubidiums.Marko Cebokli

author: MIS42N
author_rank: Frequent Contributor
timestamp: November 03, 2022, 10:41:10 pm
content: Quote from: S57UUU on November 03, 2022, 04:30:22 pmThat's impressive work you are doing. I think we share the same philosophies to some extent - keep the cost down, don't rely on complex systems with unknowns. That's why I use assembler for this project - the whole program is a single (large) source file containing everything. There is no included libraries except the one for the PIC16F1455 symbols. I use a 32 bit signed arithmetic package (included in the source) written by someone else (with attribution). I am tempted to rewrite it as it is for the original PIC designs that didn't include the arithmetic ADDWFC and SUBWFB instructions (ADD with carry, SUBtract with borrow) so the package had to program around it with extra instructions. However, if it isn't broken, don't fix it.I can see why you want better timekeeping. You won't get it with the hardware I've used. The OSC5A2B02 has a sensitivity around 0.1V/Hz, the better OCXOs can be 1V/Hz which is 10 times better already. Also, the NEO GPS has quite variable 1pps and you need something better (LEA?) with a decent antenna (quadrafiliar?). The software approach used in this project may work with a few modifications. Because the intermediate GPS modules still have jitter, this actually works to the advantage of a design limited to 25ns intervals. If the disciplining drifts the oscillator so half the received 1pps are 0 phase offset and half are 25ns later, the average over many 1pps is 12.5ns later. And with many samples the statistical uncertainty is 1 or 2 ns. I believe a straight OCXO solution can reach 10^-11 accuracy, but 10^-12 is more than an order of magnitude more difficult. I estimated to go from 10^-9 to 10^-10 required about a 30 times improvement (longer integration period to get statistically valid 1pps readings; and, because longer periods are needed, a more stable oscillator). I think -11 to -12 would be similar.I am thinking of trying for more accuracy with different hardware but the same software, just to see if it works as I think it should. However, that field is crowded with other designs by people with a lot more money than I have. So it will be for my own satisfaction. The software is very generic, it will handle positive or negative slope control of the oscillator (the original design was a positive slope, this design appears as a negative slope because the signal is inverted by the FET pair. The software detected it during calibration and worked without change). There is a 1 line change to modify the software to 'see' what looks like a negative slope (as in the current design) as a positive slope and report it correctly. Also, the calibration on first power up determines the sensitivity of the OCXO and stores it as a 12 bit precision value with an exponent, so the arithmetic will always stay within the 32 bit limit. And it should handle averaging periods of more than a day, which is unlikely to be used in real life. The synthesized 24 bit DAC from PWM dithering is able to adjust in amounts of about 3 parts in 10^-13 with the current OCXO, with a 1V/Hz this would be 3 parts in 10^-14. So not a limitation.At some point, I will 'freeze' the software and fully document it. Maybe you could adapt it for your own use.

author: S57UUU
author_rank: Regular Contributor
timestamp: November 04, 2022, 03:32:08 pm
content: I did some PIC programming in the past, simple stuff, 16F84 etc. So, hopefully, it won't be too hard to read your code. Now I mostly work with MSP430 chips.Currently I am trying to test a bunch of different OCXOs and rubidiums, that I gathered off Ebay. I have no absolute reference (except for a pair of Trimble GPSDOs), so I am just doing comparisons of stability, and measuring the phase noise. For the last few months I have been "on the verge" of publishing all that online, but I always think of one more measurement that would be nice to do :-) The problem is, any such measurement takes at least days.Also playing with disciplining. One approach is to derive the 26MHz clock for a NEO6 from the disciplined 10MHz OCXO with a PLL, and then use the errors reported in the UBX messages to discipline. This avoids the 1PPS problems completely. No need for external measurements, the Ublox internal DSP does that for me. The whole setup is not as simple as I would like, but it shows promise.I only have simple feedback loops in the software, no drift estimation/compensation, etc. That's why I'm interested in your experiments with this stuff.

author: LADmachining
author_rank: Contributor
timestamp: November 08, 2022, 10:12:57 am
content: I have been meaning to post in this thread for some time, but for one reason and another it has not been done up to now.A version of the GPSDO was built according to the schematic and code posted in Lars' GPSDO thread. This was running well with a CTI OSC5A2B02, until that OCXO unexplicably died and refuses to warm up any more. This was removed and changed for a Vectron OCO100-67, which has been performing well since then (about 6 months). I don't yet have the PCB in an enclosure, and my workshop is an unheated garage.The graphs below show the performance since 31/10:The NEMA and PPS signals are provided by a NEO-M8T GNSS board in fixed location mode. These signals are buffered and split 4 ways to feed the other GPSDOs I am running (1x Lars GPSDO with a Bliley NV47A1282, 1x Yannick Turcotte GPSDO with CTI OSC5A2B02 and 1x STM32 GPSDO (AndrewBCN)).Thank you for making your design available - I am looking to build the V2 design as shown in post 53 once I have managed to source some of the components. Given the simplicity of your design, I think this is the one that will be incorporated within a 10MHz distibution amplifier I built that was described in Practical Electronics / Silicon Chip magazines. Would be good if you could put your code / designs on Github - makes it much easier to see if there have been any code updates etc. Thanks again!Anthony

author: MIS42N
author_rank: Frequent Contributor
timestamp: November 08, 2022, 09:52:14 pm
content: Quote from: LADmachining on November 08, 2022, 10:12:57 amHello Anthony. Did I publish enough that you could build it? I have had a few people build versions, but they have contacted me and I've sent more details and the source code.Do you know which copy of Silicon Chip your distribution amplifier was published - I've subscribed for quite a few years.In fact, now the project is almost 'finished', I'm discussing getting it published in Silicon Chip. They are enthusiastic, will probably appear next year.Yes - Github - I should make time to do that.

author: LADmachining
author_rank: Contributor
timestamp: November 09, 2022, 07:42:40 am
content: Quote from: MIS42N on November 08, 2022, 09:52:14 pmYes, the V1 was built fine, and I think the V2 will be the same. The only bit I wasn't sure about were the comments in post #53 about the line driver ICs on the V2 schematic having the wrong symbols, but as I won't be using those I have ignored them.Is the PIC firmware for V2 the same as V1?I can't claim any glory for the distribution amplifier unfortunately. It was in the April 2021 issue of Practical Electronics. I thought they shared designs with SC, but that project doesn't appear in the Silicon Chip project index. Let me know if you don't have that issue of PE in your back catalogue..Anthony

author: MIS42N
author_rank: Frequent Contributor
timestamp: November 09, 2022, 11:32:29 am
content: Quote from: LADmachining on November 09, 2022, 07:42:40 amThe V1 firmware will work in V2, with a one line change due to the PWM signal being inverted by the 2N7000/BS250 pair. It actually works without changing the line because the calibration pass can handle both positive slope and negative slope control voltages, but the reporting comes out wrong - reports 5V as 0V and 0V as 5V.Code:MOVLWB'11000000' ; enable PWM2; 1 1 0 0 0 0 0 0; | | | | ---|---; | | | | +--- x = Unimplemented: Read as ?0?; | | | +-------- 1 = PWM output is active low ### INVERTED ###; | | | +-------- 0 = PWM output is active high ### not inverted ###; | | +---------- 0 = PWM Module Output Value bit; | +------------ 1 = Output to PWMx pin is enabled; +-------------- 1 = PWM module is enabledMOVWFPWM2CONHowever, I have worked on the code a lot, the current discipline algorithm is different, there's a bit more reporting and there's a bootloader so the firmware can be updated via the serial port - convenient if the device is in an enclosure. It's still got some rough edges, but usable. I'll investigate Github, see if I can get the project there in a week or so.

author: MIS42N
author_rank: Frequent Contributor
timestamp: February 13, 2023, 03:11:11 am
content: Now the project is working I've started a GitHub repository for all the bits and bobs.https://github.com/ajcashin/budget-gpsdoI will monitor this thread for any discussion, and maybe try some other variations (a Morion MV89 DOCXO and a Ublox LEO-M8T is appealing).

author: MIS42N
author_rank: Frequent Contributor
timestamp: March 09, 2023, 03:00:07 am
content: I bought a u-blox LEA-M8T on what is termed a Huawei board. You can find them on the usual online sites. The board does nothing special, it has a few spike suppression devices, snubbing resistors. I was able to connect it to the GPSDO board with the addition of a 5V to 3.3V LDO. The aim of the exercise was to see if it made much improvement over a cheap NEO. The antenna is the same as was used with the NEO, located on a window ledge. This is not a good location, it has a limited view of the sky due to being the bottom storey of a 2 storey building, with an adjacent building about a metre away.The M8T was allowed to survey-in so it operated in timing mode. Survey time was 86400 seconds (a day), the resultant standard deviation was about 6m (I believe in an optimal position should be much better).After running for a few hours, the results show a huge improvement over the NEO. The last 2 hours:Code:Time 232744 UTC. Ctrl 1.677427 -0.021 ppbTime 233616 UTC. Ctrl 1.677433 0.005 ppbTime 234448 UTC. Ctrl 1.677448 0.013 ppbTime 235320 UTC. Ctrl 1.677489 0.032 ppbTime 000152 UTC. Ctrl 1.677517 0.022 ppbTime 001024 UTC. Ctrl 1.677520 0.003 ppbTime 001856 UTC. Ctrl 1.677547 0.021 ppbTime 002728 UTC. Ctrl 1.677541 -0.005 ppbTime 003600 UTC. Ctrl 1.677515 -0.021 ppbTime 004432 UTC. Ctrl 1.677513 -0.002 ppbTime 005304 UTC. Ctrl 1.677509 -0.003 ppbTime 010136 UTC. Ctrl 1.677507 -0.001 ppbTime 011008 UTC. Ctrl 1.677512 0.003 ppbTime 011840 UTC. Ctrl 1.677537 0.020 ppbTime 012712 UTC. Ctrl 1.677558 0.017 ppbTime 013544 UTC. Ctrl 1.677553 -0.004 ppbTime 014416 UTC. Ctrl 1.677563 0.008 ppbTime 015248 UTC. Ctrl 1.677557 -0.005 ppbTime 020120 UTC. Ctrl 1.677557 0.000 ppbTime 020952 UTC. Ctrl 1.677568 0.008 ppbTime 021824 UTC. Ctrl 1.677599 0.025 ppbTime 022656 UTC. Ctrl 1.677604 0.004 ppbTime 023528 UTC. Ctrl 1.677645 0.032 ppbThis shows a frequency error of less than 0.4mHz (4 parts in 10^-11). That is better than achieved with a NEO with an antenna on the roof (clear sky view).Is it worth the trouble? it depends on what you want. The Huawei board cost more than the rest of the GPSDO. The GPSDO with this receiver would make a good reference for a transverter working in the 10-100GHz region - 4Hz error at 100GHz might be acceptable.Next - try this with the MV89 DOXCO. And continue this test to see if it stays as good as it started out.

author: MIS42N
author_rank: Frequent Contributor
timestamp: March 13, 2023, 01:55:31 am
content: After running the LEA-M8T for a few days, here is the result. It is not quite as good as the first few hours but definitely worth having for more difficult reception situations. It was good enough to show a small deficiency in the disciplining algorithm. It previously aimed to get the 1pps in a 25ns window (an error of zero). As a consequence the phase error drifted from one side of the window to the other. To combat the problem, the algorithm was adjusted by increasing the phase error by 25ns if it is positive. This has the effect of forcing the algorithm to seek a point where +ve and -ve errors balance. An expected behaviour by the cheaper GPS units due to jitter in the 1pps.The accompanying graph is control voltage and corrections in ppb. for nearly 2 days. The corrections are well under 0.1ppb (implying a frequency error of less than 1mHz). The longer term variation of control voltage of 300uV is almost certainly due to room temperature variation (dropped from around 28C to around 22C).

author: MIS42N
author_rank: Frequent Contributor
timestamp: March 27, 2023, 09:28:25 pm
content: Now the GPSDO using the LEA-M8T as a GPS receiver has been running for a while, its advantage is clear. The measurement period was changed from 512 seconds to 1024 seconds and that almost halved the size of applied corrections. I'm not sure of the significance. If it was the statistical error due to jitter in the 1PPS the reduction would be less. It implies short term variations in the GPS signal itself.It took more than 2 days from a cold start to reach stability. The first 2 days have been deleted from the accompanying graphs, and it can be seen there was still significant corrections in the first few hours shown. This is data of about 5 days, showing the correction voltage and the correction size in parts per billion. This may be as good as it gets with the OSC5A2B02, the short term stability is quoted at ≤0.05ppb and the corrections are less than 0.04ppb. End of the road?

author: MIS42N
author_rank: Frequent Contributor
timestamp: March 29, 2023, 02:00:19 am
content: Not quite end of the road. This version was supposed to eliminate any glitches from attaching or detaching anything. The accompanying graph shows the disturbance caused by attaching a 50Ω load to the BNC. The implied control voltage jumps 500µV. The change in frequency is less than 0.01Hz so didn't trigger the 'out of specification' indication. I hadn't noticed this with the cheaper GPS units as I put it any variations down to changes in the GPS signal. With the M8T it is really obvious.Since the 5V supply and control voltage for the OCXO are derived from a different regulator to the rest of the circuit, the problem is likely to be earthing. I had hoped an earth fill would have a low enough resistance that this wouldn't happen. Looks like the earth plane needs redesign to isolate the OCXO earth from the other earth. Mr trobbins, I should have taken more notice of your advice.I have other cosmetic changes to the PCB, time to get a new batch made.

author: trobbins
author_rank: Frequent Contributor
timestamp: March 29, 2023, 03:19:18 am
content: Assuming the 50 ohm load step is causing a supply rail transient related to 74HC04 U7, then a perturbation of VDD could impact either the GPS or the PIC (as the other circuitry relates to J3, J4, and J5). Perhaps the PIC's internal derivation of PWM is being perturbed ?Whatever the mechanism of the disturbance imposing on the control voltage, I'd suggest assessing the 74HC04 environs to avoid a step change in VDD current from egressing to other circuitry. The pcb layout indicates U7 is quite some distance from the regulator and C14, both for the VDD line and the return 0V plane.One option could be to buffer that at U7 perhaps using an RC so that U7 mainly gets its step current from a local reservoir. Eg. add a series R (and possibly even a ferrite bead over the R lead) in the VDD feed trace from C15 to U4, and replace C15 with an e-cap, and route a trace from pin 14 to near pin 7 (with end pads) so that a smt cap can be soldered to the ground plane side of the pcb at pin 7, with the cap trace going direct to pin 14 - that may mean carving a trace out of the gnd pour. You could even retrofit that mod to an existing board to gauge the benefit from suppressing the glitch at its source.Another aspect could be to minimise the J10 gnd disturbance so that it locally goes to just R18 and U7/7 pads, and not into the general gnd pour.Perhaps of no tangible concern but I see that the ground connection from the GPS J4/4 has quite a long route to the PIC U4/14 and the C14 reservoir - but no apparent easy change is seen.PS. U6 +5V trace perhaps could go direct to C10, C11, and then to the OXCO. Also VDDA trace to U3 and U6 could start from C3, rather than from L1 pad.Ciao, Tim

author: MIS42N
author_rank: Frequent Contributor
timestamp: March 29, 2023, 05:02:21 am
content: Quote from: trobbins on March 29, 2023, 03:19:18 amI think rerouting the traces from L1 to U3,U6 has a lot of merit, also the OCXO +5V.It seems to me the main problem is resistance in the ground plane causing a drop in the wrong place, and that can be fixed by putting in a few exclusion zones. While the 50Ω load was plugged in the system settled to a different voltage and the corrections once that voltage was established were small (similar to no load). The graph is over more than a day. Although it is annoying to see this, it was pleasing to see the algorithm caught it after the phase was out by about 100ns (1 cycle), changed the frequency to pull back the phase error, then changed the frequency to be correct once the phase error was eliminated. Minimum hunting or ringing.

author: trobbins
author_rank: Frequent Contributor
timestamp: March 29, 2023, 05:55:39 am
content: Ok I see that level shift now - my initial thoughts were blinkered to the transient disturbances.I can see that the control voltage level change could result from a change in the U5 regulated rail, and/or the VDD rail, and/or the gnd points.The driving change is increased U7 supply current on the VDD supply and its return. That could be due to the VDD trace resistance from U3 to U7 causing a voltage change on U4 (if the PWM value was sensitive to device supply voltage). That influence could be checked by cutting the VDD trace near U7 and rerouting U7 directly to U3, then there is just the load regulation of U3 at play.It seems difficult to know where to start carving up the gnd plane without some indications of where there may be ground current influences. I'd suggest that static voltage changes in the gnd plane could be assessed by retrofitting direct additional wire links, eg. from U3 to U7, and U3 to J7/4, and U3 to U4/14, such that the gauge of an added link diverts or suppresses gnd related voltage drops that show a net benefit in the frequency ppm deviation with 50 ohm load steps.If available from the pcb maker, a simple way to suppress static voltage drops in the gnd plane is to increase the copper thickness spec for that plane.

author: thinkfat
author_rank: Unknown
timestamp: March 29, 2023, 06:05:40 am
content: Increasing the copper thickness sounds like a pretty drastic method to me. I'd first try to increase decoupling, adding capacitors close to the critical circuits, maybe adding a choke.

author: MIS42N
author_rank: Frequent Contributor
timestamp: April 01, 2023, 10:06:28 pm
content: Further investigation of the reason the errors were halved when the averaging period doubled. A bit of stupidity (typical). The previous algorithm was designed to steer the 1pps so it arrived in the interval 0 to 25ns. As described earlier, this allowed the system to settle anywhere in that 25ns window so tended to wander in that window. My simplistic solution was to add 1 to all +ve deviations so 0-25ns became 1, 25-50ns became 2 etc, with -ve deviations -25to0ns is -1, -50to-25ns is -2 etc. This did force the system to try to settle on the transition from -ve to +ve. What I didn't realise was this gave too much weight to the 0to25ns and the -25to0ns intervals, resulting in corrections which were too large. This can be seen on the graphs, the voltage becomes a sawtooth overshooting every time.When the measurement period was doubled, the overshoot was the same. But the algorithm now had twice as long to fix it, so the correction was halved.The perfect solution to this is to measure the arrival time exactly rather than to the nearest 25ns. But this adds more hardware, against the principal of this build. Also it may test the power of an 8 bit processor to deal with the larger numbers involved.So the algorithm is changed yet again. The solution was to add weight to deviations greater than ±25ns. The actual solution was double the number and add 1. So 0-25ns is still 1, 25-50ns becomes 3, 50-75ns becomes 5 etc, with -ve deviations -25to0ns is still -1, -50to-25ns is -3 etc. Calculations of corrections uses close to 32 bit precision, and shifts (divide by multiples of 2) the final result. It was a simple matter to add 1 to this to remove the effect of doubling the raw deviations.So does it work. Yes it does. The GPSDO was off for a different reason before changing the software, so it has been running less than a day. Even so, sawtooth is gone and many corrections are less than 0.01 ppb. That's very satisfying. It seems temperature is now the biggest disturbing factor. Always something to think about.I'll post another graph when I've got more data.

author: MIS42N
author_rank: Frequent Contributor
timestamp: April 09, 2023, 03:50:37 am
content: Here's the results of further testing with the u-blox LEA-M8T. Each bar on the lower graph is the adjustment after 1024 seconds of averaging so there's about 2 days of data. As can be seen there's a definite up and down wander to this which I originally put down to some error in the disciplining algorithm. Between X=105 to 140 I tried two modifications to the algorithm. Both seemed to make the situation worse, and as I couldn't see a flaw in the algorithm, the original was reinstated around 140.Then I looked at the pattern displaced by 84 on the X axis, and it seems to repeat. 84 bars is about a day. Lightbulb moment, this is variations in the 1PPS. It makes sense, when the M8T was surveyed in, it came up with a standard deviation of position of 10 metres. The antenna is in a poor location and it is likely sometimes the calculations are done on a reflected signal. ±10 meters equates to ±30ns in arrival time.Best way to prove it is put the antenna in a better position. Maybe in a few day's time.Even so, happy with this. Some room for improvement but isn't there always.

author: trobbins
author_rank: Frequent Contributor
timestamp: April 14, 2023, 02:11:14 pm
content: I quickly started up your GPSDO earlier today to test and adjust the high stability OCXO option 001 on a HP3325B, which was 0.1Hz high for 10MHz. It certainly makes the adjustment process easy, especially as I only needed to reach the 0.01 ppb level on the GPSDO for this application.My other 'budget' based adjustment on the HP3325B was to null the Analog Phase Interpolation 3kHz spur using a PC soundcard and REW spectrum analyser software, rather than use a full-blown spectrum analyser from that vintage.

author: enut11
author_rank: Super Contributor
timestamp: February 14, 2024, 12:25:20 am
content: My introduction to GPSDOs was not a good one.Oct 2021I had a HP 10811A crystal oscillator that needed a cal check using a higher authority. The DIY nature and low cost of a GPSDO seemed the way to go so I started building the@AndrewBCNproject.https://www.eevblog.com/forum/projects/yet-another-diy-gpsdo-yes-another-one/250/I am not a programmer so after several failed attempts at programming the STM32 chip using the Arduino IDE, I gave up as I had more pressing things to do.Jan 2024Recently I revisited@AndrewBCNproject and reread all the posts and downloaded the latest IDE, STM and firmware. This time I got lots of IDE compile errors, so gave up again!In Reply #143 of the@AndrewBCNthread I saw a short description of a GPSDO by@MIS42N. This one used a preprogrammed PIC to do the disciplining. Fantastic! I chased up all the parts and PCB and here it is. My 'Budget GPSDO' is still in the build phase but it does work and it works well.Initial tests show my FA-2 counter to be low by about 2Hz. Later I will test the HP 10811A crystal oscillator. I also logged the Vco (OCXO control voltage) for a couple of hours and am still trying to understand the control mechanism.@MIS42N, I made some changes to the build:1) I used linear voltage regulators throughout (I prefer them).2) I did not use the Vco buffer FETs and connected the PWM directly. This does mean a longer wait for stability when connecting to the 10MHz 50R output.3) I used an Isotemp 143-141 5v OCXO. The two used OSC5A2B02 OCXOs I bought on eBay were faulty.enut11EDIT: The note on the Vco plot about hot-plugging the GPS module is a leftover from an old test and should be ignored.

author: MIS42N
author_rank: Frequent Contributor
timestamp: February 14, 2024, 04:44:49 am
content: Quote from: enut11 on February 14, 2024, 12:25:20 am1) - no problem. The SMP was there to lower dissipation in an enclosure, and so it could be used by the Amateur Radio people who like a 13.xV supply. Any supply that works is OK.2) - connecting the PWM directly leaves you at the mercy of supply variations to the uP and the output buffer. Also, if you connect up to the serial output it will report a -ve control voltage slope and an incorrect Vco. That's an artifact of the reporting, the software was written to handle both +ve (normal) or -ve (inverted) slope. It determines the slope during the calibration run. The FETs act as an inverter and the reporting software assumes it is there. Neither of those are show stoppers, just "nice to have".3) - Also the software is written to handle OCXO of different sensitivities, also determined in the calibration. It's good to hear this works in the real world.The control mechanism is written up in Software.pdf in the GitHub repository. It's a bit weird as there's no accurate timer of the 1PPS, just to the nearest 25ns. It relies on the sawtooth jitter of low end GPS modules to randomize arrival times which (perhaps counterintuitively) improve accuracy. So collecting lots of data and averaging, unlike a normal PID control.I still can't understand GitHub and might shift to SourceForge which seems more user friendly.GitHub repositoryhttps://github.com/ajcashin/budget-gpsdo

author: enut11
author_rank: Super Contributor
timestamp: February 14, 2024, 06:03:56 am
content: Thanks@MIS42Nfor a fantastic GPSDO project that just works and is great for non-programmers.I bought some of the hard-to-get parts from Silicon Chip Magazine and the rest from Jaycar Electronics Australia.https://www.siliconchip.com.au/Issue/2023/Mayhttps://www.jaycar.com.au/You might have noticed that I mounted the OCXO on stand-offs. After the failure of two used units from eBay, I needed a way to easily change the OCXO.To finish the project I am building an analog power supply and I also have a nice case to mount it in. You might say it was made by HP for this projectIn case you were wondering, the box at present is just an empty shell. I know not what happened to the original internals.enut11

author: enut11
author_rank: Super Contributor
timestamp: February 17, 2024, 05:32:25 am
content: All the bits mounted inside the HP box. I am currently monitoring the OCXO Vco from a cold start to see how it tracks by the time the 1PPS signal stabilises.The 'GPS Lock' LED appears to be off but is in fact flashing once every second. The designer,@MIS42N, tells us that this is when the best performance is available.Apart from measuring the Vco, how else can I check the circuit for performance? I am a novice wrt precision frequency/time references and my main interest at this stage is a way to check my frequency counters and 10MHz distribution box.enut11

author: trobbins
author_rank: Frequent Contributor
timestamp: February 17, 2024, 06:17:56 am
content: As I was an early adopter (so to speak), and MIS42N kindly gave me two of his Rev1 pcbs, I built a second of these GPSDO's to 'confirm' performance of the first built unit. To satisfy any further doubt, I luckily had access to a HP5065A Rubidium standard that gave a reference that was independent from GPS. As I recall, I didn't have tools (or incentive) to push the comparisons below 0.01Hz, or do statistics or further design tweaking that MIS42N has since done. Since then I have happily tweaked a HP 10811-60159 10MHz OCXO, as this budget GPSDO was easy and convenient to turn on and quickly stabilise.

author: MIS42N
author_rank: Frequent Contributor
timestamp: February 17, 2024, 06:18:37 am
content: Quote from: enut11 on February 17, 2024, 05:32:25 amThe LED has a variety of flash patterns. They are documented in GPSDOnotesV1.pdf in the repository. A design aim was to minimise the hardware to get a functioning system, the LED flashes try to convey useful information at all stages (e.g satellites in view before the GPS module reports a lock).A single flash (50ms) once a second indicates the software thinks the frequency is within 1ppb (i.e. 10MHz±0.01Hz). This was a design aim and considered 'good enough' for most hobbyist uses as it is better than most standalone frequency references. The GPSDO frequency may be more accurate but that doesn't change the LED. The actual estimate is reported via the 9600 baud user interface. The output frequency is locked long term to the GPS 1pps, guaranteed (10M * period in seconds) cycles ±1.25 cycles if the LED is single flashing. So can be used to compare a rubidium standard (which is very stable but can have a small frequency error) using a phase comparison over a long period (e.g an hour).

author: enut11
author_rank: Super Contributor
timestamp: February 17, 2024, 08:50:56 am
content: Quote from: trobbins on February 17, 2024, 06:17:56 am@trobbins, I too have a HP 10811 reference and, compared to this GPSDO, it was running approx 2Hz low. This may have been just an ageing phenomenon as the HP specs say something like '10 to the -11' which is very good indeed. Anyway, I adjusted my 10811 and it is now better than '0.02Hz' as read on my FA-2 counter. See Reply #83.enut11

author: enut11
author_rank: Super Contributor
timestamp: February 17, 2024, 07:45:33 pm
content: This is a plot of the Vco (OCXO trim voltage controlled by the PIC) over a period of 2 hours from a cold start. This was an open box test.The sudden Vco variations near the start are part of the software OCXO voltage/frequency sensitivity calibration.The 1PPS GPS Lock signal happened around 30 min. From then on the plot is very flat suggesting only minor frequency control changes were required.

author: enut11
author_rank: Super Contributor
timestamp: February 17, 2024, 07:50:26 pm
content: A close up of the last 20 min shows the Vco varies by about 300uV PP short term. Larger cyclic variations are also visible. Sample rate for this test was 4 sec. Ambient temp was 30C.

author: enut11
author_rank: Super Contributor
timestamp: February 18, 2024, 07:20:03 pm
content: My GPSDO locked up a couple of times and had to be rebooted. Discussions with@MIS42Nultimately showed that I inadvertently created the problem.The HP box that I used to house the GPSDO had some front panel LEDs that I re-used. These 'last century' LEDs were very inefficient, requiring up to 10mA drive. This current was upsetting the PIC and ultimately the Vco stability. While the exact nature of the problem was not fully understood, it appears to have been solved when I installed a very efficient modern PIC LED.I also skimped and left off the 2 FETs that buffer the Vco and would recommend that they be used as per the circuit.In any case, the PIC based GPSDO is working well now and holding 10MHz to within 0.01Hz or better.A great project. Thanks @MIS42Nenut11

author: trobbins
author_rank: Frequent Contributor
timestamp: February 19, 2024, 12:31:08 am
content: enut11, did you use a 10k series resistor for your LED, or lower that value for better visibility ?I had surreptitiously located various smt caps directly from various device pads to local gnd plane as a pro-active way of hopefully avoiding such disturbances, given the 10MHz operation and the nuanced manner of deriving the OCXO control voltage.

author: enut11
author_rank: Super Contributor
timestamp: February 19, 2024, 03:16:48 am
content: Hi@trobbins. I had previously lowered the 10K resistor to 270R (ouch) to get sufficient visibility from those very old LEDs. Anyway, I found a green LED that needed only 0.1mA (x100 less current) and it was still bright! Installed an additional series 18K for a total of 28K so minimal loading now on the PIC.Tell me more about your ground plane and how you use it to improve circuit performance.enut11

author: trobbins
author_rank: Frequent Contributor
timestamp: February 19, 2024, 03:39:22 am
content: 'Improving' circuit performance may be a step too far, but the photo shows where I located local bypass caps on the PIC, 740AC04, J1, J2, OCXO, and power input (I used 5V plugpack and an on board LC for buffering). The pcb is V0.0.Ciao, Tim

author: enut11
author_rank: Super Contributor
timestamp: February 21, 2024, 09:20:47 pm
content: Quote from: enut11 on February 17, 2024, 07:50:26 pmI was curious about the short term Vco variations shown in Reply #88.@MIS42Nhad indicated that they were too large and that something was affecting the PIC supply.The only other significant load on the PIC supply was the GPS receiver so I powered it with its own 5v regulator directly from the 12v input. This made a noticeable improvement to Vco stability.The first chart is a 9hr plot of Vco. The large sudden variations are under software control as the program uses the Rx 1PPS to lock in the 10MHz.The second chart is zoomed in to show the smaller variations. These are now around 10uV. Compare this to the 300uV in Reply #88.The Budget GPSDO is now boxed and ready to use. Very happy with this DIY 10MHz reference. I have used it to calibrate a Racal Dana frequency meter, a 10MHz Oscilloquartz reference and a HP 10811 OCXO.Is it finished? Not yet. I want to add a 10MHz output to the front panel and maybe even a buffered 1PPS. Also, I think a 240AC line filter will help clean up the power supplies even more.enut11

author: enut11
author_rank: Super Contributor
timestamp: February 22, 2024, 03:09:25 am
content: With the metal cover on, the Budget GPSDO seems to have stabilised to the third decimal place. It has been running for about 8 hours in a room with an ambient temperature of 26-29C. Counter settings were 1s gate and HP 10811A external reference. Not sure if the GPSDO was checking the 10811 or vice versa

author: ddosegov
author_rank: Contributor
timestamp: March 09, 2024, 10:32:14 pm
content: Í´d say I´m good.Half of the sky shaded by building, in non-heated room, no enclosure...>h Time 204314 UTC. Ctrl 1.760273 -0.049 ppbTime 204730 UTC. Ctrl 1.760203 -0.070 ppbTime 205146 UTC. Ctrl 1.760194 -0.008 ppbTime 205602 UTC. Ctrl 1.760196 0.002 ppbTime 210018 UTC. Ctrl 1.760378 0.182 ppbTime 210434 UTC. Ctrl 1.760338 -0.040 ppbTime 210850 UTC. Ctrl 1.760435 0.097 ppbTime 211306 UTC. Ctrl 1.760323 -0.112 ppbTime 211722 UTC. Ctrl 1.760218 -0.105 ppbTime 212138 UTC. Ctrl 1.760233 0.014 ppbTime 212554 UTC. Ctrl 1.760255 0.022 ppbTime 213010 UTC. Ctrl 1.760339 0.085 ppbTime 213426 UTC. Ctrl 1.760386 0.047 ppbTime 213842 UTC. Ctrl 1.760370 -0.016 ppbTime 214258 UTC. Ctrl 1.760319 -0.051 ppbTime 214714 UTC. Ctrl 1.760295 -0.023 ppbTime 215130 UTC. Ctrl 1.760288 -0.008 ppbTime 215546 UTC. Ctrl 1.760330 0.042 ppbTime 220002 UTC. Ctrl 1.760366 0.036 ppbTime 220418 UTC. Ctrl 1.760416 0.049 ppbTime 220834 UTC. Ctrl 1.760378 -0.038 ppbTime 221250 UTC. Ctrl 1.760322 -0.056 ppbTime 221706 UTC. Ctrl 1.760216 -0.106 ppbTime 222122 UTC. Ctrl 1.760214 -0.002 ppb

author: MIS42N
author_rank: Frequent Contributor
timestamp: March 10, 2024, 04:42:11 am
content: Quote from: ddosegov on March 09, 2024, 10:32:14 pmExcellent.I (and maybe others) are interested to know where you got your info and parts from. Version 1 or Version 2? And is it a part or full build. [enut11 did a partial build with his own variations].

author: ddosegov
author_rank: Contributor
timestamp: March 10, 2024, 12:32:46 pm
content: Quote from: MIS42N on March 10, 2024, 04:42:11 amHuh... Parts source: Aliexpress, PCB from JLPCB, I used design published here, modified power supply part and added LC filter to the output, repoured copper pour...

author: ddosegov
author_rank: Contributor
timestamp: March 10, 2024, 12:58:06 pm
content: Quote from: enut11 on February 21, 2024, 09:20:47 pmTry this trick i used when I was chasing microvolts of variations on 5V line in another GPSDO - use 12v power supply and add 7808 in front of 5V regulators.For 1pps use PICDIV from leapsecond.com for generating 1pps from 10MHz, in that way you´ll still have 1pps if gps looses signal, and if something goes wrong with 1pps out, you´ll replace 1€ PIC, not gps.

author: enut11
author_rank: Super Contributor
timestamp: March 12, 2024, 12:40:44 am
content: Quote from: ddosegov on March 10, 2024, 12:58:06 pmHi@ddosegov. Yes, I already use a 7808 in front of the 7805 supply to the PIC. That is part of the original design by@MIS42N.Tell me more about PICDIV.Thanksenut11

author: MIS42N
author_rank: Frequent Contributor
timestamp: March 12, 2024, 02:19:10 am
content: Quote from: enut11 on March 12, 2024, 12:40:44 amUses assembler program for a pic12f675 or similar to create pulses from the OCXO 10MHz input. The processor runs without interrupts so relies on accurate loops to produce the desired output.There are a few different 1PPS programs. The simple ones produce the 1PPS with no synchronisation so are not aligned with an external time source. More complex programs allow alignment to within ±200ns of another source with suitable external input. Due to the instruction time being a quarter of the clock, it would be difficult to adjust that last 200ns.I don't know it is worth implementing. You want 1PPS, take it from the GPS module. As long as there is a reasonable sky view, they will continue to output 1PPS. The PIC in the GPSDO keeps stats on lost signal, rarely happens.However, if 100% reliable (but not necessarily 100% accurate) 1PPS is required, for example to run a wall clock, then maybe PICDIV has a place. The OCXO is always running but with an extended loss of input there will be a CPU reboot and there may be a loss or gain of cycles before discipline is reestablished.The GPSDO program could be written to give extended holdover (if input is lost then restored, the OCXO frequency is changed to compensate for any lost/gained cycles then discipline reestablished). However, that seemed like more complexity that a simple GPSDO was expected to deliver. Currently if signal is lost for around a minute, the CPU is rebooted and runs with the Vco established during calibration (unless the user interface is used to update the default Vco) until the signal returns.http://www.leapsecond.com/pic/picdiv.htm

author: radio_ham
author_rank: Newbie
timestamp: August 27, 2024, 10:48:20 am
content: @MIS42N Hi, perhaps somewhat late to this party, however I have been lurking and following with considerable interest. I recently built two of your excellent GPSDO designs using your GITHUB gerber files you posted and they work well. The short term corrections are better than 0.04ppb and -0.04ppb over maybe 3 to 4 hours and longer term corrections over 24 hours tend to occasionally jump to around plus or minus 0.08pbb so at worst around 0.16ppb drift. For the most part the stability is well within 1Hz at frequencies higher than 10GHz. The number of satellites I have in view with good signals will vary between 11 and 15.My setup for testing is presently a dual output linear DC PSU set at 8v to drive PIC16F1455 and the Oscillator and the other output set to 12v for the remaining needs. I am using NEO M8N sat receiver module. The active antenna is a puck patch antenna mounted high up in my conservatory with approximately a 240 degree view of the sky. The sat rx module is plugged directly into the GPSDO board. The GPSDO is also in the conservatory so there is a temperature variation, particularly when the sun shines through but the correction appears to cope with that extremely well. In these extreme temperatures I find the 256 second correction adjustment works fine.Some observations from my experience on the build for others contemplating this project are these. I have used male PCB headers for J1, J3, J4, J5 and J8. For J6 and J7 I have used female PCB headers. J6 does not matter so much as this is a two pin header and can be used as a link if so desired but J7 needs to be a socket should anyone wish to plug the satellite board directly into the GPSDO PCB. If you do this make sure that U8, the UA9637 is not soldered on the board or not plugged into an IC socket if used, as this loads the 1pps from the GPS receiver board. I have used low profile PCB sockets for U8 and also for the PIC chip to no obvious detriment. Do I need to improve this? Likely not for my needs, but having got the bug and because I can I have ordered a few VECTRON C4550A1-0213 10MHZ OCXOs from Ali-veryfast and a LEA M8T Huewai board to see if there will be any difference. I had five PCBs made by a well known Chinese PCB Manufacturer for $5.00 plus approx £20.00 UK postage so I shall make two more boards up and eventually compare the difference. Do I look at implimenting my own RTK system? Probably not as this will be entering the realms of diminishing returns!@MIS42N, congrats on an excellent GPSDO design and a heartfelt thanks for sharing this. I appreciate the time and effort you have put in.

author: MIS42N
author_rank: Frequent Contributor
timestamp: August 30, 2024, 01:51:16 pm
content: Quote from: radio_ham on August 27, 2024, 10:48:20 amThank you for the kind words.I wonder if it is a design suited to further refinement as you intend. The original design parameters were (1) to produce something that had respectable performance for minimal cost (2) to self calibrate so there were no annoying parameters that needed fiddling (3) to be self checking (hence the long averaging periods). This did involve some compromises, the main one being the 1PPS detection which is only to the nearest 25ns. Perversely, this has proven to be adequate when using low cost GPS modules that jitter the 1PPS then applying averages. If there were no jitter, it wouldn't work.You have addressed most of the simple improvements with the well position antenna and the quality power supply and you've noted that environment plays a part too. Varying temperatures do have effects that are hard to pinpoint, so having a stable temperature helps.However, you are now bitten by the bug, and it will be interesting to see how the design stands up. I hope you share your results.

author: PA0KTF
author_rank: Contributor
timestamp: November 07, 2024, 12:42:56 pm
content: Hello AJCashin,You have done a great job designing this GPSDO.I have built a few examples an done some testing. See attachment.I would like to do some testing with different steps in the control loop.It should be possible in my opinion to make it faster.Is the software source code somewhere available ?Thanks.

author: MIS42N
author_rank: Frequent Contributor
timestamp: November 08, 2024, 12:05:32 am
content: Quote from: PA0KTF on November 07, 2024, 12:42:56 pmThe software is in PIC assembler, and is in the GitHub repositoryhttps://github.com/ajcashin/budget-gpsdoas main.asm. Unless you know assembler well, it will be hard to change.The arrival time of 1PPS pulses is only to the nearest 25ns due to the simple detection system. This, and the natural jitter in the 1PPS of cheap GPS units makes the system less stable with shorter averaging times. So longer times are desirable, but are a compromise between the quality of GPS and the stability of the OCXO and its control voltage. So the default is set to 512 seconds. This can be changed using the serial interface, see GPSDOnotesV1.pdf. The minimum is 256 seconds.Note the set value is the maximum time between adjustments. The software monitors deviation on every 1PPS. In startup or unusual events, the monitor checks against some limits to determine if the frequency or phase shift is "too much" and will schedule a change much earlier. In the first 15 minutes of startup the OCXO drifts and frequent corrections are usual. The limits are a bit arbitrary but seem to work well in practice. The system will usually lock after about 2 minutes and will not lose lock after that.If you do want to change the control algorithm, it is described in Software.pdf. Start from the section headed "The control algorithm used after calibration". I think once you understand that, you may not want to change how it works.

author: Bryan
author_rank: Frequent Contributor
timestamp: November 13, 2024, 05:44:04 pm
content: Quote from: MIS42N on November 08, 2024, 12:05:32 amMIS42NBeen years since I used Mplabs. I don't have a PicKit 3, but do have a 2 version. if I recall when compiling it shouldn't matter what tool is used to program as the bin file is just uploaded to the PIC by whatever tool is used, so I should be able to compile with the PicKit3 (pickit 2 no longer shows) and then upload the bin file using the picKit2 software 2.60?

author: MIS42N
author_rank: Frequent Contributor
timestamp: November 13, 2024, 09:18:32 pm
content: Quote from: Bryan on November 13, 2024, 05:44:04 pmYes, the assemble and upload are separate functions. You don't need to specify a programmer to rum MPlab. The binary ends up in a folder in the project. All that is needed is the programmer know the protocol for the PIC16F1455. I think (but haven't researched) it exists for the PicKit2.

author: Bryan
author_rank: Frequent Contributor
timestamp: November 13, 2024, 10:22:04 pm
content: Quote from: MIS42N on November 08, 2024, 12:05:32 amThanks, will give it a try this weekend, starting to come back to me. If I recall you select the PIC from within the Pik2 program software and then program.

author: nsummy
author_rank: Contributor
timestamp: February 26, 2025, 07:49:40 pm
content: Hi, I am going to build one of these and have a quick question about the buck converter. Is there a reason the 12v power supply isn't just fed directly into the lm1085? Unless I am missing something this requires 2 power supplies, 1 12v that comes into a jack and then a buck converter is attached to a 3 pin jack that converts the 12v to 7.5v before it gets converted to 5v? Thanks for your work on this!

author: MIS42N
author_rank: Frequent Contributor
timestamp: February 27, 2025, 02:57:42 am
content: Quote from: nsummy on February 26, 2025, 07:49:40 pmThe main reason is playing it safe with heat dissipation. The OSC5A2B02 has a start up current up to 600mA. With a 7V drop in the regulator that's 4.2W, it will get hot. I think it is within the specification of the lm1085, but one of the things that affects the stability (and long life) is heat. So reducing heat is desirable.The second reason is the 12V is nominal. Depending on the buck converter, should run anywhere between 9V and (for the one I used) 18V input. So a car battery would be fine. Some buck converters will take higher voltages. With the buck converter, inductive filter, linear regulator the supply can be quite 'dirty' and not affect the circuit.Another reason is efficiency. Reduces the consumption (by 40%?)I bought the converters for about $1.50AU each - seemed like not much expense for the benefit.You can ditch all the regulators and run it off a 5V phone charger (or a USB capable of 1A) if you want. I've tried a few different 5V supplies, it will still work but may not achieve the design goal of inaccuracy less than 1 part per billion (0.01Hz in 10MHz). You can also ditch the opto couplers. People have built a few variations, even using a different OCXO. I won't go as far as saying the software is bulletproof, but it's close.

author: nsummy
author_rank: Contributor
timestamp: February 27, 2025, 08:37:42 pm
content: Thanks for the reply. I went through and re-read all of the posts and its starting to make more sense. Before I had just kind of skimmed various parts and went to the github. I generated a BOM and while I was adding components in Newark (Farnell) I started to think, this doesn't seem that budget or simpleBut from what I understand the PCB design allows for many optional features that aren't required in all situations. That makes sense.So just to confirm, 12v (13.power supply was simply chosen as a convenience/compatibility with other radio equipment, and I could actually just use an 8 or 9v power supply and forgo the buck converter (at the cost of slightly more heat at the linear regulator)?

author: MIS42N
author_rank: Frequent Contributor
timestamp: February 28, 2025, 03:57:23 am
content: Quote from: nsummy on February 27, 2025, 08:37:42 pmYes, the power supply can be modified to suit your resources.The original working 'budget' circuit can be seen in Documentation02.pdf, an attachment to « Reply #15 on: September 13, 2021, 12:04:21 pm ». A few people built it and gave feedback, doesn't fit any readily available case, requires a filtered 5V supply, sensitive to being attached to equipment etc. And the line driver/receiver option was regarded as dodgy (and it is), people instead opting to position antenna in good position and running long runs of coax to the GPS unit located near the circuit.It was truly budget, the main cost being the GPS unit and antenna, OCXO, power supply which are essential for any GPSDO. The rest of the bits cost something like $10 (a bit more today). The revised circuit addresses most of the shortcomings identified by users of the first circuit, but add complexity and cost. Even so I was able to create a kit with everything except case and 12V power supply for about $50 (including NEO-7, antenna, OCXO, programmed PIC). Which I think is still budget when compared with the cheapest commercial offering. And there's nothing to stop the PCB for version 2 being populated with the parts for version 1, just bridging out the extra circuitry.There is actually very little difference between the heart of the original circuit, and the heart of the latest circuit. The main change to the heart was to isolate the OCXO power and control voltage (via the two FET buffer) from the PIC and output. The same software runs on every version except for a couple of changes due to the inversion caused by the FET buffer. Even without the changes, the software will run just as effectively (no difference in disciplining) but reports the control voltage incorrectly.So I guess it's up to the individual if they want to make changes or keep to the published design. I enjoyed the exercise of designing and making, I don't actually have a use for the final product. I published thinking others might find it interesting also.

author: MIS42N
author_rank: Frequent Contributor
timestamp: March 10, 2025, 12:07:27 pm
content: I have updated the software for this project. I find GitHub too complex for my simple needs so I'm migrating tohttps://sourceforge.net/projects/minimal-gpsdo/. A work in progress.At the moment, there is the source and a .hex file for the latest. It is for the buffered version (with FETs). If anyone wants, I can do a hex for the unbuffered (earlier design) version, it is a one line change to the source.The update was for a trivial problem - the up time counter (accessed by Tab S) only displayed 6 digits (about 10 days). The counter is 32 bit so can go to 10 digits (many years). I thought I had a power glitch but then the penny dropped. I believe the problem is now fixed in the real world, it tested OK in the simulator. We'll know in a couple of weeks.While doing changes, I altered the display of missing pulses and no fix from m- and f- to m! and f! so they stand out better. You may never see them if your GPS signal is reasonable. I force them by disconnecting the antenna from the GPS unit, then reconnect a few seconds later.Also, the calibration run was shortened from 16 passes of 256 seconds to 4 passes. The sanity check on passes is quite stringent so 16 passes was overkill. A calibration should now take less than an hour (half an hour if all passes are valid).If you have a more recent version of the software, it can be updated through the user interface using the XMODEM facility in TeraTerm. You can find out by typing Tab U (it may have been Tab P in one version). If the facility is there, the system will go into programming mode but if no program is sent it automatically does a reset after a minute and nothing is altered. I'm not sure I documented the update procedure, it's been a while since I've done any work on the project. I'll look, and if I can't find I'll do a writeup and put it on SourceForge.

author: trobbins
author_rank: Frequent Contributor
timestamp: March 10, 2025, 12:16:05 pm
content: I would appreciate the updated software availability on sourceforge to also include an unbuffered version, as I have two assemblies with that earlier design hardware.Ciao, Tim

author: MIS42N
author_rank: Frequent Contributor
timestamp: March 15, 2025, 01:27:21 am
content: You may wonder why I haven't completed the migration to SourceForge. Apologies.After posting about the misbehaving up time counter, I did a recording run (i.e. logged every second via the serial port) and discovered the system was rebooting. It was a soft reboot (explained below) which logically should not reset the counters, but the counter reset was not moved from soft reboot to power on/forced reboot where the whole system is initialised. A historical oversight. Before migrating I thought I should fix the counter reset issue first. Just need to find the time.In the meantime, I tried my hand at creating a YouTube video of the software update procedure via the serial port. Not my finest work, but for your amusement the link ishttps://youtu.be/k7s6wC9ixdg?feature=shared. The .hex file that is uploaded is the output of the assembler, no reformatting is required. The upload software checks both the line by line checksum of the .hex file, and also the uses the XMODEM checksum to ensure the upload is not corrupted.Soft reboot: There are a few situations that initiate a soft reboot:(1) after a cold start, the system has trouble getting a lock between the 1PPS and the oscillator frequency. The first control voltage applied is the one determined during calibration (or subsequently updated by the user). For the OSC5A2B02 that should easily bring the oscillator within 10MHz±2Hz. But for the first minute or so the oscillator will be a long way from this. The system will soft reboot until the frequency is about ±5Hz then start correcting. Once locked, the system should remain locked.(2) for about 20 seconds after a reboot (soft or hard) the reliability of the 1PPS is unknown. A 1PPS is processed if it is within about a 3µs window of the first detected 1PPS. If it is outside the window (because perhaps the first one was spurious) a soft reboot is initiated. After 20 seconds of presumed reliable 1PPS a spurious 1PPS should be ignored and not cause a reboot.(3) Before a change to the control voltage, the new voltage is checked against the limits (for the current software 0.25V to 3.75V) and if the calculated value is outside the limits a soft reboot is initiated.It is though that the reason for the observed soft reboot is (3). It is not clear why, but the GPS module was producing unstable 1PPS at the time (the antenna is in a poor reception area, and we had fog) and that may be the cause. Unless the system is used for timing, this is unlikely to impact anyone so I'm not going to spend a lot of time hunting it down.

author: MIS42N
author_rank: Frequent Contributor
timestamp: March 24, 2025, 09:40:49 am
content: The latest sources and .hex files can be found athttps://sourceforge.net/projects/minimal-gpsdo/I am slowly adding more files to the SourceForge repository. I find it much easier to maintain than GitHub. I hope to move it all, but I am examining each file to see if it is relevant and accurate.The counters are now set to zero before the main program starts, and are not reset by a soft reset. The rejected count is incremented by any soft reset.Also, the interrupts dealing with the 1PPS have been rationalised. Hopefully any spurious 1PPS outside the detection window (about 1.8ms) will be ignored. Not that it was known to cause a problem but it makes for simpler code.An I (info) request returns both the permanent and current aggregation windows (default 512 seconds)

author: nsummy
author_rank: Contributor
timestamp: March 24, 2025, 10:34:46 pm
content: Thanks for all of your on this. A couple of more questions as I already have the PCBs so i won't be doing the true "budget version". Really this is just related to the inductors since I completely forgot to buy those:1. The L1 SMD inductor, is that due to the buck converter or does it serve a different purpose? It looks like if I omit it there will be no connection between the DC jack and the rest of the circuit, so wondering if I can just jumper the positive holes of those 2 smoothing capacitors.2. The Fastron MICC inductor seems to be impossible to find anywhere. When looking for a replacement what sort of specs should I be looking for? Is the 1 Mh inductance the important part? Do I need to pay special attention to the SRF or DCR? I clearly know next to nothing about inductors

author: MIS42N
author_rank: Frequent Contributor
timestamp: March 25, 2025, 12:58:28 am
content: Quote from: nsummy on March 24, 2025, 10:34:46 pm1. L1 is there because people can use all sorts of buck converters with unknown noise characteristics. One version I made used a mini360 converter and it was noisy. If you are happy with the quality of your power, just use the jumper as you suggest. Also, somewhere in notes I said C1 could be left out if the buck converter has an adequate capacitor (the mini360 doesn't but the LM2596 version I am using now does). I maybe am overcautious with power filtering, the philosophy being you can't have too much but you can have too little. If you have the equipment to test the ripple on the power line, maybe build with a link, test, put in L1 if there's ripple on the OCXO supply (it may carry through to the 10MHz output, could tune a radio to 10MHz and check for noise).2. In retrospect, L2 is an aberration. If you want to use a precision voltage source (and it is only worthwhile if you are looking for accuracy below 0.5mHz which is pretty ridiculous and needs a timing GPS unit) link out the inductor and replace C4 with a low value ceramic like 100nF. If you are taking the supply from the OCXO 5V supply replace L2 with a 100Ω resistor. The reason for dropping the inductor is most have a big variation in resistance with temperature and that affects the control voltage. A resistor is better, a precision source is better again. It doesn't have to be a MAX6350, they are expensive and overkill. Its temperature stability is around 1000 times better than the LM1085. If the environment doesn't have a lot of temperature changes, the LM1085 will be good enough.

author: MIS42N
author_rank: Frequent Contributor
timestamp: April 03, 2025, 12:17:05 am
content: The SourceForge repository now has a lot of information, I can't think of anything to add. Please let me know if there are errors, something is unclear, or a request for more information.There are source and hex files for both older and newer design.For your enjoyment -https://sourceforge.net/projects/minimal-gpsdo/

author: aandrew
author_rank: Frequent Contributor
timestamp: April 04, 2025, 02:42:59 am
content: Thank you for all of your efforts and careful documentation of your journey. I do truly appreciate seeing not only the end result but all the discovery and "why"s as well.Is the sourceforge link correct? The "Download" link seems to only give a .zip with the kicad project, and all the other files are not available as a single file, nor do I see the equivalent of a "download everything in this project" link. I'm quite sure it's something I'm doing wrong but I can't figure it out, and even with adblockers enabled, the sourceforge site is ... to put it mildly... eye cancer.

author: MIS42N
author_rank: Frequent Contributor
timestamp: April 04, 2025, 08:48:50 am
content: Quote from: aandrew on April 04, 2025, 02:42:59 amI feel your pain. I have tried to get rid of the download link with no success (yet). SourceForge did it without me asking. Maybe I just create a folder with the KiCad files, so there is no .zip for it to find.A quick search leaves me thinking SourceForge don't provide a download everything facility, I would have to recreate the structure on my machine and zip it all up.There is a downside to that. The ReadMe.MD files are rendered by SourceForge, someone who downloads the whole structure may not have a reader. I think those ReadMe are relevant.********************************Update - it appears SourceForge offers the last file added as the download. Which would be fine if there was only one file. It can be set to a different file but there seems no way to get rid of it. So I've set it as the readme.md file for the top level. Annoying.

author: nsummy
author_rank: Contributor
timestamp: April 14, 2025, 08:05:28 pm
content: IMHO Sourceforge is not a good fit for this type of use case. Its good if you have an application and want to release new installer with every new version. Github on the other hand is good when there are multiple files and multiple changes. We can see the history of the modifications to all of the files, and you can create "releases" with the relevant files in an archive. Even if you don't use the release functionality github still gives the ability for the end user to download the entire repository as an archive. What part of the github experience did you have trouble with?

author: MIS42N
author_rank: Frequent Contributor
timestamp: April 14, 2025, 11:57:25 pm
content: Quote from: nsummy on April 14, 2025, 08:05:28 pmThe last part first. I just do not understand GitHub to the depth where I feel confident using it. It may be obvious to software developers today but my development days finished 25 years ago and I was not part of a development team since 1975. Since I only published two projects (the other ishttps://sourceforge.net/projects/top-octave-generator/I just wanted a simple way of putting them out there and SourceForge is simple.I agree it is a pain if the only option is to download the project one file at a time. The solution is for me to create a .zip of everything and make that the 'download' file. Just have to find the time. It would be simple except for the markdown files, which I consider a necessary part of the file structure. I'm not sure there is a need to track changes, the only changes are to add something or fix something so supersedes whatever went before.Thanks for giving me a prod. Just have to find time to act.I am currently testing the combination of a well placed antenna and a timing GPS module (M8T), something I've wanted to do for some time but didn't get a round tuit. First results are very encouraging, the control voltage changes are equivalent to frequency changes of ±0.02ppb. That's nearly as good as a calibrated Rubidium source, and more reliable as an accurate frequency standard than an uncalibrated one. There's more work to do, and a longer test time, before making it "official".

author: MIS42N
author_rank: Frequent Contributor
timestamp: April 18, 2025, 06:49:41 am
content: I tested the GPSDO with a U-blox LEA-M8T GPS module (specifically designed for timing) with a well placed antenna. The results were gratifying - accuracy better than ±0.2mHz or 2 parts in 10-11. I've written a short description and uploaded it to SourceForge herehttps://sourceforge.net/projects/minimal-gpsdo/files/Documentation/M8Teval.pdf/downloadApart from the M8Teval.pdf file, the whole Minimal-GPSDO file structure is packaged up into a zip file. It is offered as the default download file. I'm changing the readme.md files to readme.txt so they are easily read when downloaded. When complete, I'll repackage the zip file. May be a few days.I noted an apparent 'hunt' in the control voltage over a period of about an hour. I shall try and find out if it is a real thing, and what is causing it. There may yet be more room for improvement.

author: MIS42N
author_rank: Frequent Contributor
timestamp: April 29, 2025, 08:42:46 am
content: The journey continues.I mentioned a possible hunt in the data. It turns out to be a real thing. The averaging period was increased to 1024 seconds to see what happened. The errors fell to half the previous (1 x 10-11instead of 2 x 10-11) and the hunt time doubled (previously around an hour, now closer to two).The question is why. At the moment, I believe it is because the correction applied is not quite big enough. The computation is correct but there are two practical considerations not catered for. The first is a delay of a second or two between gathering the data and applying the correction. The second is the response time of the PWM filter.The first attempt to reduce the delay resulted in bricking the PIC. The test bed previously was updated via XMODEM so could be done without touching the box. As the PIC was programmed before installation, I hadn't even soldered a programming header onto the board. So, open up, pull the board, add the header, out with the PICkit 3 and reprogram. Assemble and verified working.It was presumptuous to think the major reprogram required would work first time. So, some debugging needed.Here is a day recording. The tendency to swing between positive and negative corrections can be seen

author: MIS42N
author_rank: Frequent Contributor
timestamp: May 31, 2025, 03:31:39 am
content: It turns out the hunting behaviour seen in the previous posts was due to a design decision made quite a while back. The control algorithm has to deal with two things: (1) The difference between the frequencies of the local oscillator and the implied frequency from the 1PPS timing (2) the phase difference between the local oscillator and the implied frequency from the 1PPS timing.When a deviation is noted, correcting fully for both generates larger changes of control voltage than correcting fully for one and partially for the other. Live testing seemed to give better figures if the phase difference was fully corrected and the frequency difference partially corrected. The full/partial strategy always gets the local oscillator headed in the right direction, it just takes longer to reach an equilibrium than full/full. When dealing with a GPS signal that varies in the short term, the calculation usually has some sort of residual error due to that variation. This is enough so the calculated equilibrium point is different after the next measurement period and the fact that full equilibrium was not reached is irrelevant because the target has moved.But the LEA-M8T provides a more reliable 1PPS, and maybe the OCXO is the cause of most deviations. Those deviations seem to be jumps in frequency. So when the frequency is not fully compensated but the phase is compensated, the algorithm takes a while to get the phase right, but the partially compensated frequency is wrong so the algorithm overshoots, causing a decaying oscillation in the control voltage. The hunting behavior is explained.Fully compensating for frequency and partially for phase eliminates the hunting behaviour. Without recourse to a higher precision local standard it is hard to tell if this results in a more stable frequency. So is it worth changing the published program? probably not. The limiting factor appears to be the quality of the oscillator, in this case a cheap second hand OSC5A2B02 which (from the plot below) is ageing markedly. The graph shows a significant jump change in control voltage presumably where something significant happened to the oscillator. Unlikely to be an external event as this setup was undisturbed for several days.

author: PA0KTF
author_rank: Contributor
timestamp: July 22, 2025, 09:43:00 am
content: I recently bought a FE-5680A (Rubidium 10MHz reference). In a message on time-nuts dated 11/17/2011 a method is described to connect an analog control voltage to the FE-5680A reference. This results in the following range: Input 1.0V with frequency deviation +0.02 Hz and input 4.0V with frequency deviation -0.02 Hz. You can see immediately the problem with the calibration using your software: The +/- 0.25 Hz points in the calibration is far more than the +/- 0.02 Hz. Is there a way to adjust your software for use with the FE-5680A ? Thanks in advance.

author: MIS42N
author_rank: Frequent Contributor
timestamp: July 24, 2025, 10:11:57 am
content: Quote from: PA0KTF on July 22, 2025, 09:43:00 amThe 0.25Hz figure is a shift in the 1PPS of 25ns/second. The hardware only detects to the nearest 25ns so that provides an easy measurement - is the 1PPS arriving 1 period (25ns) earlier or later per second. It would be possible, but not really practical, to look for 1 period change per 32 seconds (as an example). That would be +/- less than 0.01Hz. However to get any precision in the value the test would need to run for longer periods. The limiting factor is the precision (or lack of it) in timing the 1PPS. For cheap GPS modules, cheap oscillators it's not a big deal. For a rubidium standard it is probably too sloppy.Even if this was done, it may break the calculations. The calibration stores a number which is the change of control voltage (representing 5V as a 24 bit number) to get an 0.25Hz change of frequency. If the full range 0 to 5V is not enough to get a 0.25Hz change then that number is bigger than 24 bits and I'm not sure how the calculation would handle it. It might work, the math package is 32 bit, and for most calculations the number is turned into a peudo floating point with 13 bits precision and only converted back to integer when calculating a voltage change (which has to be within the pulling range).Assuming the calculations don't break, it would be possible to cut out the calibration phase of the program and replace it with code that directly writes the calibration data to non volatile memory (after hand calculating that V/Hz figure). Just how it would behave is a matter of speculation. Good luck.