need help choosing a microcontroller

Thread Starter

kuhkoa

Joined Jan 8, 2011
5
Hi everybody! I'm new to forum and I was hoping someone could help me choose a microcontroller for my team's project.

I'm a first year college student majoring in Computer Science. I've recently obtained an internship where I'm in a team of 5 other undergrads (mostly Electrical Engineers). We are supposed to build a motion detection sound system for a local musical instrument museum's display.

Our idea is to set up motion sensors in front of the glass displays so that if somebody triggered the sensor, a sound clip of the instrument behind the glass will play.

So basically, we need a microcontroller that we can hook up the motion sensors to and store a bunch of sound files in.

I haven't had much experience with microcontrollers in the past, except for playing with one to program a robot to do certain things (just sense its environment and play sounds and such)... so hopefully, you can recommend something that's easier to use.

Thank you so much!
Kirsten
 

thatoneguy

Joined Feb 19, 2009
6,359
Would it be OK to have the sound samples stored in different ICs?

What are the sound samples (Duration, volume, etc)? It may be easier to run a PIC for the detection of motion, then trigger the "Play" on a few external 20 second sound record/playback ICs. The sounds would need to be pre-recorded, but that would give you good fidelity.

Most microcontrollers outside the dsPIC line cannot generate much for sound other than different frequency beeps.
 

Thread Starter

kuhkoa

Joined Jan 8, 2011
5
Ohh, I see. Yeah, I just read somewhere too that even the dsPIC line wouldn't have the best sound quality.. so that's probably not the best thing.

Yeah, I think that sounds like a good idea. Would any PIC microcontroller work or do you think a certain one would be better for the job?

And thank you so much for you help!
 

thatoneguy

Joined Feb 19, 2009
6,359
Ohh, I see. Yeah, I just read somewhere too that even the dsPIC line wouldn't have the best sound quality.. so that's probably not the best thing.

Yeah, I think that sounds like a good idea. Would any PIC microcontroller work or do you think a certain one would be better for the job?

And thank you so much for you help!

What uC's are you familiar programming? What languages? Most all microcontrollers are capable of what you need to do, Digital or analog PIR input, and digital outputs for selecting which audio IC is to play.

I personally love PICs with Sourceboost C or Mikro C, as they are free to affordable, and work with any PIC processor from the PIC10 to PIC18 series.

With AVR, there are free dev tools as well, and the Arduino simplifies the programming at the sacrifice of a bit of speed, which I don't think will be a major issue in your case.
 

t06afre

Joined May 11, 2009
5,934
You could store the sound in MP3 format on a SD card. then use a MCU to decode and play the sound. But you have to use some audio DA with amplifier to reproduce the sound. At least discuss it with your professor. Because I think this is some sort of school assignment ;). But I do not mind helping for that reason
 

Thread Starter

kuhkoa

Joined Jan 8, 2011
5
What uC's are you familiar programming? What languages? Most all microcontrollers are capable of what you need to do, Digital or analog PIR input, and digital outputs for selecting which audio IC is to play.

I personally love PICs with Sourceboost C or Mikro C, as they are free to affordable, and work with any PIC processor from the PIC10 to PIC18 series.

With AVR, there are free dev tools as well, and the Arduino simplifies the programming at the sacrifice of a bit of speed, which I don't think will be a major issue in your case.
The only one I've used was one for my 1-unit robotics seminar last quarter. It was a BASIC Stamp® 2 and it was on a Scribbler Robot. We used Python to write the programs for it.

I'm most comfortable programming in Java, but I'm familiar with C++ and Python as well.

You could store the sound in MP3 format on a SD card. then use a MCU to decode and play the sound. But you have to use some audio DA with amplifier to reproduce the sound. At least discuss it with your professor. Because I think this is some sort of school assignment ;). But I do not mind helping for that reason
I can promise you it's an internship. haha. =P That's why I'm trying to get all the information right. I don't want me and my group to mess it up! What we end up building is going to be implemented at the Museum for Making Music in a few months.

Doing that won't sacrifice any of the sound quality, right? It sounds like a possible solution as well. =] Thanks a lot!

Google Roman Blacks 1 bit audio.
The problem with that one is that I read it sacrifices sound quality, which we can't really do considering it's a musical instrument museum.

Thanks though. =]
 

t06afre

Joined May 11, 2009
5,934
If you follow the SD card path. You can start out using a PCM format (wav files). Then if time permits. Also implemt MP3
 

Thread Starter

kuhkoa

Joined Jan 8, 2011
5
Here is a great sdcard mp3 player with a very simple UART communication setup. It is only $10 and I have worked with it personally with good results. All you will need is a simple external amplifier. Since this is a first level class, doing d/a and audio sampling while talking to a sdcard is definitely going to be very difficult for you.

http://www.mdfly.com/index.php?main...ducts_id=284&zenid=3lkk94q5vu0rob41affj4chcj2
That sounds good. Would I hook that up to the microcontroller? Thanks. =]
 
That sounds good. Would I hook that up to the microcontroller? Thanks. =]

You may want to check with your teacher considering that you have many EE's in your group. But it seems unlikely they would consider a freshman to do mp3 decoding and the whole bunch. You only need simple serial communications which im inclined to believe is on ~99% of common micro controllers.
 

Thread Starter

kuhkoa

Joined Jan 8, 2011
5
You may want to check with your teacher considering that you have many EE's in your group. But it seems unlikely they would consider a freshman to do mp3 decoding and the whole bunch. You only need simple serial communications which im inclined to believe is on ~99% of common micro controllers.
She said she doesn't care how we do it, just as long as we get it done. haha. It's an internship, not a class, so we don't get graded (except we want to do a good job for our client, of course). Our supervisor said just use whatever resources we need and she doesn't care how we do it.. so yeah. That sounds good! =] I'll run that by my team when we meet on Thursday. Thanks so much!
 

thatoneguy

Joined Feb 19, 2009
6,359
Don't you need a MP3 decoder chip? Or can this be done in software on the uC?
Not easily on uC's. MP3's are highly compressed, it is a lossy compression, similar to JPG for photos. I still remember Trying to play MP3s with Windows back in early 1990's, if you moved the mouse, the song would "skip" because a 486 couldn't keep up with decoding AND moving the mouse. Similar happened with DVD Decoding and Pentium II Processors in the mid to late 90's, you needed a "DVD Accelerator Card" to watch movies, since a general purpose processor couldn't decode the video and audio stream fast enough.

Hardware has come a LONG ways!
 
Top