??? 03/06/11 20:42 Read: times |
#181462 - Shouldn't be too expensive Responding to: ???'s previous message |
It shouldn't be too expensive to sample and compute.
You have two choices. Either compute sum of squared samples in the ISR, or buffer the data and have the main loop do batch-computations. The quality of your computations depends on sampling frequency and number of bits of resolution (and obviously amount of noise, offset error and scaling error of the data), so it would be good if you did an FFT analysis of the data to figure out how much energy there are in frequencies above the 150Hz you mentioned earlier, just so you don't select too low sampling frequency. |