Arduino and a PNP

I'm not sure where this belongs...

If we use 5v on a pnp, it's arduino friendly, pull base to ground and we have life.. bring it to 5v (or HIGH) the pnp drops out of saturation..

let's suppose we supplied 9v, turning on is easy pull it to ground, turning it off is more problematic. Because 5v won't do it, it needs to see within .6v of the emitter voltage.

however...

the PNP will supply 10v to the base pin if 10v is on it's emitter..

so then... if I set the pinmode to input and have it float, a simple 4v zener at the base should A. Protect the processor and B. Turn off the PNP?

Yeah yeah, I could just design a circuit to circumvent the issue npn pnp combo etc..

but would it work? Don't want to try, just theory.

If you have 10v on the emitter of the PNP and a 4 volt Zener on the base to ground you will burn out the E/B junction of the Transistor. If you have a current limiting resister in the base between the Zener and base, you still have 6 volts forward bias on your PNP so it will conduct C/E.

Weedpharma

Yes zener's are handy for various voltage shifting tasks like this, but remember the
base resistor - the base emitter junction is forward biased and will carry destructively
high currents if you try to voltage-drive it rather than current drive it.

Best bet - use an NPN to pull the base low to turn it on, with pullup to 9V to turn it off.
Or an NPN controlling the gate of Low Rds P-channel MOSFET for less power loss across the high side switch.

Before or after? Falling asleep..

A diode, since we don't require gnd to switch it on just 5v (providing the emitter voltage > 5v) and to turn it off it simply needs to float so the pnp will have on it's base (and diode drop) what's on the emitter..

I'll test that later...

cjdelphi:
Before or after? Falling asleep..

A diode, since we don't require gnd to switch it on just 5v (providing the emitter voltage > 5v) and to turn it off it simply needs to float so the pnp will have on it's base (and diode drop) what's on the emitter..

I'll test that later...

I am confused with what you have said.

If we have a circuit where we have a PNP transistor with 10 volts on the emitter, resistor from the base to the cathode of a 4v Zener and a wire to the Arduino IO pin:

We have a situation of potential destruction of the IO if it goes high. This is due to 5v from the IO going to a 4v Zener and drawing excess current.

We also have a current path for the transistor E/B current via the Zener. This means the device will never turn off.

Weedpharma

weedpharma:
I am confused with what you have said.

If we have a circuit where we have a PNP transistor with 10 volts on the emitter, resistor from the base to the cathode of a 4v Zener and a wire to the Arduino IO pin:

We have a situation of potential destruction of the IO if it goes high. This is due to 5v from the IO going to a 4v Zener and drawing excess current.

We also have a current path for the transistor E/B current via the Zener. This means the device will never turn off.

Weedpharma

no zener.. just a diode followed by a resistor to the base pin. (anode to cathode)

the pin simply floats causing the base pin to turn off (as it's the same as the emitter voltage) as pinMode as input (ie, letting it float) the diode will prevent feedback into the arduino..

I see the issue with this method now...