Ninjafishleg
Posts: 5
Joined: Sun Aug 18, 2013 6:07 pm

An idea for a light switch.

Tue May 27, 2014 10:19 am

Hi,
I had an idea where I would take my light switch apart and attach my raspberry pi up to it using the gpio pins. I thought it would be awesome because then I could use SSH to control my light wirelessly. However I am not very good at circuitry and cannot think of a way of making a switch that I can turn on and off with the Pi. I dont know if that makes much sense so I have a image below that hopefully clears things up a bit. Also, by the way, I am currently just turning my light on by putting a wire between the white one and the black one and completing the circuit.

Image

Also, if someone has done this before - I'm sure they have - could you send a link so I could see how they done it. I am rubbish at electricity because I am 14 and haven't even done it in shool yet! This is my way of getting a head start.

Thanks!

Ps: this is my first time posting so I am sorry if I broke any forum rules, please tell me if I have!

User avatar
DeeJay
Posts: 2027
Joined: Tue Jan 01, 2013 9:33 pm
Location: East Midlands, UK

Re: An idea for a light switch.

Tue May 27, 2014 10:30 am

No image visible.

If you are talking about controlling a real domestic lighting installation, be aware that MAINS VOLTAGES ARE LETHAL AND CAN KILL PEOPLE.

Less importantly, connecting mains voltages to the GPIO pins of your RPi will also kill your RPi.

Don't take your light switch apart unless you know what you are doing - your suggestion indicates that you do not have the level of knowledge you need to keep yourself and other people in your house safe.
How To Ask Questions The Smart Way: http://www.catb.org/~esr/faqs/smart-questions.html
How to Report Bugs Effectively: http://www.chiark.greenend.org.uk/~sgtatham/bugs.html

Ninjafishleg
Posts: 5
Joined: Sun Aug 18, 2013 6:07 pm

Re: An idea for a light switch.

Tue May 27, 2014 10:43 am

Thanks for the reply but I have my Father watching over me and I am being extra careful to turn the fuse box off before doing anything and he is supervising and turning the fuse box back on for me.
Last edited by Ninjafishleg on Tue May 27, 2014 10:55 am, edited 1 time in total.

User avatar
FLYFISH TECHNOLOGIES
Posts: 1750
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia
Contact: Website

Re: An idea for a light switch.

Tue May 27, 2014 10:53 am

Hi,
Ninjafishleg wrote:I have a Father watching over me
Special attention is needed with mains... therefore, I'm going to be a bit rude now - if your father doesn't know how to control a light switch with the RasPi, then you (both) must select another challenge... start with a LED, small motor, temperature sensor, etc.


Best wishes, Ivan Zilic.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: Korea

Re: An idea for a light switch.

Tue May 27, 2014 11:34 am

Ninjafishleg wrote:Thanks for the reply but I have my Father watching over me and I am being extra careful to turn the fuse box off before doing anything and he is supervising and turning the fuse box back on for me.
This implies that your father knows what it is you are trying to do (otherwise he wouldn't be able to judge if it was safe to turn the fuse box back on, would he?). If this is true, then why not ask him how to do it?

Seriously though, what you want to do is possible, but requires a lot of knowledge that you should acquire the boring way (i.e. studying) rather than the fast way. Do educate yourself on the dangers of mains power, and how to safely control it before having a go yourself.

hampi
Posts: 223
Joined: Fri May 31, 2013 11:29 am
Contact: Website

Re: An idea for a light switch.

Tue May 27, 2014 11:39 am

Maybe low voltage LED lights would do? I have an advanced DIY project for that

https://github.com/oh7bf/RasPiPwrSwitch/wiki

but you can make use of only part of the project if doing the complete thing is too much for your time and skills.

Ninjafishleg
Posts: 5
Joined: Sun Aug 18, 2013 6:07 pm

Re: An idea for a light switch.

Tue May 27, 2014 1:15 pm

Ok, thanks everyone for the help. By the way my dad said that he wouldn't directly help me because this is my project. He said he would supervise but I would have to do the research by my self. Thanks anyway

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

Re: An idea for a light switch.

Tue May 27, 2014 1:21 pm

Ninjafishleg wrote:

Code: Select all

[img]https://gqpt9w.dm2303.livefilestore.com/y2pDPeID5thbwVoqgxhiMe0lbUeDhJwr0U1olF37d0GlC96C-_O6xhLb6LqLjJhWIflNQDG2Jinszu3mL9uMTT4v632pYZNf6J34IBvN1MwmGE/WP_20140527_004.jpg[/img]
Your image doesn't work for two reasons, 1) it needs a microsoft login to access it & 2) it fails to display when you do that.

If you are working with mains voltages in the UK you need to have your installation inspected by a competent electrician who holds an NICEIC Part P certificate. 230V will kill.
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.

User avatar
Douglas6
Posts: 4739
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: An idea for a light switch.

Tue May 27, 2014 1:50 pm

I agree with all previous replies. The (relatively) safe way to accomplish this is to use something like this Powerswitch Tail 2. Find one appropriate for your mains voltage.

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

Re: An idea for a light switch.

Wed May 28, 2014 10:25 am

Ninjafishleg wrote:Hi,
I had an idea where I would take my light switch apart and attach my raspberry pi up to it using the gpio pins. I thought it would be awesome because then I could use SSH to control my light wirelessly. However I am not very good at circuitry and cannot think of a way of making a switch that I can turn on and off with the Pi. I dont know if that makes much sense so I have a image below that hopefully clears things up a bit. Also, by the way, I am currently just turning my light on by putting a wire between the white one and the black one and completing the circuit.

Image

Also, if someone has done this before - I'm sure they have - could you send a link so I could see how they done it. I am rubbish at electricity because I am 14 and haven't even done it in shool yet! This is my way of getting a head start.

Thanks!

Ps: this is my first time posting so I am sorry if I broke any forum rules, please tell me if I have!

Hiya

Avoid the mains electricity.

Start with a simple led project.

If you want to simulate controlling a bedroom light remotely, then find a battery powered night light (6 to 12 volts) and put a relay in the circuit.
Add some Pi circuitry and programming etc etc.

The risks are

Burns from an exploding battery, over-volting your Pi and killing it;
Both much less likely and lethal than playing with the mains.

If in doubt please ask.

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: An idea for a light switch.

Wed May 28, 2014 11:10 am

You'll get exactly the same answer on the Arduino forum (or any other responsible purveyor of answers) if you're asking questions at this level, you're not fit to be playing with mains electricity.
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

hampi
Posts: 223
Joined: Fri May 31, 2013 11:29 am
Contact: Website

Re: An idea for a light switch.

Wed May 28, 2014 11:26 am

Here is an example of modern LED lights available today http://www.led1.de . Some of these operate directly from 12 V or 24 V DC.

Return to “General discussion”