Audio Responsive LED box

Discussion in 'The Projects Forum' started by MmastermanN, May 2, 2011.

  1. MmastermanN

    Thread Starter New Member

    May 1, 2011
    9
    0
    Hi my name is mike and I am new to this forum (first post ever). A little about me, I am currently getting a bachelor degree in mechanical and electrical engineering. Started out mechanical, took some circuit theory classes and I found them so interesting I picked it up as a degree (now I regret the mechanical degree but I’m to far in to just drop it). I have an okay background in electronics mostly with mosfets, bjts, opamps and some microcontroller experience.

    I come here seeking advice for a something I want to build. Basically I want to build an led display box consisting of around 20 leds. These leds will respond to the signal outputted from my audio jack in my labtop. I want 10 of them to respond to low frequencies (bass, probably 20 to 200 Hz) and 5 of them for both medium and high range.

    What I can think of to start off with is take the signal and run it through filters to get the correct signal to the respective leds. Beyond that I don’t really know where to go(if that’s even correct to begin with). If anyone has past experience with something like this or has any ideas on how to get started please share. I know there is multiple ways to do this, I just don’t know how to get started. If I get this project going I will post pictures and video of the end result.

    I want the led’s to behave like the video in this link:
    http://www.instructables.com/id/Music-Led-Bar/#step1
    But I don’t want to just hook it up to the leads in the speaker.

    Any and all advice appreciated
     
  2. Wendy

    Moderator

    Mar 24, 2008
    20,765
    2,536
    Welcome to AAC!

    Another member has a similar query going...

    Average Joe, Needs Help!

    You want more channels. I'm trying to remember where someone showed a project much like you are describing, basically it was an audio spectrum analyzer. Maybe one of the other members can dig it up, he had a video on it, it was pretty decent.

    When you say you don't want to hook it up to the leads in the speaker, does this mean you want to use a microphone? Are you wanting two channel?
     
  3. nickelflipper

    Active Member

    Jun 2, 2010
    280
    35
    I have played with this a little bit from the electret mic and op amp perspective. Pick up some bits and pieces, electret mic or 3.5mm jack, 3 or four LM2902 OPA's, a few pots to adjust gain, resistors and caps. Follow the LM2902 data sheet for the AC coupled amplifier for the electret or 3.5mm input, and use the bandpass filter schematic for the three outputs.

    I recently used Tayda Electronics, mostly for the cheap pin headers, but they should have everything you need.
     
  4. MmastermanN

    Thread Starter New Member

    May 1, 2011
    9
    0
    When talking about hooking it up to the speaker leeds I was referring to the video when they attachted the wires to their surrond sound system. To clarify I want to use the signal from my audio jack in my labtop. I will probably rig a headset that has a broken headphone.

    Thanks for the info guys, im going to do a little more research and work up a shematic and post it. Might take me a awhile being finals week and all at my university so my free time is limited.
     
  5. MmastermanN

    Thread Starter New Member

    May 1, 2011
    9
    0
    Does anyone have any suggestions of any particular op amps that would be good for this application. Also what are your thoughts on using a tip31 transistor as a switch to control when the led's flash.

    What kind of information does anyone have on the signal the audio jack outputs? max, min?
     
    Last edited: May 3, 2011
  6. mjhilger

    Member

    Feb 28, 2011
    119
    16
    Mike as you are a student and will be working on these types of projects in the future, I suggest that you get the signal into a micro and use its power to provide all your processing decisions. You either have or soon will touch on the Z transform or the butterfly FFT. The Z transform provides the digital filtering you need to identify bass, mid, treble. Or you can use the FFT for the same purpose. Most higher end micros (Microchip 16 bit or 32 bit, still less than $10) have the DSP functions, ADC, and libraries necessary to process the signals you need. Once you have the signal in the micro, you can pretty much do anything you wish (within reason) @ 40 or 80 mips.

    As far as your laptop output is concerned, the headphone output is usually 8-16 ohm and less than 10v p-p, but each manufacturer can be different. You have the knowledge to measure this in the lab to determine your particulars.
     
  7. MmastermanN

    Thread Starter New Member

    May 1, 2011
    9
    0
    Thanks mjhilger, I think this option would be a better route to take. I believe I have a good understanding of the z transform and the area of signal processesing so if I could apply it that would be great. I also took a class on programming PIC's with assembly and C, mainly the P18F452 this semester. But due to the lack of funds in the department at my university I learned mainly through powerpoint and have little hands on experiance. Could you point me in the direction of what tools and software I would need to program a micro, perhaps like a kit of some kind. If the software is expensive I am sure I would be able to get a copy of it through my university.

    Again thanks for the info I appreciate it.
     
  8. nickelflipper

    Active Member

    Jun 2, 2010
    280
    35
    A quick and easy way is to use the MSGEQ7 chip for 7 channel equalizer output. It has 20DB gain, so just hook up direct to line out < 1V p-p, three micro pins, very simple circuit. Equate the a-d inputs to set a hardware PWM duty cycle controlling an Nfet for a pulsing effect. An 18f1330, and any number of other PICS have 3 hardware PWM outputs.
     
  9. marshallf3

    Well-Known Member

    Jul 26, 2010
    2,358
    201
    12V color organ? I just saw one for sale on one of the surplus sites. It was only three channels/colors though.

    Relatively easy to construct, just type "build color organ" in Google.

    Here's several and if they're 110V it isn't hard to redesign the circuit to run off 12V.
    http://www.discovercircuits.com/C/color-org.htm

    Microphone and preamp (or direct isolated connection to car stereo output)
    For three channels you'd just need a low pass, a bandpass for midrange and a high pass active filter, easy enough to build with op amps that drive the switching output circuitry. If you want more channels just add more bandpass filters.
     
  10. marshallf3

    Well-Known Member

    Jul 26, 2010
    2,358
    201
    To clarify I want to use the signal from my audio jack in my labtop
    1/8" mni phone plug, should be enough output to go directly to the frequency filters.

    Does anyone have any suggestions of any particular op amps that would be good for this application.
    TL074/TL084 are easy to find and inexpensive.


    Also what are your thoughts on using a tip31 transistor as a switch to control when the led's flash.
    Fairly low gain and overkill unless you're driving very high current or a lot of LEDs.
    http://www12.fairchildsemi.com/ds/TI/TIP31A.pdf

    How many/what type/part #/specs of LEDs are you planning on?
     
  11. MmastermanN

    Thread Starter New Member

    May 1, 2011
    9
    0
    marchallf3,

    I want to use a total of 28 LED's with a 12v supply from an adapter plugged into a wall socket. Havent done the math yet though so I dont know if thats possible.

    14 Blue
    8 Green
    4 Pink

    I would like them to be 10mm LED's, could also use 5 mm but I want it to be very bright.

    I am guessing Vf will be around 3.4 to 4 V and If will be around 20 to 30 mA.
    dont have the datasheets yet cause I am still searching for a website that will sell them to me in batches that are not 100 or higher (if anyone knows of any please tell me).

    What order of filters would you suggest for this. I can easily do first and second order, for any higher order filter I would use butterworth filters.

    On a sidenote I have multisim and eagle so I am going to work up the circuit on multisim and then make the pcb on eagle and send it off to be made.

    Thanks for all the input everybody.
     
  12. russpatterson

    Member

    Feb 1, 2010
    351
    16
  13. MmastermanN

    Thread Starter New Member

    May 1, 2011
    9
    0
    heres what I have done so far

    [​IMG]
    Consist of 3 4th order butterworth filters, one LP, HP and BP. cut off freq of LP is 250 hz, for HP its 3000 Hz. BP is 250 to 3000 Hz
    I have the values of the resistors and caps calculated but not labeld.
    Power supply is coming from a 12v adapter with a 5.5mm plug plugging into a jack on the pcb.
    Wires to the right of the LED's will be connected to 12v.

    I know theres supposed to be resistors before the LED's just havent added them yet.

    Input is audio signal from laptop.
    Any and all advice or corrections appreciated.

    IC's are LM2902 , not sure if these are the correct ones to use.
     
    Last edited: May 4, 2011
  14. Wendy

    Moderator

    Mar 24, 2008
    20,765
    2,536
    I can't get the image to work, try a link instead.
     
  15. MmastermanN

    Thread Starter New Member

    May 1, 2011
    9
    0
    [​IMG]

    Used a different service this time. If it still doesnt work tell me.
    Ive changed the first opamp to a amp/level shift since audio input is 1v PtP
     
  16. MmastermanN

    Thread Starter New Member

    May 1, 2011
    9
    0
    For the power supply I want to use DA12-M Series (12V, 1A), this will run the led's and op amps.
    I need to reduce the voltage to +-5v for the op amp supplies, any ideas?
     
  17. Wendy

    Moderator

    Mar 24, 2008
    20,765
    2,536
    If all you want is 3 channels there are much simpler ways to do this. Basically there are schematics for active filters that use a fraction of the components you have.
     
  18. MmastermanN

    Thread Starter New Member

    May 1, 2011
    9
    0
    Bill, do you think 12v is enough for this or should I up it to 24?
     
  19. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    Cascading simple filters like that ends up with a very droopy respose. You should use Sallen and Key Butterworth filters that have some positive feedback that creates a flat response up to (or down to) the cutoff frequency then a sharp dropoff.
     
  20. Wendy

    Moderator

    Mar 24, 2008
    20,765
    2,536
    How many LEDs per channel?

    I have a schematic for the LED driver, but not the filters, here, Figure 12.4.

    Higher power supply voltage allow more efficient LED use for large numbers of LEDs.

    Of course, you could still have a lower voltage for the chips, many ICs upper power supply voltage limit is 12V-20V.

    I was posting the same time as AG, but he is right. I would steel the schematic from other color organs. One chip (a quad op amp) and a handful of resistors and capacitors. More than 3 channels is possible with this scheme, but it seems to be the norm, and if you build stereo it is still a substantial project.\

    I just remembered, JameCo even sells a kit with all the parts. Kitting is very useful, as it can be the most time consuming part of a project.
     
Loading...