need help choosing a microcontroller

Discussion in 'Embedded Systems and Microcontrollers' started by kuhkoa, Jan 8, 2011.

  1. kuhkoa

    Thread Starter New Member

    Jan 8, 2011
    5
    0
    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
     
  2. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    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.
     
    kuhkoa likes this.
  3. kuhkoa

    Thread Starter New Member

    Jan 8, 2011
    5
    0
    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!
     
  4. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718

    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.
     
  5. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    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
     
  6. blueroomelectronics

    AAC Fanatic!

    Jul 22, 2007
    1,758
    98
    Google Roman Blacks 1 bit audio.
     
  7. kuhkoa

    Thread Starter New Member

    Jan 8, 2011
    5
    0
    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.

    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!

    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. =]
     
  8. t06afre

    AAC Fanatic!

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

    Active Member

    Jan 2, 2007
    89
    0
    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
     
  10. maxpower097

    Well-Known Member

    Feb 20, 2009
    795
    388
    ....................................................................
     
    Last edited: Jan 16, 2011
  11. kuhkoa

    Thread Starter New Member

    Jan 8, 2011
    5
    0
    That sounds good. Would I hook that up to the microcontroller? Thanks. =]
     
  12. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    It may be done. But you need some CPU power. Here is an AN from microchip. http://ww1.microchip.com/downloads/en/AppNotes/01367A.pdf But this is not something I have done or tested.
    Anyway the SD card mp3 player controlled by a serial link sounds like a good idea. It should be doable.
     
  13. bassplayer142

    Active Member

    Jan 2, 2007
    89
    0

    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.
     
  14. kuhkoa

    Thread Starter New Member

    Jan 8, 2011
    5
    0
    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!
     
  15. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    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!
     
  16. BlackCow

    Active Member

    May 11, 2009
    65
    1
  17. maxpower097

    Well-Known Member

    Feb 20, 2009
    795
    388
    ....................................................................
     
    Last edited: Jan 16, 2011
Loading...