Re: sample & hold: maxima - minima



Somewhere on usenet Fri, 21 Oct 2005 06:57:03 -0700, Tim Wescott wrote:

> sonos wrote:
>> Somewhere on usenet Fri, 21 Oct 2005 01:22:15 +0000, josh lawton wrote:
>>
>>
>>>I think you are better off to just measure with an a/d and write
>>>software to detect the peaks
>>>
>>
>>
>> this should work for the peak...
>>
>> --||---->>adc>>store conversion
>> |
>> |->>pin pulled low to reset after reading from adc
>>
>>
>> but for the trough? this is where I draw a blank.
>
> I think what Josh is suggesting is that you just sample often enough to
> capture the whole waveform and detect the peaks in software. This would
> require you a sampling rate vs. peak accuracy tradeoff -- if your signal
> is a pure sinusoid it wouldn't be too bad, but if you have to capture
> brief events then you'd have to sample pretty darn fast.

Yes, this is a problem as the signal is random. It is certain that
the peak/trough will generally occur w/in 1 Hz however, but will change
in amplitude over time. In fact, it is the change of peak/trough
amplitude that must be captured and analyzed after aquisition. There is
some tradeoff in the uC w/ triggered vs free run mode for adc; triggering
introduces an annoying jitter whereas free run mode does not.


.


Quantcast