
I use this circuit for taking the audio jack signal to arduino, but now i want to filter the signal and at least play it on a small speaker, i dont know how to connect the speaker to arduino withtout making some damage...
Any help is apreciated
Audio is AC and the Arduino cannot process the negative half of your audio signal. You have likely killed that part of the Arduino.
Same applies to the speaker. It will kill the Arduino pin when your code sets the pin to output. If you want to process audio, use a device made for audio.
What is it you are trying to accomplish? You can bias a small AC signal so the negative half of the signal is greater than zero and then you can use an analog pin to read the varying voltage, if that is what you are trying.
But in no way can you attach a speaker directly to an Arduino pin. Make the connection to the input of a real audio amplifier that has a speaker, then you can hear the output.
The circuit you showed is fine for input to the Arduino. The next step is to filter it, so decide what sort of filter you want and get that working.
To play the result you need an external digital to analog converter (DAC) connected to an amplifier & speaker, or use PCM modulation with an amplifier & speaker. The TimerPCM library is fine for the latter.
You cannot connect a speaker directly to an Arduino output, as that will damage the output.
Big project, so take it one step at a time.
Sorry, i dont know much about circuits, almost new , i follow the circuit above so that way i can connect my cellphone to the 3.5 audio jack and that signal passes through arduino, arduino filters the signal and the speaker gives the sound of the signal filtered. That´s what i´m trying to do.
Plotter show this, so arduino detects a signal from my cellphone but, as you say... that negative half and also looks weird, doesn´t give me much hope.
Anyway, i don´t know exactly how to connect the speaker as output, and obviously not doing any damage to arduino.
Not a big speaker, can´t attach other image... But is not a big speaker, only one.
Thanks for the clarification.
So, i need to put a song into arduino from my cellphone, that means the filter lowers the quality of the song, i´m gonna use a low pass filter, thing is i´m new at this, so i don´t know how that is gonna work.
https://github.com/curiores/ArduinoTutorials/blob/main/LowPass2.0/LowPass2.0.ino
I found this and test it, but still, don´t know if the filter is gonna entiretly work or if i miss another thing...
Don´t know exactly how to connect the speaker, maybe to the circuit and then to arduino..?
You need an audio DAC to connect the speaker, and probably an amp.
Edit: Something like this should make it easy, or you can get the chip and set it up yourself. There are many options.
IMO some of the above proposals are a bit of an overkill.
You could drive earphones or a teeny-tiny speaker directly from the Arduino output via a series capacitor (10uF or more would allow you get something) to remove the DC offset. This may allow you to test what you want to do before progressing to a LOUD speaker.
To get more volume you can add an amplifier, there are many options for that. This web page may help a little : Using a Speaker for Audio Output | Mbed
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
