A relay is simply an electrically operated, heavy duty switch. Relays are used in applications where an electric device draws a large amount of current. With a relay installed, the wire size to the primary switch, and the switch itself can be constructed for a small current draw. Heavy wire is run from the battery to the relay contacts and then to the device. In motorcycle applications we use relays for powering accessory horns that would draw more current than our horn pushbutton and associated wiring can handle.
Most general purpose relays have a set of normally open contacts and a set of normally closed contacts and are wired internally as shown to the left. They have two pins for powering the relay coil (85 and 86), a pin for main power in (30), and two pins for main power out. One of the power out pins is through the normally open contacts (87A) and the other pin is through the normally closed contacts (87). Some relays reverse the 87 and 87A markings.
Relays work like this: Power is sent through the relay coil which becomes an electromagnet. A small iron rod or bar is pulled by the magnetic field towards the coil and in turn pulls one set of contacts open and the other set of contacts closed. The relay therefore can be used to open a circuit or close a circuit depending on which pins are used. For horn applications we use the normally open contacts, so that when the coil is energized by pushing the horn button, it pulls the contacts closed, completing the circuit from the battery to a horn or air compressor.
If your relay is unmarked you can still figure out the pins. Start by finding the pins connected to the N.C. contacts. Use an ohmmeter to find two pins with zero resistance between them. Mark these 30 and 87. Then find the pins that are connected to the coil which will have some resistance. Mark them 85 and 86. The remaining pin is one of the N.O. contacts. Number it 87A.
One thing remains. You know which pins are the N.C. contacts (30 and 87) but you do not know which one is pin 30 for the power. This DOES matter. Temporarily connect coil pin 85 to ground and pin 86 to positive 12 volts, but be sure to use an inline fused wire in case you have a mistake. It does not matter which you have marked 85 and 86. As you put power on and off the coil you should hear the relay clicking in and out. If so proceed. (If the fuse blows, you have pins 30 and 87 not 85 and 86). Temporarily connect positive 12 volts (again through a fuse) to what you think is pin 30 and connect a test light from pin 87A to ground. The light should be off. Then energize the coil and the light should come on.
If this works you have identified all the right connections. If the light does not come on at all, then you have connected power to pin 87 instead of 30. Move your power source to the other pin and try again. All should work. If the light still does not come on, the relay may be faulty.
For relays with only four pins it is quite simple. Find the two pins that have continuity. These are the coil pins, the remaining two are the N.O. contacts. It doesn't matter which one of the N.O. contact pins you connect the main power to. It works just like an on/off switch.
The stock horns have two wires coming to them. One is the hot line and the other is a ground wire. Within this circuit is the horn pushbutton (a switch). The easiest thing to do is connect the two wires that went to the stock horns, to the relay coil pins. Now run a fused line from your battery positive post to pin 30. The 10 amp inline fuse holder should be as close to the battery as possible, because you don't want six feet of unprotected wire running under the seat, through the frame etc. to the fuse. If the insulation rubs through you have a direct short across the battery. This applies any time you are running a hot line for something on your bike. Run another wire from pin 87 (N.O.) to the horn or compressor. The other pin on the horn or compressor is run to a frame ground. All wiring on the horn side of the relay should be a minimum 12 guage wiring.
One final note. The 75 to 83 Goldwing (and most likely many other bikes) have the horn button located in the GROUND leg of the circuit. This has confused many back yard mechanics, including the writer. To check for this, disconnect the two wires from your stock horn. Turn your key on and put a 12 volt test light between one connector and a frame ground. Do the same with the other connector. If either one energizes the test light, your horn switch is on the ground side. That is why you use both wires that went to the stock horns for the relay coil. If you just run the hot line to the relay coil and then to a frame ground, your horns will be constantly on whenever your key is on. Some neighbours get annoyed by this!
Good luck and enjoy your new horns!