semiconductors
the building block of everything electronic. switches, amplifiers, logic gates - all semiconductors underneath.
transistors
transistors are voltage-controlled switches. small voltage at base/gate controls big current through collector/drain.
two main types:
- bjt (bipolar junction transistor) - current controlled
- fet (field effect transistor) - voltage controlled
bjt basics
three pins: base, collector, emitter
- npn: current flows collector to emitter when base is high
- pnp: current flows emitter to collector when base is low
common ones i use: 2N2222 (npn), 2N2907 (pnp), BC547 (npn)
fet basics
three pins: gate, drain, source
- n-channel: current flows drain to source when gate is high
- p-channel: current flows source to drain when gate is low
mosfets are the most common fets. i use them for switching loads. common ones: 2N7000 (n-channel), IRF540 (high power n-channel)
mosfet details
metal-oxide-semiconductor field-effect transistor. voltage-controlled device that's great for switching applications.
key advantages
- high input impedance (voltage controlled)
- fast switching speeds
- low on-resistance (rds-on)
- no base current needed
types
- enhancement mode: normally off, turn on with gate voltage
- depletion mode: normally on, turn off with gate voltage
- n-channel vs p-channel determines polarity
practical considerations
- gate threshold voltage (vgs-th) determines when it turns on
- rds-on determines power dissipation when on
- gate charge affects switching speed
- body diode conducts in reverse direction
practical uses
- switching leds, motors, relays
- level shifting between 3.3v and 5v logic
- amplifying audio signals
- building logic gates from scratch
- power management circuits
my design patterns
for switching: mosfet with gate resistor and pulldown for amplification: bjt in common emitter configuration for level shifting: bjt voltage divider or mosfet buffer
gotchas i learned
- always use base/gate resistors to limit current
- body diode in mosfets can cause unexpected behavior
- heat dissipation matters for power transistors
- static electricity can kill mosfets easily
- gate capacitance can cause slow switching without proper drive
understanding semiconductors helps me design better circuits and debug problems. they're everywhere once you know how to spot them.