Relays give your smaller switches the OOMPH to handle large loads
like horns, compressors, ballasts for HID lights, etc.'
For an explaination of relays check this site:
http://www.kpsec.freeuk.com/components/relay.htm
Another good explanation of relays can be seen at:
http://www.bcae1.com/relays.htm#demo
For a full screen demo of the common automotive relay
from BOSCH that allows you to see what's happening when
a switch is operated controlling the relay. Pretty good show
and tell segment of the above site:
http://www.bcae1.com/images/swfs/relay.swf
Relays need protection to from voltage spikes etc. that can harm the
circuits they are switching. Resistors and diodes are common devices
to protect from this spike. They are explained on sites mentioned
below.
DIODES
For a pretty good description of DIODES I found this site:
http://www.kpsec.freeuk.com/components/diode.htm
Some text on the subject:
Transisitor and switches do basically the same thing.
Transistors are good for loads below <5 amps.
It's just easier for most of us to use switches to control
relays. You'd put a switch in the circuit where the transistor
is shown.
Protection diodes for relays
Transistors and ICs must be protected from the brief high
voltage produced when a relay coil is switched off.
The diagram shows how a signal diode (eg 1N4148)
is connected 'backwards' across the relay coil to
provide this protection.
Current flowing through a relay coil creates a magnetic
field which collapses suddenly when the current is
switched off. The sudden collapse of the magnetic
field induces a brief high voltage across the relay coil
which is very likely to damage transistors and ICs.
The protection diode allows the induced voltage to
drive a brief current through the coil (and diode) so
the magnetic field dies away quickly rather than
instantly. This prevents the induced voltage becoming
high enough to cause damage to transistors and ICs.
When you use relays to operate things like amps or ballasts
for HID lighting might be good to find a relay with a diode
protecting the relay's coil. Could save frying your expensive
items.
RESISTORS
(will draw power constantly when installed on
relay coils I don't recommend using them without
a diode in series to block that current flow. The diode will
prevent the back emf from frying your circuits
when the relay is switched off.)
Resistors are used in parallel the coils to.
Their function will be in another post.