Your GPIO Can't Drive This
A controller must switch a 12 V relay coil from a 3.3 V MCU. Build a safe interface that works during normal operation and stays off while the GPIO is high-impedance at reset.
Interface requirements
The relay wiring is fixed: one coil lead remains connected to +12 V.
- 01Build design
- 02Verify design
Technical references
Engineering notes
GPIO role: the pin commands the switch. It should not be the load's power source.
Gate drive: VGS(th) only describes the start of conduction. Qualify the switch using guaranteed RDS(on) at an available gate voltage.
The 470 Ω gate resistor limits initial ideal charging current to about 7 mA at 3.3 V. Gate current is transient and capacitive; after settling, the 100 kΩ pull-down draws about 0.033 mA. The evaluator also accounts for the small gate-voltage reduction from this resistor divider. This slow relay exercise does not calculate gate-charge timing or qualify real GPIO pulse behavior.
Reset behavior: a pull-down keeps the MOSFET off before firmware configures the pin.
Turn-off: coil current cannot stop instantly. The flyback diode provides a controlled path and limits drain stress.
Compare the candidate datasheets at the available gate voltage.
Exercise boundary. The relay is modeled as a 12 V / 100 Ω load for this mission. Candidate drain-current ratings are only a coarse screening requirement, not a thermal sign-off. A real release would also check coil-resistance tolerance and temperature, MOSFET derating/SOA, PCB thermal resistance, diode current and recovery behavior, switching transients, and supply variation.