Top Banner
This is a relatively simple controller for controlling equipment in your home. At the moment I control my central heating, security and lighting. By sending commands from my home computer. My homeeasy central heating controller hack. http://www.instructables.com /id/BampQ_homeeasy_home_automation_central_heating_c/ (http://www.instructables.com /id/BampQ_homeeasy_home_automation_central_heating_c/) I am also able to login remotely from the internet to control the equipment at home connected to this controller. This project is built around an Arduino board. http://www.arduino.cc/ (http://www.arduino.cc/) The arduino board is a hardware interface allowing you to control and monitor hardware devices with your computer. And the homeeasy home automation controllers available from B&Q. http://www.homeeasy.eu/home.php (http://www.homeeasy.eu/home.php) These are basically plug-in module which allows you to switch devices on and off using a remote control. The idea behind this project was. I wanted to be able to login to my home Related (http://cdn.instructables.com/FCN/M73Z/FU0HZ7ZZ/FCNM73ZFU0HZ7ZZ.LARGE.jpg) About This Instructable License: 199,778 views 284 favorites (/member /simon72post/) simon72post (/member /simon72post/) Follow 85 (/id/Motorbike-Phone-Alarm) (/id/Home-made-DIY- Grey-water-system-water-recycling) (/id/Charge-your-shaver- from-the-sun) More by simon72post Arduino (/tag/type-id/category-technology/keyword- arduino/) home automation (/tag/type-id/category-technology /keyword-home automation/) smart home (/tag/type-id/category-technology /keyword-smart home/) Tags: (/) let's make share what you make > (/about/submit.jsp) (/) Explore (/tag/type-id/) Create (/about/submit.jsp) Contests (/contest/) Community (/community/) Login (/you/) Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS 1 of 20 3/4/2014 4:22 PM
40
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: otomatisasi rumah

This is a relatively simple controller for controlling equipment in your home.

At the moment I control my central heating, security and lighting.By sending commands from my home computer.

My homeeasy central heating controller hack.http://www.instructables.com/id/BampQ_homeeasy_home_automation_central_heating_c/(http://www.instructables.com/id/BampQ_homeeasy_home_automation_central_heating_c/)

I am also able to login remotely from the internet to control the equipment athome connected to this controller.

This project is built around an Arduino board.

http://www.arduino.cc/ (http://www.arduino.cc/)

The arduino board is a hardware interface allowing you to control and monitorhardware devices with your computer.

And the homeeasy home automation controllers available from B&Q.

http://www.homeeasy.eu/home.php (http://www.homeeasy.eu/home.php)

These are basically plug-in module which allows you to switch devices on andoff using a remote control.

The idea behind this project was. I wanted to be able to login to my home Related

(http://cdn.instructables.com/FCN/M73Z/FU0HZ7ZZ/FCNM73ZFU0HZ7ZZ.LARGE.jpg)

About This Instructable

License:199,778 views

284 favorites

(/member/simon72post/)

simon72post (/member/simon72post/)

Follow 85

(/id/Motorbike-Phone-Alarm)

(/id/Home-made-DIY-Grey-water-system-water-recycling)

(/id/Charge-your-shaver-from-the-sun)

More by simon72post

Arduino (/tag/type-id/category-technology/keyword-

arduino/)

home automation (/tag/type-id/category-technology

/keyword-home automation/)

smart home (/tag/type-id/category-technology

/keyword-smart home/)

Tags:

(/)

let's make

share what you make

> (/about/submit.jsp)(/)

Explore (/tag/type-id/) Create (/about/submit.jsp) Contests (/contest/) Community (/community/)Login (/you/)

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

1 of 20 3/4/2014 4:22 PM

Page 2: otomatisasi rumah

computer and send commands that would allow me to turn lights on remotely.Or have the computer do it automatically at a set time or when it gets dark.

Step 1: Parts needed

1 arduino board.1 homeeasy controller - part number HE3001 prototype board - Vero board10 resistors - 47 ohm10 led's4 opto isolators - RS part 308-613Some ribbon cable.a strip of pins to connect to the headers on the arduino board.1 box - to put it all in.some HE302S - remote control socket

Tools

See More (/tag/type-id/?q=)

(http://cdn.instructables.com/FCN/M73Z/FU0HZ7ZZ/FCNM73ZFU0HZ7ZZ.LARGE.jpg)

(http://cdn.instructables.com/FYN/HAZK/FU0HZ81A/FYNHAZKFU0HZ81A.LARGE.jpg)

Smart Home Automationwith Voice command(/id/Smart-Home-Automation-with-Voice-command/)Smart home with arduinoand jubito (/id/jubito-client-for-android/)by jambel (/member/jambel/)

Control lights with thePebble smartwatch and theArduino (/id/Control-lights-with-the-Pebble-smartwatch-and-the-/)432 MHz wireless sensorsand power outlets for homeautomation using Arduino(/id/Wireless-power-outlets-for-home-automation-Turn on and off your thingswith a laser! (/id/Turn-on-and-off-your-things-with-a-laser/)by XicoMBD (/member

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

2 of 20 3/4/2014 4:22 PM

Page 3: otomatisasi rumah

Soldering ironSolderCutters

Step 2: Basic principle

Hardware

Basically the arduino board when programmed will switch the digital outputshigh.Which will send 5 volts through the resistor and light the led's.Which will activate the opto isolator which will connect the contacts on theremote control.which will send the comand to the remote control socketsAnd turn on or off the lights, heating or anything you want.

this circuit shown is for the first on and off switches.just repeat the circuit for the following channels

software

I programed the software so when I pressed (H) in the terminal the arduinoboard will send a 1 second pulse to my remote control and switch my heatingon.when I press(h) the board will send a 1 second pulse my heating switches off.(S) for security on(s) for security off(G) garden lights on(g) garden lights off

and so on this can be changed to any button you want

Step 3: Building the board

(http://cdn.instructables.com/F31/AVTS/FU0HZ819/F31AVTSFU0HZ819.LARGE.jpg)

(http://cdn.instructables.com/FD2/DLS1/FU0HZ81Y/FD2DLS1FU0HZ81Y.LARGE.jpg)

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

3 of 20 3/4/2014 4:22 PM

Page 4: otomatisasi rumah

The board I built on some prototype project board available from most electronicstores.

It was just a matter of soldering on the components as show in the circuitdiagram.And making sure there were no short circuits.

the first led connects to pin 1 on the opto isolator, led 2 connects to pin 4 on theopto isolator.pins 2 and 3 are then connected to ground. which is next to digital pin 13 on thearduino board.

opto isolator pins 6 and 7 are connected together and go to the center contacton the remote control for the first on off buttons.opto isolator pin 8 goes to the left track on the remote.pin 5 goes to the right track on the remote.

and then it's just a matter of repeating the circuit for the other channels.

(http://cdn.instructables.com/F11/AQTO/FU6LQWEA/F11AQTOFU6LQWEA.LARGE.jpg)

(http://cdn.instructables.com/FRH/DPZY/FU6LQWF7/FRHDPZYFU6LQWF7.LARGE.jpg)

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

4 of 20 3/4/2014 4:22 PM

Page 5: otomatisasi rumah

Step 4: Modifying the remote control

I unscrewed the screw under the rear label. And carefully prised open the case.

When open you will see the PCB.On the PCB there is one track on the left which when connected to the centrecontacts will switch devices on.And there is a track on the right which when connected to the centre contactswill switch equipment off.

I just attached the contacts to my circuit as shown in my diagram.

and soldered on a link in place of the remote switch.

Next I attached the battery to the 3v output on the arduino board.You don't have to do this. But I did it so I wouldn't need a battery in the remotecontrol.

Step 5: The software

(http://cdn.instructables.com/F68/UAC5/FU0HZ830/F68UAC5FU0HZ830.LARGE.jpg)

(http://cdn.instructables.com/FPV/153X/FU6LQWES/FPV153XFU6LQWES.LARGE.jpg)

(http://cdn.instructables.com/FZZ/JPCF/FU54UEEG/FZZJPCFFU54UEEG.LARGE.jpg)

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

5 of 20 3/4/2014 4:22 PM

Page 6: otomatisasi rumah

the arduino board is controlled from it's own software this can be downloadedfrom here.http://www.arduino.cc/en/Main/Software (http://www.arduino.cc/en/Main/Software)

you can then copy and paste this code in to the arduino software and upload itto the board.

char val; // variable to receive data from the serial portint ledpin = 2; // LED connected to pin 2 (on-board LED)

void setup(){pinMode(ledpin = 2, OUTPUT); // pin 2 (on-board LED) as OUTPUTpinMode(ledpin = 3, OUTPUT); // pin 3 (on-board LED) as OUTPUTpinMode(ledpin = 4, OUTPUT); // pin 4 (on-board LED) as OUTPUTpinMode(ledpin = 5, OUTPUT); // pin 5 (on-board LED) as OUTPUTpinMode(ledpin = 6, OUTPUT); // pin 6 (on-board LED) as OUTPUTpinMode(ledpin = 7, OUTPUT); // pin 7 (on-board LED) as OUTPUTpinMode(ledpin = 8, OUTPUT); // pin 8 (on-board LED) as OUTPUTpinMode(ledpin = 9, OUTPUT); // pin 9 (on-board LED) as OUTPUTpinMode(ledpin = 10, OUTPUT); // pin 9 (on-board LED) as OUTPUTpinMode(ledpin = 11, OUTPUT); // pin 9 (on-board LED) as OUTPUT

Serial.begin(9600); // start serial communication at 9600bps

}

void loop() {if( Serial.available() ) // if data is available to read{;}val = Serial.read(); // read it and store it in 'val'

if( val == 'h' ) // if '2' was received

{digitalWrite(ledpin = 2, HIGH); // turn ON the LED

(http://cdn.instructables.com/FQI/TAU1/FU54U9BQ/FQITAU1FU54U9BQ.LARGE.jpg)

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

6 of 20 3/4/2014 4:22 PM

Page 7: otomatisasi rumah

delay(1000); // waits for a secondSerial.println("h = Heating off");digitalWrite(ledpin, LOW); // sets the LED off

}if( val == 'H' ) // if '3' was received{digitalWrite(ledpin = 3, HIGH); // turn ON the LEDdelay(1000); // waits for a secondSerial.println("H = Heating on");digitalWrite(ledpin, LOW); // sets the LED off}if( val == 's' ) // if '4' was received{digitalWrite(ledpin = 4, HIGH); // turn ON the LEDdelay(1000); // waits for a secondSerial.println("s = gate off");digitalWrite(ledpin, LOW); // sets the LED off}if( val == 'S' ) // if '5' was received{digitalWrite(ledpin = 5, HIGH); // turn ON the LEDdelay(1000); // waits for a secondSerial.println("S = gate on");digitalWrite(ledpin, LOW); // sets the LED off}if( val == 'g' ) // if '6' was received{digitalWrite(ledpin = 6, HIGH); // turn ON the LEDdelay(1000); // waits for a secondSerial.println("g = Garden lights off");digitalWrite(ledpin, LOW); // sets the LED off}if( val == 'G' ) // if '7' was received{digitalWrite(ledpin = 7, HIGH); // turn ON the LEDdelay(1000); // waits for a secondSerial.println("G = Garden lights on");digitalWrite(ledpin, LOW); // sets the LED off}if( val == 'b' ) // if '8' was received{digitalWrite(ledpin = 8, HIGH); // turn ON the LEDdelay(1000); // waits for a secondSerial.println("b = Bedroom light off");digitalWrite(ledpin, LOW); // sets the LED off}if( val == 'B' ) // if '9' was received{digitalWrite(ledpin = 9, HIGH); // turn ON the LEDdelay(1000); // waits for a secondSerial.println("B = Bedroom light on");digitalWrite(ledpin, LOW); // sets the LED off}if( val == '9' ) // if '9' was received{digitalWrite(ledpin = 10, HIGH); // turn ON the LEDdelay(1000); // waits for a secondSerial.println("9");digitalWrite(ledpin, LOW); // sets the LED off}if( val == '0' ) // if '9' was received{digitalWrite(ledpin = 11, HIGH); // turn ON the LEDdelay(1000); // waits for a secondSerial.println("0");digitalWrite(ledpin, LOW); // sets the LED off}

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

7 of 20 3/4/2014 4:22 PM

Page 8: otomatisasi rumah

}

Step 6: Testing

After I had set up the homeeasy module to respond to the remote.(You can find out how to do this in the instructions for the modules.)

I loaded the software on to the arduino board.And ran the command (H)

And my heating switches on.I tested the other commands for the lights and security and they all respondedas planned.

Step 7: Final Assembly

(http://cdn.instructables.com/FOI/QWNW/FU0HZ82E/FOIQWNWFU0HZ82E.LARGE.jpg)

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

8 of 20 3/4/2014 4:22 PM

Page 9: otomatisasi rumah

the last job was to fix all the boards in a plastic box and made a hole for the USBto plug in to the arduino board.

You may find when the boards are in the box the range at which they work isshortened.If this happens you can mount the remote antenna on the out side of the box asI have done this to solved the problem I had with range. But you will have tokeep the leads short or they will effect the frequency at which the antenatransmits at.

Step 8: Controlling remotely from the internet method 1 and 2

(http://cdn.instructables.com/FNX/98PR/FU6LQWFL/FNX98PRFU6LQWFL.LARGE.jpg)

(http://cdn.instructables.com/FPU/KWSB/FU6LQWFK/FPUKWSBFU6LQWFK.LARGE.jpg)

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

9 of 20 3/4/2014 4:22 PM

Page 10: otomatisasi rumah

The computer I have connected to the arduino board is running Linux ubuntu.But this board will work with windows, mac and Linux.

I have 3 ways of remotely controlling the board from the internet at the moment.

The first way will work with any computer. And that is using VNC to remotelylogin and control the board from the desktop. There are other softwarealternatives to remotely login.

Such as windows remote desktop.

And log me in https://secure.logmein.com/home.asp?lang=en(https://secure.logmein.com/home.asp?lang=en)

The second way which I use most of the time because of security.

Is to login using the Linux SSH terminal from windows using a program calledputty.

(http://cdn.instructables.com/F2Q/2VU9/FU54U9CG/F2Q2VU9FU54U9CG.LARGE.jpg)

(http://cdn.instructables.com/F4W/Q5E6/FU54U9CF/F4WQ5E6FU54U9CF.LARGE.jpg)

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

10 of 20 3/4/2014 4:22 PM

Page 11: otomatisasi rumah

you can also you do it this way using a mac.

When logged in

You can find out which device the arduino board is, by typing this command.

ls /dev/tty*

You should get a screen like this.

My device is USB0 but this can be different.

Then you can send the command.

screen /dev/ttyUSB0 9600

to open the tty terminal.

When the tty terminal is open you can then type the command to turn the deviceon or off. I.e. G or g for garden lights.

And that is about it.

if you have any problems here are some more usefull commands.these comands will show you which tty services are running.ps -lt ttyUSB0ps ax | grep tty

this command will stop the service running.kill (job number)

Step 9: Controlling from the internet method 3 (using ascript)(even from my phone)

This is a new update I have just set up to alow me to control the arduino boardfrom any web browser.

I wanted to control my home automation from my phone but this was not veryeasy using VNC or SSH.

So installed webmin on my server this will give me full control of the machinefrom within a web browers.

In web min there is a page called command shell that will allow me to runcommands from the web browser.

I original tried to run the comands I was using in the SSH terminal. but theydidn't work in webmin.

(http://cdn.instructables.com/FNV/NO6R/FXETSNLM/FNVNO6RFXETSNLM.LARGE.jpg)

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

11 of 20 3/4/2014 4:22 PM

Page 12: otomatisasi rumah

So with help from my brother we wrote a script.

so now all I have to do is send a command like "home_auto h1" and the heatingwill switch on. or "home_auto h0" to switch the heating off.

so now it can all be controlled from my phone

here is a copy of the script.

#!/bin/bash

_usage () {echo "gl1 it will run this comand echo G > /dev/ttyUSB0 9600 and turn mygarden lights on"echo "gl0 it will run this comand echo g > /dev/ttyUSB0 9600 and turn mygarden lights off"echo "s1 it will run this comand echo S > /dev/ttyUSB0 9600 and turn my gateson"echo "s0 it will run this comand echo s > /dev/ttyUSB0 9600 and turn my gatesoff"echo "h1 it will run this comand echo H > /dev/ttyUSB0 9600 and turn myheating on"echo "h0 it will run this comand echo h > /dev/ttyUSB0 9600 and turn my heatingoff"echo "b21 it will run this comand echo B > /dev/ttyUSB0 9600 and turn mybedroom 2 lights on"echo "b20 it will run this comand echo b > /dev/ttyUSB0 9600 and turn mybedroom 2 lights off"echo "N it will run this comand echo N > /dev/ttyUSB0 9600 and turn next bankof outputs on for 5 seconds"echo "R it will run this comand echo R > /dev/ttyUSB0 9600 and turn the Relayon"echo "r it will run this comand echo r > /dev/ttyUSB0 9600 and turn the Relayoff"

}

case "$1" in

gl1)#garden lights on/bin/echo G > /dev/ttyUSB0 9600 && echo "Lights On";;

gl0)#garden lights off/bin/echo g > /dev/ttyUSB0 9600 && echo "Lights Off";;

s1)# gates on/bin/echo S > /dev/ttyUSB0 9600 && echo "Gates On";;

s0)# gates off/bin/echo s > /dev/ttyUSB0 9600 && echo "Gates Off";;

h1)#heating on/bin/echo H > /dev/ttyUSB0 9600 && echo "Heating on";;

h0)# heating off

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

12 of 20 3/4/2014 4:22 PM

Page 13: otomatisasi rumah

/bin/echo h > /dev/ttyUSB0 9600 && echo "Heating Off";;

b21)# bedroom 2 lights on/bin/echo B > /dev/ttyUSB0 9600 && echo "Bedroom 2 Lights On";;

b20)#bedroom 2 lights off/bin/echo b > /dev/ttyUSB0 9600 && echo "Bedroom 2 Lights Off";;

N)#Next Bank on/bin/echo N > /dev/ttyUSB0 9600 && echo "Next Bank on for 5 seconds";;

R)#Relay on/bin/echo R > /dev/ttyUSB0 9600 && echo "Relay on";;

r)#Relay off/bin/echo r > /dev/ttyUSB0 9600 && echo "Relay off";;

*)#echo $0 ": Not a valid command";echo "Please retype command";_usage;;;

esac

Step 10: Updates and upgrades

Update

I have now added the option of switching to the next set of button. It was just amatter of wiring in a spdt relay.

so when the relay is off the first bank of buttons are selected.

and when the relay is energised the second bank of buttons are selected.

I have also added a second relay incase I want to conect anything up in thefuture.

Step 11: Future upgrades

I am now in the process of connecting light and tempiture sensors to the arduinoboard.which can help automate devices.

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

13 of 20 3/4/2014 4:22 PM

Page 14: otomatisasi rumah

Make Comment

(/member/Tbus/)

28 days ago Reply (CJVJ0XIHR0AXOFB)

(/member/andylphillips/)

9 months ago Reply (CJH3HMLHGH6RXLO)

(/member/MechEngineerMike/)

1 month ago Reply (C8NH65WHQRO1TJ1)

(/member/D_Ghost01/)

9 months ago Reply (C7NPDPTHGH70PHU)

Tbus (/member/Tbus/)

This was a great project to complete after I took an entry-level learn at homecourse. (http://www.ciebookstore.com/home-automation-instal...(http://www.ciebookstore.com/home-automation-installation)) It's nice having a labto complete after learning about home automation installation techniques andapply what I learned from my course! Thank you.

andylphillips (/member/andylphillips/)

I am interested in building a temperature controller for heating the mash water forbrewing beer. I bought the HomeEasy HE300 and a HomeEasy socket, but thedesign of the HE300 circuit board has changed and I can't figure out how toconnect it to the Arduino board. Has anyone out there used the newer HE300 andcan identify the connections to make?Thanks Andy

MechEngineerMike (/member/MechEngineerMike/) andylphillips

Christ on a cookiesheet! That isgoing to turn out to be a difficultproject for you, guaranteed. Thereare easier & cheaper ways of puttingtogether a temperature controller.Check out this baby from amazon:http://www.amazon.com/AGPtek-Temperature-Controlle...(http://www.amazon.com/AGPtek-Temperature-Controller-TA4-SNRWith-alarm/dp/B00BVWYHVO/ref=lp_306533011_1_7?s=industrial&ie=UTF8&qid=1390499094&sr=1-7)Thats right, $25 gets you PIDcontrol...! (youll have to buy a $6thermocouple, and a $5 solid staterelay, plus what ever heaters youwant to use.

D_Ghost01 (/member/D_Ghost01/)

Hello,Could anyone email the document regarding Arduino Home automation to [email protected]

Thank you,

77777777 (/member/77777777/)

hiiii want to prepare it, but

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

14 of 20 3/4/2014 4:22 PM

Page 15: otomatisasi rumah

1 year ago Reply (C289S8FH8CVIAM8)

(/member/77777777/)

(/member/77777777/)

1 year ago Reply (CD5CJOTH8CVFOJK)

(/member/Matrixis/)

4 years ago Reply (CFFS5SKG68H9L4I)

(/member/gsalerni/)

1 year ago Reply (CG9YD0CH006ACTQ)

(/member/mojud/)

2 years ago Reply (CFO9SC5GZ0BVVSH)

(/member/Teknopuppy/)

2 years ago Reply (CY5R0JQGM9QKLR1)

if i try to control 10 system withthis project than ,can i doit??????reply

77777777 (/member/77777777/)

thats so good budy.now i can prepare it for my home.....

Matrixis (/member/Matrixis/)

Doing a home automation project myself using these sockets and an arduino.

The main differences are that my project uses the ethernet shield and iscontrollable via some custom software on my mobile phone over the internetPlus that I use a 433Mhz AM transmitter and a library I created by researchingother peoples work that reverse-engineered the protocol.I can transmit the code for the old simple protocol(sockets have dial on back) andthe advanced protocol (socket have small button on front). So i can actuallycontrol millions of sockets all from 1 pin on my arduino.

I have timers for turning on and off electric heating, water and even my electricblanket on my bed , plus I have an output for controlling my electric door lock so Ican actually let in a friend when I'm not there if they call me.

Code is getting rather big now as I keep adding things and might have to upgradeto a mega just for the extra space :p

Who knew such a small device could take up most of my free time. ( I own 2 andprobably more soon).

With regards to your own project, great work and if ya want to upgrade yourproject to using a dedicated 433Mhz transmitter, just give me a shout and cansend you my library with instruction on how to use it.

gsalerni (/member/gsalerni/) Matrixis

Hi Matrixis,I'd love to extend the home easy setup using Arduino to create a low costmain controller and low cost input devices which seem to be missing fromthe range (temp sensors, light sensors etc.)Would you mind sharing your library and transmitter design?many thanksGuy

mojud (/member/mojud/) Matrixis

Hi Matrixis,

Do u mind sharing the library with me too?

Thanks,Mojud

Teknopuppy (/member/Teknopuppy/) Matrixis

Hi,

Matrixis,

i insterested in your project , can ushare it with me.

thanks,

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

15 of 20 3/4/2014 4:22 PM

Page 16: otomatisasi rumah

(/member/squirrelsnuts/)

2 years ago Reply (CWD9WYRGPBD3Y9H)

(/member/mbainrot/)

2 years ago Reply (CLPRPBWGXUZEVM3)

(/member/jimmer22/)

2 years ago Reply (CI2VP0WGUD897Y6)

(/member/Teknopuppy/)

2 years ago Reply (CLCAZMGGM9QKLR7)

(/member/TOCO/)

3 years ago Reply (COUOTLKGDNJ48MA)

(/member/mman1506/)

3 years ago Reply (CGY0R56GBQ9MXUS)

jimmy

squirrelsnuts (/member/squirrelsnuts/)

Holy crap! This is awesome! I've been researching X10, Insteon, misterhouse,arduino, thermostats, lights ad naseum to start doing something like this. I wasfocused on the Insteon PowerLinc modem to hook up to my computer, but I neverthought of hooking into a remote... genius! Opens all kinds of possibilities!

Question though.... why the opto isolators? I don't know electronics very well (butI'm learning!)

mbainrot (/member/mbainrot/) squirrelsnuts

Opto Isolator (aka opto coupler)provide optical isolation from themains circuit. The idea behind it is ifsomething goes wrong your microdoesn't get fried and protects themicro from EMF noise.

When you working with noisy loads(such as heavy mains switching viarelays) the opto will usually preventthe micro from spazzing out (due toit switching, copping an emf whack,crashing, then rinse and repeating)

jimmer22 (/member/jimmer22/)

This is amazing in terms of smart home products. I came acrosshttp://sabinessmarthome.com the other day and saw some cool and usefulproducts for home automation as well

Teknopuppy (/member/Teknopuppy/)

hi,

simon,

can i use different remote control.

Thanks,

Jimmy

TOCO (/member/TOCO/)

Where can I get the block of 10 leds? I have looked for them but I cant find themanywhere. Can you post a link or something?

mman1506 (/member/mman1506/)

thank you !! i was looking for months to find a alternative to transitors and powerhungry relays i never thought of using opto-isolators

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

16 of 20 3/4/2014 4:22 PM

Page 17: otomatisasi rumah

(/member/Yakumo/)

3 years ago Reply (C70KU63G7DY6HOG)

(/member/purpulhaze/)

4 years ago Reply (C587LVHG69MV2QH)

(/member/purpulhaze/)

4 years ago Reply (C0139L3G69MV3TY)

(/member/purpulhaze/)

4 years ago Reply (CNJ3U18G619L3IL)

(/member/flemron/)

4 years ago Reply (CR7SRY6G1BBHGUM)

(/member/killersquirel11/)

4 years ago Reply (C0HWDW6G4PBWVA1)

(/member/rk24/)

4 years ago Reply (CCY6W0XG33OXT0V)

(/member/simon72post/)

4 years ago Reply (CMF4RMLG2WM20Q0)

Yakumo (/member/Yakumo/)

Thank You for this wonderful idea. I'm using a different remote system buteverything works fine thanks to you :)

i seriously need to add some flat cables to my next project...its works but it looksvery ugly ^^'

purpulhaze (/member/purpulhaze/)

Can you explain in a lil more detail of how to communicate via SSH. I havefreeSSH server running on my windows xp machine. I can connect but none of thecommands are recognized. Am I missing something here?

purpulhaze (/member/purpulhaze/) purpulhaze

I think I'm missing something here butI'm not sure. I don't think it can bedone without something else.

purpulhaze (/member/purpulhaze/)

Kinda new to scripts just want to make sure. I add this script somewhere in myarduino sketch?

flemron (/member/flemron/)

if( val == 'B' ) // if '9' was receivedif( val == '9' ) // if '9' was receivedif( val == '0' ) // if '9' was received

is this correct?

killersquirel11 (/member/killersquirel11/) flemron

Technically, no, but it will work sinceits just the comments that arescrewed up. Should readif( val == 'B' ) // if 'B ' was receivedif( val == '9' ) // if '9 ' was receivedif( val == '0' ) // if '0 ' was receivedbut the code will still compile thesame either way

rk24 (/member/rk24/)

Thanks a lot!!!!!

look this: "instructables.com/id/we-controlled-valentine"

Can you make more digital outputs for that?

T_T please I need a web controlled pcb with 8 outputs...

I've tried but ....fail...

simon72post (/member/simon72post/) (author)

Hi the server software I used was webmin. www.webmin.com/(http://www.webmin.com/)

rk24 (/member/rk24/)

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

17 of 20 3/4/2014 4:22 PM

Page 18: otomatisasi rumah

4 years ago Reply (C6AMN3ZG2WLYCZA)

(/member/rk24/)

(/member/WillTheRescue/)

4 years ago Reply (CN3FW50G068MH5I)

(/member/simon72post/)

4 years ago Reply (CXUVZAIG0AMK20W)

(/member/get+to+da+parakeet/)

4 years ago Reply (CZ4N7Z3FU6LZPI4)

(/member/simon72post/)

4 years ago Reply (CJWAC6DFU6M01GJ)

(/member/get+to+da+parakeet/)

4 years ago Reply (CSDI914FVW22SUX)

(/member/ReCreate/)

4 years ago Reply (CMVWXQ2FZQ1FNA0)

(/member/andrew101/)

4 years ago Reply (CGIZ9R7FXR6YPBE)

can you post your webserver? please

WillTheRescue (/member/WillTheRescue/)

Why does your Arduino programing interface have a space to input a letter andmine doesn't?

simon72post (/member/simon72post/) (author) WillTheRescue

in the arduino software click thebutton on the right to open the serialterminal.

get to da parakeet (/member/get+to+da+parakeet/)

Hey! i got somthing for you. the cheaper,quicker way is to use relays :P

simon72post (/member/simon72post/) (author) get to da parakeet

Hi I was going to use relays originally.But I had these bits laying around.This is all powered from the arduinoboard. running relays from thearduino board could overload it ifthere are a few on at the same time.

get to da parakeet (/member/get+to+da+parakeet/) simon72post

Well, That REALLY all sepends onwhere you get them.in the USA, theres this thing called ahamfest for/and computer showwhere you can get alot of cheep stuff.

i controll my relays with the dccontroller shield found on arduino'swebsite =P

ReCreate (/member/ReCreate/) get to da parakeet

Or you can control the relays withanother low power relay...

andrew101 (/member/andrew101/) get to da parakeet

haha, this i would like to see. someguy just randomly re-wiring his houseusing relays. that is a fire wating tohappen. plus the fact this is alreadywireless, if you were to use relays youwould need to either 1. run wiresacross your house or 2. find awireless alternative. if you usewireless, it will either be cheap andunreliable or really expensive. eitherway this method here seems like abetter choice to me really.

raathi2009 (/member/raathi2009/)

Sir! I need the detailed schematic. please help me sir. Or any other ways to get [email protected]

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

18 of 20 3/4/2014 4:22 PM

Page 19: otomatisasi rumah

4 years ago Reply (CKDRD5WFVDC2XD4)

(/member/raathi2009/)

(/member/i0scan/)

4 years ago Reply (CRYDBODFU6LTM9H)

(/member/simon72post/)

4 years ago Reply (C6Z1SFXFU6M01GA)

(/member/i0scan/)

4 years ago Reply (CFEZX9KFU6M06Y8)

(/member/thrhymes/)

4 years ago Reply (CCE1O1OFU6LZVMY)

(/member/westfw/)

4 years ago Reply (CCWP90FFU6LTH43)

Make Comment

i0scan (/member/i0scan/)

Where did you get the project box that you used!?

simon72post (/member/simon72post/) (author) i0scan

I just used an old box I had layingaround. I think it came from maplinsoriginally

i0scan (/member/i0scan/) simon72post

Thanks!

thrhymes (/member/thrhymes/)

thank you for the inspiring instructable i will try this....

westfw (/member/westfw/)

I really like the idea of putting the LEDs in series with the optoisolator inputs soyou can see what's going on!

About UsWho We Are (/about/)Advertise (/advertise/)Contact (/about/contact.jsp)Jobs (/community/Positions-available-at-Instructables/)Help (/community?categoryGroup=Help)

Find UsFacebook (http://www.facebook.com/instructables)

Youtube (http://www.youtube.com/user/instructablestv)

Twitter (http://www.twitter.com/instructables)

Pinterest (http://www.pinterest.com/instructables)

Google+ (https://plus.google.com/+instructables)

ResourcesFor Teachers (/teachers/)Artists in Residence (/group/air/)Gift Pro Account (/account/give?sourcea=footer)Forums (/community/)Answers (/tag/type-question/?sort=RECENT)

MobileDownload our new apps foriOS and android!

Android (https://play.google.com/store

/apps/details?id=com.adsk.instructables)

iOS(https://itunes.apple.com

/app/instructables/id586765571)

Join our newsletter:

Terms of service (http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21959721) |Privacy Policy (http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21292079) | Legal Notices & Trademarks (http://usa.autodesk.com/legal-notices-trademarks/) |Mobile Site (http://m.instructables.com) (http://usa.autodesk.com/adsk/servlet/pc/index?id=20781545&siteID=123112)

Join!

All content on Instructables including How To's, Downloads, Images, Comments are © Copyright 2014 Autodesk Inc. All rights reserved.

Englishenter email

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

19 of 20 3/4/2014 4:22 PM

Page 20: otomatisasi rumah

Go Pro Today » (/account/gopro?sourcea=footer)

We're Hiring! » (/community/Positions-available-at-Instructables/)

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

20 of 20 3/4/2014 4:22 PM

Page 21: otomatisasi rumah

This is a relatively simple controller for controlling equipment in your home.

At the moment I control my central heating, security and lighting.By sending commands from my home computer.

My homeeasy central heating controller hack.http://www.instructables.com/id/BampQ_homeeasy_home_automation_central_heating_c/(http://www.instructables.com/id/BampQ_homeeasy_home_automation_central_heating_c/)

I am also able to login remotely from the internet to control the equipment athome connected to this controller.

This project is built around an Arduino board.

http://www.arduino.cc/ (http://www.arduino.cc/)

The arduino board is a hardware interface allowing you to control and monitorhardware devices with your computer.

And the homeeasy home automation controllers available from B&Q.

http://www.homeeasy.eu/home.php (http://www.homeeasy.eu/home.php)

These are basically plug-in module which allows you to switch devices on andoff using a remote control.

The idea behind this project was. I wanted to be able to login to my home

Related

(http://cdn.instructables.com/FCN/M73Z/FU0HZ7ZZ/FCNM73ZFU0HZ7ZZ.LARGE.jpg)

About This Instructable

License:199,778 views

284 favorites

(/member/simon72post/)

simon72post (/member/simon72post/)

Follow 85

(/id/Motorbike-Phone-Alarm)

(/id/Home-made-DIY-Grey-water-system-water-recycling)

(/id/Charge-your-shaver-from-the-sun)

More by simon72post

Arduino (/tag/type-id/category-technology/keyword-

arduino/)

home automation (/tag/type-id/category-technology

/keyword-home automation/)

smart home (/tag/type-id/category-technology

/keyword-smart home/)

Tags:

Smart Home Automationwith Voice command(/id/Smart-Home-Automation-with-Voice-command/)Smart home with arduinoand jubito (/id/jubito-client-for-android/)by jambel (/member/jambel/)

Control lights with thePebble smartwatch and theArduino (/id/Control-lights-with-the-Pebble-smartwatch-and-the-/)

(/)

let's make

share what you make

> (/about/submit.jsp)(/)

Explore (/tag/type-id/) Create (/about/submit.jsp) Contests (/contest/) Community (/community/)Login (/you/)

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

1 of 20 3/4/2014 4:25 PM

Page 22: otomatisasi rumah

computer and send commands that would allow me to turn lights on remotely.Or have the computer do it automatically at a set time or when it gets dark.

Step 1: Parts needed

1 arduino board.1 homeeasy controller - part number HE3001 prototype board - Vero board10 resistors - 47 ohm10 led's4 opto isolators - RS part 308-613Some ribbon cable.a strip of pins to connect to the headers on the arduino board.1 box - to put it all in.some HE302S - remote control socket

Tools

See More (/tag/type-id/?q=)

(http://cdn.instructables.com/FCN/M73Z/FU0HZ7ZZ/FCNM73ZFU0HZ7ZZ.LARGE.jpg)

(http://cdn.instructables.com/FYN/HAZK/FU0HZ81A/FYNHAZKFU0HZ81A.LARGE.jpg)

432 MHz wireless sensorsand power outlets for homeautomation using Arduino(/id/Wireless-power-outlets-for-home-automation-Turn on and off your thingswith a laser! (/id/Turn-on-and-off-your-things-with-a-laser/)by XicoMBD (/member

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

2 of 20 3/4/2014 4:25 PM

Page 23: otomatisasi rumah

Soldering ironSolderCutters

Step 2: Basic principle

Hardware

Basically the arduino board when programmed will switch the digital outputshigh.Which will send 5 volts through the resistor and light the led's.Which will activate the opto isolator which will connect the contacts on theremote control.which will send the comand to the remote control socketsAnd turn on or off the lights, heating or anything you want.

this circuit shown is for the first on and off switches.just repeat the circuit for the following channels

software

I programed the software so when I pressed (H) in the terminal the arduinoboard will send a 1 second pulse to my remote control and switch my heatingon.when I press(h) the board will send a 1 second pulse my heating switches off.(S) for security on(s) for security off(G) garden lights on(g) garden lights off

and so on this can be changed to any button you want

Step 3: Building the board

(http://cdn.instructables.com/F31/AVTS/FU0HZ819/F31AVTSFU0HZ819.LARGE.jpg)

(http://cdn.instructables.com/FD2/DLS1/FU0HZ81Y/FD2DLS1FU0HZ81Y.LARGE.jpg)

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

3 of 20 3/4/2014 4:25 PM

Page 24: otomatisasi rumah

The board I built on some prototype project board available from most electronicstores.

It was just a matter of soldering on the components as show in the circuitdiagram.And making sure there were no short circuits.

the first led connects to pin 1 on the opto isolator, led 2 connects to pin 4 on theopto isolator.pins 2 and 3 are then connected to ground. which is next to digital pin 13 on thearduino board.

opto isolator pins 6 and 7 are connected together and go to the center contacton the remote control for the first on off buttons.opto isolator pin 8 goes to the left track on the remote.pin 5 goes to the right track on the remote.

and then it's just a matter of repeating the circuit for the other channels.

(http://cdn.instructables.com/F11/AQTO/FU6LQWEA/F11AQTOFU6LQWEA.LARGE.jpg)

(http://cdn.instructables.com/FRH/DPZY/FU6LQWF7/FRHDPZYFU6LQWF7.LARGE.jpg)

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

4 of 20 3/4/2014 4:25 PM

Page 25: otomatisasi rumah

Step 4: Modifying the remote control

I unscrewed the screw under the rear label. And carefully prised open the case.

When open you will see the PCB.On the PCB there is one track on the left which when connected to the centrecontacts will switch devices on.And there is a track on the right which when connected to the centre contactswill switch equipment off.

I just attached the contacts to my circuit as shown in my diagram.

and soldered on a link in place of the remote switch.

Next I attached the battery to the 3v output on the arduino board.You don't have to do this. But I did it so I wouldn't need a battery in the remotecontrol.

Step 5: The software

(http://cdn.instructables.com/F68/UAC5/FU0HZ830/F68UAC5FU0HZ830.LARGE.jpg)

(http://cdn.instructables.com/FPV/153X/FU6LQWES/FPV153XFU6LQWES.LARGE.jpg)

(http://cdn.instructables.com/FZZ/JPCF/FU54UEEG/FZZJPCFFU54UEEG.LARGE.jpg)

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

5 of 20 3/4/2014 4:25 PM

Page 26: otomatisasi rumah

the arduino board is controlled from it's own software this can be downloadedfrom here.http://www.arduino.cc/en/Main/Software (http://www.arduino.cc/en/Main/Software)

you can then copy and paste this code in to the arduino software and upload itto the board.

char val; // variable to receive data from the serial portint ledpin = 2; // LED connected to pin 2 (on-board LED)

void setup(){pinMode(ledpin = 2, OUTPUT); // pin 2 (on-board LED) as OUTPUTpinMode(ledpin = 3, OUTPUT); // pin 3 (on-board LED) as OUTPUTpinMode(ledpin = 4, OUTPUT); // pin 4 (on-board LED) as OUTPUTpinMode(ledpin = 5, OUTPUT); // pin 5 (on-board LED) as OUTPUTpinMode(ledpin = 6, OUTPUT); // pin 6 (on-board LED) as OUTPUTpinMode(ledpin = 7, OUTPUT); // pin 7 (on-board LED) as OUTPUTpinMode(ledpin = 8, OUTPUT); // pin 8 (on-board LED) as OUTPUTpinMode(ledpin = 9, OUTPUT); // pin 9 (on-board LED) as OUTPUTpinMode(ledpin = 10, OUTPUT); // pin 9 (on-board LED) as OUTPUTpinMode(ledpin = 11, OUTPUT); // pin 9 (on-board LED) as OUTPUT

Serial.begin(9600); // start serial communication at 9600bps

}

void loop() {if( Serial.available() ) // if data is available to read{;}val = Serial.read(); // read it and store it in 'val'

if( val == 'h' ) // if '2' was received

{digitalWrite(ledpin = 2, HIGH); // turn ON the LED

(http://cdn.instructables.com/FQI/TAU1/FU54U9BQ/FQITAU1FU54U9BQ.LARGE.jpg)

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

6 of 20 3/4/2014 4:25 PM

Page 27: otomatisasi rumah

delay(1000); // waits for a secondSerial.println("h = Heating off");digitalWrite(ledpin, LOW); // sets the LED off

}if( val == 'H' ) // if '3' was received{digitalWrite(ledpin = 3, HIGH); // turn ON the LEDdelay(1000); // waits for a secondSerial.println("H = Heating on");digitalWrite(ledpin, LOW); // sets the LED off}if( val == 's' ) // if '4' was received{digitalWrite(ledpin = 4, HIGH); // turn ON the LEDdelay(1000); // waits for a secondSerial.println("s = gate off");digitalWrite(ledpin, LOW); // sets the LED off}if( val == 'S' ) // if '5' was received{digitalWrite(ledpin = 5, HIGH); // turn ON the LEDdelay(1000); // waits for a secondSerial.println("S = gate on");digitalWrite(ledpin, LOW); // sets the LED off}if( val == 'g' ) // if '6' was received{digitalWrite(ledpin = 6, HIGH); // turn ON the LEDdelay(1000); // waits for a secondSerial.println("g = Garden lights off");digitalWrite(ledpin, LOW); // sets the LED off}if( val == 'G' ) // if '7' was received{digitalWrite(ledpin = 7, HIGH); // turn ON the LEDdelay(1000); // waits for a secondSerial.println("G = Garden lights on");digitalWrite(ledpin, LOW); // sets the LED off}if( val == 'b' ) // if '8' was received{digitalWrite(ledpin = 8, HIGH); // turn ON the LEDdelay(1000); // waits for a secondSerial.println("b = Bedroom light off");digitalWrite(ledpin, LOW); // sets the LED off}if( val == 'B' ) // if '9' was received{digitalWrite(ledpin = 9, HIGH); // turn ON the LEDdelay(1000); // waits for a secondSerial.println("B = Bedroom light on");digitalWrite(ledpin, LOW); // sets the LED off}if( val == '9' ) // if '9' was received{digitalWrite(ledpin = 10, HIGH); // turn ON the LEDdelay(1000); // waits for a secondSerial.println("9");digitalWrite(ledpin, LOW); // sets the LED off}if( val == '0' ) // if '9' was received{digitalWrite(ledpin = 11, HIGH); // turn ON the LEDdelay(1000); // waits for a secondSerial.println("0");digitalWrite(ledpin, LOW); // sets the LED off}

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

7 of 20 3/4/2014 4:25 PM

Page 28: otomatisasi rumah

}

Step 6: Testing

After I had set up the homeeasy module to respond to the remote.(You can find out how to do this in the instructions for the modules.)

I loaded the software on to the arduino board.And ran the command (H)

And my heating switches on.I tested the other commands for the lights and security and they all respondedas planned.

Step 7: Final Assembly

(http://cdn.instructables.com/FOI/QWNW/FU0HZ82E/FOIQWNWFU0HZ82E.LARGE.jpg)

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

8 of 20 3/4/2014 4:25 PM

Page 29: otomatisasi rumah

the last job was to fix all the boards in a plastic box and made a hole for the USBto plug in to the arduino board.

You may find when the boards are in the box the range at which they work isshortened.If this happens you can mount the remote antenna on the out side of the box asI have done this to solved the problem I had with range. But you will have tokeep the leads short or they will effect the frequency at which the antenatransmits at.

Step 8: Controlling remotely from the internet method 1 and 2

(http://cdn.instructables.com/FNX/98PR/FU6LQWFL/FNX98PRFU6LQWFL.LARGE.jpg)

(http://cdn.instructables.com/FPU/KWSB/FU6LQWFK/FPUKWSBFU6LQWFK.LARGE.jpg)

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

9 of 20 3/4/2014 4:25 PM

Page 30: otomatisasi rumah

The computer I have connected to the arduino board is running Linux ubuntu.But this board will work with windows, mac and Linux.

I have 3 ways of remotely controlling the board from the internet at the moment.

The first way will work with any computer. And that is using VNC to remotelylogin and control the board from the desktop. There are other softwarealternatives to remotely login.

Such as windows remote desktop.

And log me in https://secure.logmein.com/home.asp?lang=en(https://secure.logmein.com/home.asp?lang=en)

The second way which I use most of the time because of security.

Is to login using the Linux SSH terminal from windows using a program calledputty.

(http://cdn.instructables.com/F2Q/2VU9/FU54U9CG/F2Q2VU9FU54U9CG.LARGE.jpg)

(http://cdn.instructables.com/F4W/Q5E6/FU54U9CF/F4WQ5E6FU54U9CF.LARGE.jpg)

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

10 of 20 3/4/2014 4:25 PM

Page 31: otomatisasi rumah

you can also you do it this way using a mac.

When logged in

You can find out which device the arduino board is, by typing this command.

ls /dev/tty*

You should get a screen like this.

My device is USB0 but this can be different.

Then you can send the command.

screen /dev/ttyUSB0 9600

to open the tty terminal.

When the tty terminal is open you can then type the command to turn the deviceon or off. I.e. G or g for garden lights.

And that is about it.

if you have any problems here are some more usefull commands.these comands will show you which tty services are running.ps -lt ttyUSB0ps ax | grep tty

this command will stop the service running.kill (job number)

Step 9: Controlling from the internet method 3 (using ascript)(even from my phone)

This is a new update I have just set up to alow me to control the arduino boardfrom any web browser.

I wanted to control my home automation from my phone but this was not veryeasy using VNC or SSH.

So installed webmin on my server this will give me full control of the machinefrom within a web browers.

In web min there is a page called command shell that will allow me to runcommands from the web browser.

I original tried to run the comands I was using in the SSH terminal. but theydidn't work in webmin.

(http://cdn.instructables.com/FNV/NO6R/FXETSNLM/FNVNO6RFXETSNLM.LARGE.jpg)

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

11 of 20 3/4/2014 4:25 PM

Page 32: otomatisasi rumah

So with help from my brother we wrote a script.

so now all I have to do is send a command like "home_auto h1" and the heatingwill switch on. or "home_auto h0" to switch the heating off.

so now it can all be controlled from my phone

here is a copy of the script.

#!/bin/bash

_usage () {echo "gl1 it will run this comand echo G > /dev/ttyUSB0 9600 and turn mygarden lights on"echo "gl0 it will run this comand echo g > /dev/ttyUSB0 9600 and turn mygarden lights off"echo "s1 it will run this comand echo S > /dev/ttyUSB0 9600 and turn my gateson"echo "s0 it will run this comand echo s > /dev/ttyUSB0 9600 and turn my gatesoff"echo "h1 it will run this comand echo H > /dev/ttyUSB0 9600 and turn myheating on"echo "h0 it will run this comand echo h > /dev/ttyUSB0 9600 and turn my heatingoff"echo "b21 it will run this comand echo B > /dev/ttyUSB0 9600 and turn mybedroom 2 lights on"echo "b20 it will run this comand echo b > /dev/ttyUSB0 9600 and turn mybedroom 2 lights off"echo "N it will run this comand echo N > /dev/ttyUSB0 9600 and turn next bankof outputs on for 5 seconds"echo "R it will run this comand echo R > /dev/ttyUSB0 9600 and turn the Relayon"echo "r it will run this comand echo r > /dev/ttyUSB0 9600 and turn the Relayoff"

}

case "$1" in

gl1)#garden lights on/bin/echo G > /dev/ttyUSB0 9600 && echo "Lights On";;

gl0)#garden lights off/bin/echo g > /dev/ttyUSB0 9600 && echo "Lights Off";;

s1)# gates on/bin/echo S > /dev/ttyUSB0 9600 && echo "Gates On";;

s0)# gates off/bin/echo s > /dev/ttyUSB0 9600 && echo "Gates Off";;

h1)#heating on/bin/echo H > /dev/ttyUSB0 9600 && echo "Heating on";;

h0)# heating off

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

12 of 20 3/4/2014 4:25 PM

Page 33: otomatisasi rumah

/bin/echo h > /dev/ttyUSB0 9600 && echo "Heating Off";;

b21)# bedroom 2 lights on/bin/echo B > /dev/ttyUSB0 9600 && echo "Bedroom 2 Lights On";;

b20)#bedroom 2 lights off/bin/echo b > /dev/ttyUSB0 9600 && echo "Bedroom 2 Lights Off";;

N)#Next Bank on/bin/echo N > /dev/ttyUSB0 9600 && echo "Next Bank on for 5 seconds";;

R)#Relay on/bin/echo R > /dev/ttyUSB0 9600 && echo "Relay on";;

r)#Relay off/bin/echo r > /dev/ttyUSB0 9600 && echo "Relay off";;

*)#echo $0 ": Not a valid command";echo "Please retype command";_usage;;;

esac

Step 10: Updates and upgrades

Update

I have now added the option of switching to the next set of button. It was just amatter of wiring in a spdt relay.

so when the relay is off the first bank of buttons are selected.

and when the relay is energised the second bank of buttons are selected.

I have also added a second relay incase I want to conect anything up in thefuture.

Step 11: Future upgrades

I am now in the process of connecting light and tempiture sensors to the arduinoboard.which can help automate devices.

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

13 of 20 3/4/2014 4:25 PM

Page 34: otomatisasi rumah

Make Comment

(/member/Tbus/)

28 days ago Reply (CJVJ0XIHR0AXOFB)

(/member/andylphillips/)

9 months ago Reply (CJH3HMLHGH6RXLO)

(/member/MechEngineerMike/)

1 month ago Reply (C8NH65WHQRO1TJ1)

(/member/D_Ghost01/)

9 months ago Reply (C7NPDPTHGH70PHU)

Tbus (/member/Tbus/)

This was a great project to complete after I took an entry-level learn at homecourse. (http://www.ciebookstore.com/home-automation-instal...(http://www.ciebookstore.com/home-automation-installation)) It's nice having a labto complete after learning about home automation installation techniques andapply what I learned from my course! Thank you.

andylphillips (/member/andylphillips/)

I am interested in building a temperature controller for heating the mash water forbrewing beer. I bought the HomeEasy HE300 and a HomeEasy socket, but thedesign of the HE300 circuit board has changed and I can't figure out how toconnect it to the Arduino board. Has anyone out there used the newer HE300 andcan identify the connections to make?Thanks Andy

MechEngineerMike (/member/MechEngineerMike/) andylphillips

Christ on a cookiesheet! That isgoing to turn out to be a difficultproject for you, guaranteed. Thereare easier & cheaper ways of puttingtogether a temperature controller.Check out this baby from amazon:http://www.amazon.com/AGPtek-Temperature-Controlle...(http://www.amazon.com/AGPtek-Temperature-Controller-TA4-SNRWith-alarm/dp/B00BVWYHVO/ref=lp_306533011_1_7?s=industrial&ie=UTF8&qid=1390499094&sr=1-7)Thats right, $25 gets you PIDcontrol...! (youll have to buy a $6thermocouple, and a $5 solid staterelay, plus what ever heaters youwant to use.

D_Ghost01 (/member/D_Ghost01/)

Hello,Could anyone email the document regarding Arduino Home automation to [email protected]

Thank you,

77777777 (/member/77777777/)

hiiii want to prepare it, but

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

14 of 20 3/4/2014 4:25 PM

Page 35: otomatisasi rumah

1 year ago Reply (C289S8FH8CVIAM8)

(/member/77777777/)

(/member/77777777/)

1 year ago Reply (CD5CJOTH8CVFOJK)

(/member/Matrixis/)

4 years ago Reply (CFFS5SKG68H9L4I)

(/member/gsalerni/)

1 year ago Reply (CG9YD0CH006ACTQ)

(/member/mojud/)

2 years ago Reply (CFO9SC5GZ0BVVSH)

(/member/Teknopuppy/)

2 years ago Reply (CY5R0JQGM9QKLR1)

if i try to control 10 system withthis project than ,can i doit??????reply

77777777 (/member/77777777/)

thats so good budy.now i can prepare it for my home.....

Matrixis (/member/Matrixis/)

Doing a home automation project myself using these sockets and an arduino.

The main differences are that my project uses the ethernet shield and iscontrollable via some custom software on my mobile phone over the internetPlus that I use a 433Mhz AM transmitter and a library I created by researchingother peoples work that reverse-engineered the protocol.I can transmit the code for the old simple protocol(sockets have dial on back) andthe advanced protocol (socket have small button on front). So i can actuallycontrol millions of sockets all from 1 pin on my arduino.

I have timers for turning on and off electric heating, water and even my electricblanket on my bed , plus I have an output for controlling my electric door lock so Ican actually let in a friend when I'm not there if they call me.

Code is getting rather big now as I keep adding things and might have to upgradeto a mega just for the extra space :p

Who knew such a small device could take up most of my free time. ( I own 2 andprobably more soon).

With regards to your own project, great work and if ya want to upgrade yourproject to using a dedicated 433Mhz transmitter, just give me a shout and cansend you my library with instruction on how to use it.

gsalerni (/member/gsalerni/) Matrixis

Hi Matrixis,I'd love to extend the home easy setup using Arduino to create a low costmain controller and low cost input devices which seem to be missing fromthe range (temp sensors, light sensors etc.)Would you mind sharing your library and transmitter design?many thanksGuy

mojud (/member/mojud/) Matrixis

Hi Matrixis,

Do u mind sharing the library with me too?

Thanks,Mojud

Teknopuppy (/member/Teknopuppy/) Matrixis

Hi,

Matrixis,

i insterested in your project , can ushare it with me.

thanks,

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

15 of 20 3/4/2014 4:25 PM

Page 36: otomatisasi rumah

(/member/squirrelsnuts/)

2 years ago Reply (CWD9WYRGPBD3Y9H)

(/member/mbainrot/)

2 years ago Reply (CLPRPBWGXUZEVM3)

(/member/jimmer22/)

2 years ago Reply (CI2VP0WGUD897Y6)

(/member/Teknopuppy/)

2 years ago Reply (CLCAZMGGM9QKLR7)

(/member/TOCO/)

3 years ago Reply (COUOTLKGDNJ48MA)

(/member/mman1506/)

3 years ago Reply (CGY0R56GBQ9MXUS)

jimmy

squirrelsnuts (/member/squirrelsnuts/)

Holy crap! This is awesome! I've been researching X10, Insteon, misterhouse,arduino, thermostats, lights ad naseum to start doing something like this. I wasfocused on the Insteon PowerLinc modem to hook up to my computer, but I neverthought of hooking into a remote... genius! Opens all kinds of possibilities!

Question though.... why the opto isolators? I don't know electronics very well (butI'm learning!)

mbainrot (/member/mbainrot/) squirrelsnuts

Opto Isolator (aka opto coupler)provide optical isolation from themains circuit. The idea behind it is ifsomething goes wrong your microdoesn't get fried and protects themicro from EMF noise.

When you working with noisy loads(such as heavy mains switching viarelays) the opto will usually preventthe micro from spazzing out (due toit switching, copping an emf whack,crashing, then rinse and repeating)

jimmer22 (/member/jimmer22/)

This is amazing in terms of smart home products. I came acrosshttp://sabinessmarthome.com the other day and saw some cool and usefulproducts for home automation as well

Teknopuppy (/member/Teknopuppy/)

hi,

simon,

can i use different remote control.

Thanks,

Jimmy

TOCO (/member/TOCO/)

Where can I get the block of 10 leds? I have looked for them but I cant find themanywhere. Can you post a link or something?

mman1506 (/member/mman1506/)

thank you !! i was looking for months to find a alternative to transitors and powerhungry relays i never thought of using opto-isolators

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

16 of 20 3/4/2014 4:25 PM

Page 37: otomatisasi rumah

(/member/Yakumo/)

3 years ago Reply (C70KU63G7DY6HOG)

(/member/purpulhaze/)

4 years ago Reply (C587LVHG69MV2QH)

(/member/purpulhaze/)

4 years ago Reply (C0139L3G69MV3TY)

(/member/purpulhaze/)

4 years ago Reply (CNJ3U18G619L3IL)

(/member/flemron/)

4 years ago Reply (CR7SRY6G1BBHGUM)

(/member/killersquirel11/)

4 years ago Reply (C0HWDW6G4PBWVA1)

(/member/rk24/)

4 years ago Reply (CCY6W0XG33OXT0V)

(/member/simon72post/)

4 years ago Reply (CMF4RMLG2WM20Q0)

Yakumo (/member/Yakumo/)

Thank You for this wonderful idea. I'm using a different remote system buteverything works fine thanks to you :)

i seriously need to add some flat cables to my next project...its works but it looksvery ugly ^^'

purpulhaze (/member/purpulhaze/)

Can you explain in a lil more detail of how to communicate via SSH. I havefreeSSH server running on my windows xp machine. I can connect but none of thecommands are recognized. Am I missing something here?

purpulhaze (/member/purpulhaze/) purpulhaze

I think I'm missing something here butI'm not sure. I don't think it can bedone without something else.

purpulhaze (/member/purpulhaze/)

Kinda new to scripts just want to make sure. I add this script somewhere in myarduino sketch?

flemron (/member/flemron/)

if( val == 'B' ) // if '9' was receivedif( val == '9' ) // if '9' was receivedif( val == '0' ) // if '9' was received

is this correct?

killersquirel11 (/member/killersquirel11/) flemron

Technically, no, but it will work sinceits just the comments that arescrewed up. Should readif( val == 'B' ) // if 'B ' was receivedif( val == '9' ) // if '9 ' was receivedif( val == '0' ) // if '0 ' was receivedbut the code will still compile thesame either way

rk24 (/member/rk24/)

Thanks a lot!!!!!

look this: "instructables.com/id/we-controlled-valentine"

Can you make more digital outputs for that?

T_T please I need a web controlled pcb with 8 outputs...

I've tried but ....fail...

simon72post (/member/simon72post/) (author)

Hi the server software I used was webmin. www.webmin.com/(http://www.webmin.com/)

rk24 (/member/rk24/)

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

17 of 20 3/4/2014 4:25 PM

Page 38: otomatisasi rumah

4 years ago Reply (C6AMN3ZG2WLYCZA)

(/member/rk24/)

(/member/WillTheRescue/)

4 years ago Reply (CN3FW50G068MH5I)

(/member/simon72post/)

4 years ago Reply (CXUVZAIG0AMK20W)

(/member/get+to+da+parakeet/)

4 years ago Reply (CZ4N7Z3FU6LZPI4)

(/member/simon72post/)

4 years ago Reply (CJWAC6DFU6M01GJ)

(/member/get+to+da+parakeet/)

4 years ago Reply (CSDI914FVW22SUX)

(/member/ReCreate/)

4 years ago Reply (CMVWXQ2FZQ1FNA0)

(/member/andrew101/)

4 years ago Reply (CGIZ9R7FXR6YPBE)

can you post your webserver? please

WillTheRescue (/member/WillTheRescue/)

Why does your Arduino programing interface have a space to input a letter andmine doesn't?

simon72post (/member/simon72post/) (author) WillTheRescue

in the arduino software click thebutton on the right to open the serialterminal.

get to da parakeet (/member/get+to+da+parakeet/)

Hey! i got somthing for you. the cheaper,quicker way is to use relays :P

simon72post (/member/simon72post/) (author) get to da parakeet

Hi I was going to use relays originally.But I had these bits laying around.This is all powered from the arduinoboard. running relays from thearduino board could overload it ifthere are a few on at the same time.

get to da parakeet (/member/get+to+da+parakeet/) simon72post

Well, That REALLY all sepends onwhere you get them.in the USA, theres this thing called ahamfest for/and computer showwhere you can get alot of cheep stuff.

i controll my relays with the dccontroller shield found on arduino'swebsite =P

ReCreate (/member/ReCreate/) get to da parakeet

Or you can control the relays withanother low power relay...

andrew101 (/member/andrew101/) get to da parakeet

haha, this i would like to see. someguy just randomly re-wiring his houseusing relays. that is a fire wating tohappen. plus the fact this is alreadywireless, if you were to use relays youwould need to either 1. run wiresacross your house or 2. find awireless alternative. if you usewireless, it will either be cheap andunreliable or really expensive. eitherway this method here seems like abetter choice to me really.

raathi2009 (/member/raathi2009/)

Sir! I need the detailed schematic. please help me sir. Or any other ways to get [email protected]

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

18 of 20 3/4/2014 4:25 PM

Page 39: otomatisasi rumah

4 years ago Reply (CKDRD5WFVDC2XD4)

(/member/raathi2009/)

(/member/i0scan/)

4 years ago Reply (CRYDBODFU6LTM9H)

(/member/simon72post/)

4 years ago Reply (C6Z1SFXFU6M01GA)

(/member/i0scan/)

4 years ago Reply (CFEZX9KFU6M06Y8)

(/member/thrhymes/)

4 years ago Reply (CCE1O1OFU6LZVMY)

(/member/westfw/)

4 years ago Reply (CCWP90FFU6LTH43)

Make Comment

i0scan (/member/i0scan/)

Where did you get the project box that you used!?

simon72post (/member/simon72post/) (author) i0scan

I just used an old box I had layingaround. I think it came from maplinsoriginally

i0scan (/member/i0scan/) simon72post

Thanks!

thrhymes (/member/thrhymes/)

thank you for the inspiring instructable i will try this....

westfw (/member/westfw/)

I really like the idea of putting the LEDs in series with the optoisolator inputs soyou can see what's going on!

About UsWho We Are (/about/)Advertise (/advertise/)Contact (/about/contact.jsp)Jobs (/community/Positions-available-at-Instructables/)Help (/community?categoryGroup=Help)

Find UsFacebook (http://www.facebook.com/instructables)

Youtube (http://www.youtube.com/user/instructablestv)

Twitter (http://www.twitter.com/instructables)

Pinterest (http://www.pinterest.com/instructables)

Google+ (https://plus.google.com/+instructables)

ResourcesFor Teachers (/teachers/)Artists in Residence (/group/air/)Gift Pro Account (/account/give?sourcea=footer)Forums (/community/)Answers (/tag/type-question/?sort=RECENT)

MobileDownload our new apps foriOS and android!

Android (https://play.google.com/store

/apps/details?id=com.adsk.instructables)

iOS(https://itunes.apple.com

/app/instructables/id586765571)

Join our newsletter:

Terms of service (http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21959721) |Privacy Policy (http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21292079) | Legal Notices & Trademarks (http://usa.autodesk.com/legal-notices-trademarks/) |Mobile Site (http://m.instructables.com) (http://usa.autodesk.com/adsk/servlet/pc/index?id=20781545&siteID=123112)

Join!

All content on Instructables including How To's, Downloads, Images, Comments are © Copyright 2014 Autodesk Inc. All rights reserved.

Englishenter email

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

19 of 20 3/4/2014 4:25 PM

Page 40: otomatisasi rumah

Go Pro Today » (/account/gopro?sourcea=footer)

We're Hiring! » (/community/Positions-available-at-Instructables/)

Arduino Home automation http://www.instructables.com/id/Arduino-Home-automation/?ALLSTEPS

20 of 20 3/4/2014 4:25 PM