count pulse problem with pulse resolution tennsy3.6

Status
Not open for further replies.
hello all i'm new in this field
if there is any unfit please tell me and i'll improve
Can someone help me do some quick test or prove the pulse resoultion of teensy 3.6
in my case i need to detect a pulse width 10 ns and it is an irregular pulse
Thanks for your comments.
godredrain
 
If it's about that 10ns pulse just triggering an interrupt, an external mono flop could help for signal conditioning. But if it's about precise measuring the duty cycle of pulses in the 10ns range, no Teensy will do that.

All just blind guessing around since the @godredrain didn't give enough details and precisions about what he wants to achieve and what he already tried.
 
@paul so there is no way to improve in this case?(ex.can i add some timer by myself?)
@theremingenieur sorry i didnt explain clearly. The picture is what the pulse i want to detect
now i'm using Oscilloscope to detect but i want to use some board to replace it so i survey to the teensy.
PMT count.png
 
If it‘s just about detecting if such a pulse has happened or not and for example triggering an interrupt or DMA transfer from that, or just incrementing a counter, if the Teensy has not to analyze the pulse in detail, and if you can be sure that the pulses do not happen more often than 1/100ns, a solution could most probably be found.
 
Its an interesting problem to count very high speed pulses, such as photon arrival at a photomultiplier tube. I have just been reading the MC10E137 chip spec (PLCC-28 device).

This is a very high speed (2 GHz) 8 bit ripple counter which might possibly be used to "front end" a Teensy as a 10 MHz counter. Each count bit is available as an output, so if the experiment had a "start and stop" time interval, you could enable/disable the count - then use Teensy digital inputs to inspect the "remainder" in the MC10E137, and add to the Teensy "more significant" counted bits.

(Note - ECL to TTL logic levels would be involved).
 
Last edited:
If the time between pulses is more than about 200 ns, you could add a flip-flop circuit to help Teensy run an interrupt. For example, this chip might work.

https://www.digikey.com/product-detail/en/on-semiconductor/MC74LCX74DR2G/MC74LCX74DR2GOSCT-ND

Connect the Qn (inverted) signal to the D input, and your short pulse to the CLK pin. Connect the Sn and Cn pins high, so the part isn't forced high or low. Connect either of the Q output to an interrupt pin on the Teensy. Configure the interrupt for CHANGE. Set the interrupt to highest priority, so you're not "blind" when the USB interrupt is running.

When the pulses happen, the flip-flop will toggle. Since you're detecting either low-to-high or high-to-low, you'll get an interrupt for every pulse. Inside the interrupt, increment a 32 bit volatile variable. In your main program, just read it and print. Maybe store a prior copy and only do stuff when the count actually changes.

However, this scheme is limited to how quickly interrupts can run. If you get another pulse too soon, the you'll miss it.
 
Another option would be to use this circuit with the FreqCount library. But this will give you half the count, since only rising edges are captured. Pulses very close together could be handled well, so maybe half the total count is worth capturing (half of) many pulses if they come rapidly.

Normally FreqCount is used to convert the counts to frequency during the last gate interval. But you could pretty easily edit the code to instead accumulate the counts and print that info, rather than converting to frequency. This approach also has the downside that you get a result at the end of a gate interval, rather than very quickly after the pulse occurs. The minimum interval for FreqCount is 1 ms (at least using the code as-is... other intervals could be implemented with direct access to the timers).
 
Actually, we haven’t yet got any information about how often these very short pulses happen... So, everything is blind guessing. I’d really prefer if @godredrain would tell us more about the source of these pulses and how often or at which frequency these happen. From the oscilloscope picture, we can just guess that the whole pulse story is at least around 50ns before the next event happens.
 
thanks for everyone's recommend.
Sorry for the bad explain and didint get the point.
Actually Im doing PMT pulse counting.
My PMT counting head is hamamtsu H10682-110.( https://www.hamamatsu.com/jp/en/product/type/H10682-110/index.html )
h10682-110.PNG
my case is when the PMT detect the photon it will give a pulse with a pulse width 10ns and +4.4V pulse height
the pulse-pair resolution 20ns(the pulse is about 20ns between pulse with pulse)
i need to count in the gate time (ex: 1s) to count how many pulse there is
so is that good for FreqCount library in teeny?
 
20ns corresponds to 50 MHz. That could still work on a Teensy 3.6 although it’s somewhat close to the limits. Just try it out, using a resistive voltage divider, making sure that the peak voltage at the Teensy’s input will not exceed 3.3V.
In case you find that the result is not reliable, you might still add a RF pre-divider IC as they are used in RF frequency counters. But one step after the other.
 
Status
Not open for further replies.
Back
Top