How to determine Resistor values for PNP transistor
Here is the circuit of a basic high side load driver with low side input.  

Vin high turns on Q1.
Q1 on pulls Q2 base low via R3 turning on Q2.

R2 is optional - if Vin is always defined R2 is not needed.
If Vin is eg a microcontroller pin that may be open-circuit after reset until initialised R2 ensures that the circuit stays off until Vin is asserted high under program control. 

R4 is usually not essential but in some extreme cases stops Q2 turning on due to base current leakage. This is usually only an issue when very low load currents may be significant.

R3 is designed to provide enough base drive for Q2.
Q2 current gain = Beta-Q2.
Q2 requires a base current of >= Iload_max/Beta_Q2
Usually Beta is forced at a value usefully lower than the datasheet value.
eg if a transistor has a beta of 200-300 under the relevant conditions then driving it with at least say Iload_max/100 (forced beta of 100) ensures it is turned on hard for all likely production samples of Q2.

Q1 switches Ib_Q2.
So Ib_Q1 >= Ib_Q2/Beta_Q1.
This is usually a very low current value and it is usual to overdrive Q1 substantially 'just because'.
eg say Iload_max = 500 mA and Beta_Q2 =200
Decide to drive Q2 at beta=100.
Ib_Q2 = IloadMax/BetaQ1
= 500/100 = 5 mA.

For Vdd=12V, R3 = V/R ~= (12-0.6)/0.005A = 2280 ohm.
R3 of 2k2 is OK but 1k is also OK.

Ib_Q1 = Ib_Q2/Beta_Q1
= 5 mA/100 say = 0.05 mA.
With 5V Vin, R1 =
V/I = (5-0.6)/0.05 mA = 88kohm.
While a value of say 82k or 68k could be used. it's more usual to use a 10k for Ib_Q1 ~= 0.5 mA.
This is well within the drive spec of any microcontroller.  

If speed is an issue then a lower value of R1 may be used and a "speedup capacitor" may be connected across R1 - but that's getting beyong the basic circuit.







simulate this circuit &ndash; Schematic created using CircuitLab

______________________

NOT recommended:

ZD1 effectively "level shifts" Vin up by about 8V.
So for Vin = 0/5V, Q2 sees about 4/0 volts drive.
Hence Vin low = on and Vin high = off.

The zener must reduce the Vdd supply enough for the microcontroller to NEVER see more than Vcc_microcontroller at the Vin pin.  

A say 100k resistor from the R1- Zd1 junction to ground may be wise to ensure this point is not ever pulled above Vcc_uC. This resistpor needs to be large enough to not turn on Q3 by itself in any situation. Hard to design well. 







simulate this circuit