Take the 2-minute tour ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

trying to blink LED's by music. i've done this circuit no problem:

Using a TIP31

Now wish to accomplish the same thing using an N-channel Mosfet. I tried this circuit, and got no blinks.

Mosfet

Also no success with this circuit (connecting Gate to audio instead of to Source):

enter image description here

Did NOT use a resistor. I know the LEDs are not blown, because they work if i hook up the battery directly.

Here's the mosfet i'm using, with a li-ion battery. http://datasheet.eeworld.com.cn/pdf/INTERSIL/20904_RFD7N10LE.pdf

What am i doing wrong. How can i drive LED's with a mosfet, in response to music? Looking for simplest method. Thx!

share|improve this question
2  
What are you using as your audio voltage level? The threshold for turning on a MOSFET is higher than for turning on a BJT. Use resistors and more importantly learn why putting a resistor in series with an LED is important. Also learn why it's important not to parallel LEDs if they haven't got in built resistors. –  Andy aka Jun 15 at 11:18
1  
The reason you didn't blow your LEDs is because the internal resistance of the 9V battery is high enough that it cannot source enough current to damage the LEDs, and you maximum current is also limited by the beta of the transistor. If you did that with a DC power supply, and with a FET like you plan, your will destroy your LEDs in a hurry. –  Connor Wolf Jun 15 at 11:32
1  
@ConnorWolf I still wouldn't hook up a 9v battery directly to an LED though! –  Ollie Ford Jun 15 at 13:49
    
Note: If you websearch "color organ schematic", you will find many circuits for music-controlled lights. Adding "LED" might be a good idea in your case. Typically, these use filters to separate frequency ranges into different colors, to make the output more interesting. To "blink in time to the music" you would probably want to respond only to the bass (lowest frequencies) part of the signal, especially for today's heavily-compressed pop music. –  keshlam Jun 15 at 16:16
    
@Andyaka Headphone output of an mp3 player. I cannot find anyplace why i should not parallel LEDs without built-in resistors, but i have found schematics showing LEDs paralleled with a single external resistor. Are they wrong? –  Johny Radio Jun 15 at 18:59

1 Answer 1

The gate voltage at which a MOSFET turns on is significantly higher than the base voltage at which a BJT turns on. While for all silicon transistors this is around 0.65V, MOSFETs vary considerably, but typical values are around 3V to 6V.

So, you need to increase the source to gate voltage, \$V_{GS}\$. You could:

  1. play louder music
  2. put the source at a negative voltage
  3. DC bias the music to a higher voltage
  4. amplify the music

Here's an example of option 3, adding DC bias to the music:

schematic

simulate this circuit – Schematic created using CircuitLab

R3 and R4 form a voltage divider which sets the DC bias. C1 blocks the DC so you don't damage the audio source. Another way to view it: C1 plus R3 and R4 form a high-pass filter. This is called capacitive coupling.

You will need to adjust the ratio of R3 and R4 to get the response you want. You might use a potentiometer. If R4 is to small and R3 is too large, then the DC bias will be too high and M1 will always be on. If R4 is too large and R3 too small, then the DC bias will be too low, and M1 will always be off (the problem you have now).

The ratio of R3 and R4 sets the DC bias, but otherwise the components aren't too critical. The input impedance is approximately R3 and R4 in parallel: \$1/(1/R_3+1/R_4)\$. You don't want this too low, or your audio source may not be able to supply enough current. Typical input impedance for line-level audio circuits is around \$10k\Omega\$ or higher.

If the resistors become too large then they stop being an accurate voltage divider, but the bias current into the gate of a MOSFET is essentially zero. Thus, the resistors could be pretty large (probably into the megaohm range).

Finally you don't want to filter out all the audio, so the cutoff frequency given by \$f_c = 1/(2\pi RC)\$, where \$R\$ is R3 and R4 in parallel as above in calculating the input impedance. Fortunately in this application some loss of lower frequencies won't be too much of a problem since no one will be listening to the result.

share|improve this answer
    
this is super-helpful! i guess i have to do the math to determine the HPF cutoff freq, so i don't filter out the music, right? Also, to simplify, could i eliminate R4 and just adjust R3 until i get the response i want? thx! Is it true that BJTs are tripped by current, and MOSFETs by voltage? –  Johny Radio Jun 15 at 19:06
    
is there a way to ensure this will not affect the same audio going to a power amplifier? thx! –  Johny Radio Jun 15 at 19:15
    
why does this falstad simulator work without any cap or resistors? bit.ly/1neF8P8 –  Johny Radio Jun 15 at 20:02
    
@JohnyRadio - You cannot eliminate R4 - the R4||R3 network is what sets the DC operating point - it's absolutely critical. The reason the falstad simulator works is because it's a simulator - it ignores pretty much all the realities of actual circuits, and just simulates ideal components. –  Connor Wolf Jun 15 at 23:39
    
Phil, your solution worked great. I noticed it also works with a 100K pot (instead of the 20K pot you suggested)-- what are the max/min limits for the resistance between V+ and V-? Also, worked with a much larger cap on the input-- what are the min/max limits for the cap? @ConnorWolf "because it's a simulation" doesn't really answer the question. If it "simulates behavior of ideal components", then are you saying Phil's solution is based on non-ideal behavior? –  Johny Radio Jun 15 at 23:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.