Shop OBEX P1 Docs P2 Docs Learn Events
Simple transistor issue — Parallax Forums

Simple transistor issue

NoBo780NoBo780 Posts: 94
edited 2010-01-26 20:57 in BASIC Stamp
I am working on a project for my robotics team where I need to drive six green, 1-Watt Luxeon LEDs (rated at 350mA). I am using 4 LD1117V33 3.3V regulators (800mA each), and a 2N2222 transistor (TO-92 package) for each LED. I have 1k-ohm resistors going from the PWM outputs of the microcontroller I am using, which has a total absolute maximum current output of 40mA, to the bases of the 2N2222s. Two of the 3.3v regulators are driving two LEDs in parallel each, and the other two regulators are handling one each.

When I bring the outputs to the 2N2222s HIGH, the LEDs light at maximum brightness for about .75 sec and then go very dim. What am I doing wrong? One more note: I forgot to add 10-ohm, 1-watt resistors from each LED's anode to the output of the 3.3v regulators. I have confirmed the microcontroller is not browning out, so it probably lies within the transistors? I think this has something to do with the Hfe values or something...I am not well-versed in transistor calculations so please, I welcome any help from an EE or two!

Thanks smile.gif

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Giggly Googley!

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-01-26 18:49
    You didn't say what the input voltage was for the regulators. They may be overheating and going into thermal shutdown. You may not be able to parallel the regulators.
  • NoBo780NoBo780 Posts: 94
    edited 2010-01-26 18:55
    Ah that's important. 9V. I am using a wall wart rated for 11A so I have plenty of current at my disposal.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Giggly Googley!
  • NoBo780NoBo780 Posts: 94
    edited 2010-01-26 18:56
    Mike said...
    You may not be able to parallel the regulators.

    What do you mean? Two LEDs to one regulator? If you're talking about connecting the outputs of the regulators I have not connected the Vout pins in any way.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Giggly Googley!
  • Mike GreenMike Green Posts: 23,101
    edited 2010-01-26 19:03
    OK, well maybe I misunderstood, but the LEDs dimming after maybe 3/4 second of full power could be thermal shutdown in the regulators. How hot do they get? 9V - 3.3V = 5.7V. Times 700mA (for 2 LEDs) is around 4W ... a lot of heat for an un-heatsinked regulator to dissipate.
  • NoBo780NoBo780 Posts: 94
    edited 2010-01-26 19:06
    They are heat-sinked, and fan-cooled. I doubt that they heat up that hot in 3/4 of a second! This happens when I start them from a cool temperature, too. And they do not get that hot after 3/4 of a second with the LEDs on full power; I have ran the LEDs at 50% PWM before and the regulators get VERY hot, but the temperature is brought way down once I turn on the cooling fan. Plus, I have heard this family of voltage regulators tends to get pretty hot.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Giggly Googley!
  • Mike GreenMike Green Posts: 23,101
    edited 2010-01-26 19:27
    Let's see ... that's a base current of roughly 10mA. hFE is somewhere on the order of 30-100 at the kind of currents used, so output currents are 300mA to 1A which may saturate some of the transistors. Do the transistors get hot?
  • NoBo780NoBo780 Posts: 94
    edited 2010-01-26 19:33
    The 2N2222's, as far as I can tell, no. I wish I could answer this more concretely but they are wedged in between some components and all I can do is stick my pinkie in there to test. They may be warm, but not hot. The voltage regulators get pretty hot though.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Giggly Googley!
  • NoBo780NoBo780 Posts: 94
    edited 2010-01-26 19:36
    and thanks for the help so far Mike; I appreciate the quick reply. I hope to get this resolved before tonight when I go to a school robotics club meeting...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Giggly Googley!
  • Mike GreenMike Green Posts: 23,101
    edited 2010-01-26 19:41
    Well good luck. I still think it's the regulators. An easy test would be to run them off 6V instead of 9V and see how long the LEDs stay bright.
  • upand_at_themupand_at_them Posts: 61
    edited 2010-01-26 19:54
    Here's a good page explaining using transistors as switches and the calculations involved.
    http://www.rason.org/Projects/transwit/transwit.htm

    If possible, I would use PNPs, not NPNs, as microcontrollers can sink more current than they can source.

    Also, have you tried 5V regulators? I'm not sure what the voltage drop is for those LEDs you're using, but you're cutting it close with the transistor voltage drop plus the LED drop.

    And....Here's a helpful troubleshooting tip: Don't try to debug five things at once. Remove 3 of the LEDs and start there.

    Mike
  • stamptrolstamptrol Posts: 1,731
    edited 2010-01-26 19:56
    You do have the 2n2222's connected so the transistors switch to ground, right?

    If the basic circuit is right, I'm with Mike as to the regulators going into shutdown.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • NoBo780NoBo780 Posts: 94
    edited 2010-01-26 20:10
    Alright. I ran it off of 5V and it seems to run fine now. The regulators are more happy with a 1.7V difference than a 5.7V difference. So, here's my question: is the current driving capability of the 2N2222s limited by the Hfe or the Ic (collector current, I am guessing)? The max ratings for these 2N2222's are: Ic: 800mA, Hfe: 300

    Also, upand_at_them:

    I have measured 2.7-2.8V across each LED as the voltage drop.
    upand_at_them said...
    you're cutting it close with the transistor voltage drop plus the LED drop.

    What do you mean, "cutting it close"? What could this do?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Giggly Googley!
  • NoBo780NoBo780 Posts: 94
    edited 2010-01-26 20:11
    ...keeping in mind that the LEDs draw 350mA under normal conditions.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Giggly Googley!
  • upand_at_themupand_at_them Posts: 61
    edited 2010-01-26 20:12
    Since regulator shutdown is suspected, here's one line of investigation he needs to pursue...

    Get the datasheet for the LED (SparkFun has it). Lookup the forward voltage for green. Get the datasheet for the transistor (Jameco, DigiKey, tons of places have it). Lookup the voltage drop. Add the two values together and see if it's less than the voltage regulator output.

    Mike
  • NoBo780NoBo780 Posts: 94
    edited 2010-01-26 20:33
    Okay, so from what I have gathered, Vce is the 'voltage drop' or saturation voltage. It is, in this case, 1V or more. This is bad, because the forward voltage for the LED is between 2.79-3.42 (and up to 3.99 MAX). This means we are drawing way too much voltage for the 3.3V regulators, so what problems does this pose (other than overheating, and me having to replace the regulators, or the transistors because of this mismatch)?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Giggly Googley!
  • Mike GreenMike Green Posts: 23,101
    edited 2010-01-26 20:34
    The 2N2222A maximum current rating (Ic) is the maximum current through the transistor that can be sustained without damage, usually caused by resistive heating (and melting) of the bonding wires, bonds, and/or metallization on the transistor chip.

    The current gain (hFE) is usually given as a minimum and is the amount of current flow through the collector (collector to emitter) for a given amount of current through the base (base to emitter). It's usually very variable from transistor to transistor, batch to batch, and manufacturer to manufacturer. Circuit designs take this variability into account. For a switching transistor like this one, you want a minimum since you're trying to saturate the transistor so it's completely conducting no matter how much collector current is being conducted (or off) and the collector to emitter voltage is at a minimum (typically 0.6V in this case)

    You're not going to draw too much voltage from the regulators because they have a fixed voltage output (3.3V). If the various voltage drops add up to more than 3.3V, something else will change, typically the amount of current drawn will drop as the LEDs begin to stop conducting.

    Post Edited (Mike Green) : 1/26/2010 8:39:43 PM GMT
  • NoBo780NoBo780 Posts: 94
    edited 2010-01-26 20:37
    I know the LEDs are running at a very low output at this point because they are not getting the power they need. But could this cause damage in the circuit if left as-is?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Giggly Googley!
  • NoBo780NoBo780 Posts: 94
    edited 2010-01-26 20:40
    BTW: Correction: the HFE for these variations of the 2N2222 transistor I bought is 200.

    Mike: Thanks for the explanation. Disregard my last 2 posts. At this point, unfortunately, I have soldered these components onto a PCB. What do you suggest I change to alleviate this problem, so I can get the maximum light output from these LEDs? The voltage regulators should be changed to 5V and the appropriate power (1W+) resistors added?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Giggly Googley!

    Post Edited (NoBo780) : 1/26/2010 8:47:00 PM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2010-01-26 20:50
    If that's the forward voltage of your LEDs (3.99V), then you really need to redesign your circuit. You've got 3 devices in series, a 2N2222A transistor, an LED, and a resistor. The total voltage drop across these has to come out to the voltage of your power source (the regulator). The forward voltage of the LED is variable and ranges from 2.79V to 3.99V, probably depending on the current and temperature. The saturation voltage of the transistor depends on the current and is somewhere between 0.3V and 1V (roughly). The resistor has to be chosen to limit the current to about 350mA. You can probably pick the high current limit and solve for the resistor value, then pick the next highest standard resistor value and see how the current comes out.

    The datasheets for the LED and transistor probably have graphs giving the forward voltage and Vce in relationship to current. That's what you'll use to figure out the resistor value.
  • NoBo780NoBo780 Posts: 94
    edited 2010-01-26 20:57
    Yes, 10 Ohms. Ok thank you for the help; I needed it!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Giggly Googley!
Sign In or Register to comment.