Tristated output to two common Base transistor issue


Closed Thread
Results 1 to 40 of 55

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    Omaha, Nebraska USA
    Posts
    263


    Did you find this post helpful? Yes | No

    Lightbulb

    I assumed on the basis of information given that the LED supply is 5 VDC:

    50 mA (current through LED) x 47 ohms (current-limiting resistor) gives a voltage drop of 2.35 VDC.

    Here is what Brian is trying to tell you:

    <IMG SRC="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1971&stc=1&d=118905553 3">

    R1a and R1b are built into Q1; R2b and R2a are built into Q2.

    As wired, the built-in 22K resistors create a voltage divider, shown in the circuit above. Brian is not quite correct in saying that "the PNP and NPN transistors are both turned ON by each other" (they are not), but he is right about the effect of the intrinsic resistors. When the input (at B) is in a high-impedance state (Z), the voltage at A is 3/4 of +VDC, at B, it is 1/2 of +VDC, and at C, it is 1/4 of +VDC.

    In other words, if +VDC is 5 volts, and the pin connected to B is high-impedance (Z), the voltage at A will be 3.75 volts, at B 2.50 volts, and at C 1.25 volts. The voltages present at A and C will keep the transistors turned partly on, which sounds like the problem you described.

    The effects of a logic high (nominal +5 VDC) or a logic low (nominal 0 VDC) at B I will leave as an exercise for those who are curious.
    Attached Images Attached Images  
    Last edited by RussMartin; - 6th September 2007 at 07:49.
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    Hi, Russ

    Look at old audio C class fully transistorized power amplifiers output stage ... the scheme is quite the same ... and see how the quiescent current is adjusted ...

    There is THE solution !!!

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    951


    Did you find this post helpful? Yes | No

    Default

    Okay, some additional infos here.

    First, I thought to use transistors for the high-power LEDs because I have to drain more than the acceptable 20-25mA a PIC can hold.

    Yes, the circuit is +5V powered.

    Acetronics, I will try with diodes but, if this works, I will have to add 30 diodes to the circuit!!!! (c'est pas une question de poids.... mais ça fait du monde sur le PCB ).

    BrianT, you may be right: I'm an electrician, not an electronician so I don't "master" those kind of Z-state subtilities and don't really know how to handle them a correct way...

    RussMArtin, I need to light the LEDs separately, never simultaneously.

    If my way of doing (thinking) is completely wrong, how would this kind of problem be resolved in an industrial environnement? Would they just use a 20 I/O ports PIC?

    Finally, I ask myself if this can be done ... or not?
    Roger

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    Hi, Roger

    the simplest (component count ) is to use "classic" transistors and use resistors for 3.5v Hi state switching, and 1.5v Lo state switching ...

    That gives "R1" = 10k and "R2" = 2.2 k ... and class "C" transistors ( gain > 400 ).
    The original Logic transistors can't work this way due to the too high b>e resistor

    AND do not forget the +V/2 pullup 2 resistors ...

    BUT ... what do you want to realize ??? other solutions possible !!!

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  5. #5
    Join Date
    Aug 2006
    Location
    Omaha, Nebraska USA
    Posts
    263


    Did you find this post helpful? Yes | No

    Default

    If my way of doing (thinking) is completely wrong, how would this kind of problem be resolved in an industrial environnement? Would they just use a 20 I/O ports PIC?

    Finally, I ask myself if this can be done ... or not?
    This is why engineering is an art, not a science!

    Let's sum up what we know so far:

    1. It is a 5 VDC circuit.

    2. The LEDs require more current than a PIC pin can source or sink.

    3. There are three permitted states for any pair of LEDs--one or the other is on, or they are both off. They are never both on at the same time.

    4. There are 10 output channels.

    Beyond this, we don't know what you are attempting to do, or why. In other words, we don't know your intended application.

    And there are questions: Do you have to use such current-hungry LEDs? Why? Of 10 channels, how many LEDs are likely to be on at the same time? Do you have size and/or board space limitations?

    Alain suggests using "classic" transistors (I think he means ones without the built-in resistors). This sounds like one good approach. I would go further and suggest generic switching transistors driven well into saturation. Going to a 20-port PIC would also work, with the advantage of allowing you to use transistors that are all the same.
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

  6. #6
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    970


    Did you find this post helpful? Yes | No

    Default

    Unless it is a course requirement, I suggest you use shift registers CD4094 to latch the states of the LEDs. For 24 LEDs you need 3 x 4094 devices; and they are dirt cheap. So, why struggle?

  7. #7
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    951


    Did you find this post helpful? Yes | No

    Default "Knight Rider" light

    Well,

    I'm still working on a "Knight Rider" stoplight...

    Because of a extremely narrow space availability inside the original stoplight, I can't add lots of components to the circuit.

    The LEDs have to be powerfull enough to look like, at least, the original bulbs.

    I have made a prototype with "common" LEDs and it works well BUT it is far to weak (... and I have made it with yellow LEDs witch makes it unsuable as stoplight).
    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1972&stc=1&d=118910210 0">

    I connected the LEDs like hereunder but this is not longer possible because of the use of transistors (btw this is just the LED connection part). The "curious" disposition of LEDs in this shematic allows me to switch-ON two consecutive LEDs and improve the fluency wipe effect - but this is another story.
    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1973&stc=1&d=118910225 7">

    I couldn't find SMD transistors (at DISTRELEC for those who now this supplier) without built-in resistors so I thought it is a common thing (?).

    Hope this helps a little...
    Attached Images Attached Images   
    Last edited by flotulopex; - 6th September 2007 at 20:30.
    Roger

Similar Threads

  1. Help changing CCP3 output pin
    By ChrisHelvey in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 15th July 2008, 03:30
  2. Bit Banging input to output on PIC16F876A
    By Bronurstomp in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 26th June 2008, 20:50
  3. Serious Serial Situation Setbacks...
    By Dansdog in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 7th February 2007, 04:46
  4. Using LEDs as light sensors
    By skimask in forum Code Examples
    Replies: 3
    Last Post: - 30th December 2006, 23:19
  5. HSEROUT Newbie question/problem
    By Mark Scotford in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 11th July 2006, 15:44

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts