# Measuring pulses, options for accumulate samples after trigger

I have a circuit that amplifies pulses and the goal is to measure them with a MCU's ADC in lowest possible power. The pulses width are about 100uS and I am interested about their peak amplitude.

Now I added a HW trigger (comparator) and the plan is to wake-up the MCU, do some conversions, compute peak then sleep. Particularly, I plan to use SAM21L (Atmel) which have some 5uS wake time from a idle mode (not sleep). The speed is not so important, I'll be glad if I can take 10 samples, so 1 at 10uS.

The problem is that I don't know if MCU approach can be realistic, since most of them wakes up quite slowly so pulse can be missed or wrong measured. As can be seen in image, from trigger to peak I have only 40uS or so.

Now I wonder what options do I have?

• use other smaller MCU only for ADC that can wake very fast
• build a sample and hold circuit
• build a precision rectifier (so sample and hold naturally)
• try a HW tiny ADC but no idea how to catch the peak (so convert and accumulate stand alone)

I'd like some opinions, thank you.

EDITED:

The GREEN trace represents (amplified) signal + some induced noise in first stage. The last stage is a non inverting DC coupled OA, with (+) forced to 0.3V reference for maximal swing to 3V3. The BLUE is my comparator reference, little above reference. The LIGHT BLUE is my comparator output which I plan to use as trigger for MCU.

The tolerance for measuring is not so tight, I just want to measure the peak. Since the MCU will consume much more compared to amplifier, the trigger is supposed to wake-up, do some burst (blind) conversions up to 100uS, then store one result as peak found.

Overall, the peaks are non-repetitive (great idea to predict) but luckily, the normal periodicity is slow, one per minute or so (particle detector). However, in practice can appear multiple pulses in bursts and I need to count them, so I presume that pulses will come next to each other.

The S&H idea or rectifier, came up in case MCU isn't able to respond fast enough.

• MSP430 can wake up from a dead sleep (nanoamps) and get up to FULL clock rate in less than $1\:\mu\textrm{s}$. Nothing else I know of can do that. Though I'd love to learn of another. EDIT: You can also consider synchronizing with software in order to "anticipate" when the next pulse will arrive. Then adjust each time based on new info collected to set the next start. Use PID control loop for this. (If this is a periodic signal that can be predicted.) – jonk Jul 16 '17 at 23:23
• If all you care about is the peak, an analog peak detector maybe worthwhile. You will have to go through the math but sampling 60 us every 2 ms is a 3% dutycycle. So your effective MCU current may be say 10mA * 0.03 (ignoring nA sleep current). Alternatively you can run an analog peakdetector in the uA, wake up the MCU for one sample conversion. – sstobbe Jul 17 '17 at 3:15
• Your signal is BW limited, perhaps intentional, but this affects peak. It also appears to be AC coupled in 1st and has a DC offset in 2nd image. What is impedance of signal? Can you design an Track & Hold that works on peak during pulse detect logic, then latency is not critical. What is your tolerance spec? 1st signal grows – Tony Stewart Sunnyskyguy EE75 Jul 17 '17 at 3:48
• @jonk, I never used MSP430 but I will check the specs right now! If this is true, I never mind to change entire MCU as I am in prospecting stage. – orfruit Jul 17 '17 at 7:10
• @jonk, I would like to give you credit as answer, I found MSP430F5359 with plenty of PM, RAM with 3uS wake up time. – orfruit Jul 17 '17 at 12:57

I gather that you have a signal or way of interrupting (waking up) a CPU. The MSP430 can wake up from a dead sleep (nanoamps) and get up to a full clock rate (say, $16\:\textrm{MHz}$) in less than $1\:\mu\textrm{s}$. Nothing else I know of can do that.

I'd love to learn of another, though. So if anyone knows of one, please let me know.

They can also be purchased with FRAM, which means very low power operation and can be written to "forever" just like RAM, but with the non-volatile nature of flash. You might want to consider an FRAM version here.

As an added consideration, not necessarily related to the MSP430, you can also consider synchronizing with software in order to "anticipate" when the next pulse will arrive. Then adjust each time based on new info collected to set the next start. Use PID control loop for this. (If this is a periodic signal that can be predicted.) I do this routinely when writing zero-cross software to examine the mains power line. Each recognition of a pulse can be used to improve the prediction for the next one and, if you know an absolute minimum duration a priori, you can use that to make this work well.

• thanks again. Now despite I have few dozens programmers, I have to buy one more.. for TI :) – orfruit Jul 18 '17 at 18:57
• @YO3HCV Yeah. Me, too. I have a room full of them, including bond-out ICE systems, JTAG chain debugging tools (expensive at times), and gosh knows what else. But so far as the software tools go, there are some good ones for the MSP430. And if you can stay in assembly code, I'd recommend avoiding the other free ones and just get the IAR toolset (the tools are wonderful and the assembler is superb, as well.) If you want any more thoughts on the MSP430, just add a note here and I'll toss an idea or two your direction if I can help out. – jonk Jul 18 '17 at 19:00

1) Choose Buffer Amplifier to >1Vp range with sufficient GBW

2) Use analog switch and Comparator between (+)Vbuf and (-)Vcap with Vout to Gate (A.Sw)

• this is faster than precision rectifier Op Amp

3) Use low Iin Buffer on Cap to ADC

4) Use above 3) out to comparator using Vcap/2 as Ref and slice for Gate signal that may be used to 1shot cap reset or wake uC.