Jump to content

The Ultimate Guide To Connecting Relays In DIY Electronics

From The Stars Are Right




Correctly connecting a relay enables safe operation of power-hungry appliances using microcontrollers or sensors



Relays function as remote-controlled switches, allowing tiny control signals from Arduinos or sensors to activate high-current devices such as motors, lamps, or heating elements



Getting it right ensures safety, reliability, and prevents damage to your components



Begin by determining your relay’s configuration



Typical 5-pin relays feature: Coil+, انواع رله Coil-, COM, NO, and NC terminals



Use the coil pins to send the control voltage, and reserve the remaining three pins for connecting your target appliance



Always refer to the manufacturer’s documentation or printed labels, since pin arrangements differ across brands and types



Now wire the input or control circuit



Coil voltage ratings commonly range from 3V to 24V—match it precisely to your control source



Connect one coil pin to your control source, like an Arduino digital pin, and the other to ground



Always include a flyback diode across the coil pins to protect your controller from voltage spikes when the coil turns off



The diode should be connected in reverse bias across the coil, with the cathode toward the positive side of the coil



Turn your attention to the switched circuit



The common pin connects to your power source for the device you want to control, such as the positive terminal of a 120 volt lamp or a 12 volt motor



Wire the NO pin directly to your target device’s input terminal



This means that when the relay is not activated, the circuit is open and no power flows to the load



Once energized, the internal switch closes, completing the circuit and powering your appliance



Use NC only if your application requires the device to be active without control signal



Do not underestimate your appliance’s power demands—undersized supplies cause failures



Always stay within the relay’s specified current and voltage limits



A 10A



Also, keep high voltage and low voltage circuits physically separated to avoid interference and danger



Triple-confirm your wiring before applying power



Always use appropriately rated, insulated cables and fasten them with terminals or wire nuts



Test the system with the load disconnected first to ensure the relay clicks when you send the control signal



Once you are confident, reconnect the load and test under normal conditions



Never work on live circuits unless you are trained and equipped to do so



Relays are simple but powerful tools



They transform tiny signals into robust control actions



Opening up many possibilities for smart home projects, automation, and custom gadgets



Safety isn’t optional—it’s the foundation of every great DIY build