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 (B-variant)200–450
PackageTO-92

KSC1845: when more power is needed

The KSC1845 is an NPN transistor with higher specifications, for applications where the BC547 falls short. The big difference lies in the maximum voltage: 120 V compared to 45 V.

ParameterValue
Maximum collector current150 mA
Maximum collector-emitter voltage120 V
hFE60–400
PackageTO-92

Comparison

BC547BKSC1845
Max. voltage45 V120 V
Max. current100 mA150 mA
Main applicationGeneral switching tasks, low voltageHigher voltages, audio preamps (low noise)

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. A 1 kΩ to 10 kΩ resistor is a good starting point in most cases.

Flyback diode for inductive loads

Are you switching a relay or a motor? Always place a flyback diode (like a 1N4148 or 1N4007) in reverse parallel across the load. When the transistor turns off, the magnetic field in the coil collapses, generating a high voltage spike (inductive kickback). The diode securely clamps this spike, protecting your transistor from breakdown.