Tristated output to two common Base transistor issue


Closed Thread
Page 1 of 2 12 LastLast
Results 1 to 40 of 55
  1. #1
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891

    Default Tristated output to two common Base transistor issue

    Hello,

    I have to power automotive LEDs that drain 50mA.

    I use twenty LEDS and have a 16F630, so my circuit connects two LEDs to 1 I/O port and I use the Z state to switch them OFF.

    To make this without destroying the PIC, I use transistors like this (one port example):
    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1965&stc=1&d=118901631 5">

    Problem: when I have set the port direction to Input (=Z state), both LEDs still light; less than normal, but still enough to make this look not good.

    The SMD transistors have built-in 22k resistors like this (the PNP one has same connections):
    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1964&stc=1&d=118901608 9">

    I tried to add 1k resistors at each Tr's Base, but... still the same.

    Is there a way to sort out this issue?

    NB: how do I put text beside the images???
    Attached Images Attached Images   
    Roger

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


    Did you find this post helpful? Yes | No

    Default

    Hi, Roger

    Supposing your leds are 5v powered ...

    inserting 3x "1N4148" in series in EACH "base" connexion, AND two resistors ( equal high value ) to set "third state" output to V+/2 ...

    that should work !!!

    Alain

    PS: dis, tes montages tordus ..., tu vas les pècher où ??? ... LOL !!!
    ************************************************** ***********************
    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
    Omaha, Nebraska USA
    Posts
    263


    Did you find this post helpful? Yes | No

    Default

    Can the circuit be simplified?

    Is there a special reason that each LED must have its own transistor driver? And that one is PNP while the other is NPN?

    Have you considered using one transistor to drive two LEDs in series? (Two LEDs in series use the same 50 mA of current!) It would reduce your parts count a lot.

    Is there a special reason for setting the output pin to high-Z (input) to turn the LEDs off? (Are you then using the pin as an input?) Have you considered leaving the output pin as output, adding a pull-up (or pull-down) resistor, and simply toggling it high and low?
    Last edited by RussMartin; - 6th September 2007 at 00:50.
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

  4. #4


    Did you find this post helpful? Yes | No

    Default Your circuit is fundamentally flawed

    With no PIC or any other drive, the PNP and NPN transistors are both turned ON by each other and the two series resistors (not shown) which are inside the cases. If you used regular PNP and NPN without intrinsic series resistors the circuit would instantly blow up two transistors.

    IF the LED supply is the 12 volt auto battery things get worse. The PNP is always conducting because its base is at either 0 or 5 volts while the emitter is at 12 volts. The PNP base sees either 7 or 12 volts drive so it is always ON.

    A rethink is needed.

    HTH
    Brian
    Last edited by BrianT; - 6th September 2007 at 01:43.

  5. #5
    Join Date
    Aug 2007
    Posts
    23


    Did you find this post helpful? Yes | No

    Default

    I would think some diode isolation with a pull-up on the PNP base and a pull-down on the NPN base. Something along those lines anyway.

  6. #6
    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 06:49.
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

  7. #7
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    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 " !!!
    *****************************************

  8. #8
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891


    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

  9. #9
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    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 " !!!
    *****************************************

  10. #10
    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.

  11. #11
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    947


    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?

  12. #12
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891


    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 19:30.
    Roger

  13. #13
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi Roger,

    Here are two complementary transistors from www.distrelec.ch.

    Best regards,

    Luciano


    ==============================================
    Distrelec Art.No: 610375
    Type BC 817-40 (NPN SOT-23, 500mA)

    Datasheet:
    http://www.nxp.com/acrobat_download/...7W_BC337_5.pdf

    ==============================================
    Distrelec Art.No: 611585
    Type BC 807-40 (PNP SOT-23, 500mA)

    Datasheet:
    http://www.nxp.com/acrobat_download/...7W_BC327_5.pdf
    ==============================================
    Last edited by Luciano; - 6th September 2007 at 19:54.

  14. #14
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891


    Did you find this post helpful? Yes | No

    Default

    Luciano,

    Je dois avoir les yeux dans mes poches, c'est pas possible autrement!

    Nevertheless, it looks not possible to control the LEDs the way I thought I could...
    Roger

  15. #15
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi Roger,

    Try that:

    If you use standard LEDs, replace the 22 Ohm resistors with 100 Ohm resistors.

    Best regards,

    Luciano

    EDIT: The note about the resistors is only if you use this circuit.
    To drive two standard LEDs (max 20 mA) you don't need transistors.
    Last edited by Luciano; - 6th September 2007 at 21:21.

  16. #16
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    20 LED's,... 20 Transistors, 20 Resistors. Start adding diodes, half-watt resistors.... Yuck!

    I think I'd just go with 3 of these

    <table><tr><td><a href="http://www.allegromicro.com/en/Products/Part_Numbers/6277/6277.pdf"><img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1974&stc=1&d=118911366 1"></a></td><td>

    Don't even need resistors on each LED.

    Up to 24V for LED drive.

    Set it for 50ma constant current.
    Shiftout the LED states

    And that's it.
    </td></tr></table>

    http://www.allegromicro.com/en/Produ.../6277/6277.pdf
    About $1.50 each in single quantities.
    <br><br>
    Attached Images Attached Images  
    DT

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


    Did you find this post helpful? Yes | No

    Exclamation Current-hungry circuit

    One problem I see with Luciano's suggested circuit is that the two 22-ohm resistors form a voltage divider (!) pulling a maximum of 114 mA (5 volts / 44 ohms = 0.114 amps) when the LEDs are doing nothing. 10 channels of this is 10 x 114 mA = 1.14 amps.
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

  18. #18
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Wink

    Hi Russ,

    The circuit is for the brake light of a car, so the circuit gets the power
    only when the brake pedal is pressed. Also consider that power is generated
    by the alternator, so this current will also decelerate the car when the driver
    activates the brakes ...

    Best regards,

    Luciano

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Luciano View Post
    The circuit is for the brake light of a car, so the circuit gets the power only when the brake pedal is pressed.
    Aha! Thanks! In that case, Roger should go ahead and give your circuit a try!
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

  20. #20
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi,

    There are ony two 22 ohm resistors for the 20 LEDs.


    Best regards,

    Luciano
    Last edited by Luciano; - 6th September 2007 at 23:55.

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


    Did you find this post helpful? Yes | No

    Red face Mea culpa!

    BrianT advised me by private message that I had oversimplified my earlier analysis, and he is right. I looked only at the voltage divider created by the resisitors built into the transistors and neglected to consider the diode drop across the base-emitter junctions of the transistors. The circuit, redrawn, looks like this:

    <IMG SRC="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1980&stc=1&d=118913663 8">

    With the diode junctions in place (a nominal 0.7 VDC drop across each), two voltages change: At A, 4.3 volts; at C, 0.7 volt. At B, it remains 2.5 volts. Both transistors are still "turned on" if there is no voltage present (a high-impedance state) at B.
    Attached Images Attached Images  
    Last edited by RussMartin; - 7th September 2007 at 05:33.
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

  22. #22
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi Roger,

    After testing my circuit on a breadboard I have found out
    that the circuit works, but the current available for the LEDs
    is too low for your application where the forward current of
    the LEDs is 50mA.

    Best regards,

    Luciano

  23. #23
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891


    Did you find this post helpful? Yes | No

    Unhappy to bad...

    So,

    Seems I have no other choice but to buy a 20 Outputs PIC.

    Thank you all anyway for all your propositions and the time you spent on my problem.

    BTW Luciano, I made the circuit too and yes, available current is far to low...
    Last edited by flotulopex; - 7th September 2007 at 20:16. Reason: added
    Roger

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


    Did you find this post helpful? Yes | No

    Question

    Luciano: After testing my circuit on a breadboard I have found out
    that the circuit works, but the current available for the LEDs
    is too low for your application where the forward current of
    the LEDs is 50mA.
    Roger: I made the circuit too and yes, available current is far to low...
    Is it possible that the series base resistor (2.2K) is too large? The "brute force" method to assure that the switching transistor saturates is to give the base about ten times as much current as it needs to turn on.

    Remember, the base current controls the collector current: Not enough base current means not enough collector current. Try 820 ohms, then on down (680, 560, and so on) until it works.

    ---------------

    I did a little looking on line. Is this the kind of thing you are doing?

    http://www.customdynamics.com/knight..._light_bar.htm

    and the cool video:

    http://www.customdynamics.com/videos...derz_video.htm
    Last edited by RussMartin; - 7th September 2007 at 23:22.
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

  25. #25
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi Russ,

    Saturation is not possible, here are the results:




    Best regards,

    Luciano

  26. #26
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891


    Did you find this post helpful? Yes | No

    Default

    I was just wondering if something like that could work.
    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1986&stc=1&d=118926122 9">
    But after I made some trials, it is still not doing the trick
    Attached Images Attached Images  
    Roger

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


    Did you find this post helpful? Yes | No

    Lightbulb

    Saturation is not possible, here are the results
    Thanks for showing us an in situ analysis. Your measurements should enable you to immediately infer what is wrong:

    The circuit, as configured, doesn't permit enough voltage across the transistor! (What is Vf for the LEDs?)

    If you remove the 22 ohm resistor to ground, you will get different results.
    Last edited by RussMartin; - 8th September 2007 at 17:13.
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

  28. #28
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by RussMartin View Post
    If you remove the 22 ohm resistor to ground, you will get different results.
    This is not possible, the circuit needs the voltage divider.



    Roger will have to modify his design.

    Best regards,

    Luciano
    Last edited by Luciano; - 8th September 2007 at 17:33.

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


    Did you find this post helpful? Yes | No

    Default

    If you remove the 22 ohm resistor to ground, you will get different results.
    Quote Originally Posted by Luciano View Post
    This is not possible, the circuit needs the voltage divider.
    . . . and it is the voltage divider that is causing the problem.

    I was not referring to your original circuit, I was referring to your test circuit, suggesting you compare your results by omitting one resistor.

    Maybe we should start over. Let's go back to Roger's original circuit, which can be redrawn this way:

    <IMG SRC="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1987&stc=1&d=118927164 6">

    This is a first cousin to a half H-bridge.

    You will recall the only problem he observed was that, when the input was tri-stated to high-Z, both LEDs were on, although not fully bright. This fault was traced to the resistors built into the transistors. Alain suggested, and I agreed, that the circuit be attempted with "classic" transistors (i.e., transistors without built-in resistors).

    Has anyone tried that yet?
    Attached Images Attached Images  
    Last edited by RussMartin; - 8th September 2007 at 20:01.
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

  30. #30
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi Russ,

    The result for your circuit:



    Best regards,

    Luciano

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


    Did you find this post helpful? Yes | No

    Default

    Beg pardon, my friend; not my circuit. It is a generic redrawing of Roger's original circuit. Which transistors did you use? And did you toast them?

    Thanks for the drawing! It illustrates the problem very nicely! (The red current path is through two diode junctions.)
    Last edited by RussMartin; - 8th September 2007 at 21:12.
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

  32. #32
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi Russ,

    The transistors are still working.

    With this circuit the LEDs are always ON.

    NPN BC546
    http://www.fairchildsemi.com/ds/BC/BC546.pdf

    PNP BC558
    http://www.fairchildsemi.com/ds/BC/BC558.pdf

    Best regards,

    Luciano

  33. #33
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi Russ,

    My interest was to find a solution for the LEDs board that Roger has already made.

    If there is no solution for the original LED board, then a new board with I/O port
    expanders ICs + transistors is in my opinion the way to go.
    (One I/O + 1 transistor for each 50mA LED). That way all the LEDs can be
    ON at the same time and each LED can be individually controlled.

    Best regards,

    Luciano

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Luciano View Post
    The transistors are still working.
    Well, that's good news!

    If you have a few extra minutes, try the circuit this way:

    <IMG SRC="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1992&stc=1&d=118928211 2">

    Let us know how that comes out. You may want to tinker with the values for Rcl, maybe starting with something between 100 and 150 ohms.

    Do you have some small-signal P-channel and N-channel MOSFETs laying around?
    Attached Images Attached Images  
    Last edited by RussMartin; - 8th September 2007 at 21:33.
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

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


    Did you find this post helpful? Yes | No

    Default

    Scratch this post.
    Last edited by RussMartin; - 8th September 2007 at 21:54.
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

  36. #36
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi Russ,

    These are the test results. I have used the old transistors
    and also new transitors but the results are the same. The
    picture below is with the new transistors.

    The picture shows the two LEDs ON with about 25% luminous intensity.




    Best regards,

    Luciano

  37. #37
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi,

    With the circuits we are exploring here, the two LEDs are turned OFF by setting
    the I/O of the PIC as input. (Input tristated). When the I/O is set as input,
    the voltage present on the I/O pin must be recognized as logic LOW or as a
    logic HIGH. Undefined voltage levels are dangerous for the input buffer of the I/O.
    Floating inputs on digital pins are a no-no.

    Best regards,

    Luciano

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


    Did you find this post helpful? Yes | No

    Default

    Thanks for an excellent result! (And the photo!) And thanks for bearing with me . . . I'm doing this on paper, not on a breadboard. I don't know what your LEDs are, so I'm having to guess at the Vf (I'm using 1.6 V) and assuming an If of 20 mA.

    If you please, try increasing both Rcl's each by the same amount until the LEDs just go out, then test high and low at Rb again.

    I appreciate your concern about floating inputs, but we can deal with that next. (I have something in mind.)
    Last edited by RussMartin; - 9th September 2007 at 00:39.
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

  39. #39
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Just to throw a little confusion in the mix, .... how bout ....

    <table border=1><tr><td><img src="http://picbasic.co.uk/forum/attachment.php?attachmentid=1994&stc=1&d=118930280 7"></td><td>
    Or, it may need a normal NPN
    <img src="http://picbasic.co.uk/forum/attachment.php?attachmentid=1995&stc=1&d=118930343 1"></td></tr></table>
    Also just on paper
    <br>
    Attached Images Attached Images   
    Last edited by Darrel Taylor; - 9th September 2007 at 03:06. Reason: Normal NPN
    DT

  40. #40
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    How about something like this?
    Attached Images Attached Images  
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

Similar Threads

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

Members who have read this thread : 1

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