Arduino Nano ESP32 - Relay

You can connect an LED directly to Arduino Nano ESP32 but you cannot connect a high voltage devices (such as an electric lamp, pump, electromagnetic lock, linear actuator, or even a big machine...) directly to Arduino Nano ESP32. We need a relay in between Arduino Nano ESP32 and the high voltage devices. Without relay, the high voltage will destroy Arduino Nano ESP32.