Maker Pro
Maker Pro

Audio storage and playing circuit?

carebare47

Oct 21, 2010
66
Joined
Oct 21, 2010
Messages
66
Hello,

An Idea has drifted into my head of a device that senses someone entering my room and plays an audio message when this happens. I can do the sensing and playing aspects of the circuit, but how would one go about storing the small audio clip on the board?

Regards,

Tom
 

JimW

Oct 22, 2010
59
Joined
Oct 22, 2010
Messages
59
The radio shack prepacked board is fine. If you want more options, and don't mind building it yourself, the part to Google is ChipCorder. Simple to use.
 

webmasterpdx

Dec 19, 2010
12
Joined
Dec 19, 2010
Messages
12
Chipcorder alternative.

Chipcorder is way advanced for this little project. I presume you want something small and neat. I'm assuming you know electronics....
First, for any sound, your sampling rate needs to be at least twice the highest frequency used. Generally for a simple cheap sound anything around 8KHz should be fine. That'll cover the range of a piano and should have crystal clear human voice sounds. If you want audiophile quality sound, you'll need to sample at least 40KHz. Here is how I'd do it assuming the 8KHz range.

I'd use a cheap PIC like the 12F675. You could have a switch with a tiny mic and preamp (just a simple transistor or op-amp one) going to one of the A/D inputs. You press the button to speak the sound and the code should be written to sample it at 8K/s and store it in EEPROM (there is only 128 bytes of EEPROM built-in). However, you can buy a 32K serial EEPROM for about $1.50 or so. You could record the sound on a PC and just convert it to a file of assembler data instructions to add to your pic program so it'll be stored in flash on the chip instead. If you go with the external EEPROM, you might need a PIC with more pins.

OK, the rest is pretty easy. You output the data as PWM data (pulse width modulated) and just feed that to a simple filter. Again a simple one with an op-amp (you'll find something like this in the Microchip app notes), and then this can be fed to a simple amp to drive a small speaker or piezo device.

This part of your product would fit on a postage stamp if you use small components, or if your eyesight isn't so good, maybe a stick of gum sized PCB.

Of course, you can breadboard your design first for simplicity.

You could use the same PIC to read your PIR sensor to detect if anyone is there.
The whole project should be pretty cheap to build:

These are bulk prices. Individual ones might be a bit more.

$1 PIC
$1 Serial EEPROM
$2 PIR sensor plus driver circuit
$1 misc components
$1 little amp chip.
$1 small speaker
$3 plastic box to contain everything.

Now, how you do your circuit board is up to you. I generally use online services that take a few days and if my board is tiny, I'll replicate it numerous times on the same board so I can cut multiple PCBs out using a dremel tool, so I can make more of them if others want such a circuit. This way, if the minimal order is $60, I might get enough PCBs to make 30 devices. Pad2pad seems to be one of the cheapest at the moment. For $20 you can get 3 boards 2x2" double sided.

Good Luck
 
Top