Switching explained -- MOSFETS vs. SSR ICs vs. Electromechanical Relays

There are a lot of options when it comes to using your favourite microcontroller (be it an Arduino, Pico, ESP32 or micro:bit) to switch something on and off. In this post I will compare some of the various options available. Option 1. Direct connection to GPIO pin It's quite common to connect LEDs (usually with a series resistor to limit the current) directly to the GPIO pin of a microcontroller.…