# What should be my sampling frequency for a peak detector output where it is extremely important for me to capture the first time the peak occured?

Following is the output of the peak detector:

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: 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.

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.