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

suj and 2 Guests are viewing this topic.

Offline lars

  • Regular Contributor
  • *
  • Posts: 132
  • Country: se
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #25 on: August 16, 2017, 08:40:22 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.

The patent from 2012 looks very similar to the PICTIC II design from 2010
http://www.ko4bb.com/doku2015/lib/exe/fetch.php?media=precision_timing:pictic_ii_schematic.pdf
see page two with a current source Q1, diode D5 and capacitor C116 and two switches through D1 and D2 going to an op-amp and ADC!

Of course these designs are better than mine but not as simple. I have not yet seen any just using the diode, series resistor, capacitor and discharging resistor (except those clearly based based on my design as Nick Sayers and the Elektor GPSDO).

Lars
 

Offline lars

  • Regular Contributor
  • *
  • Posts: 132
  • Country: se
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #26 on: August 16, 2017, 08:44:48 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


I really like Kasper's article and have read it closely. I even at a time wondered if I should change to his design but still think my are simpler and easier with enough resolution and stability. I also have worked a lot to prove that my design is robust with regard to the sync between the phase detector and timer1 readings. Testing a new design, including all kind of modes, user cases and environment takes time.

Lars
 

Offline lars

  • Regular Contributor
  • *
  • Posts: 132
  • Country: se
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #27 on: August 16, 2017, 09:20:06 pm »
Hello all,

And thanks for the positive comments.

About the pdf's:
Probably in the long term I should publish this somewhere else if the design works well for more people. Pdf-merge seems to be a good way to combine them even if I haven´t tried it (I have a complete pdf that took some time to divide   ;)? ) .

About rubidium or OCXO:
I have my rubidium powered all times. Of course we have power interrupts. The longest continuous run without an interrupt has been above 30 million seconds on the internal time counter, that is almost a year!

I was happy to buy two LPRO rubidiums cheap five years ago so I have one spare that I only power up seldom. Now it has been on for a couple of months as I have done a lot of tests and wanted a second opinion from another rubidium. The reason I use the rubidium is that it is by far the most stable oscillator I have in hold mode (free running). For me that want to test other GPSDO´s this is the best choice. My continuously powered rubidium has very low drift. From the 3 hour logs the last 9 months I can see a drift of 700 dac_value units, that is about 1.2E-11 for 270 days so about 4E-14/day. Worse is the temperature coefficient that is about 8E-13/C but in hold mode the temperature is compensated so probably within +-2E-13/C. The worst problem is the air pressure sensitivity of about 7E-14/mbar. I have a pressure sensor BMP180 built in but it doesn´t compensate. The air pressure is mostly a problem for me at long runs that are week long, as the air pressure varies slowly.

For most people I guess an OCXO based GPSDO is best. It will give about 9-11 digits of frequency accuracy. For those that want even lower power of course an VCTCXO based with e.g. DOT050V is a very good choice but only gives 8-9 digits for short times (seconds to minutes).

A lot of people think OCXO based GPSDO's take too long time to start up. If you want the GPSDO to lock in 5 minutes that is just the warm-up time for the OCXO, but remember that even with a retrace of 10ppb after being off for a long time, you will never be off more than 10ppb, as the old DAC value is stored in the EEPROM. So you will have 8 digits and probably better within 5 minutes, but no locked LED. If you set a short time constant say 20 seconds the locked LED will come on within just minutes after warm-up. This will of course give more ripple on the frequency but not worse than other designs that promise short start-up times. If you really want very good frequency accuracy you need to have long time constants mostly depending on the 1PPS stability that limits this. Another thing to remember is that I have used a quite conservative lock time of five time constants to be sure the loop has settled. The frequency probably is stable after half of that time at most start-ups.

Lars
 
The following users thanked this post: cdev, Gyro

Offline lars

  • Regular Contributor
  • *
  • Posts: 132
  • Country: se
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #28 on: December 04, 2017, 07:58:06 pm »
Going through the last weeks time-nuts archive I found that Stanford has updated the FS740 GPSDO/counter/generator manual (that some may have downloaded an earlier version from the links on page 15 of my instruction).
http://www.thinksrs.com/downloads/PDFs/Manuals/FS740m.pdf

The updated manual now contains the complete BOM and 20 pages of schematics last in the manual. For me that are curious it is always interesting to see commercial designs.

Here you can see how they have done their Time interval counter with 1ps resolution. They also seems to combine a 16+12bit DAC to steer the oscillator.

Read also the comments by Attila in the time nuts archive here:
https://www.febo.com/pipermail/time-nuts/2017-November/107608.html

Lars
 
The following users thanked this post: BradC

Offline Qw3rtzuiop

  • Regular Contributor
  • *
  • Posts: 60
  • Country: de
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #29 on: May 11, 2018, 09:08:28 am »
Thanks for your efforts! I build the minimal design on a protoboard with one of those 10$ OCXOs from ebay.
It worked well but i can only test it with my 53131a with the HS OCXO.
Now i started to design a pcb for that. If it works i want to add a distribution amplifier.
 

Offline lars

  • Regular Contributor
  • *
  • Posts: 132
  • Country: se
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #30 on: May 22, 2018, 07:33:52 pm »
Hello Qw3rtzuiop,

Nice to see a PCB design of my GPSDO. It is always possible to have a lot of comments. Both on the layout and also on the schematic.
But my advise is just to go on if not someone find something really stupid you should change.

I decided not to do a PCB design for several reasons. The first is that everyone have different requirements on for example output ports, oscillator pinout and connectors. You have a point in having a distribution amplifier. I had salvaged boxes from automated test stations I designed long ago (as can be seen in the instruction). They had three BNC on one side appropriate for the 10MHz outputs so my prototypes uses parallel 74HC or AC04 for buffering with square waves out (+about 40-50ohm in series). Second: I have always been fortunate to have good PCB designers at my side in my professional job. So in a case like this I had just told them that I wanted a good ground plane and that the oscillator and buffer should be placed so crosstalk from the Arduino and GPS module power and signals were minimized. A third reason is that I am struggling with my health that is also a reason I am not very active on EEVblog neither reading nor writing.

Lars
 
The following users thanked this post: cdev

Offline lars

  • Regular Contributor
  • *
  • Posts: 132
  • Country: se
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #31 on: September 07, 2018, 07:39:01 pm »


I feel a little guilty to haven’t answered PM’s and probably will not do but instead do some general comments here. As I said my health is not well – frankly I am suffering cancer and treatments are tough. So for a long time I haven’t done something to my GPSDO project.

My LPRO rubidium based GPSDO is on all time and a little sporadic I check it. It is still very stable and due to the internal data logging up to 18 days (every third hour) I can follow the drift of the LPRO. So after 5-6 years I can see drifts below 1E-13/day (averaged over long times).

One question is if I have an updated software and the answer is no. Actually I have not found or heard of any bug so severe that I have had a reason to do any changes. I have a long list of improvements but as testing is so important I would like to have a very good reason to do changes.

Some ask about LCD and my answer is again about robustness and also that it is so many different GPS module so I recommend adding the display to a separate processor that also reads the GPSDO controllers serial line. Others ask about changing components but again robustness. Some ask about changing processor but that is really something for everybody interested in experimenting except me.

Back in March I was a little bit better and decided to start two of my OCXO based GPSDO’s to get more data and charts as I had seen a lot of more or less strange comment in other GPSDO thread here on EEVblog. I decided to take two GPDO that I know had OCXO’s with a lot of retrace, so not the best. One OCXO with about +10ppm retrace for a month and the other with -10ppm instead. Both OCXO were STP2187 double oven from eBay. I also had seen that at least one of them had jumps in the E-10 range even if with days or longer between.

As the Trimble thunderbolt is very admired by time-nuts I decided to setup the OCXO time constants to give about the same ADEVs as a non-optimized thunderbolt with TC 100 seconds. That is to give an ADEV at about 1E-11 at 100 sec. This also gives the frequency accuracy as I see from e.g. the leapsecond .com tests that give frequency stabilities and accuracies of about 1E-10.
http://www.leapsecond.com/pages/tbolt-tc/   
http://www.leapsecond.com/pages/tbolt-8d/
As my GPSDO is not as good as the thunderbolt I chose 200s TC, so settling time will be about twice as long is my guess. One of my GPSDO’s had a NEO 6M and the other an LEA6T (timing receiver) as the LEA can be set for position mode I tried that first. This also showed that the ADEVs at 100 seconds were similar and at about 1E-11 for both the NEO and LEA. With a good survey and timing mode it was possible to get ADEVs in the higher -12 range, maybe a factor of two better for the LEA.
 
One of the things I wanted to test was how long time does it take to get the frequency accuracy in this case. My goal were 1E-10. After about 30 minutes both GPSDO were within 1E-10 measured with a TAPR TICC versus the rubidium GPSDO. It took about an hour to get the locked LED ON. This shows the conservative locked spec in the Arduino program but I prefer this instead of the other way. As the locked condition requires the phase/time to be within 100ns (low pass filtered with 16 seconds) for at least 5 time constants this means that the frequency should be within 100ns/200secs * 5 that is 1E-10 so on par with my goal of 1E-10 in this case. But if you look on a PI-loop with the damping I have set, that also corresponds to the default setting of the Thunderbolt it will converge in a smooth manner that gives better results. I have had that it is a drawback to have just one time constant and no switching of time constant or FLL locking in the beginning but I am not sure it is really a problem from a settling time point either. Having just one time constant and the classic third order PI-loop are very robust in my opinion. Having seen comments on time nuts with HP 38xx GPSDO’s giving strange results after jumps also gives these conclusions as a jump recovers nice on my design.

During the month I had the GPSDO’s on I had one jump that were enough large to turn off the locked LED. As I said the locked LED requires the time to be within 100ns. If the OCXO jumps 2E-10 and the time constant is 200seconds the loop will go away just below 100ns so the jump was above 2E-10.

I also had another occasion with the locked LED off that I traced to the signal from the PPS but don’t know if it were the GPS module or antenna. I should say I at both of these occurrences had a terminal program that logged the output of the GPSDO serial line otherwise I only afterwards could have seen from the logged 18 days data that the GPSDO were unlocked during 3 hours.

Lars
 
The following users thanked this post: jpb, 3apw, mycroft, Theboel, imo

Offline Bryan

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: ca
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #32 on: September 13, 2018, 09:10:23 am »
Hello:

Is there any other recommendations for a GPS receiver module, I note you recommend the Neo7M, but wondering if there are others that can be considered. Are some better suited to supplying a frequency reference. There is also the 8M/T model(s) and the Venus, but not sure as to what advantages/disadvantages they have. I was going to start with a old Jupiter-T TU60-D120 module that I have as it has a 1pps output.

Jupiter-T datasheet
6.1.1 Pin J1-6: 1PPS output This signal is a positive going pulse with the leading edge being the point of measurement for synchronisation with the GPS satellite transmissions. The pulse width is approximately 26 ms.

Regards
-=Bryan=-
 

Offline t1d

  • Frequent Contributor
  • **
  • Posts: 599
  • Country: us
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #33 on: September 13, 2018, 09:37:58 am »
You might enjoy this series, on the topic...
Scullcom Hobby Electronics # 35 - Design & Build a GPS locked Frequency Reference Standard

Also at his website.
 

Offline lars

  • Regular Contributor
  • *
  • Posts: 132
  • Country: se
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #34 on: September 13, 2018, 05:59:21 pm »
Hello:

Is there any other recommendations for a GPS receiver module, I note you recommend the Neo7M, but wondering if there are others that can be considered. Are some better suited to supplying a frequency reference. There is also the 8M/T model(s) and the Venus, but not sure as to what advantages/disadvantages they have. I was going to start with a old Jupiter-T TU60-D120 module that I have as it has a 1pps output.

Jupiter-T datasheet
6.1.1 Pin J1-6: 1PPS output This signal is a positive going pulse with the leading edge being the point of measurement for synchronisation with the GPS satellite transmissions. The pulse width is approximately 26 ms.

Regards


Hello Bryan,

As you indicate the new timing modules from uBlox like the 8-series and the Venus 838 could be better choices. I prefer the uBlox.
I only recommended the NEO7M as it were cheap, available and is easy to use and at the same time gives good performance that I have measured. For simple position receivers with 1PPS I guess the ones from Adafruit is worth looking for even if not state of art for a GPSDO.

I am also curious about the Furano GT87 and hope that somebody will test it and give ADEV and MDEV's.

The nice thing with Lars GPSDO is that almost every GPS module with a 1PPS out can be used if the amplitude is 3.3-5V and the 1PPS is accurate on the positive going flank. The pulse width can be down to 10uS and probably even shorter. A square wave also works.

As you have a Jupiter-T I would definitely use that first. I started with even older and more jittery GPS modules and without timing mode and it worked. Of course a modern timing receiver will give better frequency accuracy and ADEV's but the loop should settle in the same time.

Lars
 

Offline texaspyro

  • Super Contributor
  • ***
  • Posts: 1296
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #35 on: September 13, 2018, 08:33:16 pm »
Does anybody sell a Lars board (bare or stuffed) or have some Gerbers available?   I've been wanting to do one but have not had the time available.  Lady Heather does have some support for it.

I have a couple of GT87's.   They are probably the best GPS out there in regards to the 1PPS.   Their sawtooth correction range is a couple of ns and the span of the 1PPS jitter is in the 5 ns range.
 

Offline Bryan

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: ca
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #36 on: September 14, 2018, 10:31:45 am »

Hello Bryan,

As you indicate the new timing modules from uBlox like the 8-series and the Venus 838 could be better choices. I prefer the uBlox.
I only recommended the NEO7M as it were cheap, available and is easy to use and at the same time gives good performance that I have measured. For simple position receivers with 1PPS I guess the ones from Adafruit is worth looking for even if not state of art for a GPSDO.

I am also curious about the Furano GT87 and hope that somebody will test it and give ADEV and MDEV's.

The nice thing with Lars GPSDO is that almost every GPS module with a 1PPS out can be used if the amplitude is 3.3-5V and the 1PPS is accurate on the positive going flank. The pulse width can be down to 10uS and probably even shorter. A square wave also works.

As you have a Jupiter-T I would definitely use that first. I started with even older and more jittery GPS modules and without timing mode and it worked. Of course a modern timing receiver will give better frequency accuracy and ADEV's but the loop should settle in the same time.

Lars

Thanks Lars, used to have a UCCM and Trimble but gave them up as unfortunately I have a poor view of the sky. But have the bug again so wanted to try a project for the fall, will give the Jupiter a try. One advantage I see with the newer modules is they can see more satellites, and for the most part should have better timing.
-=Bryan=-
 

Offline Bryan

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: ca
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #37 on: September 14, 2018, 10:34:15 am »

I have a couple of GT87's.   They are probably the best GPS out there in regards to the 1PPS.   Their sawtooth correction range is a couple of ns and the span of the 1PPS jitter is in the 5 ns range.

Interesting, I haven't seen the GT87's for sale in many places, at least not on Ebay. Digi-Key, but not very cheap though.
-=Bryan=-
 

Offline texaspyro

  • Super Contributor
  • ***
  • Posts: 1296
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #38 on: September 14, 2018, 05:02:49 pm »
Here is a place in Germany:
https://www.buerklin.com/en/gnss-module-und-gps-module/p/64s3196

The GT-8736 is the module on a breakout board.   
 

Offline Bryan

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: ca
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #39 on: September 14, 2018, 06:26:26 pm »
Thanks, for the link, Digikey has a couple which is probably comparable in price. Still pricey compared to the Neos,

https://www.digikey.ca/products/en/rf-if-and-rfid/rf-receivers/870?k=furuno
-=Bryan=-
 

Offline jpb

  • Super Contributor
  • ***
  • Posts: 1620
  • Country: gb
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #40 on: September 14, 2018, 08:12:15 pm »
Digikey seem only to sell the module or the very expensive development kit.

The GT-8736 module looks more useful at a reasonable price. The Furano web site doesn't have much info on the module except it reveals that it emulates the Motorola M12+ on which there is a lot of info:
https://www.cnssys.com/files/M12+UsersGuide.pdf

 

Offline texaspyro

  • Super Contributor
  • ***
  • Posts: 1296
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #41 on: September 14, 2018, 09:01:57 pm »
The Furano web site doesn't have much info on the module except it reveals that it emulates the Motorola M12+ on which there is a lot of info:
https://www.cnssys.com/files/M12+UsersGuide.pdf

The GT-87 can speak NMEA, M12, or Furuno ESIP protocols.   Lady Heather can switch between them.  The ESIP protocol seems to be slightly better than M12... it can report the sawtooth error to sub-nanosecond resolution.  M12 is limited to nanoseconds (integer value). 

The GT-87 docs say the the GT-87 can also support Furuno PFEC protocol, but this puts it into a funky, undocumented binary protocol that effectively bricks the unit... Heather blocks all attempts to enter PFEC mode.
 
The following users thanked this post: jpb

Offline Bryan

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: ca
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #42 on: September 15, 2018, 10:39:34 am »
Texaspyro mentions the GT-87 has superior 1pps performance, but not sure how the GT-8736 would perform.
-=Bryan=-
 

Offline texaspyro

  • Super Contributor
  • ***
  • Posts: 1296
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #43 on: September 15, 2018, 05:56:43 pm »
Texaspyro mentions the GT-87 has superior 1pps performance, but not sure how the GT-8736 would perform.

The 8736 is jus the GT87 on a board with the M12 form factor/pinout.   It's the one I did the testing on.
 

Offline Miti

  • Frequent Contributor
  • **
  • Posts: 451
  • Country: ca
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #44 on: September 30, 2018, 07:18:44 pm »
Hey Lars,

I made your GPSDO on a breadboard and I can't get it to lock. Please see attached. I assume the schematic is good and I verified everything with the oscilloscope.
I use Bliley NV47A1282.OCXO. The only problem with this OCXO is that it seems to have an internal voltage divider that keeps the VFC pin around 2.8V. I had to add a 100K resistor to GND to bring the control voltage below 1.54V (that's the VFC for 10MHz on my OCXO) with h1.
Could you give me a hint?

Edit: It locked few times but it is unstable. It keeps saying "Missing 10MHz?".
« Last Edit: September 30, 2018, 10:42:55 pm by Miti »
That big spark at power up was by design!
 

Offline Miti

  • Frequent Contributor
  • **
  • Posts: 451
  • Country: ca
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #45 on: October 01, 2018, 03:58:52 am »
Success, it locked!
However, it doesn't lock with the calculated gain which is 100. I had to increase it to 200. I also get a lot of "Missing 10MHz?" before it gets close to the correct DAC.
That big spark at power up was by design!
 

Offline lars

  • Regular Contributor
  • *
  • Posts: 132
  • Country: se
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #46 on: October 01, 2018, 08:47:54 pm »
Success, it locked!
However, it doesn't lock with the calculated gain which is 100. I had to increase it to 200. I also get a lot of "Missing 10MHz?" before it gets close to the correct DAC.


Hello Miti,

good that it locked but you have to blame me and my instruction that you have "missing 10MHz" due to insufficient hardware instructions on the 10MHz oscillator. The small section on the 10MHz oscillator doesn't mention square wave versus sine wave outputs from the OCXO. You have an OCXO with sinewave out. I have tested several with sinewave with good result. What I have missed in the instruction is that if the output is sinewave it is critical to have bias on the 10Mhz input. That is to add for example two 100kohm resistors as pullup and pulldown to ground and +5V respective on the HC390. This gives a DC bias of 2.5V. So my first suggestion is to add 100kohm from HC 390 pin 1 to pin 16 (+5V) and another from pin 1 to GND.

Hey Lars,

I made your GPSDO on a breadboard and I can't get it to lock. Please see attached. I assume the schematic is good and I verified everything with the oscilloscope.
I use Bliley NV47A1282.OCXO. The only problem with this OCXO is that it seems to have an internal voltage divider that keeps the VFC pin around 2.8V. I had to add a 100K resistor to GND to bring the control voltage below 1.54V (that's the VFC for 10MHz on my OCXO) with h1.
Could you give me a hint?

Edit: It locked few times but it is unstable. It keeps saying "Missing 10MHz?".

For the EFC input to Bliley NV47A1282.OCXO you have done exactly correct to add a resistor , in this case 100k to ground. Later you can probably test to have even a little lower resistance depending how the oscillator drift. If you have lower resistance the gain will change so you have to test it again.

As the output impedance of the PWM is about 78Kohm (39k+39k) and the input impedance on the OCXO according to the data sheet is 10-100kohm you get a voltage divider to the internal OCXO ref that you say is 2.8V. In this case you have an OCXO range of 0-4V. Some OCXO as for example the 8663 type might have above 5V EFC. In this case you need a resistor to a higher voltage. I have often used a 10k trimpot from the Vref on The OCXO to GND on the OCXO. Some OCXO's don't like as low a load of 10kohm on the Vref so that could sometimes be a problem but in very few cases.

-

I like your screen shoots. If you add the two 100kohm resistors (values not so critical, even a factor of ten will work to get 2.5VDC as long as the values are the same, if the OCXO has no coupling capacitor on the output you might need to add for example 10nF in series), it will be interesting to see a screen shoot of h1 and h65535 to see the diff_ns to see why you get instability with a gain factor of two wrong. Of course it could be due to the missing 10MHz that that I hope have gone away.

Lars
 

Offline Miti

  • Frequent Contributor
  • **
  • Posts: 451
  • Country: ca
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #47 on: October 02, 2018, 01:43:28 am »
Hi Lars and thank you for the quick response!

It stayed locked for almost one day now. One thing I forgot to add regarding the sine wave output, I used a second HC4046 to make it square like in Brooks Shera's schematic, except for the 10K and 50K resistors, I injected the full 1.5Vpp to the input of HC4046 through 100nF capacitor. I've attached that part of the schematic. My 10MHz should be very reliable square wave. I observed that after power up, during and after warm up period, when TIC is high (500+) I get that message "Missing 10MHz?" so it must be something in the software. One thing that seems to have made it better, and I don't pretend I know why and what all the numbers mean, is when I changed the TIC_Offset from 500 to 650.
« Last Edit: October 02, 2018, 01:50:13 am by Miti »
That big spark at power up was by design!
 

Offline lars

  • Regular Contributor
  • *
  • Posts: 132
  • Country: se
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #48 on: October 02, 2018, 08:22:52 pm »
Hello Miti,

As you have used Shera's sine to square circuit it shouldn't be the problem I suggested in hardware. So now I am more confused!

The problem I see is that the "missing 10MHz" comments just is written instead of the TIC_value 1023 that is the ADC0 value read in the very short interrupt routine in the beginning of the program. The ADC0 reading is triggered by the 1PPS input.

So missing 10MHz must be because the pulse on the HC4046 output is too long and gives maximum ADC value. As the HC4046 is set high by the 1PPS and reset by the divided down 10MHZ to 1MHz the 1MHz if it isn't missing shouldn't give more than a 1us (1000ns). If the diode+3.9k+1nF and discharge resistor 10M are ok this shouldn't give more than around 970+-40 maximum ADC reading. With h1 or h65535 you should see the ADC readings changing fast on the filtx10 value but multiplied by 10 so if the filtx10 value is 6500 it is an ADC value of 650. The second row with ns values around zero (in locked condition) has some math on them and also subtracts the TIC_offset. Note: the filtx10 is only the ADC value in non locked condition as in the locked condition it is a low pass filtered value.

It is also intersting that now you don't seems to get missing 10MHz? Have you let the GPSDO cool down and restarted to see if you get the problem again?


About the TIC_offset it just and offset on the ADC reading. So if the TIC_offset is 500 and you have an ADC reading of 500 the input to the PI-loop will be 0 and no shift of the DAC value will happen. If you change the TIC_offset it will strive to 650 ADC reading instead. So if you change it on the fly you will see a reading on the ns value on the serial monitor of -150ns as the ADC reading is around 500 and the TIC_offset higher at 650.

Would be intersting to see what happens if you change the TIC_offset back to 500. As this is more than 100ns difference you will loose lock. But it should only take about 5-10 time constant to get lock again.

I have selected 500 as TIC_offset as that is around the mid point of the ADC range 0-1023.

Lars



 

 

Offline Miti

  • Frequent Contributor
  • **
  • Posts: 451
  • Country: ca
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #49 on: October 03, 2018, 02:07:42 am »
Hey Lars,

I attached the h1 and h65535 screenshots.
One weird thing I observed, I would expect the voltage on C1 to have a base line of 0V with some short pulses. Instead, it stays around 200+mV with pulses. See the attache scope shots. Interesting thing is that if I disconnect the cap from the ADC input, everything is as expected so I thought there may be a leakage from the ADC input. The ADC input however stays flat at 0V. Only when they are connected together, the baseline jumps to over 200mV. This is SF ... or electronics.   :-DD Could you check your circuit?

Edit: Just to be clear, when I say I disconnect C1 from A0, I mean that I separate R1, R2, C1 from A0, see the cut in the attached minimum working schematic.
« Last Edit: October 03, 2018, 02:40:15 am by Miti »
That big spark at power up was by design!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf