Small micro based sound player.

Discussion in 'The Projects Forum' started by windoze killa, Jan 22, 2012.

  1. windoze killa

    Thread Starter AAC Fanatic!

    Feb 23, 2006
    605
    24
    Hi all. Its been a while since I have been here but I have an idea that needs some input.

    I want to build a sound playback device. It will have 2 stored sounds. First sound will be looped continuously and will have a variable speed/pitch relative to an input. The other sound will be looped continuously but only active with the presence of another input. The other requirement is the second sound needs to be superimposed on the first without changing the first.

    Now for some clarification.

    First sound will be a WW2 aircraft engine. The stored file doesn't have to be large as it will be looped. maybe even not stored at all but output from the firmware. Its speed/pitch will be controlled by the throttle output of an RC receiver.

    The second sound will be a machine gun/cannon firing. Triggered by another RC receiver output.

    Both of these sounds will be output on a SMALL speaker.

    Any ideas/warnings. I was hoping to use MPS430 micros. Am I aiming too high?

    TIA

    Jason
     
    Last edited: Jan 22, 2012
  2. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    A small speaker will not sound loud and will not sound realistic. It will just sound like a little speaker.
     
  3. windoze killa

    Thread Starter AAC Fanatic!

    Feb 23, 2006
    605
    24
    I realise the limitations of small speakers but I was thinking it would be a good staring point. If I need to go up in power and speaker size I would work on that at a later point. I am concentrating at the moment on the micro side of it. Your advice is apreciated though as always.
     
    Last edited: Jan 22, 2012
  4. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    I have a couple of the MPS430 launchpads, but have been somewhat intimidated by the complexity of getting started. The PICAXE family is much easier to learn to use.
     
  5. windoze killa

    Thread Starter AAC Fanatic!

    Feb 23, 2006
    605
    24
    I also have a couple of launchpads and I got a few samples as well so I want to try and get these working.
     
  6. davebee

    Well-Known Member

    Oct 22, 2008
    539
    46
    Heh heh! This is almost exactly like a project I made for a museum exhibit a few years ago.

    Some retired pilots built the cockpit of an old airplane into a kids museum -

    http://www.inkfun.org/exhibits/airlines.php

    and they wanted the plane to have sounds. Air traffic control sounds would be playing in an endless loop, but when a kid hit a big button, the sound of an aircraft engine starting would play. LOUD!

    I handbuilt an audio board with a Parallax Propeller multicore microcontroller that read WAV files from an SD card and used duty-cycle modulation to create audio outputs.

    It was a pretty difficult project to read and play one WAV file from a FAT filesystem, while simultaneously listening for a buttonpress which would trigger the reading and playing of the second WAV. The multicores of the propeller helped a lot. I don't think I would even want to try this with a conventional single-core microcontroller, although I'm sure a skilled programmer could make it work.

    The guys at the museum fed the audio to an automotive subwoofer amplifier, and they were very happy with the wall-rattling results!

    So yes, your project is totally doeable if you have the skills.
     
  7. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    Just think what a tiny speaker fed from a low power amplifier will sound like. Little squeaks, not an aircraft engine and machine gun/cannon firing.
     
  8. windoze killa

    Thread Starter AAC Fanatic!

    Feb 23, 2006
    605
    24
    Ok. Point taken. I will use a 150W amp with a 5.2 surround sound system. One problem though..... I don't think my 500gm foam Spitfire will lift it. :D

    Seriously though. I don't need hifi sound. It is more for a bit of a sound effect as it races past. It doesn't have to be a constant ear shattering noise. All up weight I am hoping I can keep it under 50gms.

    Also Davebee I will have a look at the propeller but I think it might be a bit over the top. I am also trying to avoid SD cards and the like. I am sure the sounds I want could be produced with software. I just need to start getting my head around it.
     
  9. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    My friends and I also fly electric RC war airplanes and they sound like electric airplanes.
    Some guys fly RC airplanes with real engines. The 4-cycle ones sound fairly realistic and the 2-cycle ones sound like chain saws.
     
  10. windoze killa

    Thread Starter AAC Fanatic!

    Feb 23, 2006
    605
    24
    Exactly. Thats why I want to add some "realistic" sound.... well a little more realistic than it has. I feel a 1W amp and speaker "should" give a bit of noise that could be heard from a short distance as it flies past. I will post a schematic soon.

    Thats because they are chainsaws with wings. :D
     
  11. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    It should be possible, I think the first thing to do would be to use some audio editing software to work out what the shortest samples, lowest number of bits per sample and samples per second sound acceptable. That should tell you if there is enough program memory on the micro to store the samples or if you need external memory. You could perhaps use 2 micros if it's borderline.
     
  12. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    You can get cheap mp3 player modules that can be controlled by a micro. The sound can be stored on a SD. Variable speed/pitch will need some serious sound processing much harder to do. I have an idea for the second sound. Make a stereo recording of the two sounds. Sound one and two in separate channels. And let the whole thing loop forever. But mute the gun sound then not needed. Much more simple than starting the sound
     
Loading...