apples723
Posts: 80
Joined: Sat Jun 22, 2013 3:13 pm

None wanting to use a relay switch

Tue Sep 23, 2014 4:12 am

How would I go about controlling this[img]
http://postimg.org/image/vmgq6ipv1/full/[/img] with a relay switch an raspberry pi via a browser.
I need a nube guide to relay switches and automation.

What do I need to buy as this a light switch and most guides I found online talk about ac outlets. I know basic python. And have been using Linux for a couple of years as well as html, but never could get node to work on my pi and I don't have vps hosting so my web host doesn't support node :( also id like to know if I can control my remote control outlets that have a basic on and off remotefrom the same relay switch. And could I fbuy something to power the pi using he light switch power because id like to actually put this in the wall next to the switch and obviously would use WiFi but it be difficult to run power to the pi in the wall.

johndough
Posts: 254
Joined: Sun Jan 13, 2013 2:00 pm

Re: None wanting to use a relay switch

Tue Sep 23, 2014 10:09 am

Hiya

MAINS ELECTRICITY IS LETHAL.

Maybe something here that could help...

http://www.raspberrypi.org/forums/viewt ... 17#p544917

If in doubt please ask.

apples723
Posts: 80
Joined: Sat Jun 22, 2013 3:13 pm

Re: None wanting to use a relay switch

Tue Sep 23, 2014 6:50 pm

So ur saying a light switch has too much power?

toxibunny
Posts: 1382
Joined: Thu Aug 18, 2011 9:21 pm

Re: None wanting to use a relay switch

Tue Sep 23, 2014 7:43 pm

just be careful, that's all.

-as long as all that's connected to the light-switch is a light-bulb, then you're fine...

...unless the relay you bought is utter garbage, in which case there's a chance it'll burn your house down.

good luck! have fun! :)
Last edited by toxibunny on Tue Sep 23, 2014 7:49 pm, edited 1 time in total.
note: I may or may not know what I'm talking about...

User avatar
DougieLawson
Posts: 36123
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: None wanting to use a relay switch

Tue Sep 23, 2014 7:48 pm

apples723 wrote:So ur saying a light switch has too much power?
No he's saying that if you don't know what you're doing you are a) going to fry your Raspberry Pi, b) going to kill yourself or c) burn your house down.

Start by learning to switch simple low voltage things like an LED with a 560 ohm resistor.
Move forward to switching relays (with transistors or opto-isolators), run the relay with a low voltage load (nothing more than 12-24 volts).
Because that prevents danger b) and danger c). It doesn't prevent danger a) as you can fry a Raspberry Pi with 24V but you won't be electrocuted or burnt to death.

Talk to a qualified electrician. Tell him/her what you're planning to do. He/she should be interested in preventing you from killing yourself.

There are also nice shiny things like 433MHz radio controllers that can be used for automating household electric circuits. You can look at using a Raspberry Pi to generate the control signals for something like that. For the United Kingdom there's the Energenie Pi Mote. http://www.raspberrypi.org/controlling- ... e-pi-mote/
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

toxibunny
Posts: 1382
Joined: Thu Aug 18, 2011 9:21 pm

Re: None wanting to use a relay switch

Tue Sep 23, 2014 7:59 pm

I'd do as dougie says and consult an electrician.

I'd also start off with controlling a desk lamp *at most* - mucking about with the internal wiring of your house is only for either qualified electricians, or brave fools...
note: I may or may not know what I'm talking about...

chunkking
Posts: 2
Joined: Fri Jan 24, 2014 1:57 pm

Re: None wanting to use a relay switch

Tue Sep 23, 2014 8:31 pm

Ah, 'tis good to be a fully qualified brave electrician fool. And an American - so I only have to worry about 110 volts at my light switches. Starting with controlling the desk lamp is a good idea. Easy to modify and disposable when fried. Good Luck, and stay safe.

User avatar
rpdom
Posts: 15194
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: None wanting to use a relay switch

Wed Sep 24, 2014 6:37 am

apples723 wrote:And could I fbuy something to power the pi using he light switch power
No, you can't power from the light switch power, at least not directly from the switch itself. The switch only connects to one of the power wires, any unit to power the Pi will have to connect to both of them to make a circuit. With the switch the circuit is made through the light bulb to the other wire.

User avatar
Burngate
Posts: 6006
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: None wanting to use a relay switch

Wed Sep 24, 2014 10:43 am

apples723 wrote:So ur saying a light switch has too much power?
toxibunny wrote:-as long as all that's connected to the light-switch is a light-bulb, then you're fine...
... though bear in mind there's a rather large generator attached to the other side of the switch.
If you get it wrong, you're trying to stop Sizewell B from rotating. Guess who's gonna win?

Return to “Automation, sensing and robotics”