Classroom Public page

Lab 6.1: Transistor Switch

626 words

~90 min. Build an NPN transistor switch that turns on a buzzer when a control pin is pulled HIGH. Measure base current and collector current to verify the gain.


Goal: use a transistor to switch a higher-current load with a smaller control signal; understand current gain in practice

Estimated time: 90 minutes

Prerequisites: labs 1-5 complete; familiar with multimeter current measurements

Steps

Step 1: Identify the transistor pinout (10 min)

For a 2N2222 or 2N3904 NPN (TO-92 package, the small black plastic three-leaded device): looking at the flat face with leads down, pins from left to right are typically Emitter, Base, Collector. Confirm against your kit's datasheet; pinouts are NOT always the same for visually-similar packages

Step 2: Design the switch circuit (15 min)

Plan:

  • Power rail: 5 V (USB or batteries)
  • Load: the kit's buzzer (or small motor; for inductive loads add a flyback diode in step 5)
  • Buzzer: positive terminal to + rail; negative terminal to transistor's collector
  • Transistor: emitter to ground; base to a control point through a 1 kΩ base resistor
  • Control: from a pushbutton (between control point and + rail) OR from a wire you can manually move between + rail and ground

The buzzer carries the high current (collector to emitter); the base controls whether the transistor lets that current through

Step 3: Build the circuit (20 min)

Wire it on the breadboard. Use color discipline. Insert the multimeter in series with the buzzer (collector path) when you want to measure collector current; or in series with the base resistor when you want to measure base current

Step 4: Verify the switch works (10 min)

Touch the control point to + rail. The buzzer sounds (or motor spins). Touch the control point to ground. The buzzer stops. The control signal is just a few mA through the base resistor; the buzzer draws more than the base does

Step 5: Measure base and collector currents (20 min)

With the switch ON (control point at + rail):

  • Measure base current: meter in series with the base resistor. Should be ~4 mA (≈ (5 - 0.7) / 1000)
  • Measure collector current: meter in series with the buzzer. Should be ~30-100 mA depending on the buzzer

Calculate gain: collector current / base current. Typical 2N2222 gain: 100-200. You should see something in that range

Step 6: Document (15 min)

In your lab notebook: record base current, collector current, calculated gain. Compare to the datasheet's typical Hfe. Note the transistor is acting as a current amplifier: a small input (~4 mA) controls a larger output (~50 mA in this example)

Expected output

  • Working transistor switch
  • Tabulated base current, collector current, calculated gain
  • Comparison to datasheet typical gain

Common pitfalls

  • No base resistor: without the 1 kΩ in series with the base, the base current can be very high and damage the transistor. Always include a base resistor
  • Pinout reversed: emitter and collector swapped means the circuit barely works (the transistor still functions inverted but with much lower gain). Verify the pinout before powering up
  • Inductive load without flyback diode: a small DC motor or relay must have a diode (cathode toward +, anode toward collector) across the motor to absorb the back-EMF when switching off. Without it, the spike damages the transistor

Stretch (optional)

  • Replace the manual control wire with a pushbutton. Holding the button on makes the buzzer sound; releasing turns it off
  • Try a much larger base resistor (10 kΩ). Notice the collector current drops significantly. Why: less base drive = less collector current
  • Try the same circuit with the buzzer replaced by the kit's DC motor (with flyback diode). The motor spins when the control point is HIGH

Lab 6.1 v0.1. The transistor bridges the microcontroller-to-real-world current gap. Used in nearly every applied microcontroller project.