Author Topic: One-Chip solution for playing Audio-Samples?  (Read 3432 times)

0 Members and 2 Guests are viewing this topic.

Offline psycho0815Topic starter

  • Regular Contributor
  • *
  • Posts: 150
  • Country: de
    • H-REG Blog
One-Chip solution for playing Audio-Samples?
« on: December 15, 2012, 09:55:46 pm »
Hi everybody,
I recently got myself a 3d-printer. One of the first things i printed were star trek comm-badges.
There are rather complex and quick to print, which makes them great for trying out different slicer options. Also i think they are cool.
now i figured it would be even coler to have a badge that plays the signature chirping noise if pressed.
So obviously i need a way to play the saound sample. i know i could probably do it with a mcu and a 1 bit DAC, but i need to fit it all on 2cmx2cm pcb.
So i thought maybe there is a one chip solution to do this. I read about the ids2100 but i couldn't find a place to buy it from in the eu. also i read that the quality is crap.
So my question is do any of you know an ic for that, or shoudl i go with a mcu. i suppose i coudl fit an 8-pin attiny and a spi dac on the pcb. the attiny 85 has 8 kByte of flash. would that be enough to store the programm and about 2 sec of pcm audio? or is there al small formfactor mcu with integrated dac?

Thanks for your replies!

Cheers Psycho
If you like, check out my blog (german):
http://h-reg.blogspot.de
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 27333
  • Country: nl
    • NCT Developments
Re: One-Chip solution for playing Audio-Samples?
« Reply #1 on: December 15, 2012, 10:11:33 pm »
Use the PWM output and a simple RC filter.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10091
  • Country: nz
Re: One-Chip solution for playing Audio-Samples?
« Reply #2 on: December 15, 2012, 10:15:35 pm »
The hardest part is going to be getting it to sound correct when its using a tiny speaker. They often sound very 'tinny'
You will probably have to filter/adjust the communicator sound in audio editing software to try and correct for the speaker characteristics.

On the plus side, the audio quality from tiny speakers isn't that amazing so you wont need 44khz/16bit sound.
22khz 8bit should do fine.

You might be able to drop the DAC and use PWM + RC filter to drive the speaker.
That would save some space.
hehe nctnico beat me to it.
« Last Edit: December 15, 2012, 10:17:36 pm by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline psycho0815Topic starter

  • Regular Contributor
  • *
  • Posts: 150
  • Country: de
    • H-REG Blog
Re: One-Chip solution for playing Audio-Samples?
« Reply #3 on: December 15, 2012, 10:20:26 pm »
Yeah, right now i'm looking into some exmaples on how-to play pcm audio on an arduino. If it works there it shouldn't be to hard to replicate it in C on an attiny.
about the speaker: is there any chance, i can get something halfway decent sounding with a piezo buzzer? if not are any speakers that tiny? it would need to be about 20mm in diameter and no more than say 3mm deep?
If you like, check out my blog (german):
http://h-reg.blogspot.de
 

Offline G7PSK

  • Super Contributor
  • ***
  • Posts: 3862
  • Country: gb
  • It is hot until proved not.
Re: One-Chip solution for playing Audio-Samples?
« Reply #4 on: December 15, 2012, 10:37:46 pm »
What about the guts from one of those sound playing greeting cards some of them have quite good sound.
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10091
  • Country: nz
Re: One-Chip solution for playing Audio-Samples?
« Reply #5 on: December 15, 2012, 10:43:07 pm »
Yeah, that's not a bad idea.
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16342
  • Country: za
Re: One-Chip solution for playing Audio-Samples?
« Reply #6 on: December 16, 2012, 05:01:48 am »
The piezo speaker from a card with the plastic surround and any 8 pin micro with more than 32k will probably fit the simple program and the sound sample. No need for a DAC or rc filter, just use 2 pins to increase the voltage across the piezo to near 2x the battery voltage and it will be loud enough. A cr1610 coin cell will power the lot, you could probably print the holder into the badge and put the single chip on top of it on a 0.8mm single sided board with a single through hole to attach the one battery connector.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf