Basic Transistor Switch Question

Discussion in 'The Projects Forum' started by boblob, Jul 25, 2013.

  1. boblob

    Thread Starter New Member

    Jul 25, 2013
    15
    0
    Hi all.

    I'm using a simple transistor switch (see attached) to turn an LED on and off in time with an astable oscillator (connected via the 330k resistor and running at 10Hz). The circuit is part of an audio circuit, so I've had to add a 4u7 cap on the base of the transistor to stop the oscillator ticking feeding through to the audio.

    Works fine on the breadboard, but I need to know if I need to add an extra resistor on the emitter to limit the discharge current from the 4u7. Is that likely to be an issue?
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,446
    3,362
    Put the LED in series with the resistor, not across the transistor.
     
  3. boblob

    Thread Starter New Member

    Jul 25, 2013
    15
    0
    Thanks for the reply - it's done like that as it needs to flash on when the oscillator output is low. It appears pretty inefficient, but it makes negligible difference to current draw in practice.

    What I need to know is if that 4u7 will cause problems.
     
  4. new voodoo

    New Member

    Jul 25, 2013
    5
    2
    Id like to know as well. Ive got 2 different synths im working on now which use LEDs flashing (vaguely) in time with the audio and am curious as well about that working.
     
  5. boblob

    Thread Starter New Member

    Jul 25, 2013
    15
    0
    Cool - this should be right up your street then. I'm using this in a tremolo effect unit to flash the LFO rate.

    This does work well on the breadboard - just need to know if it'll continue to work well and not blow the transistor with that capacitor discharging...
     
  6. Ramussons

    Active Member

    May 3, 2013
    557
    92
    No, the Transistor will not be damaged by the Capacitor.

    Ramesh
     
    boblob likes this.
  7. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    The cap charges and discharges through the 330k resistor. Base current (Ib) is limited by the 330k resistor. Collector current (Ic) is limited by the 4.7k resistor.
    Emitter current Ie) is Ie=Ic+Ib. It will never exceed 2mA, so you have no worries.
     
    boblob likes this.
  8. boblob

    Thread Starter New Member

    Jul 25, 2013
    15
    0
    Thank you very much. Just wanted a sanity check. I'm not much for the "if it works and it don't smoke, game on" school of design.

    For the benefit of new voodoo, might be worth sharing this alternative circuit using a PNP. Possibly a bit more efficient as the LED is in series with the transistor - see attached... The 2N3906 requires a little more current to switch, so the 330K has been changed to 150K and there's an extra 22k to pull the base up a bit.
     
  9. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    It should be noted that the high level of your input needs to go to +9V.
     
  10. boblob

    Thread Starter New Member

    Jul 25, 2013
    15
    0
    You mean at the bit where it says "from LFO"? That swings between just 2 and 4.5V peak - works well when I breadboard it.
     
  11. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Yeah, I forgot about the 22k resistor.
    Still, if you plug in another transistor, it might not work. It's a terrible design.
    It is dependent on the beta of the transistor. To make it solid, you would need to add a transistor.
     
  12. boblob

    Thread Starter New Member

    Jul 25, 2013
    15
    0
    Another transistor? Not sure I follow... A biasing voltage divider with another resistor going to ground from the 22k - would that make it less device dependent?

    Just as a side note -going back to the cap discharge question. The reason I asked was I playing about with it on the breadboard and swapped the 4u7 for a 100u to see what happened. The 100u had been used to decouple the 9V power supply and was still charged up -and pop went the transistor... Presumably that did so as it was charged up above the 0.7V or so needed to break over the base-emitter junction and was storing enough charge to kill it. Right?
     
  13. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    In order to guarantee good turn-off on a BJT, be it NPN or PNP, Vbe needs to be less than about 0.3V. Any more, and you are at the mercy of the individual transistor's parameters.
    A resistor from PNP base to ground will make the problem worse, as it provides base current, and you really need to deprive it of all base current when the input is high.
    I couldn't design a proper interface to the PNP without seeing the output circuitry of the source of the input signal, or at least data on high and low voltages and output resistances.

    I think you accurately diagnosed the cause of your transistor's demise.:(
     
  14. boblob

    Thread Starter New Member

    Jul 25, 2013
    15
    0
    It's a simple 2n2646 unijunction relaxation oscillator, like this:
    http://www.talkingelectronics.com/projects/DataBook1/DataBook1-22-41_files/image013.gif

    The input to the flasher is taken from point VE on the diagram - low voltage is 2V, high about 4.5V. Not sure about the output resistance.

    Yay - at least I got killing the transistor right! I guess in normal operation the cap never gets charged up enough to do damage.

    So... is the NPN design any better in your opinion?

    BTW - really appreciate you taking the time to reply.
     
  15. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    I don't know what the output waveform is supposed to look like. I tried simulating the NPN circuit, it is so dependent on transistor parameters that it was inconclusive.
    What are you really trying to do?
     
  16. boblob

    Thread Starter New Member

    Jul 25, 2013
    15
    0
    Ah, OK - the waveform this produces is a sawtooth, with the rise time depending on R1 and C1. C1 charges through R1 until it reaches ~ 4.5V, the unijunction turns on and C1 discharges rapidly through RB1. When the emitter of the unijunction gets to 2V it turns off and the process starts over. So we have a slow rise from 2V-4.5V and a comparatively rapid fall back to 2V - a sort of sawtooth. I'm also using a rheostat for R1 so I can control the rate - it's tuned to go from about 1Hz to 10Hz.

    I'm using the oscillator output to modulate the amplitude of an audio signal - the waveform simulates a kind of repeat plucking effect as well as adding some interesting distortion/harmonics to the audio. The flashing LED is there to give a visual representation of the oscillator rate.
     
    Last edited: Jul 25, 2013
  17. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    I know how the UJT works. Are you modulating the audio directly with the sawtooth, and using the transistor and LED strictly as a rate indicator, or are you modulating the audio with the voltage across the LED (i.e., at the collector)?
     
  18. boblob

    Thread Starter New Member

    Jul 25, 2013
    15
    0
    The LED is indeed strictly for indication. I'm modulating the audio with another transistor and amplifying the modulated audio before output.

    The attached is what the audio part looks like...
     
  19. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    OK, here's my idea. The audio modulation will be dependent on the beta of Q2, so your results may vary.
    Also, I didn't know what your audio input amplitude was. I chose 200mV p-p.
     
  20. Ramussons

    Active Member

    May 3, 2013
    557
    92
    Not too comfortable with this alternate circuit. There are chances of burning out the EB junction on power up when the 4.7 uF behaves as a dead short.

    Ramesh
     
Loading...