What are the selection parameters for an NPN BJT

bjtcomponent-selectiontransistors

I'm building an NPN-based driver circuit for disconnecting my battery level measuring voltage divider when not in use. Here's the circuit:

circuit

http://www.microbuilder.eu/Tutorials/Fundamentals/MeasuringBatteryVoltage.aspx

I've gotten fairly familiar with selection parameters for mosfets (gate-source voltages and whatnot), but what parameters should I be looking for when picking Q2? Digikey, as always, has about 100 results for BC817

As a small part 2, what is the purpose of R4 in this circuit? I know for MOSFETs, this is done to manage gate capacitance, is it the same idea here?

Best Answer

BC817 is a particular type of transistor, so any variations between suppliers will be minimal.

The requirements for this application are minimal. Since we can assume the battery voltage is less than 20V, the Vceo rating needs only to be 20V.

As to the base resistor- it sets the base current- the base-emitter junction behaves like a diode (around 0.7V drop). Most any ordinary inexpensive transistor you can find will have a beta of more than 40. We don't need the transistor to saturate hard in this case, we only need a voltage of more than (say) 4.5V across the 100K resistor, which implies a minimum collector current of 45uA. If the beta is 40, then the base needs to see about 1.1uA. If we assume the minimum supply voltage for our GPIO is 1.8V * 0.95 and the maximum Vbe is 0.8V, then the maximum base resistor is about 800K, so 2K seems pretty safe, even with a really low voltage drive (20K would be fine too). The lower limit on the base resistor is determined by how much current you want to draw from the GPIO.

The leakage should be well under 10uA under all operating conditions to avoid turning the MOSFET on (only potentially an issue at very high temperatures with modern transistors).

It should be NPN type. Avoid RF transistors and exotic SiGe types, they would probably not misbehave but they're of no help, and may be rated for unusually low voltages.

Pretty much any general purpose switching transistor will work here. 2N3904, 2N4401, BC817, 2SC1815, etc. etc. You can search for the most common type and/or least expensive and it will probably meet all the requirements when you look at the datasheet.