Relays
Relays are electrically operated switches that let a small control signal turn on or off a much larger load. In LED lighting projects, relays serve a critical purpose: they allow a low-current output from an Arduino, ESP32, Raspberry Pi, 555 timer, or any other logic-level controller to switch high-current LED circuits — LED strips, arrays of dozens of LEDs, high-power emitters, and automotive lighting loads — without routing the full load current through the controller. Without a relay (or equivalent transistor/MOSFET switch), a microcontroller GPIO pin rated for 20–40mA would need to directly drive loads pulling hundreds of milliamps or even several amps, which would destroy the output pin instantly. The relay provides electrical isolation between the control circuit and the load circuit, protecting your controller while giving you switching capability far beyond what the control signal alone could handle.
Browse our electrical components selection for the relays and supporting components you need. Our relay inventory focuses on DC voltage relays designed for the switching demands of LED lighting installations. These relays use a DC coil voltage (typically 5V or 12V) to actuate an internal mechanical switch that opens or closes the load circuit. The coil draws a small current (typically 30–80mA depending on the relay model) to generate the electromagnetic field that moves the armature. The load contacts are rated for significantly higher current — commonly 10A at 30VDC — giving you the ability to switch large LED installations, multiple LED strip segments, or banks of high-power LEDs from a single relay contact.
How relays work in LED control circuits: A relay has two separate circuits. The coil circuit is the low-power control side — you apply the coil voltage (5V or 12V DC) and the coil draws enough current to magnetize the relay’s iron core, which pulls the armature to close (or open) the load contacts. The contact circuit is the high-power load side — this is where your LED strip, LED array, or high-power LED circuit connects. The two circuits are electrically isolated, which means the load voltage and coil voltage do not need to match. You can switch a 24V LED strip installation using a 5V relay coil driven by an Arduino — the Arduino sees only the 5V coil load, not the 24V strip voltage.
Arduino and microcontroller integration: Most microcontrollers cannot drive a relay coil directly from a GPIO pin because the coil current (30–80mA) exceeds the pin’s current rating (typically 20–40mA). The standard solution is a driver transistor (NPN BJT like a 2N2222 or N-channel MOSFET) between the GPIO pin and the relay coil. The GPIO pin drives the transistor base or gate with a few milliamps, and the transistor switches the full coil current. Always include a flyback diode (1N4148 or 1N4007) across the relay coil — when the coil de-energizes, the collapsing magnetic field generates a voltage spike that can damage the transistor or microcontroller. The flyback diode clamps this spike to a safe level. Pre-built relay modules with integrated driver transistors, flyback diodes, and optocouplers are widely available, but if you are designing a custom PCB or want to understand the circuit fundamentals, the discrete approach using our electrical components gives you full control over the design.
Common LED project applications for relays: Relays excel in scenarios where you need on/off switching of LED loads without the complexity of PWM dimming. Automated lighting schedules — an Arduino or ESP32 with a real-time clock module energizes a relay at sunset to turn on landscape LED strip lighting, then de-energizes at sunrise. Motion-activated lighting — a PIR sensor triggers a microcontroller, which activates a relay to switch on an LED floodlight or under-cabinet LED strip. Stage and prop lighting — escape room builders and haunted house designers use relay banks to sequence LED effects: a controller activates relays in sequence, and each relay switches a different LED zone (glowing eyes, lightning simulation, reveal lighting). Automotive auxiliary lighting — a dashboard toggle switch drives a relay coil, and the relay contacts switch 12V LED light bars, rock lights, or interior accent strips without routing high current through the thin toggle switch wiring.
Relay vs. transistor/MOSFET switching: Relays provide complete galvanic isolation between the control signal and the load. They switch AC or DC loads equally well, handle high inrush currents, and produce zero voltage drop across the contacts when closed (unlike transistors, which always have some saturation voltage). The tradeoff is switching speed — mechanical relays take 5–15ms to actuate, far too slow for PWM dimming, which requires switching at hundreds or thousands of hertz. If you need dimmable LED control, use a transistor or MOSFET. If you need simple on/off switching of large loads, a relay is the more robust and easier-to-implement solution. Relays also generate an audible click when switching, which may be undesirable in some quiet environments but is actually a useful feedback indicator in industrial and automotive applications.
Pair relays with our resistors (for base/gate bias in driver circuits), 12V LED strips, component LEDs, and hookup wire and switches for complete relay-switched LED installations. For projects that need dimming rather than simple on/off, a transistor or MOSFET switching circuit is the better approach — use a 555 timer to generate the PWM signal, or drive the MOSFET directly from a microcontroller’s PWM-capable GPIO pin. For power supplies to drive both the relay coil and the LED load, browse our power supply category.