NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Support Forum » Sound meter - DElta calculation Vs LP digital filter
February 21, 2012 by gnkarn |
Hi, I made a 16 channels led lamp and added the sound meter effect , I will try to add a LP digital filter instead of detecting de max min difference on a 300 samples window, to make a smoother effect. the filter would be like Vo=V0(n-1)+k[Vi-V0(n-1)] , where k should be like dt/RC ; when comparing to an analog equivalent lp filter. The question is , do you have an orientation on how to select the K value ? Thankyou, |
---|---|
February 22, 2012 by hevans (NerdKits Staff) |
Hi gnkarn, You actually mentioned in your post the way to devise what your k value should be. dt in your formula is the time between samples coming into your digital filter, this is just how fast you are getting samples from your ADC. RC is the desired time constant of your filter (if this were an analog filter), this is something you get to pick depending on how much smoothing you want your filter to do. Hopefully that is enough to help you get going, if more questions come up, ask! Humberto |
Please log in to post a reply.
Did you know that the microcontroller's crystal oscillator can be used to keep accurate time? Learn more...
|