Small micro based sound player.

Thread Starter

windoze killa

Joined Feb 23, 2006
605
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:

Thread Starter

windoze killa

Joined Feb 23, 2006
605
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:

davebee

Joined Oct 22, 2008
540
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.
 

Audioguru

Joined Dec 20, 2007
11,248
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.
 

Thread Starter

windoze killa

Joined Feb 23, 2006
605
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.
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.
 

Audioguru

Joined Dec 20, 2007
11,248
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.
 

Thread Starter

windoze killa

Joined Feb 23, 2006
605
My friends and I also fly electric RC war airplanes and they sound like electric airplanes..
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.

Some guys fly RC airplanes with real engines. ........and the 2-cycle ones sound like chain saws.
Thats because they are chainsaws with wings. :D
 

Markd77

Joined Sep 7, 2009
2,806
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.
 

t06afre

Joined May 11, 2009
5,934
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
 
Top