Low frequency audio level detector using PIC ADC?


Results 1 to 40 of 69

Threaded View

  1. #13
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default Re: Low frequency audio RMS signal level detector using PIC ADC?

    Quote Originally Posted by Ioannis View Post
    The first that comes to mind is to use a DSP or dsPIC for the job as there seems to be a lot of maths.

    But then since the max frequency is just 1,5KHz then maybe the PIC used is good enough.

    Of course it has the speed to convert the input sample, but do you have time to proceess afterwards?

    The other matter is the form of the input signal. You mentioned that it is greatly varying. Are you feeding it directly to the ADC? Any pre-conditioning I thing is necessary (filtering, dc-level bias etc.).

    Ioannis

    P.S. I changed the thread title hoping you do not have any objection.

    Actually, that's the beauty here - there's almost no complicated maths....ie just et the special event trigger grabbing ADC samples at a reasonably high sampling rate (& this is all done in the background without any recourse to interrupts etc), then in the main (fast) loop, just compare the present ADC sample to the last sample...if it is the same or bigger, keep it as the 'present peak'....if it's not the same or bigger. start decrementing the variable linearly.

    This approach wouldn't be right, if the PIC was already running intensively....but like I say, in my application the PIC isn't being too stressed.

    The signal is preconditioned in that it goes through a buffer.....this puts the AC signal on a DC level of half VCC (necessary to full wave rectify the signal inside the PIC).

    At the end of the day, I'm really just using the latent (otherwise wasted) power of the in-situ modest PIC to save on a few components (not for cost, but space) - .I don't want to start involving specific specialised ICs for what is after all a simple enough requirement.

    oh, btw I've no problem with the title being changed!

    Quote Originally Posted by languer View Post
    Hank, take a look at the Tips & tricks doc (http://ww1.microchip.com/downloads/e...Doc/01146B.pdf). Pay special attention to chapter3 (CCP and ECCP); tips #7 and #11.
    wow...a great doc.....need to digest - thanks!
    Last edited by HankMcSpank; - 24th February 2011 at 20:59.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts