Something like AGC would be a big help. I've done this with a floating window comparator. You AC couple the signal to a peak detector, with a suitable discharge time, and then feed 2/3 Vpeak and 1/3 Vpeak to a pair of comparators through RC time constants to determine how fast the system should adapt to any given noise level. Vpeak/2 is fed to the output comparators directly, or thorough a small RC, to limit responses to impulses. This gives you an output when the signal spikes above average, and another if it suddenly drops off. But, that's a fair bit more circuits. More than this, and I'd start thinking DSP :) -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu