Playing loud sound bytes from microcontroller - Page 1
Forum section: electronics / projects

author: bentomo
author_rank: Contributor
timestamp: June 24, 2017, 02:06:05 pm
content: So I'm looking for the cheapest way to play some loud sound bytes from a micro controller.I've got a PIC selected and an EEPROM to store a couple hundred KB of pcm audio. But I'm having trouble finding the right amplifier. By loud I mean 90-95dB acoustic.My design is pretty early in the development cycle so I'm free to change most things around.

author: DaJMasta
author_rank: Super Contributor
timestamp: June 24, 2017, 03:54:21 pm
content: Unless you need a feedback loop for the micro to know how loud it is, or change it with a very wide dynamic range or something, once you can generate the sound at any level, the loudness has nothing to do with the micro.You just need more in the amplification stage and a suitable speaker. I assume this is for a device with a built in speaker and not connecting to an external system? Do you need the micro to be able to control gain? Do you have much of a physical space requirement? Power requirements? Sound quality requirements (also what kind of sound is it)?You can get 90dB up close with a small, cheap 8 ohm speaker and a single power transistor, though you'd probably need a second as a preamp stage and it's not going to sound great. If you want 90dB several meters away, then you're going to need a lot more driving power. There are a number of single chip amps that make it fairly easy (just follow the app note, for example), but without knowing the physical constraints of the device and the area that it needs to be heard... it's really tough to try and recommend specifics.

author: bentomo
author_rank: Contributor
timestamp: June 25, 2017, 03:16:44 am
content: It's going to emulate a dog bark. Which is generally 90-100db. The sound bytes are about 8khz so pretty low quality. The pic probably isn't going to control the gain, the final version might but only 2 or 3 levels. Size and power I'm not too worried about. I've got a 4" x 4" 8 ohm speaker picked out. I've got plenty of room and it's powered off of a decent size lipo.Cost is the primary concern so I'm just looking for the professional way to do it. It doesn't necessarily have to be pcm either. I can also do spin, i2c, or something similar.I'm fine with following app notes too, I just need to find the right one to forgot out how much power I need in the amp. The speaker can handle 6 watts continuous so I believe that should be sufficient.

author: Richard Crowley
author_rank: Super Contributor
timestamp: June 25, 2017, 03:31:33 am
content: If you analyze the sample, you may find that there are few (if any?) low frequencies, and high-frequency overtones (harmonics) may also be absent (or unimportant to your undisclosed experiment). So you might try a horn speaker. They are loud and efficient (so you don't need a huge amplifier for high SPL.)https://www.parts-express.com/cat/pa-horn-speakers-for-music-paging/240Here in 2017, digital techniques are used to create relatively high-efficiency audio power amplifiers at remarkably low prices. Look for "Class-D" and "Class-T" amplifiers.

author: NiHaoMike
author_rank: Super Contributor
timestamp: June 25, 2017, 03:55:29 am
content: Use a PWM output to drive a discrete H bridge. A super cheap way to make a very simple digital amplifier.