Relays

Relays are electrically operated switches that let a small control signal turn on or off a much larger load.

Read full description & FAQ ↓

2 Items

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.

Frequently Asked Questions

A relay is an electrically operated switch. A small DC voltage applied to the coil (typically 5V or 12V) creates an electromagnetic field that physically moves internal contacts to open or close a separate, higher-power circuit. In LED projects, relays let a microcontroller (Arduino, ESP32, Raspberry Pi) or a simple switch control large LED loads — LED strips, arrays, high-power emitters — without routing the full load current through the controller. The control side and load side are electrically isolated, protecting your controller from the load voltage.
In most cases, no. A relay coil typically draws 30–80mA, and Arduino GPIO pins are rated for 20–40mA. Exceeding this rating can damage the microcontroller. The standard approach is to use a driver transistor (such as a 2N2222 NPN or a logic-level N-channel MOSFET) between the GPIO pin and the relay coil. The GPIO pin switches the transistor with a few milliamps, and the transistor handles the full coil current. Always include a flyback diode across the relay coil to suppress the voltage spike generated when the coil de-energizes.
A relay coil is an inductor, and when you suddenly cut power to an inductor, the collapsing magnetic field generates a large reverse voltage spike — often 100V or more from a 12V coil. This spike can destroy the driver transistor, damage the microcontroller, and cause erratic behavior in nearby electronics. A flyback diode (1N4148 or 1N4007) is wired in reverse across the coil. It provides a path for the spike energy to dissipate safely through the diode rather than through your circuit. Every relay coil driver circuit should include a flyback diode — it costs pennies and prevents expensive failures.
Use a relay when you need simple on/off switching with complete electrical isolation between control and load. Relays handle high inrush currents, switch AC or DC loads, and have zero voltage drop across the contacts. Use a MOSFET when you need PWM dimming (the MOSFET can switch at thousands of hertz; a relay cannot), when you need silent operation, or when switching speed matters. For most Arduino-controlled LED strip on/off applications, a relay is simpler to wire and more forgiving of wiring mistakes. For dimming, fade effects, or color mixing, a MOSFET is required.
The contact rating specifies the maximum current and voltage the relay can safely switch on its load side. A rating of “10A at 30VDC” means the relay contacts can handle up to 10 amps at voltages up to 30V DC. For LED applications, this is enormous headroom — a 5-meter 12V LED strip typically draws 1–3A, and even a large multi-strip installation rarely exceeds 10A through a single switching point. Always verify that your load current stays below the relay’s contact rating for reliable, long-term operation.
Match the coil voltage to whatever DC supply is most convenient in your project. 5V coil relays are ideal for Arduino and Raspberry Pi projects where 5V is already available from the USB power rail. 12V coil relays are the natural choice for automotive and LED strip installations where 12V is the system voltage. The coil voltage only affects the control side — the load contacts switch the same current regardless of which coil voltage you choose. If your project has both 5V (for the microcontroller) and 12V (for the LEDs), a 5V coil relay is usually simplest because the coil can share the microcontroller’s power rail.