In this project we are going to switch on the home appliance from remote location using web services. In this we are going to use one Raspberry Pi interfacing with 4 bulbs using relay modules with low level trigger. Each bulb is connect in each corner like right, left, top, button. We can trigger the relay from anywhere in the world using a website. In each trigger of relay the correspondence Bulb will glow and one stop button is there for stop operation.
This is the recommended OS for Raspberry Pi. You can also install other OSes from third parties. Raspbian OS is a Debian based OS. We can install it from noobs installer. You can download it here.
This is the software we get in Raspbian OS. For this project we have used Python script.
This is the tool to make a local website publicly accessible. We’ve used this to make our local website and ssh servers accessible to any network. We'll describe it later. You can download it here.
4) Putty:We are using putty for remote access of Raspberry Pi. You can download it here.
This software is used to burn Raspbian Os on SD Card. You can download it here.
6) SDFormatter:This software is used to format memory card. You can download it here.
Component UsedFor this project you need:
- Raspberry Pi 3
- Relay Module
- LED Bulbs
This is the latest version of Raspberry Pi. In this we have inbuilt Bluetooth and wi-fi, unlike previously we have to use Wi-Fi dongle in one of its USB port. There are total 40 pins in RPI3. Of the 40 pins, 26 are GPIO pins and the others are power or ground pins (plus two ID EEPROM pins). There are 4 USB Port and 1 Ethernet slot, one HDMI port, 1 audio output port and 1 micro USB port and also many other things you can see the diagram on right side. And also we have one micro SD card slot wherein we have to installed the recommended Operating System on micro SD card. There are two ways to interact with your Raspberry Pi. Either you can interact directly through HDMI port by connecting HDMI to VGA cable, and keyboard and mouse or else you can interact from any system through SSH (Secure Shell). (For example in Windows you can interact from putty ssh). Figure is given below.
We have used 3 four channel relay module to control 12 led bulbs. As we are working with 220 volt ac we have to make sure that our connection are properly connected. Figure is given below.
For complete isolation with microcontroller we can wire up our circuit as below. Here we have to remove jumper used in Jd-vcc and Vcc. Connections are given in figure 1.
Bulb connection with relay and Raspberry Pi 3:
Here we are connecting our relay to one single Bulb. In this there is no optical isolation we can make it by removing jumper from Vcc and Jd-vcc. And by giving separate power supply to Jd-Vcc. As below the diagram I’ve just shorted all the com pin of relay and from NO we've taken wire which is going to the entire bulbs one terminal and from the second terminal of bulb it will go to the AC main and the hot line of the AC will be coming from the shorted com pin of relay. Connection are given in figure 2.
As we are using web services for this project so we have chosen Django Python framework. There are many frameworks in Python like flask, Django, bottle so you can chose other one as well but in our project we are using Django framework. So for that you have to import Django for Python.
Here are the steps for importing DjangoStep 1:
sudo apt-get install python-pip
After pip is installed:
Step 2:
sudo pip install django
Comments