I would like to connect arduino mini pro to mini jack output and send sound through it.
What would I need here, how can I connect the mini jack to arduino and how to send data of sounds (any library?) to that connected output?
EDIT
The sound source will be a music file ( streamed via bluetooth). I would like to be able to connect this output to a speaker and play (stream) music via bluetooth.
EDIT
Either mono or stereo will be good for me. My plan is to: stream the music via bluetooth to bluetooth module (for now I think about HC-06), send that data stream through arduino mini pro to the output mini jack.
Do I need in that case some kind of mp3/other format decoder module like VS1003B on ebay ?
-
Low pass filter on a PWM signal? Best to buffer it with an op-amp too. Or just connect it through a capacitor and use tone()?Majenko– Majenko2014年06月15日 17:19:30 +00:00Commented Jun 15, 2014 at 17:19
-
Please improve this question. Tell us what kind of sound you want to generate, what level of quality, what the sound source is expected to be (file? tone()?), and what you ultimately want to connect the output to.Majenko– Majenko2014年06月15日 17:24:21 +00:00Commented Jun 15, 2014 at 17:24
-
Also tell us what you have tried, and why none of the millions of tutorials available through a very quick google search are good enough for you.Majenko– Majenko2014年06月15日 17:25:58 +00:00Commented Jun 15, 2014 at 17:25
-
@Majenko Edited.Patryk– Patryk2014年06月15日 17:30:18 +00:00Commented Jun 15, 2014 at 17:30
-
Still not enough information. Tell us more. A jack is just a socket. There's a million ways to wire it up. The correct one depends on things like what you will plug into the jack, what quality of audio you want, whether you want stereo or mono, etc.Majenko– Majenko2014年06月15日 18:32:43 +00:00Commented Jun 15, 2014 at 18:32
1 Answer 1
The Arduino Uno / Mini Pro is not really the right tool for the job. It has no native audio output such as a 3.5mm jack.
Having said that I am sure it can be done - but it won't be the best quality sound. I have no doubt that it can be achieved with one of the following methods:
- using the
tone()
function. - by using a R-2R resistor ladder network and some sort of amplification circuit.
The Arduino Due and the Arduino M0 / M0 Pro both have inbuilt DAC's, meaning that they can output analog signals which can be used to drive a speaker circuit.
Another option is to use a Raspberry Pi which has a native 3.5mm audio jack.
-
1Or you can use the PWM as a poor man's DAC. That's what the Mozzi sound synthesis library does.Edgar Bonet– Edgar Bonet2017年09月27日 19:25:02 +00:00Commented Sep 27, 2017 at 19:25