I have tried to measure it using my DMM (set to the "20k" mode and placing the red probe on pin 86 of the relay, and the black probe on pin 85 of the relay). I get a reading of 0.08 which doesn't make sense to me. I thought it needed to be much higher than that?
What's the trouble?
[I thought you were getting some relay board for this deal.] http://arduino.cc/forum/index.php/topic,103055.0.html
That was my original plan (thanks for the help with that by the way) but when I got the lights I want to control, they already came with these relays equipped. So I figured
why not just use the exiting ones instead of buying a new board.
That simple circuit will work for your application. An Arduino cannot supply the current needed to energize this relay. The transistor can. It acts like a switch to complete the circuit to energize the relay. What switches the transistor off or on is the signal from the Arduino pin.
Relay power + would be power from the positive battery terminal and Relay power GND would be from your battery's negative terminal. This doesn't mean you have to run wires to the battery; it's just to say that the battery is the source of those two connections.
K1 (written horizontally) is the coil of your relay (pins 85 & 86). S1 & 01 of the K1 written vertically are the 'switch' that turn your lights on or off. S1 & 01 are connections 86a & 30 of your relay.
Diode D1 is necessary to prevent damage to the transistor when the relay goes from on to off.
The resistor in the circuit limits the current coming from the Arduino so as to not damage it.
The lower part of the diagram with all the GND connections is showing that the ground of the Arduino must be attached to the ground you are using to power the relay coil.
Basically this circuit is a s follows: The output from the Arduino turns on the transistor, the transistor turns on the relay, the relay turns on your lights. By the way, I believe this relay can be considered a 'small' relay since a similar relay's data sheet indicates it consumes 1.6 watts which would be around 130ma @ 12V which the 2N2222 can handle.. - Scotty
Thanks for the explanation, I tried this was a 2N2222 earlier and I couldn't get it to work right. I tested the voltage coming off the transistor in my circuit and got around 5.5-6 volts. I am guessing I need a bit more than this so I am going to see if I can find a TIP102 transistor today and swap them out in my circuit.
Thanks for the help!