PNP transistor can't off, help appreciated ty!

Hi, im doing a project on electric door strike.

What i'd done: Connected 12V supply to emitter of PNP, base to Arduino,
collector to LOAD>resistor>GND (i have attached a photo of my circuit)

When i setup everything and turned on the 12V supply, and set arduino output to HIGH, it shouldn't have any current passing thru the load. BUT, instead there is current flowing thru the load even if i set arduino output to HIGH or LOW.

Could it be because arduino is 5V and cannot control the 12V?

If so, has anyone got suggestions pls? I need the load to be connected to GND because i want to combine other circuits to the load.

I know i can connect the 12V supply to LOAD then to NPN transistor. But i need LOAD to connect to GND so i use a PNP transistor. it doesnt seem to work with the 5V arduino.


You can use circuit like this, R1 220 Ohms , R2 1K Ohms , R3 100 Ohms.

Umm - first off - do you have a resistor between the base and the Arduino?

Secondly - a high-side PNP transistor switch acts opposite that of a low-side - HIGH effectively turns the transistor "off" - so you need to keep this in mind, and reverse your logic as needed.

Finally - what transistor are you using, and what are the specs of the door strike (beyond the assumed 12 volts) - mainly, having the coil resistance would be helpful.

If you weren't using a base resistor - there's a good chance that either that pin, or possibly more - has been damaged by excess current draw; a base resistor is absolutely necessary for this circuit - something from 470 ohms to 1K would be what you'd want to try (start with the higher values first). Also, you need a snubber diode across the coil to prevent damage to the transistor from back EMF; it would be hooked up the same way whether it was an NPN or PNP circuit.

Without knowing more specifics of the components - ie, specs - we can't give you better directions...

BillHo:

You can use circuit like this, R1 220 Ohms , R2 1K Ohms , R3 100 Ohms.

That would work, but all Q2 does is act as an inverter - so that the logic of the code doesn't need to change; you could eliminate it (and likely change R3 - but without knowing what Q1 is and other details, who knows what R3 would need to be to fully switch Q1 on while not drawing excess current from the Arduino's pin).

Basically that circuit could be simplified if one didn't care about changing the software logic to support inverted logic (and really, it would be easier to change it in the code than use extra hardware). Plus, that circuit is showing a resistive load, and not an inductive one (which is what a door strike is - essentially an electromagnet) - and thus doesn't include a snubber diode or other protection for Q1.

For a proper approach for the circuit, we really need @darrylc to give us some specs on either the transistor being used and/or the door strike.

Hmm - and maybe the power supply, too - because door strikes can be pretty current hungry - so a voltage sag won't help debugging matters - so we'd need the operating current draw for the strike as well...

Why so complicated?

N-channel MOSFET like AOI514 would also work well.
http://www.digikey.com/product-search/en?vendor=0&keywords=aoi514

darrylc:
I know i can connect the 12V supply to LOAD then to NPN transistor. But i need LOAD to connect to GND so i use a PNP transistor. it doesnt seem to work with the 5V arduino.

While all those discussions are correct, the reason what you had in the first place didn't work was because to turn off a PNP transistor you have to get the base to be within 0.7V of the emitter. So while the Arduino's output is only 5V, it can never get up to the 11.3V needed to turn off the transistor.

darrylc:
What i'd done: Connected 12V supply to emitter of PNP, base to Arduino,
collector to LOAD>resistor>GND (i have attached a photo of my circuit)

You have got several errors/discrepancies in the schematic that you have posted.

You have used the symbol for an npn transistor, not a pnp one.

The emitter and collecter are shown transposed.

Now, here is cause of your problem:
When the output of the Arduino is low, the pnp transistor will be turned on as the voltage on the base resistor will be at -12V, with respect to the emitter.
However if you take the Arduino output high, then it is still at -7V, with respect to the emitter of the transistor, this will mean that the transistor is still turned on.

So the pnp transistor is turned on whether the output of the Arduino is high, or low.

You can get around this problem by using the Arduino output to switch an npn transistor, which in turn switches the pnp transistor.

EDITED:
6 relies received whilst I was composing my answer.

It is simpler to use just a single npn transistor, (which are far more common than pnp ones, in the first place).

Thank you all so much for the replies and suggestions. It really helped me a lot! Andd..YES! THANK YOU Grumpy_Mike! i went to search up what you said and yea..my mistake, my arduino hasn't enough V to turn the transistor off.

I can't express how thankful i am to all replies. Thank you! :slight_smile: