AtoD - first attempts


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by malc-c View Post
    Guys, I'm getting a little out of my depth and would like some feedback here.

    From my previous posts some of you (two Steves !) will remember that I'm playing with a 16F873 to come up with a better version of some disco lights based on an 16F628a. I'm now looking at hooking up the audio output from a CD player but I've never played with A - D conversion and not sure what I need to do. I've used the example varibles in the manual so I have

    [/code]


    And it's probably not going to act like a VU meter. I've tried this before. I was semi-successful in 2 ways.

    The first way, I got around it by looking for and averaging the peaks of what I was sampling on the A/D port over X time. It's either that or you feed the audio in thru a diode into a capacitor across the A/D port with a small-ish resistor to ground (I wish I could do ASCII graphics). The audio 'charges' up the cap, the resistor discharges it slowly-ish (think R/C time constant), the diode keeps the cap from messing with the input signal and only let's positive voltage thru even though you do lose the .25v or .7v due to forward voltage drop (or you could use an opamp as a follower). Then you sample the A/D input.

    The 2nd method was using actual FFT routines on a PIC18F4620, 128 bands per channel updated at about 13hz. Ya baby! That was neat to look at on a 128x64 graphic LCD! But the FFT routines cost me some $$$. Check my site (www.srt.com/~jdgrotte) to see what came out at the PICAlyzer link.

    But just sampling the A/D of an audio input won't get you anywhere. It would be just like looking at audio on an o'scope. Doesn't look like anything useful...

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


    Did you find this post helpful? Yes | No

    Default

    Yeah I 'spose when you think of it I would need to rectify the AC signal in some way so that there is something for the pic to read.

    I'll try the diode / capacitor thing and see what happens.. thanks for the input

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by malc-c View Post
    Yeah I 'spose when you think of it I would need to rectify the AC signal in some way so that there is something for the pic to read.

    I'll try the diode / capacitor thing and see what happens.. thanks for the input
    Oh it works pretty good, once you get the caps/resistors all set up to the right numbers. I don't remember the values that I used, but I do know I ended up buffering the input with an opamp before going into the diode. I've got a decent pdf of what I did around somewhere. If I find it, I'll link it.

  4. #4
    Join Date
    Sep 2003
    Location
    INDIA
    Posts
    161


    Did you find this post helpful? Yes | No

    Default furthering the idea.

    Hello Skimask / Malc-c,

    I also want to pursue this project and was wondering, what was the overall results of Malc-c project.

    In abscence of some design guidelines (Schematic) from Malc-c side towards the project, I would like to share my idea.
    1. I also wish to make a dancing light controller with musical input on a ADC port or a PIC 16F72 / 16F873A to make PORTB dance to the music. REALTIME
    2. I am also interested in digitizing the pattern of the music , so that it could be replayed without any music source. STORE/PLAY

    I would first like to work upon the REALTIME idea and then jump over to the STORE/PLAY version.

    Could anyone please guide me thru this.

    regards

    p.s. Wonder it this thread is still alive

Similar Threads

  1. Averaging AtoD samples
    By HankMcSpank in forum mel PIC BASIC Pro
    Replies: 39
    Last Post: - 29th September 2011, 22:51
  2. 16F684 AtoD problem
    By hell_pk in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 20th February 2009, 07:59
  3. Atod Digital Filter
    By GeoJoe in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd April 2008, 18:04
  4. 877A AtoD config problem?
    By ttease in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 1st April 2007, 17:57

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