Help with opamp for shaping circuit - Page 1
Forum section: electronics / projects

author: snx
author_rank: Contributor
timestamp: August 09, 2020, 06:37:26 pm
content: I want to sample and process a pulse from a Silicone-Photomultiplier.The Pulse has amplitudes between 10mV and 2.5V (depending on light strength and bias voltage. Therefore, an amplification with switchable gain would be very helpful. For example if a high bias voltage is used, the gain can be zero, and when lower voltage for bias is used, the gain can be 2) The pulse length is from around 10us to 80us in a sharply rising and then slowly decaying curve, making it very hard to sample since the peak is of interest, and would have to be sampled very quickly after the trigger condition.I've attached 3 Scope images of the pulses, one with persistence at the highest bias voltage (Gain 0). And two were you can see a very large pulse (2.4V peak) and a regular pulse (400mV Pulse).My goal is to sample this with a 16-bit 3.6MSPS or 2MSPS ADC (2.5V Reference IC) that is built in in STM32H750VB Microcontroller. I've attached the ADC specifications extracted from the datasheet for you. To have a good number of samples, i would like to shape this pulse to a more Gaussian shape with uniform rise and fall times (like sine-wave). Also i would be good to have a pulse length of around 15-20us so a 2MSPS ADC would get 30-40 Samples.The MCU has two build in OP Amp, maybe these can be put to use, the specifications are attached. The Voltages currently planned to be available on the design are 5V from USB and 3.3V from SMPS, surely, if its vital to have other voltages, i can add them.So i'm not that familiar with opamps, but 've seen designs with variable gains by switching resistors with analog switches. But i'm more worried what i would need to create the desired shape of the signal.Can someone give me advice on a circuit for shaping the signal?Do i need a OP-Amp for the ADC to buffer? (seen this on some adc datasheets).Can the OP-Amp from the MCU be used, or are they too bad?

author: OM222O
author_rank: Frequent Contributor
timestamp: August 09, 2020, 07:14:32 pm
content: do not use an analog switch with many different resistors.It seems like the peak is actually negative, then you most likely need an inverting amplifier setup. I strongly suggest you ditch the built in ADC / OP AMP since they're not actually optimized for anything, they're more for general purpose applications where accuracy is not that important.It all depends on what you need to do.Use a dual pot, you can easily get 8 bit 10k digital pots for around 1$. it allows you to fine tune your gain. The absolute value of digital pots is really bad, but the ratio-metric arrangement is very accurate. Especially since they're on the same die, effects like temperature drift and whatnot won't change the ratio accuracy.Try to set them to max values for any given ratio as they have a current limit, just something to be aware of.it's also easy to do the math as you can easily just use values from 0 to 255 (or 256, depending on the exact part you use, some use a 16 bit number and go from 0 to 256 instead of 0 to 255 or 1 to 256, just check the datasheet).

author: snx
author_rank: Contributor
timestamp: August 09, 2020, 07:51:00 pm
content: Good Idea with the digital potentiometer, i will try to implement this!Any ideas on the OpAmps?I need to extract the peak value of the peak. If the internal ADC of the MCU is capable, i would like to use it, since it saves cost an board space, but of course if its not accurate enough, i will have to ditch it. The Problem is, that usually, when using high-bit, fast speed adc, you need to take care of signal routing and have high clock lines. For example a 3.6MSPS 16bit ADC needs at last 57.6MHz of Clock and probably SPI. Other high speed ADC's then to use LVDS, which is not supported by this mcu.I've looked for standalone ADC with following parameters16-bit>3MSPS1 CHSerial SPI or Paralell InterfaceFor example, Analog Devices only hase 5 matches, all super expensiveWould LTC2311-16 (13.80$)https://www.analog.com/en/products/ltc2311-16.htmlbe a much better choice than built in ADC?Sure, the op-amp can be ditched, i just mentioned that its there

author: OM222O
author_rank: Frequent Contributor
timestamp: August 09, 2020, 08:17:03 pm
content: the built in ADC seems to only go upto 3.6V max (3.3V normal operation) but you mentioned running on 5V? I'm not sure how that'd work.Also there is no mention of INL + DNL or ENOB BUT there is a table at the end regarding RAIN() which I'm not sure what input resistance that is exactly. Maybe you can make sense of that and how accurate it is?I personally use sigma delta ADCs with only a few KPSP but 24 bits high accuracy, since I don't have fast signal applications, you should look into SAR ADCs for fast sampling if you want to buy an external one. Unfortunately I can't really help you with that. As for the Op Amp: how much gain bandwidth product do you need? any ideas on the min/max required gains? 3 good suggestions would be MAX4238 (unity gain stable), MAX4239(at least a gain of 10), INA189. I have used these for high accuracy measurements before and they work like a charm. Actually Dave recommended all of them in a recent video which was surprising, each of them has some benefits over the others so take your pick between them.Edit: my bad, you mentioned 2.5V not 5V. please ignore that comment.

author: Kleinstein
author_rank: Super Contributor
timestamp: August 09, 2020, 08:32:58 pm
content: 16 bit resolution sounds plenty. With so much resolution there is no need to switch the gain, at least not in fine steps. Digital pots tend to be relatively slow with quite some unwanted internal capacitance. In addition the fet switches can act nonlinear. I would consider adjusting the high voltage to trim the gain if needed.AFAIK the energy resolution is often quite limited, so more like 10 or 12 Bit. This is especially true for the more low cost type detector.For the detection of the peak there are 2 options: either the maximum value, or the area under the curve.For the OP I would expect something like a relatively fast CMOS OP, maybe LTC6240 or similar of price is not that important. The baseline (DC level) can probably be subtracted in software.An important factor would be the expected count rate. The more the less pulse stretching is possibly without loosing to much to pulse collision.In principle the pulse stretching would be similar to an anti aliasing filter - the rest would in theory be done in math.

author: OM222O
author_rank: Frequent Contributor
timestamp: August 09, 2020, 10:27:01 pm
content: there are problems with the switching speed, but the bigger thing is the I2C communication time. I found that even with the max frequency, the 16 bit number takes longer to transmit than the actual switching so ... SOL there. Parasitics would be quite large for the switch ICs too, but you're then also adding the issue of unmatched resistor ratios, temp co, etc. Based on OP's description it seems like they carry out tests with different bias voltages, so they can adjust the gain for that specific voltage, carry out the test and change that if needed, rather than sampling at 3.6MSPS AND changing the gain dynamically at the same time, that'd be quite a feat to achieve using range switching and would require a different solution all together (usually having different fixed gain amplifiers and sampling all, then stitching together via software. Really expensive and time consuming to get right).If OP provides more details, then perhaps we can make better recommendations.Also MCUs usually advertise their ADCs as X number of bits but in reality they perform way worse.For example the popular ATMEGA-328P advertises 10 bit ADC but INL and DNL are about 2LSB, so really it's only an 8 bit ADC with a bunch of added noise. That's why I mentioned the noise figures don't seem to exist on the ST datasheet, at least not in a way that makes much sense to me.

author: Unixon
author_rank: Frequent Contributor
timestamp: August 09, 2020, 10:48:10 pm
content: Quote from: snx on August 09, 2020, 06:37:26 pmThere are programmable gain amplifiers, but you have to condition signal into their working range anyway.Do you have a random amplitude pulse each time?

author: snx
author_rank: Contributor
timestamp: August 10, 2020, 06:09:18 am
content: Quote from: OM222O on August 09, 2020, 08:17:03 pmThe Parameters are in the sheet, but it looks like ST made own shortsEL = INL = 11LSBENOB = 12.2 bitsTotal Unadjusted error = +10 -20 LSBQuote from: Kleinstein on August 09, 2020, 08:32:58 pmYes this is kinda true, but 16-bit ADC usually do not really have 16-bit Resolution because of errorQuote from: Kleinstein on August 09, 2020, 08:32:58 pmThis is true, usually there are 4k or 8k channels, so you need at aleast 13 valid bits to fill 8k ChannelsQuote from: Kleinstein on August 09, 2020, 08:32:58 pmI have this one in stock. Maybe i will try itQuote from: Kleinstein on August 09, 2020, 08:32:58 pmUsually big detectors put out 50 counts per second in a normal room and in my experience i never got more than 2000 cps. Since the Si-Detector is much smaller, i except around 1000cps as a maximum count rate.Quote from: OM222O on August 09, 2020, 10:27:01 pmAre you sure 2LSB is referenced to resolution bits? As far as i know, LSB are stated as the difference in value, not bit position 2LSB would mean that a binary value at 10 bit would have differences in the last 2 bits, not completely remove them. For example:1111 1111 00 could be either 1111 1100 11 or 1111 1110 00, not remove 2 bits and reduce the resolution to 0 - 111 111 ?More details:The Goal is to first shape the Output to a better geometrical property. With the current shape, it will be very hard to have correct sampling, because the peak of the signal is almost immediately after the trigger threshold. If the curve rises smaller, there is more time for the MCU and ADC to get the values. Also the current signal is to short to be sampled with 2MSPS or 3.6MSPS and get the peak.The gain of the amplifier does not have to be dynamically switchable, more like 2 or three gain settings. For example, when operating on low pulse height (low bias), lets say 0-500mV, it would be a shape to waste the remaining 2000mV (2.5V ref) of resolution because of fixed gain. If the signal is amplified by 4 in this case, you have 0-2000mV of Resolution. In high pulse height mode (high bias), there would be a gain of 0 needed, because the pulses already reach 2.4V of height. Also, lowering the bias voltage to control the gain, is no option, since it must support different bias voltage, because bias voltage changes behavior of the detector.Lets say i would need at maximum 3 Settings of Gain (0, 2, 4) and could live with 2 settings (0,2). They do not have to be fast or dynamically switchable. The idea with the analog switch I've seen in a commercial detector fronted by Amptek, but made for different detector. See image for the Circuit. But i do not need 4 gains. I will look into the digital pot solution that was proposedThe Signal is random each time, by the pulse-height of the signals a spectrum can be drawn where its possible to see peaks in certain values, looking roughly similar to those EMC test-reports (just as a reference how it will look). The gain will be set and fixed for the measurement and will be calculated from the bias. For example bias 25-27V will be Gain 2, and 28-32V will be Gain 0.As stated, usually there are 4096 or 8192 Channels available, but they have to be valid. The idea is to round pulses into a certain value. For example, an equivalent of a value of 1023.4 would be binned as 1023, and 1023.6 would be 1024. BUT! The initial accuracy must be at least as good as the channels. For example, if you have 4096 channels, the ADC resolution must be at least 12bits.Lets say we take a "perfect" 16-bit ADC with 0 Error as example. It would output values between 0-65535. With 4k Channels, on a 16bit ADC there would be a channel each 16 ValuesFor example:Channel - ADC Val0 01 162 32...1000 160001001 160161002 160321003 160481000 is binary 0000 1111 1010 00001001 is binary 0000 0011 1110 10011002 is binary 0011 1110 1010 00001003 is binary 0011 1110 1011 0000So to in case of this case, we can say the last 3 binary values can be ignored, or just be binned to the next channel value.

author: OM222O
author_rank: Frequent Contributor
timestamp: August 10, 2020, 06:57:34 am
content: Regarding the number of bits, again my bad, was rushing to write an answer. It should be 4LSB to equal 2 actual bits, but if they provide an ENOB figure well then that's your actual resolution, which seems to be 12 bits in this case.If you don't need fast switching then the digital pot idea works like a charm, giving you a very wide (almost infinite) control for the gain, since you can change both resistors in the amplifier path.If you're going to such high sample rates just to detect the peak, why not use a peak detect + smaple and hold circuit for measuring the peak seperately?

author: snx
author_rank: Contributor
timestamp: August 10, 2020, 07:17:32 am
content: Quote from: OM222O on August 10, 2020, 06:57:34 amYes, this would be an idea, but given the short peak time, you would need a very fast peak-detector. I currently know no design that is that fast, but maybe some people around here know one.

author: ChristofferB
author_rank: Frequent Contributor
timestamp: August 10, 2020, 07:27:52 am
content: For a multichannel analyzer 16 bit is way plenty resolution! This would theoretically let you have a conversion gain of 65K!!Look up the manual for the Ortec 452 shaping amplifier (which seems very close to what you need), it's very 1970s but it has some excellent theory and a nice block diagram!

author: MattHollands
author_rank: Frequent Contributor
timestamp: August 10, 2020, 07:42:44 am
content: Quote from: snx on August 10, 2020, 07:17:32 amADI have a nice article on peak detectors.https://www.analog.com/en/technical-articles/ltc6244-high-speed-peak-detector.html#Looks like the Current Boosted Improved Peak Detector is approaching the performance you require. Might be worth a SPICE sim.

author: OM222O
author_rank: Frequent Contributor
timestamp: August 10, 2020, 07:48:18 am
content: https://www.analog.com/en/technical-articles/ltc6244-high-speed-peak-detector.htmlI think you'd want to use the current boosted version that's promised to work at 200KHz.You just need a fet to discharge the cap as it seems to be missing from the diagram.Eidt: well someone else mentioned it too, posted at the same time sorry

author: Kleinstein
author_rank: Super Contributor
timestamp: August 10, 2020, 08:33:36 am
content: Analog peak detection is also not that simple and accurate. Using a fast ADC is a real alternative today and can be lower noise. Anyway an analog peak detector would also need peak shaping, it would be even more critical here.For the ADC one does not need to have the unadjusted error to be so low to get perfect 12 Bits. Some of the errors like offset and a fixed gain error can be compensated for. Chances are the 4 K or 8 K channels are also more like enough so that quantization error does not matter - so this is not the factor that determines the accuracy needs for the ADC. The number of channels more like compared to the nominal resolution needed. So 12/13 Bit minimum.The µC internal OP specs do not look that bad as I have expected. It is however relatively high noise (especially 1/f noise) and has a limited drive capability. For the speed it is quite low in power.I would still prefer an external one as it would be difficult to upgrade - with more common OP one would have the option to keep the board and just upgrade / exchange a chip. They often come in standard cases.If size is an issue the LMV771 would be a good candidate for the OP.It helps to have the same supply as the ADC, as this also gives amplitude limiting and thus saves on additional clamping. With Rail to rail OP one may have to take care of the input cross over - so ideally not use the full RR input, but stay on the better side that often is some 0-2.5 V with a 3.6 V supply.Anyway the first step would be getting the general circuit and do some simulations there and than choose the final OPs for the circuit. Here there are many OPs to chose from and I don't think one would need extreme performance or exactly one special OP to start with.The problem with a digital pot is that the parasitic capacitance depends on the setting. So the wiper changes more than just the divider.If simple is needed, there are ready made variable gain amplifiers like MCP6S91, that may be good enough.

author: snx
author_rank: Contributor
timestamp: August 10, 2020, 11:14:39 am
content: Quote from: Kleinstein on August 10, 2020, 08:33:36 amSo you think the ADC of the MCU can be used for this? This would save alot cost, since 16bit, >2MSPS ADC's seem to be very expensive.Quote from: Kleinstein on August 10, 2020, 08:33:36 amThe 3.3V supply from the MCU is generated by generic SMPS wich supplies VDD and VDDA of the MCU. The 2.5V is the reference voltage for the ADC/DAC Part. Usually the references cannot supply enough Power to drive OPAMPS and stuff. So you suggest to use higher reference? For example 3V? If the Analog Input goes beyong 2.5V, the ADC will not damage, it will just display max value.Do you know if LTC6268-10, or LTC6088 or ADA4622-2 would work too? These seem to have similar parameters an i have them in stock to do testsQuote from: Kleinstein on August 10, 2020, 08:33:36 amWhat about LTC6910? It has simple binary configuration

author: OM222O
author_rank: Frequent Contributor
timestamp: August 10, 2020, 11:43:01 am
content: I would suggest you find a general equation for the decay of your signal, if you decide to go for the pure sampling method, that way you can work your way back and reconstruct the actual peak since it's likely you won't catch it exactly.regarding digital pots and programmable gain amplifiers, the PGA inside the op amp is basically the same thing. It's a very wildly used circuit and I'm not sure what your problems are with it? the delay in changing the setting? if so that doesn't cause any issues since OP mentioned he doesn't need dynamic fast switching, just adjustment before each test.

author: oschonrock
author_rank: Regular Contributor
timestamp: August 10, 2020, 12:47:51 pm
content: Quote from: snx on August 10, 2020, 11:14:39 amSome clarifications:1. I think "reshaping the signal" is a distraction. Any circuit which can "reshape it", can measure the peak (in analog domain or digital). Unless you call "peak detect" a reshape.2. From what I understand, you just need the peak value right? You don't care about the exact shape?3. What sort of accuracy are you after for the peak value? You talk about 16bit. That's pretty accurate? Is that really necessary or will 12bit do? This is important because, together with the speed of the pulse, this will totally drive the solution. To get 16 bit accuracy, you don't just need a 16 bit ADC, your circuit and the power supply to it needs to be super noise free and you need a precision voltage reference (independent, the one in the CPU will almost certainly not do for proper 16bit accuracy). Your PCB will need to have fully seperate analog and digital sections with independent power supplies, independent ground/power planes etc etc etc. So, will 12 bit do? Note, that the scope you are using is just 8-bit....As already discussed, either a fast ADC or an analog signal conditioner, followed by a simple ADC are the best bet. My instinct leans toward the analog signal conditioner first, then you can use CPU ADC. That LTC6244 App note (current boost option) is almost exactly what you need and for $10 BOM (2 "special" op-amps and a bunch of passives) and near zero design time, this seems like an attractive option. If it can do the job...Also the discussion about amplifier gains is a bit premature for me. These are not super small signals. The small pulse has ~400mV peak. How accurately do you want to measure that small peak? To the nearest 5mV, which would be ~1% (8-bit is sufficient, if pre-amplified or 12bit to give 16x dynamic range which seems more than enough for your pulse size range)? Or is 16 bit accuracy (0.0015%!!) necessary? If so then you are dealing with measuring and/or preamplifying a delta V of 400/65000 ~ 6uV. I am not even sure that's possible at this bandwidth...But we need more data....The pulse is "fast ish" but it's not clear to me from the traces how fast it really is. Can you provide some traces with the horizontal zoomed out to 2us? (ie 10x what it is now) And/or turn on a rise time measurement on the scope. We need to see that edge. The width is not important, it is the rise time that matters,Thanks

author: rstofer
author_rank: Super Contributor
timestamp: August 10, 2020, 02:17:27 pm
content: Dave did a video that winds up with an op amp precision peak detector (the 3rd circuit iteration), maybe it is useful...

author: Kleinstein
author_rank: Super Contributor
timestamp: August 10, 2020, 03:15:08 pm
content: The analog peak detector gets tricky if it has to be fast and accurate at the same time. So one would need peak stretching anyway. Even than 10 bit accuracy gets tricky and slow.The peak shaping is nothing magic, it is essentially a low pass filter with a suitable response in the time domain, so that the short pulse will get wider, as the higher frequency part is lost. Ideally this would be with little undershoot and not too much slow decay at the very end. However nearly every low pass filter will do pulse stretching and the differences are not that large. Even a not so good solution would still be linear. Optimization is a little about the last little bit of noise / sensitivity.The LTC6910 and LTC6088 look good. The LTC6268 is more like overkill and the ADA4622 may not be happy with well below 5 V supply.For looking at the peaks I would prefer looking at the area instead of the actual maximum value. With scintillators both should be proportional to the energy as the peak shape should be fixed. Chances are the area can be more stable (e.g. with temperature). In addition the area measurement can be lower noise as it uses more than just 1 ADC conversion. With enough computing power the ideal way would be a kind of peak fitting: with parameters amplitude and time. This is kind of in between the peak hight and area. With enough simplification this may be a feasible way: calculate the correlation with 2 test shapes (about the expected shape to get the amplitude and one closer to the derivative to fix the position).There is also a semi analog way to the area way: have an extreme low pass filter close to an integrator with a very slow reset and measure the quasi DC value before and after the peak.I think the ADC inside the µC can be OK if the µC gets a clean supply (e.g. LDO after SMPS). However I have no experience with the ST µCs and don't know how sensitive it is to the actual layout.This is because I very much doubt one would really need perfect 12 or 13 bits. Only really high end detectors (e.g. cooled germanium direct semiconductor detector) have such a resolution. For the gain error the more problematic point is a stable detector gain.The OPs would likely be supplied by the same 3.3 V or similar voltage as the analog part of the µC.

author: oschonrock
author_rank: Regular Contributor
timestamp: August 10, 2020, 03:18:29 pm
content: Quote from: rstofer on August 10, 2020, 02:17:27 pmYeah good. I was going to find the link to that. This is a goo introduction. However, to be clear for the OP, even the final version of what Dave talks about is not at the level of complexity or performance of that ADI article linked to above.Depending on the rise time of the pulse (waiting for detail) that ADI circuit, which catches the peak of a 200kHz sine wave as shown, may or may not be enough for this application.

author: oschonrock
author_rank: Regular Contributor
timestamp: August 10, 2020, 03:20:55 pm
content: Quote from: Kleinstein on August 10, 2020, 03:15:08 pmThis doesn't make sense to me.The part the OP is interested in (I believe) is the rising edge and the initial peak.If you apply a low pass filter to that, you will flatten the peak and get the wrong value. Totally defeats the purpose?We want the information in the very steep edge. That has the highest frequency content. So why would we use a low pass filter? It will just give us some kind of "low frequency average"..which is exactly what we do not want.You are right that "fast peak detect" is tricky. That's exactly because it has to deal with that high frequency content. Anyone can apply a low pass filter and get an average. Then I can get grandma to watch the value at the output of the low pass filter, and she will get it spot on?

author: snx
author_rank: Contributor
timestamp: August 10, 2020, 04:31:08 pm
content: Quote from: oschonrock on August 10, 2020, 12:47:51 pmYes, correct the shape of the pulse is irrelevant, only the peak value is of interest.The peak is linked to the amount of radiation energy hitting the detector, the higher the energy, the higher the amplitude will be. In terms of Resolution, i need 4096 Channels, so basically a *perfect* 12-bit ADC, so in reality maybe a 14bit. Sure the scope has less, but usually scopes are to visualize values, not exactly measure them, that's why you use a bench top multi meter to measure voltage and not just the DC-Meter in the scope. Also, the signal can be reshaped or transformed freely, unless the output has a defined link to the input. I've also seen approaches to measure the peak by simply use a Comparator to create a rectangular pulse, and then precisely measure the "on" time with a FPGA, but that's. The pulse length is linked to the pulse height, so this works. But that's another approach.Detectors are limited towards energy depending on size, so lets say for this one, the maximum possible value out of 4096 Channels is 3000 Channels, the count rate above 3000chnl is so low, it can be ignored. Tricky is the thing, that the gain has to be set-able, because for example at low bias voltage, the 4069 Channels are spread between 0 and 400mV for example, but at high bias they are spread between 0 and 1200mV. If its unity gain 1, the problem would be that if we use a 10bit ADC for example, when the value at high bias would be 0-1000mV, we would have 1024Channels, but if the bias is low (0-500mV) we only have half of values. The further processing of data would be to sample a collection of peaks, for example 5000pcs. Then a visible peaks in the values should be visible. For example, a calibration source would put two peaks in the spectrum, one at 32keV, and the other one at 661keV. These are linked to ADC samples in case of spacing, so we would know between the adc reading x and y, where x = 32keV and y=661keV, there are 629Channels, so all values that not mach a channel would be rounded to the next one.I've captured the two pulses for you. One rather small one of 140mV, the other 850mV. In the final version, the signal will be less noisier than in the scope shots, i basically used the voltage from a bench-top supply and put things on a breadboard with a not-professional coupled detector, so ignore the noises

author: Marco
author_rank: Super Contributor
timestamp: August 10, 2020, 04:40:31 pm
content: Quote from: snx on August 09, 2020, 06:37:26 pmMeh, don't make things harder than they need to be ... just R-C filter it, then a PGA.

author: Marco
author_rank: Super Contributor
timestamp: August 10, 2020, 04:50:40 pm
content: Quote from: oschonrock on August 10, 2020, 03:20:55 pmLets say the avalanche is instantaneous for a moment ... the original waveform is already the output of a low pass filter for that instantaneous energy.In principle it's all linear ... the peak of the low passed pulse has a linear relationship with the peak. Also in theory the area under the curve is linear with the original energy too, which can be measured with less noise than the peak (and with a lower resolution ADC). Not that noise seems to be a problem here.

author: snx
author_rank: Contributor
timestamp: August 10, 2020, 08:02:04 pm
content: By the area of the curve you mean like sample and then geometrically restore the peak by adapting the measurements to a known geometrical shape? Like measuring a sine wave with a low bit resolution?Still, does this work with so few samples? Lets say we have 2MSPS, this means a sample each 500ns, so a pulse of 10us would get 20 Samples. Lets say for bad luck, the first and the last sample misses the pulse, so there is only 18 samples? Would that be enough to either find the peak, or calculate the area of the curve? Would it not even be more vital to shape the output to a better shape?Also, i noticed that for example Amptek has a similar pulse shown here:https://www.amptek.com/products/digital-pulse-processors/dp5-digital-pulse-processor-and-mca(2- Prefilter Output - ADC Inputlooks really similar to my pulses, but they have 80MSPS 12bit ADC which is extremely faster than my 2MSP. They would get 800 Samples in 10us

author: oschonrock
author_rank: Regular Contributor
timestamp: August 10, 2020, 08:12:54 pm
content: Quote from: Marco on August 10, 2020, 04:50:40 pmThat's "possibly correct", but I am not sufficiently familiar with the physics apparatus he is using. In his response above he says "Yes, correct the shape of the pulse is irrelevant, only the peak value is of interest", and he is the best one to judge given we don't know he experimental setup...?

author: oschonrock
author_rank: Regular Contributor
timestamp: August 10, 2020, 08:14:45 pm
content: Quote from: Marco on August 10, 2020, 04:40:31 pmI agree "shaping it into a gaussian" does not seem relevant, but upon request for clarification he clearly says: "Yes, correct the shape of the pulse is irrelevant, only the peak value is of interest"...Which means.... if you RC filter it, you have just ruined the measurement..?

author: oschonrock
author_rank: Regular Contributor
timestamp: August 10, 2020, 08:34:17 pm
content: Quote from: snx on August 10, 2020, 04:31:08 pmThat's very helpful thank you.Without doing a fourier analysis on that, my MKI eyeball says that the leading edge of those pulses "fits" a sine wave of half period of about 3us. ie 6us full Period or about 160kHz. That means that high speed peak detector circuit should be able to keep up with that pulse (or very nearly so).I am not sure what your constraints are, in terms of budget and time. I would do the following:1. Make a protopye of that peak detect circuit. Feed your pulse through a unity gain inverting opamp circuit first (use a high BW/quality opamp, maybe the same type). I am thinking of a soldered circuit in your preferred format, not necessarily a PCB. You also need a mechanism for resetting the circuit between pulses obviously.2. Then have a look on the scope. Can it follow? We think yes... Lets prove it.3. At the same time, make some estimates of the inaccuracies of your aparatus / sensors. ie can you really get rid of that noise such that this is a 12-14bit signal? Get hold of a higher resolution scope if you can, to judge how clean this signal is. This is not that fast for a scope, so this should be possible. There is no point going nuts with 16bit ADC infrastructure if all you're going to measure is noise.If the answer to 2 is "yes", then you no longer have a speed issue, and you can design your ADC stage for the accuracy which is justified by the answer to 3. (whether you need preamps / separate power supply etc).I don't understand some of the other comments about RC / low pass filtering / estimate energy based on area under curve, etc. If I have understood your answer correctly, then you don't want to do that. I am taking what you said at face value. You want to measure that peak, as accurately as you can (just how accurate is yet to be determined).Does that help?

author: OM222O
author_rank: Frequent Contributor
timestamp: August 10, 2020, 08:36:58 pm
content: Snx please clarify: what are you trying to measure? If it's the peak, you can breadboard a prototype of peak detect for under 10$ and see if it works for you.If you're interested in pure sampling, then you need some form of formula that describes the overall shape of the pulse (maybe split it into 2 for conviniance, it seems like a sharp linear rise, then a decay process). You can then use the "18 samples" to figure out the scaling / offsets that when applied to the basic formula, reconstructs the original curve, allowing you to analyze the data.Solution to the variable gain is already answered and as everyone mentioned reshaping doesn't seem to do anything in this case. Please read through all the replies carefully, you should already have your answer

author: Kleinstein
author_rank: Super Contributor
timestamp: August 10, 2020, 09:12:01 pm
content: Quote from: oschonrock on August 10, 2020, 08:14:45 pmOne does not need to directly read the hight of the peak. It is good enough if the height of the stretched pulse is proportional to the hight of the input peak. To make sure this works the amplifier part should be quite linear, otherwise a RC filter is linear and will thus ensure the proportionality.The gain factor for the whole setup would need to be calibrated from time to time anyway (e.g. with a known source or line from the background).If the pulse shaping / filter will remove the frequencies beyond the Nyquist limit, it should be OK to get the pulse area from a relative limited number of points. One has 2 options here:One is integrate over a little more than the actual lenght, so that getting the exact position does not matter that much. However this would add some extra noise.The other way, to get close to minimal noise would not calculate the area, but do a correlation with a test function that is similar to the peak shape (probably just a sequence of some 50 values). This way the values closer to the peak maximum get a higher weight and the points at the start and end get little weight. So there is little error from missing a few point at the start or end. Compared to just looking for the largest point, one still uses more points and is less sensitive to having a sample just at the peak.

author: oschonrock
author_rank: Regular Contributor
timestamp: August 10, 2020, 09:18:43 pm
content: Quote from: Kleinstein on August 10, 2020, 09:12:01 pmThe OP says: He needs to measure the peak and only the peak. And you decide otherwise...? On what basis? I don't get it.

author: oschonrock
author_rank: Regular Contributor
timestamp: August 10, 2020, 09:21:46 pm
content: Quote from: OM222O on August 10, 2020, 08:36:58 pmHe did already clarify, because I asked:https://www.eevblog.com/forum/projects/help-with-opamp-for-shaping-circuit/msg3182710/#msg3182710The peak and only the peak.I am really not sure where all this other stuff came from... area under the curve...we could also measure the shape of the clouds, because we think that's a cooler question? ;-)

author: Marco
author_rank: Super Contributor
timestamp: August 11, 2020, 12:08:28 am
content: Quote from: snx on August 10, 2020, 08:02:04 pmThere's little difference really, either way you'd be fitting a curve using multiple samples. It's easier to think of it in terms of peak detection though.You can do a fast analog peak detector and auto-reset circuit too, but it's going to be a little more complex.

author: snx
author_rank: Contributor
timestamp: August 11, 2020, 05:17:41 am
content: Quote from: Kleinstein on August 10, 2020, 09:12:01 pmThat is also correct. Maybe i need to clarify a few things more.These detectors start conducting when hitting by light, so if placed between a positive and negative voltage, they actually produce something like short circuit. By Adding Series resistor and Output Capacitor you get a negative peak at the capacitor, because its stored energy is shorted to ground. See attached PDF for the detector circuits. I use Circuit E with a 1k Resistor and a 100nF Capacitor in the "Sout" line.There are also possibilities to use different readout with Figure 13 with Trans-impedance Amplifier.Actually what we measure, is not that much of importance. If its the pure peak, the area under the curve (this can be helpful in high pulse rate where pulses overlap, a peak detector cannot catch this), or the length of the signal. What matters is that the measured pulses have relation to the initial discharge on the detector. The SiPMS are basically the exact same thing than "regular" Photomultiplier tubes. For more information, see pdf from sensl.Also see this page:http://physicsopenlab.org/2016/02/16/silicon-photomultiplier-sipm/what they actually did there, is hook up one of those SiPMS to a Computer Audio Card as ADC to sample the pulse with 44ksps, and they produce rather good measurements for that experiment!Quote from: oschonrock on August 10, 2020, 08:34:17 pmOkay, i will try to build a prototype that is soldered to prototype board with the Analog Inc Design of the current boosted circuit. I have a few opamps and transistors here so i think i should finish this by the end of the week.

author: OM222O
author_rank: Frequent Contributor
timestamp: August 11, 2020, 11:36:14 am
content: From the scope pictures looks like the signal is more on the order of 5 or 600Khz so there's a chance the current boosted circuit needs even more current boosting, for which there are plenty of things you can do. Just share the results from your prototype if it wasn't fast enough.

author: snx
author_rank: Contributor
timestamp: August 16, 2020, 07:43:01 am
content: Quick Update:Parts for the test will arrive next week and also a development board for the bias. I will then assemble the peak detector and will show results