Switch Design

Discussion in 'General Electronics Chat' started by Federov, Oct 3, 2010.

  1. Federov

    Thread Starter New Member

    Sep 14, 2010
    26
    0
    I need to have a way of selecting what LEDs turn off and on in my circuit represented in the figure below. The idea is to parallel the LEDs with switches and have the switches be controlled by a PIC. So far the idea is to just build the switches with a BJT, but I wanted the opinion of others to see if there is a better way. This is for school so an IC sadly cannot be used. All suggestions will be appreciated, thanks in advance!


    [​IMG]
     
  2. strantor

    AAC Fanatic!

    Oct 3, 2010
    4,302
    1,988
  3. Federov

    Thread Starter New Member

    Sep 14, 2010
    26
    0
    Thanks for the response! I've run into many problems with this project mostly because the professor wants to make it harder than it needs to be :(. That being said I have to use the current source and a PIC to control a switch to turn them off and on. Even if this wasn't the case though the LEDs i'm using have a max current of 700mA and the PIC cannot source that amount of current or should I say the PICs i know of can't =P.
     
  4. Kermit2

    AAC Fanatic!

    Feb 5, 2010
    3,782
    941
    you will have lots of trouble with that design because the voltage/current setting of the LED's will change everytime a switch is opened or closed.

    The LED's need to be in parallel to operate with switches set up that way.
     
  5. Federov

    Thread Starter New Member

    Sep 14, 2010
    26
    0
    Hello Kermit2,
    What you describe is exactly the problem i have been seeing with this sort of a design. Here is the problem.. I need to use one current source to supply all 3 LEDs but in parallel (like diodes) it will not light all three but only one correct? Is there a thermal coupling technique that will stop this problem?

    There isn't a switch circuit that doesn't have the negative effects (aka more ideal like a wire)? Currently all I can think of doing is making 3 current sources, one for each LED =P.
     
  6. Kermit2

    AAC Fanatic!

    Feb 5, 2010
    3,782
    941
    arrange the LED's in parallel instead of the serial arrangement you have drawn.

    Have the switches between the LED's and ground and have them active when the LED is On and turn off the switch when the LED should be off. This avoids current drain problems of using a grounding switch to short the supply to the individual LED's
     
  7. marshallf3

    Well-Known Member

    Jul 26, 2010
    2,358
    201
    That or if you can make a constant current source from the PIC, then it wouldn't matter if they were in series.

    Can't quite fathom how you'd go about switching the things though.

    Of course just because thos LEDs have a max current of 700 mA doesn't mean they need that much to light up, in other words they may be forgiving enough to make up a circuit that way so long as with just one on you didn't exce3ed the maximum current.
     
  8. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,574
    230
    Federov,

    Are all lighted combinations of the 3 LEDs required? When lit, do they have to maintain one level of LED brightness, no matter how many are lit?

    Ken
     
  9. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Use logic-level N-ch MOSFETs to sink current from the LEDs.

    A PIC can drive the gates of the logic-level N-ch MOSFETs directly via a resistor of low Ohms; 220 would be good.

    Wire the LEDs in parallel. You will need one MOSFET per LED.
     
  10. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    Why would everybody wants to connect the LEDs in parallel?

    You can't because it is a requirement by the problem setter(professor) to make the problem harder.

    Because the LEDs are driven in series via a current source, its brightness will not be affected by shunting out various LEDs in the string. This is why a current source is specified.

    Easy way out is to use relays but it will certainly get you zero or low marks.

    Shunting the individual LED by MOSFET seems to be the correct way to address the problem and so it leaves the problem of how to drive the MOSFET gates from the PIC.

    This has now become an interfacing problem. First we have to assume that from the data given, a 700mA max. LED could have a few volts across itself in operation. Let's say 3.5V.

    For the bottom LED, a logic level MOSFET can be used and be driven directly via the PIC port pin output.

    For the middle and top LED, a similar gate drive connection will not work if the bottom LED is ON(not bypassed) thus having 3.5V across itself. The PIC output can only be less than +5V normally so will not drive the middle MOSFET gate as its Source voltage is now 3.5V. Similarly this is also true for the MOSFET across the top LED.

    The solution is to drive the MOSFET gate using voltage from a higher voltage rail(say +18V) and adds transistor level converter in between the gate and the PIC output. This usually takes the form of a PNP/NPN pair. You can even use the same arrangement for the bottom LED too and removes the requirement of using a logic level MOSFET. Or, you can use logic level MOSFET throughout and lessen the high voltage requirement to say +14V or lower. This would be attractive if there is no high voltage rail available and you have to generate it yourself.

    Another easier option is to use optocoupler for the level conversion. As this a homework problem I will leave all the component details for you to figure it out.

    [​IMG]
     
  11. marshallf3

    Well-Known Member

    Jul 26, 2010
    2,358
    201
    Could you possibly send AC signals to the gates? Might be a way to use some caps and diodes to simulate a common ground situation that would appear to be common to each FET.
     
Loading...