Posted in

How to connect a relay module to a power supply?

Hey everyone, if you’ve ever dabbled in DIY electronics, home automation, or small industrial setups, you’ve probably stumbled on relay modules—little workhorses that let you flip high-power devices (like a porch light, a small water pump, or even a 12V motor) on and off with a low-voltage signal from a microcontroller (Arduino, Raspberry Pi, whatever). And let’s be real, half the time people mess up these projects not because the relay itself is broken, but because they hook up the power supply wrong. As a relay module supplier who’s fielded way too many “why won’t my relay trigger?” emails last year, I figured I’d break this down like I’d walk a newbie through it—no jargon, no confusing graphs, just what actually works. Relay Module

First, let’s cut to the basics: a relay module isn’t just a “switch” you plug into anything. It has two separate circuits, and if you mix them up? You might blow the module, fry your power supply, or worst case, short something and trip a breaker. The two circuits are: the Control Circuit (the weak side that takes signals from your Arduino/pi, usually 3.3V or 5V) and the Load Circuit (the strong side that powers the device you’re controlling, like 120V AC for a lamp, or 12V DC for a fountain pump). Today we’re talking specifically about connecting power supplies, which is mostly for the Control Circuit—though we’ll touch on Load power too, since they’re tied.

Let’s start with the number one rule I repeat to every customer: Check your relay’s specs before you do anything. Every relay module is labeled (or comes with a quick sheet) that says two big numbers: 1) Control Voltage (let’s call this Vcc for short) and 2) Control Current (the amps it needs to trigger, usually between 50mA and 100mA for a standard 5V relay). If you skip this, you’re setting yourself up for trouble. For example, I’ve seen a kid try to hook a 12V relay to a 5V Arduino pin—no wonder it wouldn’t click. Or someone use a 12V power supply that only outputs 20mA for a relay that needs 80mA—again, no trigger.

Next, pick the right power supply. This isn’t your phone charger—don’t grab a random wall wart off your shelf. Let’s break it down for the two most common control voltage types you’ll see (90% of relay modules are either 5V or 12V):

  • If your module is 5V: Use a 5V DC power supply that can deliver at least the control current. Most standard 5V relays need ~70mA, so a 5V 1A supply is perfect—way more than enough, no strain.
  • If it’s 12V: Grab a 12V DC supply with at least 100mA (again, 1A is safe). Wait—DC, not AC. Relay control circuits run on DC, always. AC power is for the Load side, not the control side. That’s another common mix-up.

Now, how to actually wire it. Let’s use a super common 1-channel relay module as an example—most of these have four main pins for power and signal: Vcc (control voltage), GND (ground), IN (signal input, from your microcontroller), and COM/NO/NC (Load side, but we’ll stick to power for now).

  1. First, ground everything. This is non-negotiable. The relay’s GND has to share the same ground as both your microcontroller (if you’re using one to trigger the relay) and the power supply you’re hooking up. If the relay’s GND is floating, the signal from your Arduino won’t register—even if the voltage is right. I had a customer last month who spent 3 hours troubleshooting because he connected the relay GND to his sensor’s GND, not his Arduino’s. Dude, floating grounds = chaos.
  2. Connect Vcc to the power supply’s positive terminal. Let’s say you have a 5V relay: take the power supply’s +5V wire, connect it directly to the module’s Vcc pin. Don’t split wires or use a breadboard jumper that’s frayed—use solid 22-gauge wire, it’s cheap and works way better for this.
  3. Connect the power supply’s negative terminal (that’s GND, obviously) to the module’s GND pin. Double-check this polarity—if you reverse it (positive to GND, negative to Vcc), you’ll probably blow the tiny diode on the module board. I’ve only had 2 customers blow modules from reversed power last year, so it’s rare, but easy to avoid if you glance at the labels.
  4. Now, the signal pin (IN) is separate, but it’s tied to power. The IN pin usually takes a 3.3V or 5V signal from your microcontroller. Again, use the same GND as the relay and power supply here. If your microcontroller is 3.3V, make sure the relay can handle 3.3V control—some modules are only 5V tolerant, so a 3.3V signal won’t trigger them. That’s another quick check on the spec sheet.

Wait, what if you don’t have a microcontroller? Like, you just want the relay to turn on when you plug in a power supply, no digital signal? That’s super easy too. Just leave the IN pin unconnected, or hook it to the same Vcc as the control circuit. Most relays default to OFF when the IN pin is high (same as Vcc) and ON when it’s low (same as GND)—so if you tie IN to Vcc, it stays off; if you tie IN to GND, it stays on. Just don’t leave IN floating, even for this case—it can cause random triggering, which is annoying.

Now, let’s talk about the Load power, because that’s where people get the big mistakes. The Load side is the COM, NO, NC pins we mentioned earlier. This is for the device you’re controlling—like a 120V lamp, a 12V water pump, whatever. Never use the same power supply for Load and Control unless the specs are identical and the power supply can handle the total load. For example, if you have a 5V control relay for a 12V AC lamp, don’t run the lamp’s power from the same 5V supply—use a separate 12V AC supply for the Load. If you do mix them, make sure the power supply’s current rating is enough for both the control circuit and the load device. I always recommend separate supplies for safety, especially if you’re working with high voltage (120V/240V).

Another pro tip from someone who’s seen a lot of burnt stuff: Add a flyback diode if your load is inductive. Inductive loads are things like motors, pumps, solenoids—they create a reverse voltage spike when you turn them off, which can fry your relay’s control circuit. Most of our relay modules already have a built-in flyback diode, but if yours doesn’t, it’s a $0.10 part you can solder on in 2 minutes. It’s way cheaper than replacing a $5 relay and a $10 power supply.

What about troubleshooting if it’s not working? I get this a lot, so here’s your quick checklist:

  1. Check Vcc polarity—did you mix up positive and negative?
  2. Check GND connection—did you share ground with the microcontroller/power supply?
  3. Is your power supply’s current enough? If it’s a 5V relay needing 70mA, and your supply is only 5V 50mA, it can’t deliver enough power to trigger the coil.
  4. Is the signal at the IN pin correct? If your microcontroller is putting out 3V and the relay needs 5V, it won’t click.
  5. Did you connect the Load side right? COM is the common pin, NO is normally open, so load power goes to COM and NO, not COM and GND. A lot of people connect the load wrong and wonder why nothing turns on.

Now, a quick note for DIYers and hobbyists working on bigger setups: If you’re using multiple relays, don’t daisy-chain power supplies unless you know what you’re doing. Each relay’s control circuit should get its own power, or a supply that can handle the total current. For example, two 5V relays each at 70mA need a 5V supply with at least 140mA—so a 5V 1A supply is perfect, no issues.

Wait, should I mention things not to do? Definitely. Don’t use a USB charger for your relay’s power. USB chargers are designed for low-current devices (phones, headphones) and usually max out at 5V 500mA, which is enough for one small relay, but they’re not regulated super well, so voltage spikes can damage the relay. I’ve had a customer burn a relay last year because he used his phone charger instead of a proper DC power supply—save the USB chargers for your phone.

Another no-no: Don’t skip the flyback diode if your load is inductive. I can’t tell you how many times someone’s sent a relay back saying it’s broken, and it turns out they ran a motor without the diode, and the relay’s coil is fried. It’s a simple fix, just don’t forget.

Now, if you’re looking for relay modules to test this out (we’ve got 1-channel, 4-channel, 8-channel, all with clear spec sheets and built-in diodes for inductive loads), feel free to reach out for a quote or more specific wiring tips. We also have tutorials for specific projects—like hooking a 12V relay to a 12V water pump, or a 5V relay to a Raspberry Pi—so just ask, we’re happy to help. We don’t sell knockoff modules, all our relays are tested before shipping, so you don’t have to worry about duds that show up dead on arrival.

A quick recap to make sure you don’t forget:

  1. Always check your relay’s control voltage and current before buying a power supply.
  2. Use a DC power supply that matches your relay’s voltage and can deliver at least the control current.
  3. Share ground between the relay, power supply, and any microcontroller you’re using.
  4. Don’t mix control and Load power unless you know your supply can handle it—separate is safer.
  5. Add a flyback diode for inductive loads if your module doesn’t have one.
  6. Troubleshoot with the checklist first before panicking and buying a new relay.

At the end of the day, connecting a relay to power is simpler than it sounds, but the small details (polarity, ground, current) are what trip people up. As a relay supplier, I want to make sure your projects work, not that you waste time fixing avoidable mistakes. If you’re working on a home automation setup, a small industrial machine, or just a cool DIY project and need help picking the right relay or power supply, hit us up to chat about your needs—we’re here to make sure your relay setup goes smoothly.

Ultra Thin Relay References

  1. "Relay Module Basics: Wiring and Troubleshooting" – Electronics For Hobbyists, 2023
  2. DC Power Supply Selection for Electronic Circuits – Power Electronics Handbook, 5th Edition, 2022
  3. Inductive Load Protection for Relay Circuits – Circuit Cellar Magazine, Issue 387, 2021

Zhejiang Weide Electric Co., Ltd.
Zhejiang Weide Electric Co., Ltd. is one of the most professional relay module manufacturers and suppliers in China, featured by quality products and low price. If you’re going to buy the newest relay module, welcome to get free sample from our factory. We also accept customized orders.
Address: No.555, South Binhe 2nd Road, Yueqing City, Zhejiang Province, China
E-mail: zjwdir@wdirele.com
WebSite: https://www.chweide.com/