micro adventures

January 10, 2010

Audio Spectrum Analyser for Ping-Pong Board from Conrad.de

Filed under: PONG Board — Tags: , , , — Piotr @ 8:42 pm

Audio spectrum analyser driven by Atmega AVR seems to be a one of the favourite topics. Pong board gives us a nice display with 12 column ten LEDs each. This makes this display a perfect one for a spectrum analyser.  I will not elaborate here any mathematics part of a spectrum analysis. What you need is a discrete Fourier transformation (DFT) or better to say a respective fast algorithm so called FFT. Luckily FFT (its fixed point version) was implemented for Atmega AVR by ChaN in 2005. See for details http://elm-chan.org/works/akilcd/report_e.html. I reused his code and by adding some neccessary lines I made out of the Pong board an audio spectrum analyser.

The audio signal  is connected to the Right Potentiometer via  100µF capacitor. A really bad solution :(

The results are not bad – see two examples.

Remark: in the second video I used some commercial music. It has been flatten by my monitor speakers and microphone from digi cam but we know youtube . I hope they will not remove this clip or get rid of the soundtrack.

I’m quite satisfy with so simple implementation and a pretty good result. I would add here kind of op-amp as a input filter. Max239 from ChaN’s projekt seems to be a good idea. From the application point of view I would look closer to the size of the buffer used for data samples. A decrease to 32 and getting 16 results fits much better to our small display.  And more display effects would make this more interesting.

The sounds at the begining part is not the best, I will make the video once again if someone will ask for :)

Get the Flash Player to see this player.

http://www.youtube.com/watch?v=-YsMRiT4e94

Get the Flash Player to see this player.

http://www.youtube.com/watch?v=Dwob_27O8SM

Here another video, from local host (commercial audio and youtube policy make me crazy)

By the way:

In the first video I used two free programs from http://www.marchandelec.com: very simple function generator and third octave real time spectrum analyser. It is a pity there is nothing similar under linux. The only one I found it was python based tone.py: http://aa6e.net/software/tone/index.html. It does not work for me in my new Pulse Audio environment (padsp does not solve anything). Another peace of software, a command line tonegenerator: http://www.lns.com/papers/tonegen/ works fine with padsp.

Any your feedback regarding Pong Audio Spectrum Analyser or a function generator under linux is highly appreciated.

download

Download AVR 4 Studio / WinAVR files from here

4 Comments »

  1. This is really awesome! Keep doing this way!!

    Comment by Maciek — January 11, 2010 @ 10:15 am

  2. http://www.elo-web.de/elo/mikrocontroller-und-programmierung/ping-pong/autorennen

    I have 3 Type of Speaker on PD0 or D0 as +
    and GND from Battery as – Original Build Manual in Link on Top

    I Hear no Sound with this:
    http://www.instructables.com/image/FQVSIZYF9056YL3/Piezo-speaker.jpg
    http://www.solidshack.com/wp-content/uploads/2009/11/Piezo-Speaker.JPG

    This i have Sound PD0 or D0 as + , AND !!! + Plus from Battery
    http://www.buzzer-speaker.com/manufacturer/speaker/pics/round%20speakers.jpg

    Game Play Normal – No Sound…..

    Please Help Me / Found on
    http://www.forum64.de/wbb3/board65-neue-hardware/board289-diverses/board191-aktuelle-mikrokontroller/32529-ping-pong-bei-conrad-mit-atmega8-auf-120-led-matrix/index3.html

    Comment by Josef Maier — August 6, 2010 @ 4:19 pm

  3. Teste mal, ob das Ding überhapt lauft.
    Hast du den Code vom Spiel schon angepast – versucht du mal.
    +/i kann bei eimem Piezo-zummer eine Role spielen.

    Comment by Piotr — August 10, 2010 @ 6:48 pm

  4. http://apps.linuxaudio.org/apps/categories/scopes_and_realtime_visualizers
    Please link the working video on the youtube page that is blocked for music content.
    Good job!

    Comment by none — January 2, 2011 @ 1:06 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

CAPTCHA Image CAPTCHA Audio
Refresh Image

Powered by WordPress