Lars DIY GPSDO with Arduino and 1ns resolution TIC - Page 1
Forum section: electronics / projects

author: lars
author_rank: Regular Contributor
timestamp: August 11, 2017, 09:18:19 pm
content: Yet another DIY GPSDO! On the internet you can find a lot of DIY GPSDO designs. What are the differences between them? Why this?Some + and – I can come up with for mine:+ 1ns resolution TIC (Time Interval Counter)+ PLL (not FLL)+ Uses Arduino (ok some might say it is negative)+ Low parts count and cheap components+ No need for a specific GPS receiver only requires 1PPS in+ Easy adaption to different oscillators (from simple VCXO to Rubidium)+ Configuration for VCO range, time constant (4-32000s) and a lot of other parameters+ Outputs time error (ns), DAC value and temperature (and a lot of other information) to the serial port+ Logs time error, DAC value and temperature every third hour+ Stores last DAC value for use at power-up-DAC resolution (now 16bits) and stability could be better-No saw tooth correction-No adaptive time constant-Not using information from receiver e.g. number of satellites etc.-No standardized communication protocol like many commercial GPSDO’s-No displayWhy did I do this? Since about 2010 I have developed my GPSDO. It started just because I was lazy and tired of tweaking my 10MHz house standard. The only thing I am proud of is the 1ns resolution TIC. A couple of years ago I published an old version on the time nuts forum. This time I decided to use this forum instead as I think my DIY GPSDO is something for experimenters in this forum.For me it is perfect for experiments. I have learned a lot during the years I have used it (and developed it).I have built several complete GPSDO’s but now the only one I have running continuous is a rubidium based DIY Arduino GPSDO I use as a lab standard for my instruments. That Rb GPSDO has been running almost continuous for more than five years with different versions of my Arduino software.Today you can get a GPS module + antenna for about 10USD from eBay, an OCXO for 10-20USD, a metal box and connectors for about 10USD, the Arduino pro mini and all other components for about 10USD, So around 50-60USD should be enough to get all components for a complete GPSDO.As I had problems with file extensions I added .txt to the arduino sketch .ino. You have to take away the .txt and place it in a folder with the same name. To easier read the file without arduino see the .txt without .ino in the file name.I also had to divide the instruction as it was about 2MB. Sorry for the inconvenience.Lars

author: lars
author_rank: Regular Contributor
timestamp: August 11, 2017, 09:19:50 pm
content: Pages 8-18 of instruction

author: lars
author_rank: Regular Contributor
timestamp: August 11, 2017, 09:23:18 pm
content: Last pages 19-21Lars

author: Gyro
author_rank: Super Contributor
timestamp: August 12, 2017, 07:51:04 pm
content: An impressive looking design Lars. Thank you for sharing the full details and code.Given the very low circuit complexity and cheap arduino based implementation (I think it is a positive), it would be hard to find a reason not try it out. Time to modify my messy LEA-6T 100kHz PLL breadboard.

author: jpb
author_rank: Super Contributor
timestamp: August 12, 2017, 10:12:15 pm
content: Thanks for publishing your design and experiences.I have a long term project to produce a GPSDO but have got side-tracked on trying to improve my ADEV measurements (so I can select OCXOs). Also I keep changing my design approach which is half the fun.I was interested to see that your currently run a rubidium full time - is this on all the time are just when you need it? I was leaning towards using an OCXO rather than rubidium because of better phase noise, lower power consumption and longer life. I have a couple of rubidiums but I wouldn't like to run them 24x7 for years because I'm not sure how much lamp life is remaining.

author: edpalmer42
author_rank: Super Contributor
timestamp: August 12, 2017, 11:10:52 pm
content: FWIW, I have an Efratom FRK Rb Standard that's been running 24/7 for 6 years. The voltage that represents the lamp output hasn't moved. These things have a long design life and are expected to be on 24/7. Problems with the lamp do occur, but I don't think it's something you need to worry about.Ed

author: jpb
author_rank: Super Contributor
timestamp: August 13, 2017, 09:18:22 am
content: Quote from: edpalmer42 on August 12, 2017, 11:10:52 pmThanks, that is useful to know.They are certainly more stable when left running all the time - I found with mine that they needed a couple of hours or so to settle when I was making measurements - though they only take a few minutes to lock.

author: jpb
author_rank: Super Contributor
timestamp: August 13, 2017, 09:37:33 am
content: Hi Lars,I realise that the forum requires you to split your pdf but, as a very minor point, it would be good to split it even pages so that those of us who still like to print things out and do so duplex can seamlessly merge the different sections.eg 1-6, 7-14 etc.Thanks again for writing up and sharing. This is probably a better forum to do so as I (and I suspect others) read stuff here but only read stuff on time-nuts if doing a particular search. I did join time-nuts for a while but the number of emails landing in my inbox, only some of which were relevant to my interests, was too much for me. (I know you can set up email filters etc but I prefer to keep my emails for communications and forums for news/general discussions.)

author: Gyro
author_rank: Super Contributor
timestamp: August 13, 2017, 12:00:16 pm
content: QuoteThe simplest way to reconstitute them into a single pdf is the online PDF Merge.https://www.pdfmerge.com/You can then manage the odd/even printing as you normally do.

author: retrolefty
author_rank: Super Contributor
timestamp: August 13, 2017, 02:11:19 pm
content: I need to follow this. I have most the stuff but just to lazy sometimes to follow up. Main problem is that I don't really require a bench 10Hz standard, but still I feel any guy must have one of these humming along.Does that mean I might potentially a time-nut disease candidate?

author: Gyro
author_rank: Super Contributor
timestamp: August 13, 2017, 03:26:46 pm
content: QuoteIt looks as if you're a Million times less susceptible than others.

author: pigrew
author_rank: Frequent Contributor
timestamp: August 14, 2017, 01:26:17 am
content: I've also been thinking putting together a GPSDO, and my thinking has been similar to your design. Some quick ideas for your design: could the 10M pull down be removed, and instead toggle an internal pulldown in the MCU at the appropriate time? I also worried about the temperature coefficient of the diode. Perhaps using a small high-side pFET instead of the diode could work better?For my design, I was contemplating using the TDC7200, but that may be overkill.

author: cdev
author_rank: Super Contributor
timestamp: August 14, 2017, 03:28:05 am
content: Have you seen the Navspark, even the Navspark Mini, which is both a GPS and a microprocessor (32 bit) that can run Arduino code and is substantially faster than an Arduino? Also the GPS in it is quite good.In keeping with the "ghetto" approach I am not even considering their timing GPSs, their $7 Mini will do.Its PPS seems to be very reliable, even with a passive antenna and it's got the ability to act as a semi-stationary GPS to some extent.It can generate a higher frequency signal by telling it to generate a certain frequency as a clock signal for i2c. How stable that is, if it is locked to GPS I don't know but it seems to me as if it does use the GPS to discipline its internal clock within limits so it is possible that even though it is a non-timing GPS the integration of the controller into a GPS might make it possible to implement a GPSDO with only the GPS/CPU and the OCXO and a display and perhaps some switches and a USB-UART dongle. With your existing code, since its Arduino-compatible.It also has Beidou in addition to GPS which gives it very stable fixes when Beidou sats are available alongside the GPS ones..

author: pigrew
author_rank: Frequent Contributor
timestamp: August 14, 2017, 04:13:59 am
content: Quote from: cdev on August 14, 2017, 03:28:05 amI worry there is no over-constrained timing mode in the NavSpark mini.. That'll probably add a bit to its PPS jitter. (I'm not sure how much).I'm not convinced it's necessary to use a higher frequency reference clock. The PPS signal from GPS is normally specified to be accurate with sigma=10 or 15ns, even with sawtooth correction. Sampling the higher frequency from the receiver won't help (if sawtooth correction is used).Also, loop constants are normally many minutes, comparisons more often than every second won't be helpful.... There should already be enough averaging.

author: texaspyro
author_rank: Super Contributor
timestamp: August 14, 2017, 04:47:57 am
content: Quote from: cdev on August 14, 2017, 03:28:05 amIt isn't locked to anything...

author: metrologist
author_rank: Super Contributor
timestamp: August 14, 2017, 06:25:23 am
content: would I be able to use a different phase detector, such as MC4044P? It looks like the phase detector#2 out is the same as specified detector #3, which changes state only on any rising edge?http://www.unitechelectronics.com/MC4044P_PLL.pdf

author: Gyro
author_rank: Super Contributor
timestamp: August 14, 2017, 09:03:55 am
content: The MC4044 is a TTL device rather than CMOS. I that means that it will have greater input loading on the OCXO. Its TTL output levels (rather than full swing CMOS) will probably affect the the characteristics of the voltage ramp on C1 (I note that the MC4044 needs an internal charge pump and amplifier in its loop filter).As an aside, the HC4046 includes self-biasing CMOS Sig. and Comp. inputs, meaning that they can be AC coupled. Lars hasn't used this feature but it may be useful, depending on the output swing of the OCXO.

author: retrolefty
author_rank: Super Contributor
timestamp: August 14, 2017, 02:52:47 pm
content: Quote from: Gyro on August 13, 2017, 03:26:46 pmGood oneTypos can be so fun on a technical site.

author: metrologist
author_rank: Super Contributor
timestamp: August 14, 2017, 07:24:27 pm
content: Quote from: Gyro on August 14, 2017, 09:03:55 amThat sounds like ano...Otherwise I have an ON 14046, but not with the #3 detector, so I think it won't do either. I'll have to draw up a list of parts to make the shipping from DK worth it. Thanks.

author: pigrew
author_rank: Frequent Contributor
timestamp: August 14, 2017, 08:57:05 pm
content: Quote from: metrologist on August 14, 2017, 07:24:27 pmWhy not use a SR latch/flip flop like the SN74LS279 or SN74*74? Are they higher jitter?

author: metrologist
author_rank: Super Contributor
timestamp: August 14, 2017, 10:30:07 pm
content: Quote from: pigrew on August 14, 2017, 08:57:05 pmI'm not savvy enough to figure that out. I suspect it would downgrade the design to FLL and there is still the matter of TTL levels (where is one reading CMOS levels for the specified PLL anyway? It is CMOS and TTL compatible so I thought output would be Vcc?).

author: albert22
author_rank: Regular Contributor
timestamp: August 15, 2017, 04:58:42 pm
content: Excelent info Lars. Specially in what to expect with different types of oscillators and gps.I am starting to experiment with this and your post was useful to bring me down to reality,here is another good article with a similar interpolator method that uses a74hc74.http://n1.taur.dk/gpsdo2a.pdfThanks for sharing all your data

author: metrologist
author_rank: Super Contributor
timestamp: August 16, 2017, 01:35:36 pm
content: Yes, thanks all for posting the project information with so much details. I was looking more into the Time Interpolator circuit and discovered a patent issued in 2012 to Lewis Masters/Phase Matrix Inc. It's quite a brilliant way to increase the timing resolution.

author: jpb
author_rank: Super Contributor
timestamp: August 16, 2017, 06:20:21 pm
content: Quote from: metrologist on August 16, 2017, 01:35:36 pm2012 sounds very recent. The general approach of time dilation by charging capacitors at different time constants has been around a long time - I think many oscilloscopes used to use it.

author: metrologist
author_rank: Super Contributor
timestamp: August 16, 2017, 07:07:51 pm
content: Yes, there are many patents dating back to the 60's and many are referenced:https://www.google.com/patents/US8324952Masters implementation is just different than the others discussed here (but I think Lars may have made reference to a similar approach in his write-up - I did not look into those other designs yet). What really qualifies it as uniqueseems very much the same idea, just using switches to turn off charging and discharging circuits, and an amplifier before the ADC.The concept was not something that I was familiar with, but the general problem was something that was lurking in my thoughts of using a micro to time the events by counting cycles, and how I was going to overcome this problem.