How to Connect a Relay (Practical Guide with Real Examples)
How to Connect a Relay (Practical Guide with Real Examples)
What is a relay and what is it for?
A relay is an electrically controlled switch. You activate it with a small signal and it lets you handle larger loads without burning out your button, alarm, module, or whatever you're using. For me, it's basically the most useful component when you want something "small" to control something "more powerful."
In practice, it has helped me when I need to power a component that requires more voltage or current than a normal line can provide. The same applies to cars: I've used it to cut power to the engine or fuel pump, especially in homemade anti-theft systems where you want the car to start only when you want it to.
Types of relays and their function
The most common ones are:
- 4 pins (SPST): the most basic. Opens or closes a circuit.
- 5 pins (SPDT): has an additional contact. Provides a normally open (NO) and normally closed (NC) position.
- Automotive 12V: the bread and butter in cars and school projects.
- Industrial / 24V: for heavier equipment, panels, control boards, etc.
For almost everything everyday, a 12V automotive relay is enough. It has standard pins and diagrams that everyone recognizes.
Understanding pins 85, 86, 30, 87, and 87a
There's no mystery here. Automotive relays use this universal numbering:
| Pin | Function |
|---|---|
| 85 | One side of the coil |
| 86 | The other side of the coil (polarity doesn't matter) |
| 30 | Main power input |
| 87 | Output when the relay is activated |
| 87a | Output when the relay is NOT activated |
Most school and home projects only use 30 and 87, because 87a is for making automatic cutoffs or diversions.
How to connect a relay step by step
Basic connection diagram
For a relay to work you need two things:
- Power for the coil (85 and 86).
- Power for the circuit you want to control (30 and 87).
The flow is like this: a low-current signal activates the coil. This moves the internal contact and allows the 12V (or whatever you use) to pass through pin 30 to 87.
4-pin relay connection
- Pin 85 to ground.
- Pin 86 to the activation signal (switch, alarm, module, Arduino, etc.).
- Pin 30 to the main source (12V with fuse).
- Pin 87 to the load (motor, light, pump, actuator).
When I've needed to power a load that requires more voltage than I can provide with a small circuit, this type of connection is what I use. It's reliable and doesn't complicate your life.
5-pin relay connection
- Pin 85 to ground.
- Pin 86 to the activation signal (switch, alarm, module, Arduino, etc.).
- Pin 30 to the main source (12V with fuse).
- Pin 87 to the load (motor, light, pump, actuator).
All of the above, but with the extra pin 87a, which delivers current when the relay is off.
It's used for systems where you want a circuit to work normally, but cut off when you activate the relay. I've used it to cut current to the fuel pump as an immobilizer, it works well and isn't visible at first glance.
Real uses: cars, power cutoffs, and anti-theft systems
In cars, the relay is almost mandatory. This is what really makes the difference:
- Cut power to engine or pump: If you connect it with 87a as the normal line, when you activate the relay you cut the power supply completely. I've applied this in anti-theft systems and it works because it's not noticeable at first glance.
- Control auxiliary lights: LED bars, headlights, strobes.
- Protect delicate modules: don't connect heavy loads directly to small switches.
- School projects: the classic use where a weak signal controls a large load. I always see it as the perfect example of "the small controls the large."
If someone wants a car that won't be easily stolen, a relay hidden in the right circuit can work wonders.

Common mistakes and how to avoid them
- Not using a fuse on line 30: rookie mistake and cause of many shorts.
- Confusing 87 with 87a: when the car won't start for no reason, it's usually this.
- Putting more load than the relay supports: check amperage.
- Bad ground on 85: the coil never activates.
- Thin wires: don't use a thin wire to power a pump.

Frequently asked questions
Can I reverse 85 and 86?
Yes, it doesn't affect anything in common automotive relays.
How do I know if a relay is damaged?
Test by listening for the "click". If you don't hear it, measure voltage at 85 and 86. If there is voltage and it doesn't activate, replace it.
Does a 12V relay work on 24V?
No. The coil will burn out.
Can I activate it with Arduino or Raspberry Pi?
Yes, as long as you use an intermediate transistor or relay module.
Conclusion
Connecting a relay isn't rocket science if you understand what each pin is for and what type you need. The key is to use it for what it was designed for: controlling large loads from small signals. In cars, it saves your electrical system, helps you move heavy loads, and if you want to get creative, it lets you set up an anti-theft system more effective than many expensive devices.

Comentarios (0) blog/en/how-to-connect-a-relay
No hay comentarios aún. ¡Sé el primero en comentar!