Maker Pro
Maker Pro

PIC and Transistor

Basically what I want to do is use the output pins of my PIC to
activate some transistors. If i understand correctly, activating a PIC
pin essentially grounds it, so an NPN won't work. I am assuming then I
need to use a PNP, so when it is grounded, it activates the "switch".

Now, does it matter what is going through the collector and emitter? I
would like to have a Positive voltage sitting on one side of the
transistor, and the other side of the transistor would go to an ECU in
a vehicle. Under most circumstances, the transistor will be ungrounded,
which should mean that there is no flow through the transistor, and no
signal to the ECU (that is what I want). When instructed, the PIC will
ground the base, allowing current to flow through the transistor and
sending the positive signal from the other side of the transistor to
travel to the ECU. Basically it is -
http://wotid.com/tls/images/ssatre/transistor_tre.jpg - but the
transistor would be activated by a PIC.
Maybe I am missing something, but I cannot get this work no matter
which I use PNP, or NPN.
Is anyone able to shed some light on this for me?
 
A

Alan

Jan 1, 1970
0
Basically what I want to do is use the output pins of my PIC to
activate some transistors. If i understand correctly, activating a PIC
pin essentially grounds it, so an NPN won't work. I am assuming then I
need to use a PNP, so when it is grounded, it activates the "switch".

Now, does it matter what is going through the collector and emitter? I
would like to have a Positive voltage sitting on one side of the
transistor, and the other side of the transistor would go to an ECU in
a vehicle. Under most circumstances, the transistor will be ungrounded,
which should mean that there is no flow through the transistor, and no
signal to the ECU (that is what I want). When instructed, the PIC will
ground the base, allowing current to flow through the transistor and
sending the positive signal from the other side of the transistor to
travel to the ECU. Basically it is -
http://wotid.com/tls/images/ssatre/transistor_tre.jpg - but the
transistor would be activated by a PIC.
Maybe I am missing something, but I cannot get this work no matter
which I use PNP, or NPN.
Is anyone able to shed some light on this for me?
Put a resistor (10k) between the transistor base and the PIC output.
Then put another resistor (22k) between the PIC output and the 12v
rail. For added safety put a 5.1v zener diode between the PIC output
and ground.

Use a NPN transistor. Ground the emitter. Collector to ECU.

HTH

Alan
 
E

Ed-

Jan 1, 1970
0
look up "tristate"
maybe you dont need a transistor, what is the load?

: Basically what I want to do is use the output pins of my PIC to
: activate some transistors. If i understand correctly, activating a PIC
: pin essentially grounds it, so an NPN won't work. I am assuming then I
: need to use a PNP, so when it is grounded, it activates the "switch".
:
: Now, does it matter what is going through the collector and emitter? I
: would like to have a Positive voltage sitting on one side of the
: transistor, and the other side of the transistor would go to an ECU in
: a vehicle. Under most circumstances, the transistor will be
ungrounded,
: which should mean that there is no flow through the transistor, and no
: signal to the ECU (that is what I want). When instructed, the PIC will
: ground the base, allowing current to flow through the transistor and
: sending the positive signal from the other side of the transistor to
: travel to the ECU. Basically it is -
: http://wotid.com/tls/images/ssatre/transistor_tre.jpg - but the
: transistor would be activated by a PIC.
: Maybe I am missing something, but I cannot get this work no matter
: which I use PNP, or NPN.
: Is anyone able to shed some light on this for me?
:
 
Top