wackazong Posted October 9, 2009 Report Share Posted October 9, 2009 Hello,for another project of mine I want to construct an interactive Sound box. I want to base it on the MBHP, with the STM32 (as I have some experience now and also a working toolchain :)The features are: The Box consists of an old but working loudspeaker chassis, with speaker and everything. Inside is all the electronic stuff, out comes just the AC power and a USB cable. The box has IR distance sensors and a microphone input. It reacts to people coming closer and to incoming sound signals by playing short samples (from an SD Card) and/or replaying the sound that comes in. It is going to be based on the STM32 core PCB with as few additional components as possible.What I need to know:1) How can I make a line out from the STM32? Do I use the I2S for that?2) How can I play sound files from a connected SD-Card? Could I use MP3 or do I have to use WAV/AIFF?3) How do I make a line in?4) How do I load sound files on the card? I would like to plug in the USB cable from the STM and just use the whole thing as a USB mass storage.I would use an encapsuled amplifier for sound output from the line out to the speaker, these things are really cheap nowadays and extremely small. For the Input I would also use an encapsuled preamp to bring the signal from mic to line level. The IR distance sensors would be connected to AINs.Thanks for ideas, answers, pointers, posts, whatever,ALEXander. Quote Link to comment Share on other sites More sharing options...
SLP Posted October 9, 2009 Report Share Posted October 9, 2009 2) How can I play sound files from a connected SD-Card? Could I use MP3 or do I have to use WAV/AIFF?what about using a seperate mp3 decoding chip? (VS1011)http://www.reichelt.de/?;ACTION=7;LA=6;OPEN=0;INDEX=0;FILENAME=A300%252FVS1011ES.pdf;SID=26LqwUXqwQARoAAD179jkf865b4ea8c1b8bbc76ad9499fb1f85ad Quote Link to comment Share on other sites More sharing options...
wackazong Posted October 14, 2009 Author Report Share Posted October 14, 2009 OK, did some more research: The STM32 Primer 2 looks like it could do all of that. Any chance to get that functionality on the MBHP STM32 core as well?It seems like the CircleOS is available in source code. As far as I can see I could port the audio stuff to MIOS. It is written for a specific codec chip though, the STw5094a. But that's only in BGA....I will have a look for a suitable codec chip with input and output. I would like CD quality (16bit, 44kHz). Is that a problem with the available memory of the STM chip maybe? Would continuous playback/record be possible? Quote Link to comment Share on other sites More sharing options...
wackazong Posted October 14, 2009 Author Report Share Posted October 14, 2009 More:The STM Primer 2 can only record at 16kHz, which is not enough for me.Anybody know a good audio codec? I ordered some samples of PCM5310. Quote Link to comment Share on other sites More sharing options...
Primate Posted December 1, 2009 Report Share Posted December 1, 2009 (edited) Hi, I was also planning to make a new project including a CODEC from TI for line outputs on my MIDIbox. So far I'm going for the PCM1792A (a x2 output, 132dB SNR, 24-bit, 192 kHz Stereo DAC), but I'll have to see how to implement it in the MIDIbox (using STM32 core). Keep us posted!!! :rolleyes: Edited December 20, 2009 by Primate Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.