- Since #2 of the coil is connected directly to 12V+ then is the signal from the arduino really connecting the other side of the coil to the ground side?
When the transistor is turned on then that is the source of ground for that end of the coil, from ground throught the emitter lead to the collector lead and onto the coil. What you are missing is a wire going to the negative terminal (ground) of your +12vdc supply to a arduino ground pin. That is required for the transistors base current to flow back to the arduino when the arduino output pin is commanded on (+5vdc).
- Why does the #2 side of the coil have to be hooked up with a diode and not just directly connected to the 12v+? I understand that the diode keeps a surge from getting to my ATmega but not really how.
When a coil is turned off the magnetic field collapes causing a reverse voltage spike. Having a diode wired right across the coil terminals allows the spike to be clamped and discharged through the resistance of the coil. Otherwise this voltage spike can damage the transistor and in some cases the arduino output pin. Note that the #2 relay coil terminal wires directly to both +12vdc and the cathode lead of the diode.
- Why are the transistor and resistor needed and how do i figure what values for these componets? If the amps I will draw change will these values also need to change?
The transistor is required because you are using a relay coil that requires +12vdc to turn on. An arduino output pin has only a +5vdc output so it can't directly power the relay coil. The transistor is used as an external switch controlled by the arduino +5vdc output pin, allowing the transistor to switch the current on and off to the coil. The transistor is selected that has voltage and current rating above that required by the relay's coil. This has no bearing on the voltage and current draw you will be using on the relay's switching contacts, that is a seperate specification of the relay and has no bearing on the transistor selected. The base resistor have to be able to allow enough current to flow through the transistor's base such the transistor turns on fully. 220 to1,000 ohms are common values to use
- So if i need a relay and the item I need to turn on is 12v and will draw around 260 mA then I need a 12v relay rated at at least around .5 amps???
When one says a "12 volt relay" that implies a relay with a coil voltage of +12vdc rating, that is seperate from what voltage level and current rating the relay's contacts can handle, that is again a seperate rating and should be well above the voltage and current demands of the device you are controlling. Many 12 volt relays have contact ratings that can handle up to 120/220 volts AC and up to many amps.
- So really simply what I believe is happening is that the lights are hooked up to 12v+ and when the relay is tripped it provides the ground side of the connection for the lights to work?
Correct, the switch contacts complete a circuit connection from your external power's ground to the device being controlled on then onto +12 volts. Remember the purpose of a relay is so there is complete isolation for the thing controlling to coil to the circuit you are controlling from the contacts.
Any other tips or suggestions on what relay I should use for my circut are welcomed... Anyting else you think i may need to know is also appreciated and valued...
Following you picture is a little difficult, it's always better to be working with a proper schematic drawing. Here is a drawing showing the proper wiring for a arduino controlled relay. Note that they don't show the external contact wiring to the device being controlled by the relay's contacts, it's assumed you know how to handle that part. Note the wire connection from the arduino ground pin to the transistor emitter lead and onto the ground of the relay power supply. That connection is often not made by newcomers and is required.