Hi, Scoupe
An elegant way would be to compare the instant value of the signal to its mean value ( a R/C ladder with 0.2 or 0.5s time constant is enough ) of your signal ...
So, the reference level will always being adjusted to your signal level ...
That is what I use for Light detection ( RPM optical meters ...) to be aware of ambient light
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks