One-Chip solution for playing Audio-Samples? - Page 1
Forum section: electronics / projects

author: psycho0815
author_rank: Regular Contributor
timestamp: December 15, 2012, 09:55:46 pm
content: 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

author: nctnico
author_rank: Super Contributor
timestamp: December 15, 2012, 10:11:33 pm
content: Use the PWM output and a simple RC filter.

author: Psi
author_rank: Super Contributor
timestamp: December 15, 2012, 10:15:35 pm
content: 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.

author: psycho0815
author_rank: Regular Contributor
timestamp: December 15, 2012, 10:20:26 pm
content: 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?

author: G7PSK
author_rank: Super Contributor
timestamp: December 15, 2012, 10:37:46 pm
content: What about the guts from one of those sound playing greeting cards some of them have quite good sound.

author: Psi
author_rank: Super Contributor
timestamp: December 15, 2012, 10:43:07 pm
content: Yeah, that's not a bad idea.

author: SeanB
author_rank: Super Contributor
timestamp: December 16, 2012, 05:01:48 am
content: 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.