AC Lamp control

Hello,

I'm going to control an AC lamp with the Arduino. I just wanted to make sure i'm doing it right because of the risk of fire when working with high voltages. This is what i'm thinking…

I'm going to take an extension cord and cut it in half and strip the wires. I will then cut the wires coming from the lamp and strip them. I will solder one wire on the lamp to a wire on the extension cord and then put some electrical tape around it. Then i will take the extra wire from the lamp and extension cord and put them into the relay.

Will that work?

http://www.seeedstudio.com/depot/grove-relay-p-769.html?cPath=156_160

Thanks,
Drew Davis

Electrically yes that would work. If that is the safest way for you is another question. Can the tape ever unravel or snag on something and come loose? Wiring of household AC is a safety item you should take into consideration.

Lefty

What would you use in place of tape? Heat-shrinking rubber?

Also, the light should draw less then .25 amps so I could put in a .5 amp fuse. I think that would prevent me from being killed.

Thanks,
Drew Davis

Or you could buy one of these and save a lot of trouble and risk...

That looks like it will work better than anything I could make! I will look into buying it.

Also, does it use one or two pins on the Arduino?

Thanks,
Drew Davis

I would imagine 1x i/o pin for control and 1x ground

Thanks for all the help!!!

Your plan looks okay.
If using heat shrink, ensure that the individual strands of wire lay flat or they may poke through, and you may get erm, a shock!

Remember, it's the volts that jolts and the millies that killies! :wink:

0.5A is plenty to kill you....

Once you have your relay working, why not look at optical isolation and zero-voltage-switching, you'll be amazed how long your bulbs last too! (filament type)

You might consider the below x10 firecracker kit for $40. The CM17A firecracker is dead simple to connect to an arduino (3 wires). The bottom discussion has info to make it controllable via a web page.

http://www.x10.com/automation/ck18a_s_ps32.html

http://arduino.cc/forum/index.php/topic,126271.0.html

I decided to make something like the power switch tale with my relay and it worked fine at first then I plugged it into a surge protector and it killed the power to my hole house and tripped some fuses. Anyway, I don't know what when wrong the second time and I need to fix it before trying it again!

The only things that were different was the program, how the relay was wired to the Arduino, and that I plugged it into a surge protecter. As for the wiring I simply just used the sensor pin on the relay not the entire grove setup (5v, ground, pin 6, pin7) but I don't think that mattered. The program should not matter either because the relay can only be off or on. When I plugged it in the relay was set to be on however I don't think it ever switched on because the power for the Arduino got shut off with the rest of my house which happened instantaneously! Also, a device of lower wattage was plugged into my home-made power cord the second time

The only idea I could come up with was that one of the wires slipped inside my home made power plug and a live wire hit a neutral or ground. If it matters I'm using a three prong cord that is running off a regular USA outlet (125v).

Also, please don't say I should not be doing this because that is not a consideration!

Thanks!

Edit: I can't get the pictures to post. Any certain format?

You can solder screw terminals to your circuit board. Don't forget a flyback diode.

I decided to make something like the power switch tale with my relay and it worked fine at first then I plugged it into a surge protector and it killed the power to my hole house and tripped some fuses.

Did it trip your RCD? You probably have an earth leakage from live or even neutral. If it was a wired fuse, you probably have a live-neutral short! Maybe you need a battery powered project?

That fuse/RCD is there to protect you.... remember...

Remember, it's the volts that jolts and the millies that killies! smiley-wink

Take care friend

If you could tell me how to post a picture I could show you what I built.

Also, I did not put a flyback diode in. Where would one go?

As for a battery project I would much prefer to use strictly DC, but the project i'm working on requires that The Arduino is able to control and outlet.

Thanks!

You need to post the picture somewhere online. This is where you put a flyback diode, I drew a diagram:
Imgur

Oh an don't put the diode the wrong way, or you will cause a short circuit.