Audio Level Meter


Closed Thread
Results 1 to 13 of 13
  1. #1
    Join Date
    Feb 2005
    Posts
    67

    Default Audio Level Meter

    Hi, I'm trying to read the adc in to create an audio vu (level) meter, but the input is unstable.
    Any suggestion on how to increase its stabilty, but maintain fast conversions, so the dsiplay doesn't lag the audio level ?
    thnks
    Peter
    Pete

  2. #2
    Join Date
    Jun 2005
    Posts
    37


    Did you find this post helpful? Yes | No

    Default Not Stable?

    Hi! I'm not sure what you mean by the input being unstable? Is it too noisy to sample reliably via the analog input of your pic? Perhaps you need a sample and hold circuit or an active full wave recitifier which uses an opamp and an RC filter. Can you post your code and add some more detail to descibe the problem?

  3. #3
    Join Date
    Jan 2006
    Location
    Toronto
    Posts
    109


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Is your audio source line level or speaker level? If it is from a speaker output then the signal levels will be too high for the pic and cause the instability, try adding a resistor (or a pot) between the PIC input and your audio source to bring it down to a level the pic can handle. You may even want to try using a voltage divider circuit.

    I hope this helps.

    Peter

  4. #4
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default Need the schematic

    Hi,

    Please post the schematic and code with the PIC details. Otherwise it might be waste of time for both of us.

    Regards

    Sougata

  5. #5
    ritvarsrizikovs's Avatar
    ritvarsrizikovs Guest


    Did you find this post helpful? Yes | No

    Post Ritvars

    ADC for PIC is very stable!
    I use 10bit ADC and max error ir one bit.
    Need to use 7805 for stable 5V power, inductors and capacitors for smaller pulsation.

    If You need simple Audio level meter, then use rectifier, resistor and capacitor. And Use Vref pin on PIC, to set max value. Thats all.

    For More advanced level meter use OpAmp and create band filter or band filters and build up to 8 band spectrum analyser. With 16 OpAmps it is very simple to build. And for example 16F877 or 18F452 works fast. You can read all 8 channels and display. By software You can add peak detectation and build log scale.

  6. #6
    Excelcier's Avatar
    Excelcier Guest


    Did you find this post helpful? Yes | No

    Default

    I'm fairly new so be gentle, but could someone provide some sample code as a reference for me to build on? I'd really appreciate it.

  7. #7
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    IMHO, PIC are useless for that. LM3914, LM3915 OR LM3916 don't even require any software and are on the market since over 20 years.

    http://www.national.com/VCatalog/vie...ircuits&tId=25
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  8. #8
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by ritvarsrizikovs
    and build log scale.
    How i build log scale.
    I use linear scale now.

  9. #9
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    You need to use the line in level (normally 1v peak to peak RMS) from a CD / Tape deck. You then need to make a filter fo that the peaks provide a cleaner input (well at least thats what I used form my disco light project).

    The attached image shows the filter I used to input the signal into an 877 PIC. I can't post the code as it was written in JAL (before I discovered PBP ) but works on the pinciple of converting the voltage to a value between 0 and 254, and then making pin on the output port go high, so for example, if the input equated to 120 the first four pins RB0 - RB3 would be made high. Its not quite a true VU or Peak level meter, and I'm sure with re-coding you could do something better, but the effect to a decent track with lots of quiet bits between the beat looks cool
    Attached Images Attached Images  

  10. #10
    Excelcier's Avatar
    Excelcier Guest


    Did you find this post helpful? Yes | No

    Default

    The reason I'm doing this on a PIC and not a LM3914, LM3915 OR LM3916 is because I wrote software for LED light patterns and I simply want to use the music input to trigger the stages of the patterns I programmed.

  11. #11
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by malc-c
    The attached image shows the filter I used to input the signal into an 877 PIC. I can't post the code as it was written in JAL
    If you want post the code or send to email.
    I know JAL.

  12. #12
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    I don't know if I still have it... I'll have a look on my archive to see if I can find it

  13. #13
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Wink The Square Wheel ...

    [QUOTE=mister_e]IMHO, PIC are useless for that. LM3914, LM3915 OR LM3916 don't even require any software and are on the market since over 20 years.

    And Also Do not forget the U.S. NTE 150x series ... (1507 IS ~ LM 3914 )

    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 " !!!
    *****************************************

Similar Threads

  1. Hall Effect flow meter with 16F876
    By revelator in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 10th March 2010, 20:42
  2. Replies: 24
    Last Post: - 1st December 2009, 08:01
  3. PIC Audio
    By toofastdave in forum mel PIC BASIC Pro
    Replies: 28
    Last Post: - 27th June 2007, 13:49
  4. Pic driven digital audio delay
    By skimask in forum Off Topic
    Replies: 12
    Last Post: - 19th April 2007, 20:42
  5. Serin2 and Serout2 with or without level converter
    By fbestepe in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 31st May 2004, 07:10

Members who have read this thread : 1

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