after several years, I decided to use again my Arduino 2009 (yeah, it's still working).
I am working on a music visualizer (reading music from 3,5 jack and make led strip lighting accordingly).
I found this project that seems to be perfect for me, but I really don't understand how to connect the jack, and if I really need to pull down the A0 input with the resistor...
First problem it make sure you understand there are jacks and there are plugs. the jack is another name for a SOCKET that the plug fits into.
The picture shows a breadboard with one connection to a jack. It is missing the ground connection to the jack.
Your headphones have a PLUG that will be pushed into the jack on the breadboard.
You ask about the resistor. Try the layout as shown BEFORE trying any modifications.
The whole design is NOT for stereo audio signals.
Does that help at all?
Paul
An audio signal swings positive and negative. The Arduino can be damaged by the negative-half of the audio signal and/or the audio can be "damaged" (distorted).
At a minimum you should put a 10K "current limiting" resistor in series with the analog input.
The ATmega chip has built-in (low-power) "protection diodes" to protect the chip from negative voltages or voltages higher than VCC. Without the resistor the negative-half of the audio waveform (above about -0.5V) will be "shorted-out". The audio will be distorted and there's a chance of frying the protection diode and your Arduino.
Here is a more-complete circuit:
The 100K resistor keeps the analog input from "floating-up" when there is no connection, or if your audio circuit doesn't have a DC current path to ground. This resistor along with the 10K resistor makes a voltage divider, reducing the signal. To minimize that effect it should be at least 10 times the value of the 10K resistor.
The capacitor blocks any DC from your audio circuit (maybe not needed).
The Schottky diode is a better protection diode. It can handle a LOT more current, and it has a lower forward-voltage so the internal diode NEVER sees ANY current (also maybe not needed).
It's also possible to bias the input at 2.5V. This is actually a more common solution. That allows the audio to swing between +2.5V and -2.5V, and when it goes-into the Arduino it's going from 0-5V. (Then, you normally subtract-out the bias in software and if you don't want to change your software you don't want to bias the input.)
P.S. Suggestion - Run the Analog Read Serial Example to make sure you're getting "good readings". (You can take-out the delay.) The numbers should "look random" (because it's a waveform) and half the readings will read zero (because they are really negative). But you should be able to tell the difference between loud sounds, quiet sounds, or silence.