transistor selection

Thread Starter

dandy1

Joined Sep 30, 2017
178
Hi guys thanks for taking a look.

i want to drive a relay via a transistor operated by arduino pin. this is what i've come up with
Capture.PNG
ive put the arduino pin on a 5 second blink but but i am having no switching thru the transistor, in fact there seems to be a bypass right upto
the relay. I havnt implemented the relay yet just thought id test the transistor first and when i measured after R1 im getting 11.78v steady.
I've checked the Arduino output and thats doing what it should.

any suggestions??
 

ericgibbs

Joined Jan 29, 2010
18,849
hi dandy,
Consider what the Base to Emitter voltage will have to be to turn the transistor off,, it is always On at the moment.
E
 

crutschow

Joined Mar 14, 2008
34,452
Use an NPN (e.g. 2N3904) as Dd said, with the emitter to ground and the relay coil between the +12V and the transistor collector.
 

Jim@HiTek

Joined Jul 30, 2017
59
I would have just used a NPN with the E grounded and the C going to the relay (the high side of the relay going to 12V). With a 10K resistor going from the B to the uP.

Now, if you need to keep the logic from the uP the same, than connect a PNP like you show it in your drawing but with it's E going to +5V and it's C going to the base of that NPN mentioned above via the 10K.

Depending on the output architecture of the uP, if I can use just a NPN sometimes I'll put a inverse diode from the uP pin to +5V or adjust the value of the base resistor of the NPN to reduce reverse current.
 
Top