Electronics BasicsIntermediate

Transistors as Electronic Switches

Learn how to use NPN and PNP transistors to control high-power components like motors and solenoids.

5 May 202612 min read

Introduction

Transistors are the building blocks of modern electronics. While they can amplify signals, their most common use in DIY projects is as a switch.

NPN Switching Circuit

To control a 12V motor from a 5V Arduino:

  1. Base: Connect to Arduino pin through a 1kΩ resistor.
  2. Collector: Connect to the negative terminal of the motor.
  3. Emitter: Connect to Ground (GND).

Why Use a Transistor?

Microcontrollers can only output about 20-40mA. A transistor like the 2N2222 or TIP120 can switch much higher currents (up to several Amps).

Tags:TransistorBJTSwitchingBasics