i know its probably simple
but i went out and got this relay at radioShack and according to the writing on the relay i should be able to switch my mains ac
with at least 12v @30ma
i just do not know what goes connected to what as far as where the one of the AC lines will be and where the microcontroller conection will be , and i do know that i need to use a few other components so that i do not toast my microcontroller.
basically lets say if i want to control a regular lamp plugged into the wall ,
i would splice of the lines from the cord and connect on end to one contact on the relay and the other end of the splice the a different contact
thus when the coil is active the two spliced ends will be connected inside the relay
since i need 12v to turn the relay on, and another lower voltage to run my arduino ,
i will probably just using that same line and step down the mains to 12v via transformer and bridge rectifier , maybe more then 12c since the diodes will drop it a bit , and use that for the relay
then a voltage divider or a goood old voltage regulator to power the arduino.
but right now i just would like some insight on how this relay gets hooked up
so sorry the images come out like that, they look right side up on my phone