Author Topic: Lars DIY GPSDO with Arduino and 1ns resolution TIC  (Read 265595 times)

0 Members and 1 Guest are viewing this topic.

Offline larsTopic starter

  • Regular Contributor
  • *
  • Posts: 132
  • Country: se
Lars DIY GPSDO with Arduino and 1ns resolution TIC
« on: August 11, 2017, 09:18:19 pm »
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 display

Why 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

Offline larsTopic starter

  • Regular Contributor
  • *
  • Posts: 132
  • Country: se
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #1 on: August 11, 2017, 09:19:50 pm »
Pages 8-18 of instruction
 
The following users thanked this post: cdev, Fennec, THDplusN_bad, Dbldutch, Johnny B Good, sgi199, ducus

Offline larsTopic starter

  • Regular Contributor
  • *
  • Posts: 132
  • Country: se
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #2 on: August 11, 2017, 09:23:18 pm »
Last pages 19-21

Lars
 
The following users thanked this post: cdev, Fennec, THDplusN_bad, Dbldutch, AlcidePiR2, Johnny B Good, sgi199, ducus

Offline Gyro

  • Super Contributor
  • ***
  • Posts: 9392
  • Country: gb
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #3 on: August 12, 2017, 07:51:04 pm »
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.
Best Regards, Chris

"Victor Meldrew, the Crimson Avenger!"
 
The following users thanked this post: sgi199, ducus

Offline jpb

  • Super Contributor
  • ***
  • Posts: 1771
  • Country: gb
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #4 on: August 12, 2017, 10:12:15 pm »
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.
 

Offline edpalmer42

  • Super Contributor
  • ***
  • Posts: 2257
  • Country: ca
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #5 on: August 12, 2017, 11:10:52 pm »
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
 
The following users thanked this post: Johnny B Good

Offline jpb

  • Super Contributor
  • ***
  • Posts: 1771
  • Country: gb
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #6 on: August 13, 2017, 09:18:22 am »
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
Thanks, 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.
 

Offline jpb

  • Super Contributor
  • ***
  • Posts: 1771
  • Country: gb
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #7 on: August 13, 2017, 09:37:33 am »
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.)
 
The following users thanked this post: W0MPM

Offline Gyro

  • Super Contributor
  • ***
  • Posts: 9392
  • Country: gb
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #8 on: August 13, 2017, 12:00:16 pm »
Quote
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.

The 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.
« Last Edit: August 13, 2017, 12:04:47 pm by Gyro »
Best Regards, Chris

"Victor Meldrew, the Crimson Avenger!"
 
The following users thanked this post: jpb

Offline retrolefty

  • Super Contributor
  • ***
  • Posts: 1648
  • Country: us
  • measurement changes behavior
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #9 on: August 13, 2017, 02:11:19 pm »
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?   :-DD

 
 

Offline Gyro

  • Super Contributor
  • ***
  • Posts: 9392
  • Country: gb
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #10 on: August 13, 2017, 03:26:46 pm »
Quote
Main problem is that I don't really require a bench 10Hz standard

It looks as if you're a Million times less susceptible than others.  ;)
Best Regards, Chris

"Victor Meldrew, the Crimson Avenger!"
 
The following users thanked this post: cdev

Offline pigrew

  • Frequent Contributor
  • **
  • Posts: 680
  • Country: us
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #11 on: August 14, 2017, 01:26:17 am »
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.
 

Offline cdev

  • Super Contributor
  • ***
  • !
  • Posts: 7350
  • Country: 00
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #12 on: August 14, 2017, 03:28:05 am »
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..   
« Last Edit: August 14, 2017, 01:58:30 pm by cdev »
"What the large print giveth, the small print taketh away."
 

Offline pigrew

  • Frequent Contributor
  • **
  • Posts: 680
  • Country: us
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #13 on: August 14, 2017, 04:13:59 am »
Have you seen the Navsark, 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..

I 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.
« Last Edit: August 14, 2017, 04:49:23 am by pigrew »
 

Offline texaspyro

  • Super Contributor
  • ***
  • Posts: 1407
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #14 on: August 14, 2017, 04:47:57 am »
How stable that is, if it is locked to GPS I don't know

It isn't locked to anything...   
 

Offline metrologist

  • Super Contributor
  • ***
  • Posts: 2196
  • Country: 00
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #15 on: August 14, 2017, 06:25:23 am »
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
 

Offline Gyro

  • Super Contributor
  • ***
  • Posts: 9392
  • Country: gb
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #16 on: August 14, 2017, 09:03:55 am »
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.
Best Regards, Chris

"Victor Meldrew, the Crimson Avenger!"
 

Offline retrolefty

  • Super Contributor
  • ***
  • Posts: 1648
  • Country: us
  • measurement changes behavior
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #17 on: August 14, 2017, 02:52:47 pm »
Quote
Main problem is that I don't really require a bench 10Hz standard

It looks as if you're a Million times less susceptible than others.  ;)

Good one    :-DD

Typos can be so fun on a technical site.    :-+
 

Offline metrologist

  • Super Contributor
  • ***
  • Posts: 2196
  • Country: 00
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #18 on: August 14, 2017, 07:24:27 pm »
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.

That sounds like a no... 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.
 

Offline pigrew

  • Frequent Contributor
  • **
  • Posts: 680
  • Country: us
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #19 on: August 14, 2017, 08:57:05 pm »



That sounds like a no... 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.


Why not use a SR latch/flip flop like the SN74LS279 or SN74*74? Are they higher jitter?
 

Offline metrologist

  • Super Contributor
  • ***
  • Posts: 2196
  • Country: 00
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #20 on: August 14, 2017, 10:30:07 pm »



That sounds like a no... 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.


Why not use a SR latch/flip flop like the SN74LS279 or SN74*74? Are they higher jitter?

I'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?).
 

Offline albert22

  • Regular Contributor
  • *
  • Posts: 177
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #21 on: August 15, 2017, 04:58:42 pm »
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.pdf

Thanks for sharing all your data
 

Offline metrologist

  • Super Contributor
  • ***
  • Posts: 2196
  • Country: 00
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #22 on: August 16, 2017, 01:35:36 pm »
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.
 

Offline jpb

  • Super Contributor
  • ***
  • Posts: 1771
  • Country: gb
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #23 on: August 16, 2017, 06:20:21 pm »
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.
2012 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.
 

Offline metrologist

  • Super Contributor
  • ***
  • Posts: 2196
  • Country: 00
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #24 on: August 16, 2017, 07:07:51 pm »
Yes, there are many patents dating back to the 60's and many are referenced:

https://www.google.com/patents/US8324952

Masters 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 unique  :-// seems 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.
« Last Edit: August 16, 2017, 07:33:37 pm by metrologist »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf