A SIMPLE TIME INTERVAL COUNTER FOR DMTD WORK - Page 1
Forum section: electronics / general

author: 5065AGuru
author_rank: Frequent Contributor
timestamp: January 01, 2021, 11:58:09 pm
content: 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 athttp://leapsecond.com/prop/index.htm#proticPlease 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 distributersfor 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 sNo dead time issues like the HP 53131/132 and SR620Easily interfaces to USB or RS23212.5ns resolution10 digits115200 baudLow 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 theinput 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 notimportant!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 unitsagainst very good Quartz as well as comparing HP 5065A units, and it has performed just asenvisioned.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 MiniI’ll share the procedure for that.Lastly here is a PIX of an old Sulzer linear phase comparator I got at a Gov. auctionin 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 torecord 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 andit lives again!Cheers,Corby

author: tkamiya
author_rank: Super Contributor
timestamp: January 02, 2021, 02:09:00 am
content: 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.

author: notfaded1
author_rank: Frequent Contributor
timestamp: January 02, 2021, 04:14:42 pm
content: 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

author: 5065AGuru
author_rank: Frequent Contributor
timestamp: January 02, 2021, 04:31:44 pm
content: Channel C is not used for this application.Cheers,Corby

author: tkamiya
author_rank: Super Contributor
timestamp: January 09, 2021, 08:05:05 pm
content: 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.

author: tkamiya
author_rank: Super Contributor
timestamp: January 09, 2021, 10:36:58 pm
content: 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#proticOn 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.

author: tkamiya
author_rank: Super Contributor
timestamp: January 10, 2021, 05:16:23 am
content: 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.

author: guenthert
author_rank: Frequent Contributor
timestamp: January 12, 2021, 05:51:14 pm
content: > 12.5ns resolutionThat 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.

author: edpalmer42
author_rank: Super Contributor
timestamp: January 12, 2021, 10:10:15 pm
content: 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?

author: guenthert
author_rank: Frequent Contributor
timestamp: January 12, 2021, 11:33:15 pm
content: Quote from: edpalmer42 on January 12, 2021, 10:10:15 pmI 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.Quote from: edpalmer42 on January 12, 2021, 10:10:15 pmI 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.

author: 5065AGuru
author_rank: Frequent Contributor
timestamp: January 13, 2021, 02:48:31 am
content: 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

author: FriedLogic
author_rank: Regular Contributor
timestamp: January 16, 2021, 08:33:21 pm
content: Quote from: guenthert on January 12, 2021, 11:33:15 pmI 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.

author: artag
author_rank: Super Contributor
timestamp: February 07, 2021, 09:46:17 pm
content: 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.

author: kpjamro
author_rank: Contributor
timestamp: January 31, 2022, 03:35:56 pm
content: Any chance a three channel version has emerged?ThanksKen

author: artag
author_rank: Super Contributor
timestamp: March 04, 2022, 05:27:55 pm
content: Propeller mini board on sale $20https://www.parallax.com/product/propellermini/

author: bnz
author_rank: Regular Contributor
timestamp: June 26, 2022, 01:31:17 pm
content: 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.