A solid state relay lets an Arduino switch mains-powered loads with no moving parts, but switching an inductive load, a motor, a transformer, a solenoid, without protection invites voltage spikes that can destroy the relay or glitch the Arduino. The classic protection is a snubber: a resistor and capacitor in series across the relay's output, absorbing the spike. Snubber design reduces to a few component choices driven by the load's behavior, and getting it right is the difference between a relay that lasts years and one that fails in a month.

Why Inductive Loads Threaten SSRs
An inductor resists changes in current: when the relay turns off and the current tries to stop, the inductor generates a voltage spike in the attempt to keep current flowing. With a solid state relay, the spike appears across the output semiconductor, typically a triac or back-to-back SCRs, and if the spike exceeds the device's voltage rating, even briefly, it punches through the junction. The relay then fails, often shorted, which means the load stays on permanently. That failure mode, failed-closed on a heater or motor, is why SSR protection is a safety issue, not just a reliability nicety. Even switching power supplies and some lighting ballasts can present transients worth snubbing.
The RC Snubber: What Each Part Does
The snubber is a resistor and capacitor in series, wired directly across the SSR's output terminals. When the voltage spikes, the capacitor absorbs the transient energy, charging up instead of letting the voltage soar; the resistor limits the discharge current when the relay next turns on, preventing the capacitor from dumping its stored charge through the relay as a current spike. Without the resistor, the capacitor alone would create a damaging inrush at every turn-on. Without the capacitor, the resistor alone cannot absorb the spike. The two work as a pair: enough capacitance to swallow the transient, enough resistance to limit inrush, but not so much that leakage current keeps a small load partially energized when the relay is off.
Choosing Values
In practice most Arduino-scale projects use well-established starting values and verify. A common starting point for mains switching is on the order of 100 ohms in series with 100 nanofarads, rated for the full mains voltage with generous margin, and this tames the transients from typical small motors, solenoids, and transformers. Larger inductive loads want more capacitance; very small loads may need less, because an oversized snubber's leakage current can keep a tiny load, like a small indicator or a sensitive electronic ballast, ghost-powered when the relay is off. The resistor must handle the pulse power: use a surge-rated type, because the transient dumps real energy into it. The capacitor must be an AC-rated safety type, X2 class for across-the-line use, because a DC-rated capacitor across mains is a fire waiting for a surge.
Placement and Wiring
The snubber must sit electrically close to the relay's output terminals, with short leads. Long leads add inductance that slows the snubber's response to the very fast transient it is meant to catch; a snubber wired six inches away through thin wire is significantly less effective than one wired directly across the terminals. Keep the mains wiring to the load separate from the Arduino's low-voltage wiring, both physically and in routing, because the transient the snubber absorbs still radiates noise. A metal enclosure for the mains side, properly grounded, contains both the electrical noise and the physical hazard. Fuse the mains input appropriately: the snubber protects the relay from the load's transients, but nothing protects the circuit from a shorted load except a fuse.
Verifying the Design
You cannot see a transient without an oscilloscope, but you can verify the snubber's effect indirectly. The practical test is operational: switch the load repeatedly, dozens of cycles, and watch for Arduino resets, relay misbehavior, or failure to turn off cleanly. An Arduino that resets when a motor switches off is seeing the transient couple into its supply or reset line, a sign the snubber is undersized or misplaced. Check the relay's temperature under sustained switching: a snubber that is too aggressive wastes power as heat in the resistor. And test the off state with the actual load: if a small load glows, hums, or runs slowly when the relay is off, the snubber's leakage current is too high and the values need trimming.
Safety Notes
This project involves mains voltage, which can kill. Work with the circuit de-energized and verified dead before touching anything; use an isolation mindset even when you believe it is off. Enclose all mains connections so fingers cannot reach them, strain-relieve the mains cable so a tug cannot expose conductors, and ground any metal enclosure. The Arduino side stays at safe low voltage only if the SSR provides proper isolation, which quality SSRs do, but cheap unbranded relays sometimes skimp on creepage distances. Buy relays from reputable sources with real datasheets, and respect the voltage and current ratings with margin, not at the edge.
A snubber is cheap insurance: a resistor, a capacitor, short leads across the relay output. Size it to the load, use AC-rated parts, keep mains away from logic, and verify with real switching cycles. The relay will outlive the project.
Related Guides
- Optocoupler Relay Isolation for Arduino: The moment an Arduino project grows up from blinking LEDs to switching lamps, pumps, or heaters, it needs relays, and relays need isolation. An
- Flyback Diode Sizing for Inductive Arduino Solenoids: A solenoid is an inductor, and inductors fight changes in current. When the Arduino switches a solenoid off, the collapsing magnetic field drives a
- Arduino Blink: Your First Electronics Project: Welcome to the World of Arduino! If you're brand new to electronics and microcontrollers, the "Blink" sketch is your "Hello World" moment. This
- Optocoupler Switching Delays in High-Speed I/O: Optocouplers isolate circuits by transmitting signals as light: an LED shines on a phototransistor across a gap, so the two sides share no electrical
- Flyback Diode Sizing on Solenoid Valve Drivers: Every solenoid valve is an inductor, and every inductor fights changes in current. When an Arduino-driven transistor switches a solenoid off, the