Connect with us

New to electronics needs help - transistor switch

Discussion in 'General Electronics Discussion' started by shagsj, Dec 28, 2012.

Scroll to continue with content
  1. shagsj

    shagsj

    10
    0
    Dec 28, 2012
    Hi All,

    Doing a project that requires me to try my hand at electronics. I am doing an led circuit with a transistor switch in it and need to know the resistor to use on the base leg of the transistor.

    There are 4 leds in parralel:

    IF Typical (mA) 20
    VF Typical (V) 2
    IV Typical (mcd) 10
    IF Max Continuous (mA) 30

    Connected to transistor:

    Manufacturer Part No: 2N3904
    RoHS: Yes

    Specifications:

    Transistor Polarity:NPN
    Collector Emitter Voltage, Vceo:40V
    Continuous Collector Current, Ic:0.2A
    Collector Emitter Saturation Voltage, Vce(sat):0.2V
    Power Dissipation, Pd:625mW
    DC Current Gain Min (hfe):100

    EDIT: Sorry circuit is powered by 3v dc.

    Seems to work ok but the leds are really dim. If I connect directly to the power supply with a resistor and no transistor they light up fine. The resistor I was using was a 1k resistor.

    Any help greatly appreciated and how you come about with the value would be awesome.

    Thanks heaps,

    Shags
     
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,448
    2,807
    Jan 21, 2010
    With 4 diodes in parallel, each should have their own resistor.

    Depending on the colour of the LEDs, the transistor may drop too much voltage.

    The circuit should have the emitter to ground (-ve) and the LEDs between the collector and +ve.

    The 1k resistor goes between the base and +ve.

    That configuration will give you the best chance.

    With a 1k resistor and a minimum gain of 100, that should be enough to turn the transistor hard on (assuming 20mA per LED)

    The value resistor depends on the Vf of the LEDs (and that typically is determined by their colour)

    With a 2V Vf, and 0,2V across the transistor, and 20mA through the LED, each LED should have a (3 - (2 + 0.2))/0.02 ohm resistor (40 ohms -- use 39 ohms)
     
  3. shagsj

    shagsj

    10
    0
    Dec 28, 2012
    Awesome. Thanks heaps Steve
     
  4. shagsj

    shagsj

    10
    0
    Dec 28, 2012
    Sorry to be a pain Steve.

    I've wired up with resistors between positive and leds.

    They are about the same illumination (quite dim). What part of this circuit would be causing the leds to dim?
     
  5. shagsj

    shagsj

    10
    0
    Dec 28, 2012
  6. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,448
    2,807
    Jan 21, 2010
    Sorry, it looks like I have to sign up for facebook to see that.

    Did you try connecting the end of the resistor to +ve to see if the LEDs light up brightly?

    Are the LEDs red? (your specs say they are) If they're actually blue then that's the reason why they are dim.
     
  7. shagsj

    shagsj

    10
    0
    Dec 28, 2012
    Sorry:

    http://www.gearheadmods.com/illuminating-abxy-button-tutorial/

    That one might be better. I have a cg2 style.

    The led's are orange. When you say resistor to +ve.... I have a wire from positive to the positive of the leds, then resistors in parralel to the leds, then negative to the emmitter of the transistor.
     
  8. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,448
    2,807
    Jan 21, 2010
    Several things wrong with that.

    1) Placing the load in the emitter will make the LEDs harder to turn on

    2) you're clearly using white LEDs. They need more than 3V to turn on

    3) You need at least 5V. 3V (more likely 3.3V) isn't going to cut it.

    4) there's no circuit diagram so it makes it very hard to be very conclusive about anything.
     
  9. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,448
    2,807
    Jan 21, 2010
    Are these LEDs supposed to be on all the time? If so, the transistor is superfluous.

    Or does something turn them on and off?
     
  10. shagsj

    shagsj

    10
    0
    Dec 28, 2012
    Yeah the controller is constantly supplying power. The transistor is to turn the leds off when it is "off".
     
    Last edited: Dec 28, 2012
  11. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,448
    2,807
    Jan 21, 2010
    So the transistor does nothing? Just connect the wire you would normally connect to the emitter to the place you connect the collector.

    Whenever there is power, the LEDs will light.

    Am I missing something?
     
  12. shagsj

    shagsj

    10
    0
    Dec 28, 2012
    I'm using orange led's. Just using the instructions on how to install them.

    The base is connected to somoethign on the pcb that is only on when the controller is officially on.
     
  13. shagsj

    shagsj

    10
    0
    Dec 28, 2012
    I'm thinking it may be easier to install directly to the power and put in a small switch on the back of the controller...
     
  14. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,448
    2,807
    Jan 21, 2010
    First you need to do the connection like I say to see if the problem is related to the transistor or the voltage that is present.

    Orange LEDs should be OK
     
  15. shagsj

    shagsj

    10
    0
    Dec 28, 2012
    OK so if I wire the resistor attached to the base leg directly to the positive power source the LEDs are brought again. However they turn on even when the controller is not on. Does this mean I need to find a different spot to wire the base that is only active when the controller is on?
     
  16. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,448
    2,807
    Jan 21, 2010
    Do you mean bright?

    If so, the problem is as I suggested before, that the load needs to be in the collector, not the emitter.

    The emitter is connected to the black wire, and the red wire connects to some +V point.

    So, take the black wire (currently connected to the emitter), and connect it to where the collector is currently connected.

    Then take the collector, and connect it to the red wire from the LEDs.

    Then, finally, take the emitter lead and connect it to where the red wire from the LEDs was previously connected.

    The base lead remains connected to the resistor and then to whatever pad you had it connected to.

    If those wires have the correct colouring, it sounds like a PNP transistor. What are the markings on it?
     
  17. shagsj

    shagsj

    10
    0
    Dec 28, 2012
    Should be an npn transistor.

    Says on it
    2N
    3904
    026.

    Does that change what you said?
     
  18. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,448
    2,807
    Jan 21, 2010
    No, it just means that the way you're told to connect the red and black wires is reversed (the red wire is more negative than the black wire).

    Don't worry about it. It's good that it's NPN, it's what I expected.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-