The transistor as a switch is one of the most fundamental circuits in electronics. Not spectacular, but indispensable. With a small control signal — from a microcontroller, a sensor, or another low-power circuit — you switch a higher current or voltage.

NPN transistor as a switch: base, collector and emitter schematic

How does an NPN transistor work as a switch?

An NPN transistor has three terminals: base (B), collector (C), and emitter (E). As soon as the voltage on the base is high enough — typically 0.6 to 0.7 V above the emitter — the transistor begins to conduct.

  • Cut-off: no base current, no collector current.
  • Saturation: sufficient base current, maximum collector current.

BC547: the everyday choice

The BC547B is one of the most widely used NPN transistors in hobby projects.

ParameterValue
Maximum collector current100 mA
Maximum collector-emitter voltage45 V
hFE at datasheet conditionsminimum 200 at VCE = 5 V and IC = 2 mA
PackageTO-92

KSC1845: higher voltage, but a lower current limit

The KSC1845 is primarily specified as a low-noise audio amplifier. Its 120 V VCEO is higher than the BC547B rating, but its absolute collector-current limit is lower at 50 mA. It is not automatically the higher-current or relay-driving choice.

ParameterValue
Maximum collector current50 mA (absolute maximum)
Maximum collector-emitter voltage120 V
hFE2300–600 at VCE = 6 V and IC = 1 mA
Package and pinoutTO-92; 1 Emitter, 2 Collector, 3 Base

Comparison

ComparisonBC547BKSC1845
Max. collector current100 mA50 mA (absolute maximum)
Max. voltage (VCEO)45 V120 V
hFE at datasheet conditionsminimum 200 at 5 V / 2 mAhFE2: 300–600 at 6 V / 1 mA
Primary applicationlow-voltage, general signal switchinglow-noise audio, higher voltage
PinoutC-B-EE-C-B

BC547B or KSC1845 as a switch? Do not start with maximum voltage alone. Check collector current, collector-emitter voltage and dissipation at the real load; guaranteed values at the operating point; required base current and driver limits; VCE(sat) at the datasheet test conditions; temperature, pulse duration and duty cycle; and the exact manufacturer pinout. For an inductive load, select a flyback or clamp solution for its current, stored energy, voltage and switching frequency.

Practical points to watch out for

Do not forget the base resistor

Never drive the base of a transistor directly from a microcontroller pin without a series resistor. Without a resistor, a large current flows through the base-emitter junction, which will destroy your transistor and likely your microcontroller pin as well. Calculate the base resistor from the required collector current, a guaranteed drive condition, the control voltage and what the driver can safely source.

Flyback diode for inductive loads

Are you switching a relay or a motor? Use a suitable flyback or clamp solution selected for coil current, stored energy, voltage and switching frequency.