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.

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.
| Parameter | Value |
|---|---|
| Maximum collector current | 100 mA |
| Maximum collector-emitter voltage | 45 V |
| hFE (B-variant) | 200–450 |
| Package | TO-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.
| Parameter | Value |
|---|---|
| Maximum collector current | 150 mA |
| Maximum collector-emitter voltage | 120 V |
| hFE | 60–400 |
| Package | TO-92 |
Comparison
| BC547B | KSC1845 | |
|---|---|---|
| Max. voltage | 45 V | 120 V |
| Max. current | 100 mA | 150 mA |
| Main application | General switching tasks, low voltage | Higher 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.