So i'm considering preceding that multivibrator with a fast D-type flip-flop like the 3GHz SY10EP51 and feed the pulse into its clock input. That part will work down to ~320ps pulse with, so that should be fine. Resetting the flip-flop again would be done by the multivibrator to "arm" it for the next pulse.
That should work, but does anyone know of a better or more elegant solution?
Any school should have an oscilloscope for the physics classes. Nothing can beat "seeing" the results as a waveform.
[...]
Could you use a dedicated interval timer IC?
TDC7200 is cheap and easily available and easy to interface to. It contains an 18 GHz counter and automatically self calibrates to an external clock (eg. 10MHz OCXO) on each measurement.
These ICs easily get sub 100ps measurement standard deviation.
So i'm considering preceding that multivibrator with a fast D-type flip-flop like the 3GHz SY10EP51 and feed the pulse into its clock input. That part will work down to ~320ps pulse with, so that should be fine. Resetting the flip-flop again would be done by the multivibrator to "arm" it for the next pulse.
That should work, but does anyone know of a better or more elegant solution?
No need for the monostable in this case or to reset the flip flop. Just configure the DFF as a divide by 2 counter to get a square wave and then look at both the rising and falling edges.
No need for the monostable in this case or to reset the flip flop. Just configure the DFF as a divide by 2 counter to get a square wave and then look at both the rising and falling edges.
And if the MCU timer can't count both rising and falling edges, have it count only the rising edges of the now 2 MHz clock, and the when reading the result after the STOP, you use the level of the DFF as the 9th bit of your counter chain.
My suggestion is to just use a fast ECL flip flop (for example MC100EPT51), data input tied high, clocked by the negative pulse, with an RC feedback network from its Q to its reset pin, that sets the duration of the output pulse. I have done it multiple times and in works to stretch/shrink pulses, although you might have to try a few R-C values to get the pulse duration you want.
..The detector creates a short pulse when a certain intensity threshold is met.
The optical input for both detectors is an optic fibre of different lengths. Input B fibre is typically >100m longer.
The setup I have in mind does not use CPU power while running. It needs to be setup and then it takes care of itself. It will require dedicated pins to be free though. It is an interesting challenge.It certainly is. And it would probably mean falling asleep on the Cortex-M3 reference manual for several days
At my regular hourly rate, It'd probably be cheaper to just spend the extra €60 in my BOM to cascade three more 8-bit ECL timers to end up with a true ECL 1,5GHz 32-bit counter
TIMx_CR1 = 0x0008; //Enable one pulse mode
TIMx_CR2 = 0x0000;
TIMx_PSC = 0x0000;
TIMx_CNT = 0x0000;
TIMx_ARR = 0x0008; //Stop after 8 clock pulses
TIMx_CCR1 = 0x0004; //Make output high after 4 pulses
TIMx_CCER = 0x0001; //Active high output
TIMx_CCMR1 = 0x0070; //PWM mode 2
TIMx_SMCR = 0x0060; //Set ETRF as external trigger (Active high)
TIMx_SMCR |= 0x0006; //Select external trigger mode. Needs to be done after selecting the external trigger to avoid spurious triggers.
That should work, but does anyone know of a better or more elegant solution?
Overnight it came to mind that you don't need additional hardware and can use the msb of your ECL counter, which at 8MHz can be used to clock a timer.
According to the timer cook book the external clock can be at max 1/3 of the timer internal clock. They have an example that uses 10MHz as an external clock, so 8MHz should work too.
~ 1 nS per foot thus for accurate measurement, need very long path ~ 1 km or picosec res.
Overnight it came to mind that you don't need additional hardware and can use the msb of your ECL counter, which at 8MHz can be used to clock a timer.
According to the timer cook book the external clock can be at max 1/3 of the timer internal clock. They have an example that uses 10MHz as an external clock, so 8MHz should work too.MSB will go high as soon as it hits 0x80. I need a pulse when it goes from 0xFF to 0x00.
Overnight it came to mind that you don't need additional hardware and can use the msb of your ECL counter, which at 8MHz can be used to clock a timer.
According to the timer cook book the external clock can be at max 1/3 of the timer internal clock. They have an example that uses 10MHz as an external clock, so 8MHz should work too.MSB will go high as soon as it hits 0x80. I need a pulse when it goes from 0xFF to 0x00.
Overnight it came to mind that you don't need additional hardware and can use the msb of your ECL counter, which at 8MHz can be used to clock a timer.
According to the timer cook book the external clock can be at max 1/3 of the timer internal clock. They have an example that uses 10MHz as an external clock, so 8MHz should work too.MSB will go high as soon as it hits 0x80. I need a pulse when it goes from 0xFF to 0x00.
Students that perform this experiment are typically 11-13 years old. A scope with 30+ buttons isa very daunting piece of equipmentcool as hell
How about making a repetition counter making i.e 128 pulses through the fiber, feding a counter that latches after that number.
The stm32 counts all this time, then the final time is obtained with a simple division. So you don't need such crazy low resolution.