HP E1740a time interval analyzer  - Page 1
Forum section: electronics / testgear

author: hgl
author_rank: Regular Contributor
timestamp: September 29, 2021, 02:31:41 pm
content: I bought an HP E1740a time interval analyzer for about 80€.There is no free software, what you can find on the internet requires a dongle. I have to do it myself.My hardware is an old laptop with a PCICIA slot for the Firewire controller to talk to the VXI rack via VISA running on windows XP.I measure 500,000 times the period of the OCXO on input 1 an save it to internal RAM with a resolution of 50ps. That takes about 1s.Each measurement is a double value and needs 8 bytes to store, so we have to read 4 Mbytes and save it as ascii to disk. That takes about 14min.A lot of time to measure and save 20 ms in the life of a 10Mhz oscillator to a 11 Mb fileI imported the data into Timelab and this is what it looks like.Sample time is 1E-7 - Timelab can only do 1E-6 so the measurement time is 20ms and not 200ms* measured against the internal reference TCXO

author: hgl
author_rank: Regular Contributor
timestamp: September 30, 2021, 08:42:47 am
content: The device dates from the 1990s and has an MC68HC000FN10 controller for math. It is probably better to read the raw timestamps in larger blocks and do the math on the PC. Histograms are excluded from this they are sorted into 2048 bins by hardware on the board.

author: KE5FX
author_rank: Super Contributor
timestamp: September 30, 2021, 10:11:20 am
content: Interesting, not too common to see one of these units up and running. If you like, try this build:beta_1ns_t0.exe. It should allow you to import data with sample intervals down to 1E-9.

author: mjs
author_rank: Regular Contributor
timestamp: September 30, 2021, 10:46:17 am
content: That's interestig, how did you find out how to communicate with the device ? I've got 89600-series spectrum analyzer, but the software is node-locked and with limited features. Would be great to be able to use the hardware for SDR.

author: hgl
author_rank: Regular Contributor
timestamp: September 30, 2021, 11:16:06 am
content: Quote from: KE5FX on September 30, 2021, 10:11:20 amThanks for the new version, the deviation windows look good, the others are apparently not correct yet.

author: hgl
author_rank: Regular Contributor
timestamp: September 30, 2021, 11:26:40 am
content: Quote from: mjs on September 30, 2021, 10:46:17 amAll SCPI commands are described in the E1740a user manual and there are also Basic and C examples. You need a VISA driver from Agilent or NI.

author: KE5FX
author_rank: Super Contributor
timestamp: September 30, 2021, 04:36:58 pm
content: Quote from: hgl on September 30, 2021, 11:16:06 amNo problem. What are you seeing that looks incorrect?

author: hgl
author_rank: Regular Contributor
timestamp: September 30, 2021, 04:55:33 pm
content: The labeling of the time axis in picture 3 and 5. Is that correct?

author: KE5FX
author_rank: Super Contributor
timestamp: September 30, 2021, 06:08:00 pm
content: Quote from: hgl on September 30, 2021, 04:55:33 pmLooks OK to me, at first glance. About 5 milliseconds per division, 50 milliseconds total. For 500K points at 100 ns per sample, that sounds correct.

author: hgl
author_rank: Regular Contributor
timestamp: September 30, 2021, 07:10:27 pm
content: Sorry I confused the 100ns period with the 50ps resolution

author: hgl
author_rank: Regular Contributor
timestamp: October 01, 2021, 09:57:01 am
content: It is possible to read the measurement results in 3 ways.-> ascii character (22 bytes)-> double values ​​(8 bytes)-> timestamp (2 bytes)For 500,000 measured values, ascii ist the slowest and takes 14min.Timestamp is the fastest and takes 70s readed as 32K blocks on my old Laptop.All binary results are encoded in big endian and for windows you have to swap the bytes to little endian.Binary results also comes in a frame started with a header (variable length) and aline feed character at the end.All information is distributed in various documents and the most important original user manual(E1740-90005.pdf) is a scan, you cannot search in it and there is no table of contents to click on.An C example is attached, extracted from the user manual

author: hgl
author_rank: Regular Contributor
timestamp: October 01, 2021, 05:31:30 pm
content: Next I tested the histogram function. 10E7 periods sampled in a histogram with 2048 bins. Span of the histogram is 100ns, each with 50ps bins and an offset of 50ns. So we have a histogram from 50 to 150ns. I don't have a graphic in my program yet, so I took a picture of the memory in the debugger.

author: hgl
author_rank: Regular Contributor
timestamp: October 02, 2021, 10:00:35 am
content: The histogram data is also big endian and the image of the last post is useless.After the conversion it looks more like a histogram

author: hgl
author_rank: Regular Contributor
timestamp: October 03, 2021, 11:24:31 am
content: It looks like everything is working fine. Now it's time to improve my "trial and error code" and build a GUI and also for the other VXI instruments that I have.My measuring system consists of:1 HP E8401A VXI rack,1 Agilent E8491B controller,1 HP E1740A Time Interval Analyzer,2 HP E1412A 6 1/2 digit multimeter,and a slot card from VXI Technology with2 VM2710A 6 1/2 digit multimeters and1 VM3608A digital to analog converter 16 channels with 16 bit resolutionas sub modules.

author: maxwell3e10
author_rank: Frequent Contributor
timestamp: October 04, 2021, 09:00:59 am
content: Thanks for sharing these data. It looks like the RMS noise is about 30 psec? I wonder if its possible to setup time stamp measurements to detect every 10th zero crossing or so. That will allow one to extend the total time interval closer to 1 sec. Then one can look for frequency deviation by fitting the time stamps to a straight line. It would be interesting to see if E1740 is better than HP53310 at frequency measurements.

author: hgl
author_rank: Regular Contributor
timestamp: October 04, 2021, 12:41:22 pm
content: The maximum measurement time depends on the internal memory size and the frequency. For 1-channel measurements the maximum frequency is 80Mhz and the shortest time between 2 timestamps is 12.5ns. You have 2 options to extend the measuring time, decrease the resolution or use what they call pacing = Timestamps every nth edge. There is also a random pacing feature. Another possibility is to take n measurements and read out the mean value. This increases the resolution but does not save any internal storage space, because the mean value is calculated after the timestamps have been saved. And finally, you can use an external loop to read the mean values ​​for long-term measurements and save them on the PC.Max timestamps = 524287.From user manual page 404:Resolution (LSB): 50 ps (variable in binary steps up to 400 ns to increase maximum TI)RMSjitter: <100 psPeak-peak jitter (for 1010 measurements): 500 ps

author: maxwell3e10
author_rank: Frequent Contributor
timestamp: October 04, 2021, 01:36:08 pm
content: For frequency estimation its best to spread the maximum number of time stamps over a longer time, but they have to be done continuously. So it would be best to use the pacing feature to measure every 10th edge. That would give 0.5 sec measurement time of 10 MHz oscillator and one could get a pretty good frequency estimate from the slope.

author: hgl
author_rank: Regular Contributor
timestamp: October 04, 2021, 05:40:52 pm
content: I did and it looks like thisThe OCXO is ref out from my BG7TBL counter.

author: maxwell3e10
author_rank: Frequent Contributor
timestamp: October 04, 2021, 06:08:30 pm
content: Are you using an external clock for E1740 locked to the same source of 10 MHz? It seems this plot pacing10_timdev.JPG shows too much time deviation at longer times?Does this plot pacing10_freqdiff.JPG show the difference between 1 usec and measured time difference of the two edges? It would be interesting to integrate it (add successively each point). This will show the evolution of the cumulative time (phase) difference.

author: hgl
author_rank: Regular Contributor
timestamp: October 04, 2021, 06:31:18 pm
content: Yes reference ist locked to signal.I read the calculated frequencies from TIA. Maybe it would be better to read the interval times or the timestamps.

author: maxwell3e10
author_rank: Frequent Contributor
timestamp: October 04, 2021, 06:51:03 pm
content: Quote from: hgl on October 04, 2021, 06:31:18 pmIs the frequency calculated just as a reciprocal of each period? With time stamps usually one gets times between successive zero crossings, so they need to be added together to calculate total time. For some of the plots it's hard for me to tell what are the units on the vertical axis?

author: hgl
author_rank: Regular Contributor
timestamp: October 04, 2021, 06:59:19 pm
content: I think so, told the TIA to measure intervals and give me frequencies back.The measurement data are 11Mbytes. I guess that's too much to upload hereStatistics about the measurement:min9,956246961595E+06max1,004413928396E+07max-min8,789232236815E+04stddev4,219388119433E+03mean1,000004548291E+07

author: maxwell3e10
author_rank: Frequent Contributor
timestamp: October 08, 2021, 10:25:12 am
content: I'd be interested in analyzing the data. You can share it using zippyshare, for example.One of the questions is long-term drift of time stamps. With averaging enough edges one can get random noise down to ~1 psec. But if there is a drift of say 1 psec over 1 sec of measurements it puts a limit on frequency stability of 10^(-12).

author: hgl
author_rank: Regular Contributor
timestamp: October 08, 2021, 10:03:43 pm
content: The maximum measuring time depends on resolution. For 50 ps it is 3.2µs. Therefore I can set pacing to max 32, otherwise there will be an overflow in the internal counter and time aliasing. 500,000 samples with pacing 30 results in a measuring time of 1.5 seconds.In meantime i have reached 4 minutes for reading out 500,000 timestamps, calculating the frequency and saving in a file. It would be possible to generate a new file every 5 minutes. Histogram measurements can take up to 1E12 samples.

author: maxwell3e10
author_rank: Frequent Contributor
timestamp: October 08, 2021, 11:09:28 pm
content: Yes, just a single 1.5 sec long measurement would be good for looking at the drift. Its best to just save the timestamps themselves, otherwise there can be round-off error in frequency calculation.It doesn't seem like one could do continuous frequency measurements for longer without loosing resolution.

author: hgl
author_rank: Regular Contributor
timestamp: October 09, 2021, 09:46:24 am
content: Timestamps come from a 16 bit counter that counts resolution steps (min real resolution step = 4.8828125000000011e-011). This counter always counts from the beginning, never stops and overflows every 65536 counts. There can be one overflow between two timestamps which can be corrected by adding 65536. You can increase the measurement time by increasing the resolution steps up to 400ns.Code:// set output format*outfile << std::scientific << std::setprecision(16)<< std::setfill( '0' );// all bytes read and stored in timestampBufferuint16_t * pbuf = (uint16_t *) timestampBuffer;unsigned num_tintv = meas_bytes /2 -1;// time intervalsint actStamp;// actual timestampint nextStamp;// next rimestampint tintv;// time intervaldouble realTintv;for (unsigned long i =0 ; i< num_tintv; i++){// swap bytes from big to low endianactStamp = _byteswap_ushort(*pbuf); // actual timestamppbuf++; // adjust pointernextStamp = _byteswap_ushort(*pbuf); // next timestampif (nextStamp > actStamp)tintv = nextStamp - actStamp;// timestamp intervalelsetintv = nextStamp - actStamp + 65536;// correct overflowrealTintv = (double) tintv * realresolution;// calc real interval timedouble freq = 1.0 / realTintv;// calc frequency// save to file*outfile << freq << std::endl;}What do you need ?raw 16bit data?big / little endian?corrected timestamps?time interval?frequency ?

author: maxwell3e10
author_rank: Frequent Contributor
timestamp: October 09, 2021, 01:10:02 pm
content: It's best to manipulate tintv, since these integer numbers can be added together to get total time without any rounding error. Also make smaller files. But it would be easiest if you save it as ASCII.

author: hgl
author_rank: Regular Contributor
timestamp: October 09, 2021, 02:10:07 pm
content: Here are 3 runs with an HP10811-6111 as reference and signal.pacing =30, timinterval as ascii int

author: maxwell3e10
author_rank: Frequent Contributor
timestamp: October 09, 2021, 03:00:12 pm
content: Are you sure these numbers are with pace=30? The average spacing between points is 2048, which corresponds to 10^(-7) seconds.Also, I am not sure if you need to take difference of successive time stamps. I think each timestamp is already the difference of successive zero crossings.

author: hgl
author_rank: Regular Contributor
timestamp: October 09, 2021, 03:27:51 pm
content: I was also surprised that I didn't need the parameter in my calculation. There is no error message and when I read the parameter back it is 30. But I'm not sure whether one of the many other parameters stops to use it.Trigger level is 0V and slope is positive.

author: maxwell3e10
author_rank: Frequent Contributor
timestamp: October 09, 2021, 03:47:35 pm
content: What are the numbers in actStamp? You would expect numbers around 61440

author: hgl
author_rank: Regular Contributor
timestamp: October 09, 2021, 04:32:53 pm
content: Quote from: hgl on October 09, 2021, 09:46:24 am

author: maxwell3e10
author_rank: Frequent Contributor
timestamp: October 09, 2021, 04:39:46 pm
content: OK, so it just reports the time bin (in 48 psec increments) when a zero crossing occurs. But still the spacing between successive points is about 2048, so its not using the pacing number somehow. Can you tell how long the measurement actually takes?

author: hgl
author_rank: Regular Contributor
timestamp: October 09, 2021, 05:24:39 pm
content: There is an unclear point or a bug in the user manual, you need an extra parameter to activate the pacing, which must not be left out.

author: maxwell3e10
author_rank: Frequent Contributor
timestamp: October 09, 2021, 08:36:38 pm
content: So here is the analysis of the timestamps and frequency resolution. For frequency measurements I do many line fits to segments of specific length and estimate frequency uncertainty from scatter of the linear slopes. These plots can be compared to the ones in review of Keysight 53230A:https://www.eevblog.com/forum/testgear/keysight-53230-frequency-counter-review-and-bug-identification/In general, the performance of E1740 is pretty good, but can't quite beat 53310A or 53230A. The rms of single edge detection is 70 psec, slightly worse than HP53310. The time stamp measurements are pretty stable over time, with Allan deviation comparable to 53230A. When measuring every edge the Allan deviation has some oscillations, which may indicate non-linearity of the time interpolators. There maybe a calibration option to compensate their non-linearity.

author: maxwell3e10
author_rank: Frequent Contributor
timestamp: October 11, 2021, 12:49:49 pm
content: I checked the manual and it does have a interpolator calibration function. Have you tried it already?

author: hgl
author_rank: Regular Contributor
timestamp: October 11, 2021, 02:45:46 pm
content: Time intervals after calibration of the timebase and interpolator.There is a small difference to the old measurement, input impedance is now 1MOhm. I don't think it matters.

author: maxwell3e10
author_rank: Frequent Contributor
timestamp: October 11, 2021, 09:31:42 pm
content: Interpolator calibration helps in reducing the time stamp rms from 70 to 30 psec. Time stamp measurements for 1.5 seconds all land in 4 (49 psec wide) bins. When averaging 1000 measurements one can get even better resolution, but there is substantial 1/f noise in the timestamps. So for short time intervals E1740 works quite well. It would probably be even better without pacing when looking at short intervals.

author: hgl
author_rank: Regular Contributor
timestamp: October 11, 2021, 09:48:24 pm
content: Sorry there was still a bug in my program. Calibration did not end properly and ran in timout.Here are 3 new runs, maybe it looks better now

author: maxwell3e10
author_rank: Frequent Contributor
timestamp: October 11, 2021, 10:12:37 pm
content: These look similar to me. It maybe interesting to get data without pacing.

author: hgl
author_rank: Regular Contributor
timestamp: October 11, 2021, 10:23:29 pm
content: I switched to frequency output again and see a difference between a T-adapter and a powersplitter. Green and red lines with a powerspliter and the others with a simple T-adapter to split the signal to input and reference.

author: maxwell3e10
author_rank: Frequent Contributor
timestamp: October 11, 2021, 10:32:12 pm
content: You don't need a power splitter if input impedance is set to 1 MOhm. Probably simple T gives larger signals. In general to reduce random time jitter one wants signals with as fast slew rate as possible. One could use a function generator to make larger sine wave or generate a square wave. The frequency stability of the generator is not so important if the same signal is used for input and for reference.

author: hgl
author_rank: Regular Contributor
timestamp: October 11, 2021, 10:42:43 pm
content: There is a command: Save Calibration Values ​​to Non-Volatile Storage. Maybe that has to be done. But first I want to save the current settings in a file.But now it's time to go to bed for an old man.

author: hgl
author_rank: Regular Contributor
timestamp: October 12, 2021, 11:14:07 am
content: Quote from: maxwell3e10 on October 11, 2021, 10:12:37 pm

author: maxwell3e10
author_rank: Frequent Contributor
timestamp: October 12, 2021, 06:02:24 pm
content: It seems like calibration of the interpolators helps a little, but there are still some oscillations in the timestamp. Or it could be the external clock reference PLL has some oscillations. One could dive even further into it and measure the time difference A-B between two channels (with identical signals). That removes the clock uncertainty. Further, if the input frequency is a little off from 10 MHz one can see periodic oscillations associated with interpolator non-linearity since the input edges land in different part of the interpolator DAC range.

author: hgl
author_rank: Regular Contributor
timestamp: October 12, 2021, 08:16:18 pm
content: Next, I wanted to try whether you can read out 3 times after a measurement as timstamp, time interval and frequency and then compare it with my calculations. Then a diff measurement with a 10m BNC cable between the inputs.