2
\$\begingroup\$

I'm pretty new/noob with electronics. I'm trying to reproduce a sound (I'm using Proteus as simulator) in a circuit.

I wasted hours of looking for but I can only found solutions with Arduino or synthetic sounds, I need to reproduce a "wav" sound or any other format, recorded previously.

Which is the simplest method/example to make this?

Thanks in advance

\$\endgroup\$
2
  • \$\begingroup\$ "...any other format ..." is the problematic part. Note that each format has its own encoding, header etc. You need to specify exactly which formats you need to support. \$\endgroup\$
    – Aenid
    Commented Jun 29, 2015 at 5:58
  • \$\begingroup\$ I think the OP meant he doesn't mind about which format the solution is based on (the simplest and/or cheapest), not that the solution should apply to all formats. \$\endgroup\$ Commented Jun 29, 2015 at 10:20

2 Answers 2

1
\$\begingroup\$

Arduino will probably be the simplest option as I suspect there will be tons of various libraries and shields to do just that (3sec on google gave me the MP3 player shield from Sparkfun).

If you want to learn a bit in the process, and you don't mind that sounds will require pre-processing to be loaded onto the system, you could: read a WAV file into an array using any software of your choice, load that array into an EEPROM chip big enough for it, and use a counter to iterate through the content to play the song. Each tick of the counter you'll get a value, that needs to be sent to a digital to analog converter before feeding a small speaker (or a preamp). I did just that on an FPGA a few months back, using Matlab's wavread() function to get the EEPROM memory content.

Somewhere in the middle, you've got the MP3 decoder chips, for example from VLSI. The MP3 Arduino shield is based on that, and its schematic is available as usual on Sparkfun's website in case you want to adapt it for your own purposes.

\$\endgroup\$
4
  • \$\begingroup\$ Thanks a lot! I'll try the second one, cause Arduino is not an option to me right now for several reasons. Also I'm trying to learn from the basics! :) \$\endgroup\$ Commented Jun 28, 2015 at 23:42
  • \$\begingroup\$ I mean, I've to added to "simplest" the word "cheaper" because if I can learn enought to make this, I'll sell it as module of something else. \$\endgroup\$ Commented Jun 28, 2015 at 23:55
  • 2
    \$\begingroup\$ Think about selling only when 1) You're convinced nothing can go wrong with your product 2) It's been reviewed successfully by experienced peers 3) You know what needs to be done to sell it (all certifications, approaching distributors and manufacturers etc.) 4) You are convinced it is viable (benefits outweigh costs, meaning people would want it and pay much more than the cost per unit). Not to discourage you, just so that you know what is ahead of you. Regardless, that is good learning. \$\endgroup\$ Commented Jun 29, 2015 at 0:10
  • \$\begingroup\$ Thanks a lot Mister for your advices!!!! Don't discourage me, even more, they grow up me! Actually my design has as complex a 555 and a 4017 with several leds, so.... but I'm starting :D \$\endgroup\$ Commented Jun 29, 2015 at 0:12
1
\$\begingroup\$

the cheapest way is to use a tiny microcontroller and feed its PWM with the array of your sound file, (embedded in your code as an array) at the appropiate sampling rate. just adding a couple of low-pass filter at the output before the speaker and its done.

you can have plenty of information about PWM modules used for playing sounds

\$\endgroup\$
1
  • \$\begingroup\$ Static arrays will be allocated in code memory - which may certainly be not enough generally speaking for sounds, or at least will limit greatly the amount of code that can be put in. Nevertheless, that is an easy solution. \$\endgroup\$ Commented Jun 29, 2015 at 22:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.