Internet Controlled House and Robot(Home Automation)

by Harshits20 in Circuits > Arduino

3103 Views, 11 Favorites, 0 Comments

Internet Controlled House and Robot(Home Automation)

temp_-1153853821.jpg
temp_-2075902507.jpg
temp_-28249659.jpg
In this instructable I will tell you how to connect your entire house(all the electrical appliances ) to internet so that you can control your each and every equipment from anywhere in the world

I have made this project 3 months back and it is continuously running since then without any problem. Now i have connected my robot to internet ,so this is a combined instructable for both Home automation and internet controlled robot

please vote this instructable for the contest

For the image you can get the basic idea of how it works

Lets Begin-----------------------------------

Basic System

Automation scheme.jpg
From bottom to top (refer Image)

1.)Your electrical equipment is connected to the manual switch(Off/On) and manual speed regulator

2.)These has to be connected to controllable relay board in parallel(If you want manual control also) and triac( for fan speed control and light intensity control) be very careful for these connection as these are 220V connection (Switch off the MCB before doing this)

3.)These relay board will be controlled from Slave server (transceiver) Can be powered with 12 V or 5 V adapter (Micro controller require 5V supply relay board require 5 or 12 V ) take care of the polarity (i have burnt 3 Board due to reverse polarity connection)

4.)These Slave server in turn wirelessly receive or transmit signal to the main server

5.)Main server send or receive signal from the slave servers and also receive instruction via Ethernet cable from internet

6.)Main server is connected to your broadband router via Ethernet cable and is powered by 5 V adapter

7.)If you are familiar with java and android app making just create an app or if you are like me just create a website using WIX to give command to your main server

So main parts are

1.)Main Server --Controls the Slave Servers

2.)Local or Slave Servers --Controls the relay board

3.)Relay board --directly connected to equipment

4.)Website Or app -send command to main server from internet ( Or via bluetooth or wifi also You just have to add bluetooth or wifi module)

Fun part

Robot :)

Main Server

images.png
temp_139654657.jpg
temp_70999480.jpg
The main server or the Brain of the Home

Hardware Components

1.)Arduino Uno

2.)Arduino Ethernet Shield (arduino wifi shield is very costly and using esp8266 is very difficult)

3.)Lan Wire for connection to router

4.)Arduino nano

5.)nRF24L01 Transceiver Module (2.4 GHz )(wireless connection between master and slave is via RF Module)

6.)A small Box to put all in together

7.)5 V adapter (any phone charger)

Software Component

1.)Teleduino API

It is really a awesome Way to connect your arduino to internet just go to the teleduino website and follow the instruction .Generate the key,Download the sketch,Edit the code,Upload it to the board and its over your board is now connected to internet (Thank you Mr Nathan kennedy For making this beautiful software)

2.) nRF24L01 Libraries to be placed in arduino libraries folder (Just search it on the web )

3.)Arduino Sketch for main Server

Connections

1.)Just Fix The Ethernet shield Over Arduino UNO

2.)Connect Arduino nano To Arduino UNO via Tx and Rx pins

UNO Tx to nano Rx

UNO Rx to Nano Tx

3.)Connect RF Module to Arduino nano (Prefer Arduino nano or Uno as they have inbuilt 3.3V supply) Refer Image

Explanation

Arduino Uno receive the command from internet via Ethernet shield and pass pass it to arduino nano for transmitting the signal via RF Module ( After uploading teleduino sketch in UNO there is no memory left and purchasing memory card module and memory card is costly than purchasing another arduino nano board)

Slave Servers With Relay Board or Sensors

temp_-792455303.jpg
temp_271064311.jpg
Slave Server or your really far extended hands (making you dumb equipment smart)

Hardware Component

1.)Arduino nano

2.)RF Module as in the main server

3.)relay board or sersors (Just take care of the operating voltage of realy 12V or 5V while purchasing)

4.)12 V or 5 V Adapter

Software Component

Sketch for Slave Server

Connection

1.)Arduino Nano to RF Module as per previous steps

2.)Arduino nano to relay board (Digital output pin to relay pin and VCC and GND )

Explanation

Rf module recieve data sent from main server and send it to Arduino nano then according to the sketch arduino nano will trigger the relay board or triac Simple

Switches Connection With Relay

temp_-1369936292.jpg
temp_-1801171221.jpg
temp_606508775.jpg
This is little dangerous Please take all precautions

1.)Switch Off the main MCB

2.)Open The switch Board

3.)with the help of screwdriver loose the screw of switch connection a little then insert wires that will be going to connect to the relays

4.)take great precaution while doing these things. programming is easy. real hard work is the relay connection

you can do this part easily if you have even little wiring knowledge

Teleduino and Transmitter Sketch Logic(main Server)

Sketches will be highly user dependent so i will tell you the logic

even after this you need any help for sketches just ask me

logic

Teleduino part

1.) first get a key
2.)enter the key on the site and get the code for the sketch
3.) download teleduino sketch and edit the code part with the code you received
4.)upload the code
5.)now explore the teleduino site. put your code in and you will get a list of commands. like changing the state of digital pins and setting rx ,tx pin. ,getting uptime of board etc
6.) for each command there is a web address if you place that web address on the address bar and press enter that command will be sent to arduino
7.)if your. internet connection is working fine and you lanwire is properly connected you can see OK message written on the webpage. or else it says key is offline



Sending command
1.)For this project we are using UNO board as a command receiver and it then transfer the data received to nano board
2.)get the web address for sending data
4.)you can send anything a,b,c,1,2,3etc
5.)just keep testing in output terminal what you are sending and what you are receiving
6.) now in the nano board if you receive the data send by UNO in a INT variable it will be converted to equivalent ASCII code
just download the ascii list.
7.)now write the data you have received from serial Rx pin to RF module

Slave Server Sketch Logic

now when you have transmitted the data just receive it via RF module and trigger the relay accordingly

for example. from web you send 1 and you are receiving 48. so just write the sketch.

if (variable=48)
trigger relay

what you are sending is your choice website will be made accordingly

what you are receiving is ascii code. sketch will be written accordingly



if you find any difficulty in writing sketch just ask


The Website

temp_1558805583.jpg
temp_376860663.jpg
temp_2035661538.jpg
temp_-771911632.jpg
temp_-377274743.jpg
temp_-1876245316.jpg
i have designed the website by using WIX. online web designing site. its very easy

as you can see from the image i have put on and off button for every equipment

when i click "on" for TV it open web address which send some data to arduino just say 1

when i click off for tv it send 2

accordingly my main server nano board receive ascii code and further transmit it to slave server which trigger the relay connected to tv. as simple as that

The Robot

temp_777591209.jpg
temp_367033734.jpg
make slave server for the bot also
connection to the motor control board will be like my previous instructable for Bluetooth control robot

just instead of Bluetooth connect the rf module

and for the sketch just follow the same logic.

say when you click on fwd button the data sent via web address is 'a' and you receive 97 so write the sketch that

if var=97

motor1 and motor2 will move forward
and so on


so it is not truly global. but can be controlled via internet as long as it is in the house. you can be anywhere.

you can make this robo carry ip camera and watch the live feed via website.

https://youtu.be/XWylRG-4cig

Conclusion

the whole process is lengthy and require a lot of hardware. but it is simple and feasible. i am using the whole system from the last 3 months


for more control you can add sensor like temperature ,humidity ,proximity etc with the salve servers,I will post an instructable with all the sensors also when i integrate it with the system

for any query. just reach me at shinagami1989@gmail.com. or. post your comment here

Codes and Libraries

1.) Teleduino Library and Internet Ethernet code for main server (Client Proxy Code in examples of teleduino328)

2.)Transmitter Code for sub server and NRF24L01 Libraries(RF24_Master)

3.)Receiver Code for Slave server

Note**

these codes are for one way transmission only means from data can transmit from internet - Server -Subserver-Slave server and not reverse

Teleduino code and subserver code are generalised no need for editing

Slave server code can be edited as per requirement (What data you have sent and what you want to recieve via this slave server etc)