how to use the arduino uno for controlling light switches

so what i want to 1st if its possible for me to be in my bed and say something like arduino turn off the light and it turns off my ceiling light, and if it is possible how would i go about connecting the arduino to the lights.

Thanks in advance :smiley:

you need to use a relay.
check here http://www.instructables.com/id/Controlling-AC-light-using-Arduino-with-relay-modu/

The voice recognition part will be harder.

Do some reading to start:
https://www.google.com/search?hl=en&source=hp&q=arduino+voice+recognition&gbv=2&oq=arduino+voice+&gs_l=heirloom-hp.1.0.0l10.1080.3451.0.6501.14.10.0.2.2.0.190.1210.0j7.7.0....0...1ac.1.34.heirloom-hp..5.9.1240.Ey490tKnW1U

My setup isn't voice controlled (and it doesn't use an Arduino), but I have an [u]X-10[/u] controller next to my bed and several X-10 dimmer switches throughout the house. So, I can push a button next to my bed and turn-on (or dim) the bedroom overhead light, or my living room or front and back porch lights (I think I have 9 X-10 controlled dimmers & relays). I also have a programmable X-10 timer/controller that automatically turns-on (and dims) lights, plus an X-10 motion sensor.

I've never done it, but you CAN interface the Arduino with an X-10 system (more information [u]here[/u]). So if you can figure-out the voice recognition stuff on the Arduino you should be able to control your whole house if you wanted to!

Other home automation protocols/systems are Insteon, Z-Wave, ZigBee, and UPB.

I also have a "wake-up system" plugged into an X-10 relay. When the X-10 controller turns it on in the morning, it slowly fades-on a "reading" light above my bed in and it has a little beeper that starts after the light is fully-on. I did build the "wake-up system" with a microcontroller a long time ago, but it's not built around an Arduino.

For a simple quick setup, an x-10 CM17A "firecracker" only needs three wires to be operated by an arduino.

Another possibility is something like this.
http://www.dx.com/p/e27-to-e27-remote-control-light-bulb-socket-ac-110-250v-104755#.U6I1J7Gg6PY
Many of these RC light sockets use a SC2272 or clone decoder, of which there are Arduino libraries to generate
the data format needed.
All you then need is a cheap 433 Mhz ASK Transmitter.

Sparkfun have a speech recognition module

And this library works well with most 433 operated switches, I've managed to get it to work with at least 3 different brands including ones that have their own micro controllers (like WattsClever)

So this is totally do-able :wink: