Music and LED's

Discussion in 'The Projects Forum' started by Chris15, Oct 23, 2010.

  1. Chris15

    Thread Starter Active Member

    Apr 15, 2009
    252
    0
    Hello
    Ive made Led's flash to music with a TIP31C But i can only run 5 leds 4 properly

    I need to run 2, 12v Globes, or a 12V bank of LED's so pretty much 12v.

    Relay or MOSFET?

    ive never used mosfets Before, i dont know anything about them except for they have 3 legs and they can be used as a Fast switch.... So How do i use the MOSFET if it is chosen, Dont rule out a relay, I love them, but they requrire alot of power and are slow, But U guys are the experts i jus wna know

    Thanks if u do know

    So basically with MOSFEt its preobs the best option, can somebody smart tell me how i use one as a switch for my project, wat the part number of it is, and if i can connect it to the tip31C circuit, or another music sync circuit


    TNAKS ALOT, Chris
     
  2. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    Both work, but MOSFETs work better. They carry current without getting nearly as hot.

    I've never built this, but I think it will work.

    [​IMG]

    Pin 8 can be an audio input with a few changes.

    LEDs, 555s, Flashers, and Light Chasers (forum edition)

    Look at chapters 10 and 12, but keep in mind it is still a WIP (work in progress).
     
  3. Kermit2

    AAC Fanatic!

    Feb 5, 2010
    3,789
    945
  4. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    I have seen a couple of horrible "Instructables" that connect the base-emitter of a TIP31 power transistor directly to the speaker outputs of a power amplifier (which will blow-up first?) and no current-limiting resistors for many LEDs connected directly in parallel.

    One showed the LEDs all having different brightnesses. How long will the brightest one survive?

    My Sound Level Indicator project has been running continuously (even all night every night) for nearly 5 years. It uses a microphone and displays very quiet sounds to fairly loud sounds on 20 LEDs. It has a little 9V rechargeable battery but a charge lasts only 15 minutes because the LEDs are very bright at their high current.
     
  5. Chris15

    Thread Starter Active Member

    Apr 15, 2009
    252
    0
    Ok so for your's Bill
    which is the actual circuit in that pic, there is 4 little ones in the bottom right, and a big one to the left, could u make it more clear to me, sorry. Like i know those triangle things are IC's but i cant understand which IC is what, i am use to circuits like this attatched Picture i have added, its got nothing to do with anything, its just how i understand reading schematic's

    And i just wanted to add, i want all the LED's to flash at the same time, Audioguru yours looks like it has different led's but i basically want

    - An output of 12V with every beat of the music, like Bass beat's so i can connect my 12V led bank and when the music goes BANG BANG the led's wil go FLASH FLASH if u get wat i mean

    Chris
     
    Last edited: Oct 23, 2010
  6. marshallf3

    Well-Known Member

    Jul 26, 2010
    2,358
    201
    I think he's wanting something more like a single channel color organ circuit.
     
  7. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    But music doesn't go BANG BANG. A gun goes BANG BANG.

    My Sound Level Indicator project shows the beat of the music and any other loud parts in the music at 10 different loudness levels then becomes 10 times more sensitive when the loudness is low. It shows the beat even if the volume is high or is low. A simple circuit will simply light all the time or will not light when its should depending on loudness. You could add a complicated automatic volume control to a simple LED circuit so that it works properly with varying levels of loudness if you want.

    The triangles at the lower right in Bill's schematic are unused comparators which are part of an LM339 quad comparator IC. Only one of the 4 comparators are used in his circuit. He should of used an LM311 single comparator IC or an LM393 which is a dual comparator IC with exactly the same comparators as an LM339 and is in an 8-pins case which is nearly half the size of the LM339 quad comparator IC and probably costs less.
     
  8. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    When you have unused gates (comparators in this case) you need to tie them off. Otherwise they can oscillate and cause other problems.

    I haven't tried these yet either, but I think it will work.

    [​IMG]

    U1 is an op amp, U3 is a comparator. While they resemble, they are very different components.
     
    Last edited: Oct 24, 2010
  9. marshallf3

    Well-Known Member

    Jul 26, 2010
    2,358
    201
    Both circuits look good to me but I see no need for U2 or U3 in the second circuit if the op amp before them is driving enough output voltage to trigger the FET and all he wants is for the lights to flash with the music. If the circuit doesn't provide enough gain that's easy enough to alter.
     
  10. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    They aren't just gain circuits, one of them is a precision diode. Since you don't know the audio source I made it where it could be matched to anything. The drawing isn't entirely complete, the first two op amps are a dual op amp on a chip. <Update, completed schematic>

    U3 is a comparator, it does the PWM conversion from U2. PWM is always more efficient, it only uses the current needed. U2 is a triangle generator, which is necessary for the PWM conversion. In general you do not use MOSFETs for analog applications.

    Since the drawing isn't complete it can change without notice as I update it.
     
    Last edited: Oct 24, 2010
  11. marshallf3

    Well-Known Member

    Jul 26, 2010
    2,358
    201
    I recognized the precision rectifier circuit but hadn't thought about the PWM factor which would probably be a necessity when dealing with music.
     
  12. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    Not necessary, but efficient.

    I really need to build a version to test the driver for the MOSFET shown in Example B. It is the only part of the circuit I'm not confident with.

    To the OP, the MOSFET is operated in digital mode, only on or off. This makes the circuit very efficient. It uses PWM, as you've probably already figured out.
     
  13. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    The transistor in Bill's latest circuit seems to work backwards and has a problem.

    The transistor and LED are turned on when there is no signal or the signal level is low, then a loud signal turns them off! Maybe the trimpot can be adjusted low enough so that the transistor and LED are turned off with a low signal level and a higher temperature will turn them on.
    The base of the transistor does not have a current-limiting resistor so it shorts the signal source if the peak voltage is higher than +0.7V.

    The base-emitter diode of the transistor slowly charges the input capacitors until the signal no longer has any effect on the transistor. It is fixed by adding a reverse diode in parallel with the base-emitter and adding a resistor in series with the base.

    I disagree that PWM increases the efficiency of this circuit, it simply dims the LEDs.
    More power will be wasted in the current-limiting resistors if the current is increased so that the LEDs are as bright as without PWM.
     
  14. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    I'll double check my logic, and I thank you for looking. Won't be the first time you've caught an error in one of my schematics. It's a good thing for me I don't mind admitting being wrong.

    This really is a single channel color organ. The whole point is the intensity of the LEDs is dependent on intensity of the sound. Another application, one I'm mentioning in the 555s, LED's article, is it makes a good electronic substitute for fire. Feed an AM radio into it and it flickers, much like a campfire.

    Put audio frequency filters on it and it makes a good color organ, right out of the sixties.

    Any here I thought you were going to task me on using the 1558. You're a hard man to predict. :D

    Think the MOSFET drive will work OK?

    ****************************

    OK, corrected.

    If the OP is only after a flash with a loud noise Example A is probably the better approach.
     
    Last edited: Oct 24, 2010
  15. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    The 1976 datasheet for the MC1558 shows that is has slightly better spec's than the less expensive MC1458 which is simply dual lousy old 741 opamps.

    I think I might still have some MC1448 dual opamps. But mine are real Motorola good quality ones and are not factory rejects or Chinese copies that were overpriced at RadioShack.
     
  16. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    Ah, now that's what I was expecting! Thanks guy, you didn't disappoint! :D

    In general dual op amps are a dime a dozen, and available under a wide range of part numbers. For this application I don't think it matters much. I wouldn't hesitate to experiment with anything, as long as it isn't a comparator and has the same pinout.
     
  17. Chris15

    Thread Starter Active Member

    Apr 15, 2009
    252
    0
    Ok Ok
    this is getting a little complex, i have made the TIP31c thing, and it works, all i need it to do is have more voltage output, so... instead of 4 LED's i want 2 12V bulbs, so basically 12V, So the operation of the TIP31c is fine the beat is ok, it works with the music, but New question

    - Will the output for 4 LED's Drive a MOSFET which then will drive 12V, so will the voltage where the LED's go, work if i replace them with a MOSFET, and then use the MOSFET as a switch for 12V

    - If so, what type of MOSFET do i use?, Like the number of it...... and a simple circuit on how i add it instead of the LED's,Like..... gate connects to the Pos, drain connects to the TIP31C base etc etc

    i have saved the other circuits so if i get better at electronics i can buld them, right now i jus need somehting simple

    I have attatched a photo of a circuit, would it work, i can just attatch a MOSFET in the place of the LED's and run 12V off that?

    Thanks Chris
     
    Last edited: Oct 25, 2010
  18. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    That is the "horrible" Instructable but it looks like you change some of its wiring.

    I sketched the schematic and analysed it.
    The LEDs are continuously lighted by the power supply.
    The TIP31 transistors are connected backwards and wrong so they don't affect the LEDs and they short the signal source.

    Your wiring diagram does not show the signal ground connected to the power supply (-).
     
  19. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    Here is another instructable using two TIP31 transistors that actually flash the LEDs.
    But it also has some serious problems.
     
  20. Chris15

    Thread Starter Active Member

    Apr 15, 2009
    252
    0
    Ok so if i build the circuits you attatched Audioguru, will it work?

    because the guy who made that instructable has a vide on youtube and it looks ok, its for what i want

    So i can build your new circuit and just put the MOSFET where your LED's Are?

    Chris
     
Loading...