-1
$\begingroup$

Following is the output of the peak detector: enter image description here

The amplitude is not important to me, however the time when the peak occurs is extremely important. So my microcontroller will have an algorithm like capture the digital values, and when 'n' digital values are same (this means the peak has arrived), store the time corresponding to the first time that digital value occured. Hence obviously, it is important that rising part is accurately digitised. This is where I am sort of confused. Following is the FFT of the signal: enter image description here As you can see, it has dominant frequency components upto 15MHz. So should my sampling frequency be greater than 30MHz?

Or should it be calculated as follows: rise time ~ 2 microseconds. Therefore, frequency ~ 0.5MHz. Hence sampling frequency > 1MHz.

Please help me out with this! Thanks!

$\endgroup$
1
  • $\begingroup$ You question lacks clarity. Please edit your question to clarify: What is important about the peak time? Do you need to quickly respond when it happens, or do you need to know exactly when it happens, but some delay is acceptable? In either case, how much delay is acceptable? It looks like you're trying to find a pulse whose underlying width is three or four microseconds -- how fast can you sample? How much more analog hardware are you willing to add? (Note that if you sample at 1Msps, then you don't need the hardware peak detector -- so why do you use it?) $\endgroup$
    – TimWescott
    Jul 3, 2021 at 16:09

2 Answers 2

0
$\begingroup$

I think you are looking at the FFT information wrong. The amplitude of the FFT at 15MHz is very much attenuated (by something like $-60dB$). The rise time is a more accurate estimate. I would do something like 2 or 4x sampling of the rise time. Also consider having a window of something like 10mV for whether you consider the values the same.

$\endgroup$
0
$\begingroup$

If you have a fast scope, you can measure the rise time and from that compute the bandwidth and from that the minimum sampling rate. However, an alternative approach which is valuable where you do not know the precise bandwidth is to put in a low pass filter and then pick a sampling rate that satisfies the Nyquist rate for that low pass filter. The low pass stretches out the rise of the signal, enabling you to very precisely measure it. You can then perform sinc interpolation to calculate the point where your signal hit a given threshold with almost unlimited (given SNR) accuracy.

Note however that if you require absolute accuracy you will have to account for the group delay of your filters (as well as the delay in the ADC and any other electronics). These can be surprisingly large.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.