Sponsor Link

Components Required

Instructions

Step 1 – The Relay

GPIO pins to One End of Coil

Ground to other End of Coil

Phase of Main Power Supply to The Common terminal or Pole

One Terminal of bulb (Or other electrical Appliance) to Normally Open Terminal

And the Other Terminal of Bulb to Neutral Point of Main Power Supply

Step 2 – The Raspberry Pi

sudo passwd pi

sudo apt update -ysudo apt upgrade -y

GPIO 11 to Relay 1 Controlling Device 1

GPIO 13 to Relay 2 Controlling Device 2

GPIO 15 to Relay 3 Controlling Device 3

GPIO 29 to Relay 4 Controlling Device 4

Step 3 – The Network

ping <ip address of mobile phone>

ifconfig

Step 4 – Connections

Step 5 – Setting Up the Listener

Best WiFi Routers of 2018

python automation.py

Step 6 – Install RootSaid WiFi Command Center from Google PlayStore

Step 7

Name Email Review Title Rating Review Content

Raspberry Pi Home Automation 4.4 rating based on 12,345 ratings 4.4 out of 5 based on 261 reviews. Anonymous Overall rating:

Let us build a home automation system that can control electrical appliances such as lights, fans, gates etc suing our mobile phone from anywhere around the world. All you need is a Raspberry Pi , some relays and an android phone. Lets get started.This Project is Sponsored by. UTSource is a professional electronic components supplier.Click on them to purchase from amazon Relays are switching circuits that can close and break circuits mechanically. That means it can control an electrical circuit by closing and breaking connections in that circuit. As you can see, there are mainly 5 terminals in a relay. Two for energizing the coil, oneterminal, aterminal which will be connected to theterminal when the coil is not energized and aterminal which will be in contact with theterminal when the coil is energized. This is how the relay works. In our case, we will be connectingSince the Output of Raspberry Pi GPIO pins are 3.3V, you will have to buy a 3.3V Relay. You can purchase the relay board of 4 relays that is compatible with Raspberry Pi from here or click on the image.Raspberry Pi is a low cost single board computer which can be used for robotics, home automation etc. Get your Raspberry Pi from Here Download and burn an OS to a micro SD card and insert it into the raspberry Pi. In this project, I used Raspbian OS. You can download the OS by clicking the below link Download Now power it up. Now fire up your terminal and create a password for the user ‘pi’ by executing the commandNow perform and update and upgrade by runningNow you can connect GPIO pins to Relay boardConnect your Raspberry Pi to a WiFi router or Wired network and make sure it is connected by checking whether it is getting an IP address from the switch. Connect your mobile phone to the same network and make sure there is connectivity between the mobile phone and the raspberry pi. You can confirm it by pinging your mobile phone from your Raspberry Pi by pinging to your mobile phoneTake a note of the IP address of the raspberry Pi as we will be using it in the future.Raspberry Pi should be provided with 5V. For this project we will be using 4 GPIO pins to control the devices. 11, 13, 15 and 29 all goes directly to the 4 relays input.Here is a list of World’s Best WiFi Routers of the year 2018. Make sure you grab one of them for High speed , Long Range, and Stable Internet connection. http://www.cuteoffers.com/technology/best-wifi-routers-2018/ Now all you have to do is setup a listener on the Pi. Download the sketch from the link below and save it as a file named “automation.py” Download Run the script by running RootSaid WiFi Command Center is a simple light weight android application that can be used to control robots and home appliances over WiFi. All you have to do is connect your mobile phone to the network, enter the IP address and Port of the server (the home automation system) and control it using the On Off buttons. Click here to know more about this App. Click Here to Download this app from Playstore.Now all you have to do is start the App, enter the IP address of the Pi and port it is listening to (5050). Load the IP and Port using the link button and navigate to the Home Automation Tab. Thats it, you can now control devices connected to your raspberry pi using this simple app and turn it on and off.