Author Topic: A SIMPLE TIME INTERVAL COUNTER FOR DMTD WORK  (Read 5126 times)

0 Members and 1 Guest are viewing this topic.

Offline 5065AGuruTopic starter

  • Frequent Contributor
  • **
  • Posts: 355
  • Country: us
A SIMPLE TIME INTERVAL COUNTER FOR DMTD WORK
« on: January 01, 2021, 11:58:09 pm »
Well it’s finally ready to share!
This counter is perfect for use used with DMTD systems to free-up more expensive counter for other work.
It’s called the ProTIC and Tom Van Baak designed the code which is available free at
http://leapsecond.com/prop/index.htm#protic
Please read the info on his page!

It utilizes the Parallax Propeller Mini and the FDTI friend.
The Propeller mini can be bought direct from Parallax or several other distributers
for around $24.99 and the FDTI friend is from Adafruit and others for around $14.99.
Some more details are at Tom’s page but the main ones for me are:
valid readings from (and including) 0.0 ns, up to 10.0 s
No dead time issues like the HP 53131/132 and SR620
Easily interfaces to USB or RS232
12.5ns resolution
10 digits
115200 baud
Low cost and minimal construction required.

Here are pictures of Toms prototype and also of the one I installed in my DMTD unit.
The bracket with the BNCs was just for testing and was removed prior to installation.
I configured mine for optoisolation and both RS232 and USB outputs.
Also here are diagrams of different hookup versions.
The 1K resistors on the inputs allow 5V inputs, also not shown are 50 Ohm loads on the
input BNCs.
Mine are switchable so I can either use 50 Ohms or not.

You might sneer at the resolution but remember the DMTD multiplication factor!
12.5 ns resolution equates to a 1.25 femtosecond resolution after the multiplication.
(10 Mhz with 1Hz offset)
The result is that the last few digits are essentially in the noise floor and not
important!

NOTE! THE DIAGRAMS SHOW PIN P15 AS THE SERIAL OUT, TOM HAS SWITCHED THE OUTPUT PIN TO P14 SO USE THAT INSTEAD!

I have run several weeks of plots with the ProTIC and several different Dual Mixer units
against very good Quartz as well as comparing HP 5065A units, and it has performed just as
envisioned.

The reset button is not really needed but it will reset the unit and output an ID string.
This is handy to check if you have the comm. set up correctly.
Tom programmed the prototypes for me and once I have a chance to program my first Propeller Mini
I’ll share the procedure for that.

Lastly here is a PIX of an old Sulzer linear phase comparator I got at a Gov. auction
in the early 70s. I used it in my early years of playing with frequency standards!
It would compare 2 100Khz signals and you used one of those old impact recorders to
record the phase. Years back I gutted it an installed a simple TIC circuit for DMTD use.
Worked great but the TIC developed problems and was not open source so it languished.
I repurposed it again with Tom's ProTIC and the Simple Dual mixer in the same chassis and
it lives again!

Cheers,

Corby
« Last Edit: January 11, 2021, 05:02:09 pm by 5065AGuru »
 
The following users thanked this post: cdev, ch_scr, FriedLogic, kpjamro

Offline tkamiya

  • Super Contributor
  • ***
  • Posts: 2178
  • Country: us
Re: A SIMPLE TIME INTERVAL COUNTER FOR DMTD WORK
« Reply #1 on: January 02, 2021, 02:09:00 am »
WOOOHOOO!

This is a great news.  I found Parallax company store to be the least expensive especially when shipping gets involved.  FDTI board is available from Amazon.
 

Offline notfaded1

  • Frequent Contributor
  • **
  • Posts: 559
  • Country: us
Re: A SIMPLE TIME INTERVAL COUNTER FOR DMTD WORK
« Reply #2 on: January 02, 2021, 04:14:42 pm »
This is great.  The Propeller is a pretty neat chip even if not common for how it works.  Hopefully I'll have a couple going soon too.  I see the pix are great!  What is channel C for?  Isn't this a two channel start and stop?
Bill
« Last Edit: January 02, 2021, 04:16:44 pm by notfaded1 »
.ılılı..ılılı.
notfaded1
 

Offline 5065AGuruTopic starter

  • Frequent Contributor
  • **
  • Posts: 355
  • Country: us
Re: A SIMPLE TIME INTERVAL COUNTER FOR DMTD WORK
« Reply #3 on: January 02, 2021, 04:31:44 pm »
Channel C is not used for this application.

Cheers,

Corby
 
The following users thanked this post: notfaded1

Offline tkamiya

  • Super Contributor
  • ***
  • Posts: 2178
  • Country: us
Re: A SIMPLE TIME INTERVAL COUNTER FOR DMTD WORK
« Reply #4 on: January 09, 2021, 08:05:05 pm »
All necessary parts have arrived. From left to right, Parallax programmer, FTDI friend, and finally the Parallax board itself. 

I've placed a 4 pin header pins for size.  They are TINY!  Wow. 

An only thing I wish they'd have done is to put a mounting holes, especially on FTDI friend.  There's really no good way to expose the USB connector to outside of the case and securely mount the board.  Small is nice but usability is also important.  I intend to build this into a small aluminum die-cast box.

I've been experimenting this DMTD for a while.  Noise intrusion and interference from the very signal we are using are major problem.  It shows up as wavy line in Adev and the graph will rise.  I'm going to shield every component.
 

Offline tkamiya

  • Super Contributor
  • ***
  • Posts: 2178
  • Country: us
Re: A SIMPLE TIME INTERVAL COUNTER FOR DMTD WORK
« Reply #5 on: January 09, 2021, 10:36:58 pm »
I have it working.  Couple things to note:

CAUTION:  Do not install Parallax IDE from google.  It is for an old basic stamp. 

Parallax IDE is here:
https://www.parallax.com/package/propeller-tool-software-for-windows-spin-assembly-2/

Code is here:
http://leapsecond.com/prop/index.htm#protic

On Corby's post, the serial output is said to be pin 15, but it is actually pin 14 according to /tvb's information.  In my case, P14 worked, so I went with it. 

By clicking on code, IDE will be launched and code will show.
Click on Load EEPROM to load.

During install of the IDE, you will receive an error on parallax.tff  I just ignored it and skipped.  It seem to work fine.  In my case, Norton told me there is a severe risk.  I ignored it.

When you plug in the little programmer, "Propeller Plug", be careful of the orientation.  Programmer faces AWAY from the board.  There are silkscreen on both boards.  Be sure VSS aligns with VSS.

Unlike Arduino, Parallax boards must be powered up separately to program.  I connected 9V battery on Vin and GND.  The little programmer board does NOT power the Propeller board.  Vin tolerates 9V.

Thanks to Corby and /tvb for all the hard work.  I'm so glad this is working for me.
 
« Last Edit: January 09, 2021, 10:41:46 pm by tkamiya »
 
The following users thanked this post: FriedLogic

Offline tkamiya

  • Super Contributor
  • ***
  • Posts: 2178
  • Country: us
Re: A SIMPLE TIME INTERVAL COUNTER FOR DMTD WORK
« Reply #6 on: January 10, 2021, 05:16:23 am »
Here are outside and inside photos.

As I was complaining before, there is no real good way to mount a Propeller 1 board without having a motherboard.  So I used a heatshrink tube over it and just stuffed it in.  Serial output from the board goes to TTL/RS232 converter board that are available cheaply online.  (I bought mine from Amazon)  I decided on serial communication as my lab is already wired for it.  Inside of the box is copper taped.  I had planned something a bit different but ended up not doing it, so this is not needed.

 

Offline guenthert

  • Frequent Contributor
  • **
  • Posts: 712
  • Country: de
Re: A SIMPLE TIME INTERVAL COUNTER FOR DMTD WORK
« Reply #7 on: January 12, 2021, 05:51:14 pm »
> 12.5ns resolution

     That slightly awkward number will be the result of the 80MHz system clock (PLL multiplied from a 5MHz external crystal or oscillator).  The P8X32A Propeller happily runs at 100MHz (Parallax sells 6.25MHz crystals), so if you're willing to make your own board (the chip is available in SMT as well as thankfully still TTH packages), then you could get down to 10ns resolution.
 

Online edpalmer42

  • Super Contributor
  • ***
  • Posts: 2268
  • Country: ca
Re: A SIMPLE TIME INTERVAL COUNTER FOR DMTD WORK
« Reply #8 on: January 12, 2021, 10:10:15 pm »
I have a couple of questions regarding the xtal on the Parallex.

If you change the frequency, do you have to edit the source to reflect the new frequency?

Since the original frequency is a 'time-nut friendly' 5 MHz, is there any value in removing the xtal and using an external OCXO with the frequency tweaked to exactly 5 MHz?

 

Offline guenthert

  • Frequent Contributor
  • **
  • Posts: 712
  • Country: de
Re: A SIMPLE TIME INTERVAL COUNTER FOR DMTD WORK
« Reply #9 on: January 12, 2021, 11:33:15 pm »
I have a couple of questions regarding the xtal on the Parallex.

If you change the frequency, do you have to edit the source to reflect the new frequency?
I haven't seen the source code (is it available?  I've seen only a link to the binary), but in general, to the best of my knowledge, the Propeller doesn't determine the frequency of the external crystal/oscillator (it could with limited accuracy, I'd think, as it has a built-in RC oscillator).  So yes, the source needs to be adjusted.


Since the original frequency is a 'time-nut friendly' 5 MHz, is there any value in removing the xtal and using an external OCXO with the frequency tweaked to exactly 5 MHz?
I used a flip-flop to divide a 10MHz external reference and fed that into the propeller in a somewhat similar project.  The proper way might have been to use a local oscillator locked to the external reference, but the simple approach worked for me.

tvb writes however "Note that although the xtal usually isn't that accurate, its stability is on the order of 1e-9. For many applications the ProTIC can be used without resorting to an external 5 MHz clock."

I'm a bit surprised about that.  I would have expected a tempco of a couple PPM/K for a run-of-the-mill crystal.
 

Offline 5065AGuruTopic starter

  • Frequent Contributor
  • **
  • Posts: 355
  • Country: us
Re: A SIMPLE TIME INTERVAL COUNTER FOR DMTD WORK
« Reply #10 on: January 13, 2021, 02:48:31 am »
There is no advantage to going to a 100Mhz clock to get 10ns resolution.
The last few digits are in the noise floor (parts in 10-15th or so) and you will get no performance improvement (for DMTD use).
Also the crystal at 10-9th will, due to the dual mixer multiplication, only impart 10-16th errors into the counts.
So (again for the particular use of a DMTD system the counters time base need not be particularly good!)
My ProTIC is built into a covered chassis with the dual mixer and is on 24/7. It sits in my timing rack which stays quite stable as far as temperature.
So far I have not seen any difference between its plots and two  more complex DMTD systems, one with a TCXO, and one with a tiny OCXO.

Cheers,

Corby


 

Offline FriedLogic

  • Regular Contributor
  • *
  • Posts: 115
  • Country: gb
Re: A SIMPLE TIME INTERVAL COUNTER FOR DMTD WORK
« Reply #11 on: January 16, 2021, 08:33:21 pm »
tvb writes however "Note that although the xtal usually isn't that accurate, its stability is on the order of 1e-9. For many applications the ProTIC can be used without resorting to an external 5 MHz clock."

I'm a bit surprised about that.  I would have expected a tempco of a couple PPM/K for a run-of-the-mill crystal.

  I think that he's talking about the short term stability of the crystal rather that the change due to temperature etc.

  It's easy enough to see the sort of effect that crystal errors in the timer will have. Assuming 10MHz DMTD oscillators and a 1Hz offset, a 10PPM frequency change in the timer crystal will lead to 10us error in measuring 1s, which equates to 1ps phase change. Normally a change in temperature large enough to cause 10PPM change in the crystal frequency would take a bit of time with an enclosed PCB. If it takes 1000s for the change to happen, the effective frequency error over that time is 1E-15, so unless the references are hydrogen masers or similar it should not be a problem. Allowing air to blow on the board could be more of an issue.

  It could in theory be a problem for measuring things like short fixed delays, but in most practical cases I suspect that it's likely to disappear among the other errors.
« Last Edit: January 16, 2021, 08:36:41 pm by FriedLogic »
 

Offline artag

  • Super Contributor
  • ***
  • Posts: 1064
  • Country: gb
Re: A SIMPLE TIME INTERVAL COUNTER FOR DMTD WORK
« Reply #12 on: February 07, 2021, 09:46:17 pm »
I think using a 100MHz propeller will also change the baud rate of the serial transmission (which exists between prop and FTDI even if you use USB externally).

So you would need to change both the timestamp scaling and the UART clocking, unless you want to work with an unconventional 144000 baud serial data.
 

Offline kpjamro

  • Contributor
  • Posts: 16
  • Country: us
Re: A SIMPLE TIME INTERVAL COUNTER FOR DMTD WORK
« Reply #13 on: January 31, 2022, 03:35:56 pm »
Any chance a three channel version has emerged?

Thanks

Ken
 

Offline artag

  • Super Contributor
  • ***
  • Posts: 1064
  • Country: gb
Re: A SIMPLE TIME INTERVAL COUNTER FOR DMTD WORK
« Reply #14 on: March 04, 2022, 05:27:55 pm »
Propeller mini board on sale $20

https://www.parallax.com/product/propellermini/
 

Offline bnz

  • Contributor
  • Posts: 43
  • Country: de
Re: A SIMPLE TIME INTERVAL COUNTER FOR DMTD WORK
« Reply #15 on: June 26, 2022, 01:31:17 pm »
As unwrapping the measurement by software does not work perfect and ProTIC has internally all needed information for the unwrapped data, I would be glad to see this data reported at the output.

Either as timestamps of both channels, or more compatible with the current setup, by reporting next to the time A->B, also one of B->A, A->(next)A, or B->(next)B. This could be transmitted like a 2-channel counter would do. So anyone wanting to use the counter as up to now would only need to listen to the first channel.
 
 
The following users thanked this post: ch_scr


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf