Introduction: Creating an Audio-Reactive LED Circuit

These instructions will help you learn how to construct an audio-reactive LED circuit.  Familiarity with electronics and soldering is strongly recommended  Barring any circuit errors, the task should take no more than an hour. This circuit can easily be expanded and integrated into other projects to create visually impressive effects.

Step 1: Safety Precautions

Caution should always be exercised when working with electric currents.  Currents can cause burns or damage to vital organs.  Currents as small as 10 mA can be damaging or even fatal.  Power sources should be disconnected when modifying a circuit, and remember to always use common sense when working with electronics.

Step 2: Materials Needed

-9 Volt Battery (or a lab power supply)
-9 Volt Battery Connector (if using a battery)
-An Audio Splitter
-An MP3 Player (or computer)
-1 or more LEDs of any color
-1 NPN Transistor (this guide uses the 2N3904)
-1 100-400 ohm resistor
-An audio Y Cable
-A few alligator clips
-Jumper wires

Step 3: Calculating Resistor Values

Pictured above is a chart detailing how to read a resistor value from color coding information.  The formula to calculate the resistor value needed to power a single LED is:
resistance(R) = (power supply voltage - LED voltage drop) / LED current

The typical recommended LED current is 20mA, our power supply voltage is 9V, and the LED voltage drop for a clear blue LED is 3.0V.  This results in:
(9-3)/0.020=300 ohm
Of course this doesn't need to be exact, a 330 ohm resistor will work fine here.  If we plug 330 ohm back into our formula we get
(power supply voltage - LED voltage drop) / resistance (R) = LED current
(9-3)/330 = 18 mA

18 mA is a good value to power our LED.  If the current is too low, the LED will be dimly lit, and if the current is too high, the LED will become very bright and may explode.

1) Strip off a small amount of the wire insulation from the 9V battery connector
2) Insert the wires into the respective positive and negative rails of the breadboard
-Red: Positive
-Black: Negative

Step 5: Powering the LED

To Ensure that our LED and resistor are working, we will send power to it.  Notice that one of the LED legs is shorter than the other — the shorter leg is the negative end, and the longer leg is positive.
1) Insert the negative end of the LED into the negative rail, and the positive end into an adjacent hole.
2) Insert the 330 ohm resistor in series with the LED, connecting the positive leg to Vcc (9 Volts).

The LED should be illuminated.  If not, check the orientation of the LED and that all connections are inserted into the breadboard fully.

Next we will add the NPN transistor, giving us control over when the LED turns on and off.  A NPN transistor is a current controlled switch, meaning that a small current flowing into the base will result in current flow from the collector to the emitter.  We will use the audio signal to allow current to flow through the LED, illuminating it. (For a more in-depth explanation of NPN Bipolar Junction Transistors see the following: http://www.electronics-tutorials.ws/transistor/tran_2.html)
1) Insert the NPN transistor into the breadboard so that the 3 different pins are in separate columns.
2) Using a jumper wire, connect the emitter pin to ground.
3) Reorient the LED so that the negative leg is connected to the collector pin.
4) Connect a jumper wire to the base pin. (we will use this for our audio signal later)
Now our switch is almost ready, but the LED will not turn on yet, because we haven't connected anything to the base.

Step 7: Connecting the Audio Y Cable

We will now connect the Y Cable to the breadboard setup.  For this step, temporarily unplug the battery from the connector.  Looking at the Y Cable, there is a stereo input (standard 3.5 mm headphone jack), and RCA left and right output.  The pin protruding from each connector carries the signal (the positive element), and the outer jacket is ground.  To ensure we get the signal from both left and right channels, we will be using both outputs.
1) Connect an alligator clip to each of the RCA pins.
2) Connect one alligator clip to the ground sheath on one of the channels. (IMPORTANT: ensure that the clips do not touch)
3) Connect the other ends of the two signal-carrying alligator clips to the base pin of the transistor.
4) Connect the other end of the ground alligator clip to a jumper wire inserted in the ground rail of the breadboard.

Now our circuit is almost complete.  We are done with the breadboard, so go ahead and plug the battery in again.

Step 8: Seeing the Flashing LED

Now we will connect all our cables together to both see and hear the result.
1) Connect the audio jack end of the Y Cable to one of the audio splitter inputs.
2) Connect the headphones or speakers to the other audio splitter input.
3) Connect the other end of the audio splitter to the MP3 player or computer.

Step 9: Enjoying the Result

1) Ensure that the volume on the device is turned all the way up.
2) Ensure that the battery is connected.
3) Start the music and enjoy the show!