Electronics 112: Relays, MOSFETs & Solid-State Switching
A practical, design-oriented guide to switching power safely and efficiently: when to use mechanical relays, when to use MOSFETs, and why solid-state solutions are often misunderstood but critical in modern electronics.
1) Why switching matters
Switching loads incorrectly is one of the fastest ways to destroy electronics. Motors, solenoids, heaters, and power rails all behave differently when switched.
2) Mechanical relay basics
A relay uses an electromagnet to physically open or close contacts. It provides galvanic isolation between control and load.
- Coil voltage (e.g. 5V, 12V)
- Contact rating (AC/DC, current)
- Contact type (NO, NC, SPDT)
3) Relay advantages & limitations
| Pros | Cons |
|---|---|
| True electrical isolation | Mechanical wear |
| AC or DC switching | Slow switching |
| Low on-resistance | Contact arcing |
| Simple to use | Coil current consumption |
4) MOSFET basics
A MOSFET is a voltage-controlled semiconductor switch. It is fast, efficient, and ideal for DC loads.
- VGS: Gate-to-source voltage
- RDS(on): On-resistance
- ID: Drain current
5) Logic-level MOSFETs
Logic-level MOSFETs fully turn on at 3.3V or 5V gate drive, making them suitable for microcontrollers.
6) High-side vs low-side switching
- Low-side: MOSFET between load and ground (simplest)
- High-side: MOSFET between supply and load (safer but harder)
7) Flyback diodes & inductive loads
Inductive loads generate high voltage spikes when switched off.
8) Solid-state relays (SSR)
SSRs use opto-isolators and semiconductor switches. No moving parts, silent operation.
| SSR Type | Use Case |
|---|---|
| AC SSR (Triac) | Heaters, lamps |
| DC SSR (MOSFET) | DC loads |
9) AC vs DC switching differences
- AC naturally crosses zero (easier to interrupt)
- DC does not β arcing is worse
- AC SSRs do not work for DC
10) Selection guide
- Low power DC: Logic-level MOSFET
- High voltage / isolation: Mechanical relay
- Silent switching: SSR
- High frequency PWM: MOSFET
11) Common mistakes
- No flyback protection
- Using non-logic MOSFETs with MCUs
- Undersized relay contacts
- No thermal considerations
- Switching AC with DC SSRs (or vice versa)
12) Practical examples
Arduino controlling a relay
- Use transistor or relay module
- Add flyback diode
ESP32 driving a DC motor
- Logic-level MOSFET
- PWM speed control
- Proper grounding