In my circuits below, I'm using a NPN 2N2222 and PNP MMBT2907A, I implemented this high side switch circuit and it works. However, I'm very concerned about the resistor values that I used. In my first circuit, I place a R1=2.2k and R2=1.2k at the transistors' bases, but after reviewing a similar question form here high-side-switch-24v-6ma-control-by-arduino I change my resistor values in my 2nd circuit with R1= 5.1K and R2=1.2K. Here's the math behind these values. If we allow the base current to be Ic/Ib = 10 and the collector current at the PNP needed is about 60ma-70ma, I would need at least 6ma at the base of the PNP transistor thus R2 must be about 1.2K. Now we have about 6ma-7ma on the NPN IC current, therefore a base current must be about .6ma-.8ma, thus I used a R1=5.1K resistor value. I was wondering if any one can tell me is that the above configuration is correct and that the circuit can be used safely. Thank you so much!
When you are using a BJT as a switch (and not just as an analog amplifier), you will usually have a base current more than the minimum needed. That's not really driving it hard.
For the 2N2222 in particular, the max base current is 200mA. See https://html.alldatasheet.com/html-pdf/15067/PHILIPS/2N2222/745/3/2N2222.html
That would be absolute max. I wouldnt go more than 2X or 3X the needed current, unless there's a very good reason. So, at 500mA collector current, assuming gain of 100, that would be about 10-15 mA base current.
Also keep in mind, the max power dissipation of the package and the ambient conditions you'll have the transistor in. If you're in the 2X range, it shouldnt be much of an issue, considering that the collector current is the max contributing to the power dissipation. If you are going more than 3X, you now have significant power dissipation to consider.