Blinking Leds to the Beat!

6,854

77

6

Introduction: Blinking Leds to the Beat!

CAUTION! LED's BLINKING WITH THE MUSIC MAY GET YOU INSANE!

This instructable is about blinking some LED's according to the beat of any music!

The idea behind this process is really simple, and the circuit is really small.

The main concept is:

1-Low pass filter for the input signal
2-Amplify the voltage this resulting signal
3-Apply it to the base of a transistor!

Simple, huh?

Materials:

2x 15K Ohms resistor
1x 10K Ohms resistor
2x 1K Ohm resistor
1x 100K Ohms potentiometer
1x 390 Ohms resistor
2x 100nF ceramic capacitor
1x Red led (power indicator)
1x Blue led (any color)
1x LM358N
1x Male 3,5mm audio jack
1x Female 3,5mm audio jack

Optional:
1x two position switch
1x 100K Ohms potentiometer

These optional itens are used to complement the circuit, where you can turn off the music blinking stuff and choose the led's brightness from 0-100%. It makes part of the board I designed, but its not totally necessary for a protoboard project!

Step 1: The Project

1 - The Filter:
Focusing on low frequencies (beats) I chose a Sallen–Key topology low pass active filter (Image 1).
The cut off frequency is given by "fo" (equation on Image 2). By testing some values, I found out that a cut off frequency of 100 Hz is good enough for electronic/rap music!

You may need to test some frequencies based on the kind of music you hear. You may also choose another kind of filter, let's say, a high pass, of band-pass, in order to blink the led according to your needs.

My values:
R1 = R2 = 15K Ohms
C1 = C2 = 100 nF

You may also see on the last picture a bode plot of the gain of filter I used, you can see a cut off frequency smaller than the calculated one, around 60 - 70 Hz! So make sure not believe only on the equations!
For the operational amplifiers, I used a LM358N.

2 - The gain:
Testing some output volumes of my notebook and measuring the voltage, I found out that a gain of 100 times would work for me. The voltages that I have on a low volume (around 15 mV rms) combined with a 100 times gain is enough to produce a output of 1.5V.
You may need to measure your own voltage levels and calculate the necessary gain to achieve a minimum voltage around 1 to 1,5V. It also depends on the transistor you are going to use, so you may need to change your gain based on it.

The gain is obtained with a simple non inverting voltage amplifier (Image 3), and it is calculated by "G" (equation on Image 4).

My values:
Rf = 100K Ohms Potentiometer
Rg = 1K Ohm

3 - The transistor:

For this project, I used a TIP 122 with a 1K Ohm base resistor according to the Image 5.

Step 2: The Circuit

Merging all the three circuits we had on the last step, and with an additional control of led brightness (it's called dimmer, and it is separate of the blinking stuff) we have the following project!

I have attached the layout of the board.

Note that S1 refers to the switch between the center pad and the two others of each side.

- When the switch is to the left, Pot 2 will control the voltage applied to the resistor connected to the base of the transistor, allowing you to control the brightness of the leds from 0% to 100%.

- When the switch if to the right, Pot 1 will let you control the gain of the audio signal applied to the resistor connected to the base of the transistor.

Step 3: Soldering

This step is just used to show you some pictures of the assembly!

-Never forget to use a thin layer of thermal paste to transfer the heat to the heatsink!

Step 4: Test It!

And that's it, here's the final result and a little stop motion of the components soldering.

I hope you enjoy this circuit, and remember to like the video and comment here if you have any doubt! =D

Video:

http://youtu.be/jSe1bXVsIF4

First Time Author Challenge

Participated in the
First Time Author Challenge

Make it Glow!

Participated in the
Make it Glow!

Be the First to Share

    Recommendations

    • Make It Bridge

      Make It Bridge
    • Big and Small Contest

      Big and Small Contest
    • For the Home Contest

      For the Home Contest

    6 Comments

    0
    Fabritren
    Fabritren

    7 years ago

    I'm sorry, but which resistor are you talking about?

    On Step 2 there is a full circuit schematic with all the components names and values that I used. Feel free to ask me whenever you need!

    0
    Fabritren
    Fabritren

    7 years ago

    Hello! Thanks for the reply!
    You can easily add more LED's by implementing an output amplification stage, just like I did with the TIP122. I simply added a 1k resistor (named Rb in the images) between the output of the LM358 and the base of the TIP122, and the LED's between the Vcc (12V in my circuit) and the Collector of the transistor. You can definitely find more information about this circuit by searching for "operating transistor as a switch". If you need any help, feel free to contact me! =D

    0
    SirajH
    SirajH

    7 years ago on Introduction

    this is awesome, I want to do this without audio input, instead use a microphone, please someone help.

    0
    Fabritren
    Fabritren

    Reply 7 years ago on Introduction

    Hello! It's a pretty interesting idea, but I personally already thought about it and realized that any other noise could activate the lights, and if you want to use a cheap microphone the would not be at a nice quality, at least not for this project, in my opinion. I haven't tried any circuit related to using a microphone ever, you could google something about it!
    If you need and other help, please contact me! =D

    Awesome build for any party! Maybe and especially building centric party, but that just makes it even better in my opinion!

    0
    Fabritren
    Fabritren

    Reply 8 years ago on Introduction

    Yeah, this is perfect for parties, or even your own daily music!