Pages: [1]   Go Down
Author Topic: AC Lamp control  (Read 1167 times)
0 Members and 1 Guest are viewing this topic.
Florida
Offline Offline
God Member
*****
Karma: 2
Posts: 559
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.ikea.com/us/en/catalog/products/10175810/
http://www.seeedstudio.com/depot/grove-relay-p-769.html?cPath=156_160


Thanks,
Drew Davis
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17262
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

Florida
Offline Offline
God Member
*****
Karma: 2
Posts: 559
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: January 18, 2013, 03:49:30 pm by Drew Davis » Logged

Online Online
Faraday Member
**
Karma: 82
Posts: 3831
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Although I answer in good faith, remember always: Your Mileage May Vary.
Get me on LinkedIn: za.linkedin.com/in/jimbrownza/

Florida
Offline Offline
God Member
*****
Karma: 2
Posts: 559
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Online Online
Faraday Member
**
Karma: 82
Posts: 3831
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Although I answer in good faith, remember always: Your Mileage May Vary.
Get me on LinkedIn: za.linkedin.com/in/jimbrownza/

Florida
Offline Offline
God Member
*****
Karma: 2
Posts: 559
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for all the help!!!
Logged

Offline Offline
Full Member
***
Karma: 5
Posts: 113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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! smiley-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)
Logged

For whom does the clock pulse? It pulses for you!

0
Offline Offline
Tesla Member
***
Karma: 141
Posts: 9470
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: January 18, 2013, 11:50:57 pm by zoomkat » Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Florida
Offline Offline
God Member
*****
Karma: 2
Posts: 559
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Beijing
Offline Offline
Full Member
***
Karma: 3
Posts: 193
Skype name habib.derbyshire
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

What is man's best friend? The breadboard!

Offline Offline
Full Member
***
Karma: 5
Posts: 113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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...

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

Take care friend
Logged

For whom does the clock pulse? It pulses for you!

Florida
Offline Offline
God Member
*****
Karma: 2
Posts: 559
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Beijing
Offline Offline
Full Member
***
Karma: 3
Posts: 193
Skype name habib.derbyshire
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You need to post the picture somewhere online. This is where you put a flyback diode, I drew a diagram:
http://www.flickr.com/photos/92382393@N06/8425886519/
Logged

What is man's best friend? The breadboard!

Beijing
Offline Offline
Full Member
***
Karma: 3
Posts: 193
Skype name habib.derbyshire
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

What is man's best friend? The breadboard!

Pages: [1]   Go Up
Jump to: