LED's and Transistors

Discussion in 'The Projects Forum' started by kiwi101, Mar 4, 2014.

  1. kiwi101

    Thread Starter Member

    Feb 18, 2014
    38
    0
    Hey guys

    I'm trying to build a circuit but there are so many components it's difficult to choose the most effective one and the way to apply it.
    So I basically have 16 LED's and I want to attach 4 in parallel with one another and connect it in series to another 4(which are parallel) and so forth. So basically it looks like four bright lights. The LED's I am using are the white 5mm one's with a maximum voltage of 3V and 20mA forward current. I am supplying 12V power from an independent voltage source. Now my question is my Professor wants us to use transistor or transistor(s) in this circuit. I have studied about PNP and NPN transistors but their function in circuits still confuses me. I also need to implement a 6 input dipswitch but that will only turn the circuit on or off. He said the use of the dipswitch will be controlled by a microcontroller so that is not something I am worrying about right now.
    My main concern is how exactly do I start this is what I have so far. I want to fully understand the circuit I end up deisgning.
    Please help
     
    • LED.png
      LED.png
      File size:
      466 bytes
      Views:
      71
  2. kiwi101

    Thread Starter Member

    Feb 18, 2014
    38
    0
    My image isn't saving but I basically just used a led resistor calculator
    so it just shows the layout of how the LED's look
     
  3. bertz

    Member

    Nov 11, 2013
    238
    31
    We can help, but first tell us a little about your background so we don't ASSume things. Are you familiar with basic AC and DC theory? Do you understand and can apply Ohm's law?

    Next, tell us more about the LEDs you are using. Do you have a data sheet for them? Do you know how to interpret a data sheet? It should look similar to the one I have attached. We need to know the maximum current and the forward voltage for these LEDs before we get started.

    The project is not difficult and you can learn a lot by doing it, but don't expect us to do the work for you. We'll walk you through it one step at a time.

    Good luck:)

    Apparently the server wont let me upload files, so get back to us with answers for the above and we'll go from there.
     
  4. kiwi101

    Thread Starter Member

    Feb 18, 2014
    38
    0
    Yes I am familiar with basic AC and DC I am currently taking a circuits class right now so Ohms law is also familiar. I guess it's just in class we are always provided with the circuit and we have to build it and I just realized I can not design one on my own.
    I definitely want to learn and am willing to do this the slow and hard way.
    Ok so the LED's have a maximum voltage of 3V and forward current 20mA.
    Also I plan on providing a 12V source.
     
  5. bertz

    Member

    Nov 11, 2013
    238
    31
    I am looking for the MAXIMUM current and the forward voltage. You have your terms backwards. Did you even look at the datasheet. Before designing and building circuits, I spent time teaching my students how to read and interpret data sheets. There is a lot of information there and it will help you get your terminology straight.
     
  6. kiwi101

    Thread Starter Member

    Feb 18, 2014
    38
    0
    Yes I have read it now
    Forward current max.: 30mA·
    Forward voltage max.: 2.5V·
    Reverse voltage max.: 5V
     
  7. bertz

    Member

    Nov 11, 2013
    238
    31
    OK my friend, now we are getting somewhere.

    Now let's see if I understand your immediate goal. You want to configure 4 strings of LEDs, each string consisting of 4 LEDs and a current limiting resistor (lets leave the DIP switches and microcontrollers out of the discussion for the moment).

    When designing circuits you want to stay away from the maximum levels. Most designers try to limit LED current to between 15 and 20 mA. Now somewhere in your data sheet they give you a TYPICAL value for the forward voltage drop. I suspect it is somewhere around 2 volts. I want you to verify what the typical forward voltage is from the data sheet. Then, using this value and 15 mA of current, I want you to calculate the value and wattage for the current limiting resistor in each branch. DO NOT use an online calculator. Show your calculations.
     
  8. kiwi101

    Thread Starter Member

    Feb 18, 2014
    38
    0
    Okay so my forward voltage drop for the LED is 2.2V
    Value of current limiting resistor = [V(s) - V(f)]/I = (12-2.2)/ 30mA = 326 Ohms
    So I mentioned this earlier our Professor wants us to use transistors and minimize the number of resistors used in this circuit design. It's the use of transistors that is confusing me the most. I have studied them I just don't see how or why they are more effective.
    If I implement a BJT where exactly should I make the connnections and if I make it there how is it helping with the circuit.
    Please keep in mind that the end goal is to turn the LED's on and off with the help of a dipswitch
     
  9. wayneh

    Expert

    Sep 9, 2010
    12,156
    3,063
    A transistor is a switch. It is turned on when a small current flows in the base circuit (BJT type) or a voltage is applied to the gate (MOSFET type). So a small signal can control a much larger amount of power. Unlike a simple switch, it is also possible to turn a transistor on only partially. You might say it is a variable resistor in that case, under the control of the base or gate.

    It's not obvious what you would use a transistor for in this project. Jumping ahead to using a microprocessor, you might use a transistor to allow the small signal from the µP to control the power to the LEDs.
     
  10. kiwi101

    Thread Starter Member

    Feb 18, 2014
    38
    0
    As you just mentioned can the transistor not also be used as a resistor? If I connect the gate to source doesn't it operate as a resistor?And it saves much area compared to resistor
    I wanted to use a dipswitch to control the power provided to the LED's.
    Is there a way I could implement both. So for example the BJT controls the power provided to the dipswitch which in turn controls the power provided to the LED's. But synonymously the BJT also acts as a resistor to control the current provided to the LED's so they don't burn
     
  11. bertz

    Member

    Nov 11, 2013
    238
    31
    In your original post you said you wanted to have four sets of LEDs in four parallel circuits, or did I misunderstand. Your getting way ahead of yourself with this discussion of transistors because you haven't come up with the correct value for the current limiting resistor. We'll get to transistors in due course. For now the answer is NO! transistors are NOT a substitute for resistors.

    Meanwhile, back to the subject at hand. You used 30 mA as the design current for your LEDs. This is the MAXIMUM rating for the LED. I told you earlier that you should design your circuit for between 15 and 20 mA.

    Next, if you have four LEDs in series as you had previously indicated you must account for the TOTAL voltage drop of the LEDs, not just one.

    Finally you were asked to also calculate the wattage value for the current limiting transistors.

    I have attached a schematic of the circuit that you described in your earlier post. Please confirm that we are all on the same page. Then calculate the correct value of the current limiting resistors R1 - R4 and their wattage rating.

    Adding transistors to the circuit will NOT reduce the number of resistors required.
     
  12. kiwi101

    Thread Starter Member

    Feb 18, 2014
    38
    0
    The schematic looks correct to the visual I have of the LED.
    Ok so limiting resistor= [V(s) - [Vd + Vd + Vd + Vd]]/I = [12-8.8]/.02 = 160 Ohms

    As for the wattage value it is Vr * I = P = (12-2.2) * .02 = .196 W
     
  13. kiwi101

    Thread Starter Member

    Feb 18, 2014
    38
    0
    Wait no the wattage value is .064 because of the 4 LED's in series
     
  14. bertz

    Member

    Nov 11, 2013
    238
    31
    OK, so now you have determined the correct value of the current limiting resistor for the LEDs and you have correctly calculated the power dissipation. Since the power dissipated is only .064 watts, a 1/4 watt resistor will do quite nicely.

    In the attached circuit diagram I have added the DIP switches (SW1-SW4) to control each branch of the circuit. I changed the value of the current limiting transistor to 150 ohms since it is more readily available and results in an increase in current of only 1 mA.

    If you want to continue this exercise, we will be replacing the switches with transistors. As you have already surmised, there is really no advantage and it complicates the circuit as you will see. I suspect your "professor" suggested the use of transistors purely as an intellectual exercise.

    By the way, you should Google Express PCB and download the free software. It is very simple to use and will allow you to draw schematics and do PCB layouts.
     
  15. bertz

    Member

    Nov 11, 2013
    238
    31
    Here is the revised schematic:
     
  16. kiwi101

    Thread Starter Member

    Feb 18, 2014
    38
    0
    So if I add a transistor to each branch then how do I choose the type I want? A BJT or MOSFET?
    Is it based fully on their properties or is there a formula I can use?
     
  17. bertz

    Member

    Nov 11, 2013
    238
    31
    Whoa there big fella! Lets take this one step at a time. I typically spend 4 to 6 weeks teaching the topic of transistors and we are trying to do this in a quickie forum. Let's just focus on the transistor as a switching device. We'll start with generalities, then get into specifics.

    A transistor can function as an SPST switch, but rather than being mechanically controlled, it is controlled by an electronic signal driving the base terminal. The attached diagram shows a comparison between an SPST switch and an NPN transistor.
    When the switch is open there is no current flowing in the circuit and the LED is off. When the control signal on the base terminal of the transistor turns the transistor off, the transistor acts like an open switch. The resistance between the collector and emitter terminals rises infinitely high and prevents current flow in the circuit. The LED in series with the transistor is off.
    When the switch is closed, current flows in the circuit and lights the LED. Likewise, when the control signal on the base terminal turns the transistor on, the resistance between the collector and emitter drops to zero and the current flow lights the LED.
    Actually, the transistor is not a perfect switch. When it is off, the resistance between the collector and emitter does not go to infinity, and when it is on, the resistance between the collector and emitter does not drop to zero. Even though the transistor is not a perfect switch, it is close enough to function as such in most circuits.
    So the $64,000 question is: What do we use for a control signal?
     
  18. kiwi101

    Thread Starter Member

    Feb 18, 2014
    38
    0
    I guess I get $64000 because the microprocessor provides the control signal for the transistors.
    I will download express PCB when i get to school because my laptop already has too many downloads and draw the end circuit.
     
  19. bertz

    Member

    Nov 11, 2013
    238
    31
    Let's not get ahead of ourselves here. We'll take it one step at a time and eventually we'll get to the microprocessor. But first we'll address your question of how to select a transistor. In order to do that you need to understand some fundamental properties..

    The ratio of how the emitter current divides into base and collector current is a function of the particular transistor being used. Typically only about 1% of the emitter current will exit the base and 99% will exit the collector. The ratio of collector current to base current is a parameter of the individual transistor and is called Gain, and is referred to in the data sheets as hFE.
    The important thing to remember about gain is that it is a fixed ratio between collector current and base current. Therefore a small change in base current will cause a large change in collector current. The base current is the control current.
    You should memorize the following formulas:
    Transistor current divider: IE = IB + IC
    Transistor current gain: hFE = IC / IB
    OK, so let’s take a look at the attached circuit diagram. Assume the base current is .1 mA and the collector current is 8 mA. What is the emitter current and the gain of the transistor?
    IE = IB + IC
    IE = 0.1 mA + 8 mA
    IE = 8.1 mA
    And
    hFE = IC / IB
    hFE = 8 mA / .1 mA
    hFE = 80
    Now it’s your turn.:) If the collector current is 21 mA and the gain of the transistor is 100, what base current is required to saturate the transistor (i.e. turn it on)?
     
  20. kiwi101

    Thread Starter Member

    Feb 18, 2014
    38
    0
    Ib = IC/gain = 21/100 = .21 mA is required to turn the transistor on
     
Loading...