Shop OBEX P1 Docs P2 Docs Learn Events
simple transistor question??? — Parallax Forums

simple transistor question???

rrrr Posts: 63
edited 2005-04-29 03:00 in General Discussion
is it a bad idea to put a transitor on the positive side of a circuit

12volts+
Transistor
led--led--led--led
Ground

it seems in most designs the transistor on on the ground side...

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-04-29 01:22
    Hello,

    ·· It depends on which type of transistor is used and how much current it can handle.· In your example you would need to be using a PNP transistor, and it would require a LOW from a Stamp I/O PIN to turn it on.· Of course, you should have a 1K resistor between the base and the Stamp I/O PIN.

    ·· If you used an NPN transistor, the LEDs would be on the positive side of the transistor, since the emitter would be tied to ground.· In this case, a HIGH on the Stamp PIN would turn it on through the 1K resistor.· Again, the transistor needs to be able to handle the voltage and current.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • pjvpjv Posts: 1,903
    edited 2005-04-29 01:41
    Chris,

    I know nothing about Stamps (never seen one) but in the case of the PNP transistor example, the Stamp would need to pull the base down as you said. In order to be able to turn the LEDs off, the Stamp would need to be able to switch its output up to 12 Volts supply rail, or alternately, have an open collector style output.

    Something to be aware of; perhaps the Stamp meets those requirements.

    Peter (pjv)
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-04-29 01:53
    Peter,

    ·· You are correct...Some minor modifications would need to be made to handle that, which is outside the scope of this discussion.· Suffice it to say he should use the NPN transistor.




    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com


    Post Edited (Chris Savage (Parallax)) : 4/29/2005 1:59:36 AM GMT
  • KenMKenM Posts: 657
    edited 2005-04-29 03:00
    rr,

    Using an NPN is far more common than using a PNP.

    Is there a reason you must source the LED's?

    It is possible to use a PNP, but it is not so easy using 4 LEDs. If you use 5 LEDs the attached circuit will work (I tested it).

    But there is no advantage to the posted circuit. Personally, I would go with the NPN as Chris suggested.
    533 x 510 - 26K
    PNP.jpg 25.8K
Sign In or Register to comment.