Chronology Current Month Current Thread Current Date
[Year List] [Month List (current year)] [Date Index] [Thread Index] [Thread Prev] [Thread Next] [Date Prev] [Date Next]

Re: [Phys-L] timestamping instrumentation



On 10/22/21 6:38 AM, Tom Van Baak wrote:

a 10 us wide pulse looks like a 115200 baud (8.6 us) start bit to the
serial port. So each pulse becomes one more byte of data to be read
by the program. The downside is that there is effectively 9 bit
frames of dead time (78 us) per pulse but the GM tube has dead time
too so maybe this isn't a problem. This pretend-its-a-start-bit
technique can easily handle continuous or erratic pulse rates of many
thousands per second.

I'm impressed. That's clever.

Some Geiger tubes have a 10μs pulse and a 100μs dead time, which
is beautifully matched to a 115200 baud UART. Also, status pins
(DSR, DCD, RNG, etc.) are often not well handled by the operating
system, but character handling is presumably very thoroughly
debugged by now.

OTOH some tubes have a 5μs pulse and a 50μs dead time, which is
not so much fun.

I realize serial ports are out of fashion

They are a bit dated. Carbon dated.

but I find them quite simple and versatile. I use them by the
hundreds in my lab.

Using what for hardware? USB took over the world a long time ago.
Laptops lost their COM ports so long ago I can't even remember.
I have a large /desktop/ with no DB9 ports, and it's ten years old.
That's a lot of dog years.


For the cost of a PCIe <-> DB9 card, you could buy a Teensy
with vastly more capability. It has dozens of interrupt pins.
That means you don't need to be super-clever about pulse width
and dead time versus baud rate. A sub-microsecond pulse will
trigger the interrupt.
Furthermore, it has 7 onboard UARTs, so even if you reeeeally
like serial ports, you come out ahead. Probably even more
ahead insofar as you need a less-complicated level shifter.
Also more-accurate timestamps on the received characters.

Here's a smart-alecky but smart video that explains what the
Teensy is good for, and how it fits into the competitive
landscape:
https://www.youtube.com/watch?v=75IvTqRwNsE

The software for high-resolution event timing exists:
https://www.pjrc.com/teensy/td_libs_FreqMeasure.html