Results 1 to 4 of 4

Thread: Realtime audio visualization with Atmel XMega MCU

  1. #1
    Join Date
    Aug 2010
    Posts
    11

    Default Realtime audio visualization with Atmel XMega MCU

    Hi All,

    I made a kinda neat hack yesterday to have some sort of "scope" display to run during a 'chiptune' concert we hold every year at our arcade.

    I used an Atmel XMega16A4 MCU (one of their 8-bit AVR microcontrollers) to directly drive the ILDA signals on a cheap RGB laser. For a day's worth of work I was pretty pleased with myself, especially since the whole thing is three chips and a little firmware.

    The XMega uses one ADC channel to digitize a line-level audio signal and then uses the internal 12-bit DAC to drive the X/Y deflection to the laser. A standard differential output stage (with TL072's) gains up the signal.

    RGB control on the laser is TTL, so I just drive it with a few IO pins.

    In the circular oscilloscope, the frame rate is pretty much 60Hz (~16.6ms) and I sweep through 180 points (in a signed, 8-bit sin/cos table) and then use the AVR's multiplier to multiply the incoming audio signal with the circular sweep. I only take one sample per 'step', so the sampling frequency is only about 10KHz. Between that and the slow/crappy scanners in the laser, things are definitely low-pass filtered. Most everything looks like sine waves. I can probably improve on it later when I have more then a few hours to write the program.

    Anyhow, it's only ~7K of code and includes a circular scope, regular scope and a few different sine-wave tests of various sorts. Most of the code is just tables...

    It worked much better than I thought and people got a kick out of it. I had a channel from our audio mixer as the input, so I could play with the EQ and gain to get different effects.

    There's plenty of overshoots and whatnot, but it looks intentional in this application at least. (and it's one of those ~$500 Laserworld RGB's which doesn't seem to scream "high quality" to me on the best of days)

    I apologize for the lackluster camera skills-- I was holding the camera with one hand and babysitting the mixer/laser with the other. Auto-focus had some "issues" at times.

    (more laser-centric @ about 1:18)


    (at about 1:30 here there's the linear scope)


    Of course it's much cooler looking in person where you have some persistence of vision and good color saturation (and YouTube's video codec doesn't seem to help matters), but hopefully you get the idea... I was also projecting onto the smurf-blue walls inside the arcade, so color mix was "sub-optimal"

    Just wanted to "show and tell"!

    -Clay

  2. #2
    Join Date
    Mar 2008
    Location
    Sydney, Australia
    Posts
    315

    Default

    Quote Originally Posted by havok1919 View Post
    I used an Atmel XMega16A4 MCU (one of their 8-bit AVR microcontrollers) to directly drive the ILDA signals on a cheap RGB laser. For a day's worth of work I was pretty pleased with myself, especially since the whole thing is three chips and a little firmware.
    The path of commercial off-the-shelf software packages is so well-trodden, it's always exciting to see new ideas and effects for laser display. Thank you for sharing your work.

  3. #3
    Join Date
    Dec 2009
    Location
    Seattle, Wa
    Posts
    413

    Default

    Way cool Clay.

    I didn't know there were any arcades left in the world.

    Mike

  4. #4
    Join Date
    Sep 2007
    Location
    Omaha, NE
    Posts
    769

    Default

    Thanks for sharing Clay, this is some fun stuff
    I have been wanting to do some playing with AVR's lately, and this makes me want to even more now!
    Thanks, Mike


Posting Permissions

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