0% found this document useful (0 votes)
193 views

Energy Efficient Home Automation Using Python Programming - V1.8

This document discusses the development of a home automation system using low-cost technologies. It introduces home automation and provides an overview of the proposed system's block diagram and components. The key components are a Raspberry Pi for centralized control, Zigbee for wireless connectivity between sensors and actuators, and a relay board to control appliances of different voltages. The system aims to provide home monitoring and control while reducing costs, power usage, and the need for specialized tools or skills.

Uploaded by

Lava Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
193 views

Energy Efficient Home Automation Using Python Programming - V1.8

This document discusses the development of a home automation system using low-cost technologies. It introduces home automation and provides an overview of the proposed system's block diagram and components. The key components are a Raspberry Pi for centralized control, Zigbee for wireless connectivity between sensors and actuators, and a relay board to control appliances of different voltages. The system aims to provide home monitoring and control while reducing costs, power usage, and the need for specialized tools or skills.

Uploaded by

Lava Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 21

INTRODUCTION

Home Automation system has become a career objective, popular and drawn attention
from the students to Industry researchers over a decade. There many industries penetrated
in the field of IoT and developed many sophisticated system. The researchers published
many papers on Automation. This has been discussed in the chapter-2 in detail. Few of
the monitoring activities beyond the human involvement. The machine will continue its
activities throughout its life time and serves for the purpose.

TOP –LEVEL BLOCK DIAGRAM


The whole composition of the automation system is shown in Fig 1.1. The basic needs of
a home are connected to the Home Gateway using computer and other monitoring
devices.

The available Sensors such as temperature sensor, humidity sensor, pressure sensor, water
level indicator, smoke detectors and actuators like light, fan air conditioning, motor are
inter connected to control from different location. The type of Wi-Fi network may be vary
system to system, for example it may be blue tooth, GSM/GPRS, Wi-Fi, ZigBee or
WLAN etc.

FIGURE 1.1: OVERVIEW OF GENERIC HOME AUTOMATION

The basic idea behind Home Automation is to control and monitor all home appliances
and its functions from different locations taking Internet as an advantage.

Sample Home Sensors and actuators

 Temperature Control
 Electronic Locking System
 Lights and Fans
 Motor and Water Level Control
 Fire Alarms
 Camera
 Smoke Detectors
 Health Monitoring Systems
 PIR Motion Sensor and Light Sensors
The developed systems are monitoring the situation using sensors and collecting
the huge data. The collected data in turn storing using cloud computing process. The
collected data is using for future requirement analysis. The human replacement is
impossible in some areas the Automation process is one among them.

PROJECT OBJECTIVES
The available Automation systems have their own merits and demerits. Few are
having drawbacks in Monitoring activities, few are facing interconnection issues, few are
with energy requirement issues and also network related issues. Few systems does not
have provision for the future expansion means dedicated to serve the current purpose.

The automation systems available in the market are expensive and bulk in size.
Few automation systems are consuming too much power even though they have enough
electronic devices built on the devices.

Taking advantage of available technology and statistical data it is not difficult to


save the power utilization. It is possible to reduce the cost of entire system also the
expansion and service. It is proving that by using low cost high efficient processor boards,
low cost networking devices and different sensors reducing the power requirements and
cost of the whole system.

APPLICATIONS
The proposed system has variety of sensors and actuators. The Future system has
different applications and few of them are:

 Safety and Security


 For Old people Health Monitoring and intimating to Doctor in an emergency
 Getting in touch with People
 Monitor Appliances all the time.
 Easy to control
 Can be controlled whenever it required
 The Consumer data is useful in analyzing future requirements.
 The usage of water can be minimized

Main application is to save the energy utilization along with the control and & Monitoring
of Home Appliances.

ADVANTAGES AND LIMITATIONS


The advantages offered by the Automation System are easy to install, easy to
replace in case of maintenance and no need of skilled people to do it. During
implementation phase or utilization phase customized tools are not required. The
increasing popularity of automation systems the required nodes are increasing day by day.
In such cases the ZigBee offers efficient network capabilities for enhancements. “Python”
is taken as programming language because of its advantages and popularity in open
source field. Python is very strong scripting Language which eliminates all IDES’s,
debugging tools, JTAG and compilers.

The automation system has few limitations on the other side. The main and
important factor is “Data Storage & Security”. The monitored and processed data should
be stored for future purpose securely. This is very critical we may need to take third
parties support it may added cost to the system. Another major factor is “Hacking”,
controlling someone’s Home network without any authorization.

INTRODUCTION
The advancements in miniaturization of electronic devices, reduced power
consumption and increased network capabilities gives more sophisticated Home
automation systems day by day.

The proposed project is using current technologies and devices to control home
appliances. ZigBee selected as a wireless source. Raspberry Pi selected as a computer for
data processing and storage. Relay board is used for controlling various devices which are
operating at different voltage levels. Each of these explained in details.
ARCHITECTURE DESCRIPTION .
The technological improvements in Automation system is changing drastically day to
day. As the ASIC and CMOS process techniques evolved which in turn integrated most
of the components into a single chip and converted in the form of single boards. These
single boards are competed with standard buses which are fit into engineering
workstations cabinets and like computer systems. In this Project ZigBee is used as a
wireless device and the Raspberry Pi as a Central Processing Unit and are connected to a
home gateway. This project is developed by using Python programing. The proposed
system eliminates the cumbersome wiring and it is easy to expand based on the network
size and capacity.

Generally most of the Homo Automation Systems contains two types of Devices and
controlled and monitored using Single Board Computer.

• Sensor and

• Actuators

The first physical device is so sensitive to the energy that can be radiated by object.
Depends on the energy level differences of the object the sensor sends the response to the
processing unit. Temperature sensor is a best example for Sensor device. The second
element is an elect mechanical device or electronic device works based on the user input.

The Electromechanical Relay is best suitable example for this Actuator.

Now a days many traditional systems are not focusing on cost and Energy
saving. Some Home Automation Systems are using their own proprietary tools which in
turn increases the dependency on the particular manufacture. This problem was
improving quickly with open source tools and locally available electromechanically parts.

INTERCONNECTIVITY
The Proposed Automation System having following components.

 Raspberry Pi 3
 ZigBee Module
 PIR Motion Sensor
 Light sensor
 Relay Board
 Mechanical Switches
 LEDs and Wiring

The ZigBee has been used as a wireless device between the sensors and actuators
which are controlled by a Central Processing Unit. The Central Processing unit is
programmed using Python Scripting Language. A simple network is developed using
ZigBee using its one of the feature of interoperability. The Raspberry Pi 3 single board
computer is selected as master device to control the network which is running at
maximum speed of 1.2GHz. An important feature of the Raspberry Pi is the Gigabit
Ethernet over USB 2.0, and Power over Ethernet and also real-time tasks can be executed
without any interruption from the Linux kernel. The Raspberry Pi 3 boot up and run using
Linux which is free and open source. The programming language using to develop logic
“Python” is also an open source programming language.

The light sensor connected to this system is minimizes the unnecessary power
wastages such as turning light on day time. The use of PIR Infrared Proximity Motion
Sensor also have similar application it turns on the devices when there is a requirement.
The ZigBee and Wi-Fi network are integrated through a common home gateway. The
gateway provides network interoperability, a simple and flexible user interface, and
remote access to the Home Automation system. The devices selected for this project are
available in the market at lower cost and the designed in such way that to enhance the
system with new devices as per the advances in technology.

ZigBee

ZigBee is an open global standard for wireless technology. It is designed


to use low-power digital radio signals at the frequency of 2.4GHz. ZigBee operates on the
IEEE 802.15.4 specification. Present Home Automation System requires a network with a
low data transfer rate, energy efficiency and secure networking. The ZigBee provides all
these features so this device has taken as Wi-Fi Device. Also the main reason using
ZigBee as a Wi-Fi device is it uses a mesh networking protocol to avoid hub devices. The
ZigBee is a low power consumption two way communication and reliable wireless
device. The ZigBee operates operate on 2.4GHz, 900 MHz and 868 MHz frequencies.
FIGURE 3 1: ZIGBEE MODULE

There are many areas different Home Automation systems depending upon the
requirement and application.
• Home: Controlling electrical appliances, Safety and Security.
• Industrial Automation: Process control, Power management and to reduce time
lines.
• Transportation: Tracking, identifying the location in case of emergency
• Cities: Traffic light control, Water Control and Public safety
• Work Environment: Fire management systems, Water and Energy saving
appliances.
Whatever be the location or environment the main goal is to reduce human interference,
time delays and to increase safety.

THE STANDARD DATA RATES OF ZIGBEE

Band width DATA Rate Frequency Bands


2.4GHz 250 kbps 16
915MHz 40kbps 10
868MHz 20kbps 1

The requirements behind the development of ZigBee Standard are


 Available at lower cost
 Consumes Low Power
 Flexible and Extendable in case of using in a Network
 The Stack of the ZigBee is Secure
 Easy and inexpensive Installation

ZigBee Devices
 It is a Full Function Devices (FFD)
 Works in any Topology ( Mesh or Star)
 Capability as a Network Co-Ordinator
 Communicates to any other Device

Reduced Function Device (RFD)


 Limited to Star Topology
 Cannot become a network communicator
 Talks to only network co- coordinator
 Very simple implementation

            The ZigBee has a capability of configure as a coordinator, router and end device.
It operates at 3.3Volts level. The current required for normal operation is 40mAmperes @
3.3V. There are different high efficiency modules which supports at a line of sight range
of 1000 meters. The ZigBee supports analog inputs directly. The PIR sensor and or any
other analog sensors operating at 3.3V can be connected directly to ZigBee.

PROCESSING UNIT

The Raspberry Pi 3 Model B is the earliest model of the third-generation Raspberry Pi.
The Features of Raspberry Pi 3 are mentioned here.

 Quad Core 1.2GHz Broadcom BCM2837 64bit CPU


 Built in 1Gb Random Access Memory
 Ethernet Connector
 External usable GPIOs – 40 IO
 4 USB 2 ports with Type –A Connectors
 Stereo output and composite video port
 Full size HDMI Connector
 CSI camera port for connecting a Raspberry Pi camera with FPC
 DSI display port for connecting a Raspberry Pi touchscreen display with FPC
 Provision for Micro SD slot for loading your operating system and storing data

The Raspberry pi 3 Board works on Open source operating System. There will not
be any development or Tools required. Easy to program and easy to debug. Plenty of
sources are available for beginners. One of the best programming language it supports is
“Python”. Python Programming Language is a scripting language mostly using in
Artificial Intelligence. It is an open source Programming Language.

The Raspberry pi is a very small form factor computer. The Raspberry Pi contains quad
core Broadcom BCM 2835 SoC. The Figure 3.2 shows the Top and Bottom view of the
Raspberry Pi. This Board is using as a control device and is running of Linux Operating
System,
RASPBERRY PI 3

Relay Board
RELAY BOARD WITH ZIGBEE BASE

The Raspberry Pi 3 operates at 3.3V range and the Relay operates at 5V Voltage level.
Whereas the Controlling circuit is 230V. The Relay board takes 3.3V input from ZigBee
board and operates Relays based on the Logic. The Logic is performed by the Raspberry
Pi 3 Single Board Computer. The Relay outputs NC (Normally Contact) and NO
(Normally Open) Terminals are connected to 230V or any home appliances. Other than
3.3V and 5V operating voltage Relay driver board is required to drive the different higher
operating voltages. The Relay board has a provision for ZigBee with base. The UlN2803
mounted on the Relay board takes 3.3V input and provides 5V output signal connected to
the Relay coil. All the components used on this board are very low cost and available in
the local market at lower cost. The Relay board requires 5V as Input thru corresponding
DC Jack.

Mechanical Switches
Keeping in mind some special cases a mechanical switch provided for each appliance. It
is Double Pole Single Throw (DPST) Switch.

FIGURE 3.4: MECHANICAL SWITCH

3.7 Summary

This chapter explained about the components used in the Home Automation and
its features along with the flow which is to be carried out in controlling and monitoring
the devices. The prosed system is implemented using open source scripting language
called “Python”.
PROJECT DESIGN AND IMPLEMENTATION
This project mainly depends on Sensor inputs and Actuator outputs.
The Raspberry Pi 3, ZigBee and Relay board configurations are explained.

DESIGN
 Raspberry Pi 3 is using as a Single Board Computer running on linux Kernel with
Python Programming Language.
 ZigBee Module one is acts as a End Device and another ZigBee Module works as
a Co-coordinator. Both of these configured for Mesh network.
 Relay Board is used to control the devices whose operating voltage is greater than
5V.

Co-Ordinator and End Device

Power Supply 3.3V

RASPBERRY Pi 3
Single Board Computer
ZigBee
Quad Core 1.2GHz
Wireless Module
Broadcom
Coordinator
3.3V Operating Voltage
WLAN Enabled
LAPTOP

LOGIC PROCESSING UNIT WITH ZIGBEE


The Figure 4.1 showing Single Board Computer with ZigBee. The coordinator is required
in every network and is setting up the network can never sleep. The ZigBee is configured
as a Coordinator. Each network must have one Coordinator. This ZigBee which in turn
transmits and receives data from other ZigBee Modules.

PHYSICAL LOGIC PROCESSING UNIT WITH ZIGBEE

The Figure 4.2 shown above is having Raspberry Pi and ZigBee. The Raspberry Pi is
powered up using USB Cable from Laptop. The ZigBee is connected to the Raspberry Pi.
All the ZigBee modules are interconnected in mesh network. ZigBee can be configured as
a Coordinator, router and end device. Coordinator establishes the network and stores the
data such as security keys. Routers act as a intermediate nodes and relay on other devices.
.Logic Processing Unit with ZigBee

The power LED blinks once after connected to the computer. The standard USB port
provides 500mA of current at 5V. This power is enough to operate both Raspberry Pi and
ZigBee.

Power Supply 9V

Power Supply
5V to 3.3V
Connector

ZigBee Relay Board


Wireless
Module
End Device

FIGURE 4.2: END DEVICE

LOGIC PROCESSING UNIT WITH ZIGBEEAS


USER INTERFACE
Either Laptop or Mobile internet can be used as a user Interface. The Controlling of
devices is through Software. The software’s used in this project are open source and
available with plenty of support.

CONTROL EXPRESSION
The Logic expression is derived for the output generated by a Single board Computer.
The Same output is executed through Relay Board.

The Default Status of Relay -1 and Relay -2 is “OFF”. The Mechanical switch status is
being read at initial state.

Case-1: If the Mechanical switch is OFF Position

The Derived Boolean Function is Y = AB

Case-2: If the Mechanical switch is ON Position

The Derived Boolean Function is Y = A+B

The experimental set up is shown below is the ZigBee as a end device configuration.

This complete module replaces the traditional switch board in the home.

The only difference is Relay board with ZigBee module. With the simple architecture
making automation using home network.
Relay and Mechanical Switch Assembly-1

Relay and Mechanical Switch Assembly-2


EXPERIMENTAL RESULTS & DISCUSSION
SPECIFICATION
 The end device is controlling all the nodes and the ZigBee is the key element.
 The Appliances operated above 5V needs relay operating mechanism in order to
control devices.
 PIR Infrared Proximity Sensor operates based on the user movement.
 The Light Sensor operates based on the day light intensity.

INPUT AND OUTPUT EXPLANATION

INITIAL STATE

Initial State Conditions:

1. The SBC will take Mechanical Switch position status before operating the any of the
Relays.

The Test Cases executed successfully

Case-1: When switch is in OFF State


To On the Light Y = AB = 1

To Off the Light Y = AB = 0

CASE-2: When Switch is in ON State

To On the Light Y = A+B = 1

To Off the Light Y = A+B = 0

RESULTS
As Per the Test Cases the Hardware is functioning and the Control over the
network executed successfully.

Case – 1: Switch = OFF


Y = AB, Turned ON the Light

Switch = OFF

Y = ~(AB), Turned OFF the Light


Case – 2: Switch = ON
Y = A+ B, Turned ON the Light

Case – 2: Switch = ON
Y = ~ (A+ B), Turned OFF the Light
The Controlling of bulb through manual switch and through network is proven with
results. By using PIR Motion sensor the usage of electrical appliances reducing
drastically.

The motion sensor allows the device to turn on whenever required. The light sensor never
turns on during day time so that the appliances turning on and off in a controlled manner.
the modules have been designed to meet the requirements. Specifications and
Functionality of each module had verified according to the project requirement. The
Linux is used as an operating system and the program implemented using Python
scripting language.

SUMMARY
The Output and input to the system has been explained also derived Boolean
expression for logic implementation. It is true for any device whose operating voltage is
above 5V.

You might also like