Transistor

Transistors are used to boost up the power for driving high-power devices such as a relay or a motor. Transistors come in many different shapes, sizes and packagings as shown on the right.

Transistor types

Regardless of what they look like, all transistors have three connections: Emitter (E), Base (B), and Collector (C), as shown on the right for the T092B packaging case.

Transistor pins

However, the identification of the three connections are sometimes confusing because they are different depending on the transistor packaging case with identification numbers such as TO18, TO92A, TO92B, TO3, etc. as shown on the right.

Transistor package cases

Regardless of their shape, size, or packaging, all transistors are categorized as either NPN or PNP where N stands for negative and P for positive.

A general purpose NPN transistor is the 3904 or the 2N2222. The symbol for a NPN transistor is shown next. A typical connection for a NPN transistor is shown on the right.
       NPN symbol
A positive signal to the Base from the control pin will turn on the NPN transistor, allowing the negative electrons to flow from the Emitter to the Collector, thus turning on the LED.

NPN connection

A general purpose PNP transistor is the 3906. The symbol for a PNP transistor is shown next. A typical connection for a PNP transistor is shown on the right.
      PNP symbol
A negative signal to the Base from the control pin will turn on the PNP transistor, allowing the positive protons to flow from the Emitter to the Collector, thus turning on the LED.

PNP connection

There might be times when you need an even more powerful transistor. The Darlington transistors are general purpose and can handle up to:

  • 60 V, 80 V, or even 100 V DC
  • 5 Amp
  • 65 Watt of power
Darlington pins

Their respective part numbers are:

  • TIP120 NPN for 60V
  • TIP121 NPN for 80V
  • TIP122 NPN for 100V
  • TIP125 PNP for 60V
  • TIP126 PNP for 80V
  • TIP127 PNP for 100V

A typical connection for a NPN Darlington transistor is shown on the right.

Darlington connections

In order to control any high-power devices such as a speaker, motor or relay using the ESP8266 (which is a 3.3V device) we need to use two transistors as shown on the right.

The first PNP 3906 transistor acts as a switch. It is turned on with a negative low signal from the ESP8266 to the Base. When this transistor is turned on, the positive output signal from the Collector of this transistor will turn on and drive the second NPN 3904 or TIP120 transistor. This second transistor acts as an amplifier to drive a high-voltage device such as a speaker or a motor.
Transistor pins          Darlington pins

PNP 3906 or NPN 3904 pins            NPN TIP120 pins

Two-transistor connection