by Doug Coulter » Tue May 29, 2012 5:12 pm
Jerry, there's a trick (actually, there is considerable prior art on this problem). You can do it with almost anything, I'm going to use a PIC because that's my favored toolchain and we already make a board here that will do most of it. Most uP's with a/d should do if you code the time critical parts (mostly realizing you need to do an a/d conversion and then re-open the gate) in asm.
You have to have a fairly smart hybrid front end (in this case hybrid means analog/digital). It doesn't take a ton of logic - my design uses a couple flip flops and gates, but it does take a super good, super fast peak catcher. Once you have a peak, you "close the gate" on the input, and a/d the peak at leisure. You don't have to get them all to get a good spectrum, especially true if there are a lot of pulses, you just have to make sure your "selection" of the ones you do take isn't non-random or affected by their height. If the count rate is quick, you have to sweat "pileups" which some nim bin stuff used a delay line to help detect. I won't need that trick (good deal, good analog delay lines are kind of scarce these days). I'm simply going to refuse more pulses if the signal doesn't hit baseline below threshold in between them. We'll have to see how that works out, but it seems all I need is a couple very fast comparators, a couple gates and flops, and a trick peak catcher (an emitter follower used as a diode, a fet to discharge that and the input later, and temp comp for the Vbe of the emitter follower). Most of the "work" is making sure you don't open the gate in the middle of another pulse and declare that a real pulse, since you might have just caught the backside, not the peak. It winds up looking deceptively simple on paper (but it's not, you have to handle every frigging case where the randomness can get you).
Sigma/delta a/d's are nice and great for audio, but not this crap. There's also a ringing prone highpass filter in digital in there on top of the anti-alias FIR....there are enough "issues" to make them seem wrong to me to use, the only advantage is that most computers have one already. Even the fastest ones you can get for pro audio aren't even close to good enough for this job, really, unless you have super stretched pulses and very low count rates.
Posting as just me, not as the forum owner. Everything I say is "in my opinion" and YMMV -- which should go for everyone without saying.