Raspberry Pi 3 Home Automation Based On IoT
Raspberry Pi 3 Home Automation Based On IoT
ABSTRACT
IoT coverage is very wide and includes variety of objects service by exchanging data with the manufacturer,
like smart phones, tablets, digital cameras and sensors. operator and other connected device. Each thing is
Once all these devices are connected to each other, they uniquely identifiable through its embedded computing
enable more and more smart processes and services that system but it is able to interoperate within the existing
support our basic needs, environment and health. The internet infrastructure. IoT communicates information to
main objective of present work is to design a smart home people and systems such as state and health of equipment
using various sensors which can be controlled and and data from sensors that can monitor a persons vital
monitored by the ESP8266 Controller and Raspberry PI- signs.
3 via the Internet of Things (IoT). The home automation The scope of the work is to develop a monitoring system
system is also implemented around the same ESP8266 by using Raspberry Pi-3 which acts as an interface
controller, which includes a smart doorbell, the smart between user and the devices. Live picture can be viewed
locker security system has the control by Raspberry PI by an LCD screen through USB camera. The Pi is a low
3. Today we are living in 21st century. It is necessary to cost microcomputer that is able to run on Linux and can
control the home from desire location. Home automation give endless extension possibilities. The work require a
is the control of any electrical and electronic device in very low energy consumption, whereby the Raspberry Pi-
our home and office, whether we are there or away. 3 operates with 5V power.
Home automation is an important milestone in achieving Most of the home security system available in the market
smart grid and is ever exciting fieldthat has exploded consist of a control panel that is installed somewhere in
over the past few years. Introducing the raspberry PI to the house.The down-side of the system is that the home
the world of home automation provides numerous users are not be able to access and customized the control
customizations to turn a regular home into a smart home. panel when they are away from their home.
Raspberry PI 3 provides a low cost platform for The motivation to build up this system is due to the high
interconnecting electrical/electronic devices and various number of home invasion and burglary reported every
sensors in a home via the internet network. It comprises year.According to The star News,during the year
of a two way communication where electricity and 2014,the number of residential break-ins in Malaysia was
information is exchanged by the consumer and utility to 11.7% of the national crime index which is definitely a
maximize efficiency. worrying number for the small nation.
Keywords: smart locker, Internet of things (IoT),
ESP8266 controller, Raspberry PI 3 2. PROPOSED SYSTEM
The block consists of USB camera, Raspberry Pi
1. INTRODUCTION Mod-b3, PIR sensor, ESP8266 controller, Relay
control, Arduino UNO, GSM Module, and LCD.
The IoT is the network of physical objects or things
embedded with electronics, software, sensors and
connectivity to enable it to achieve greater value and
Fig.1.block diagram
3. HARDWARE DESCRIPTION
3.1 PIR SENSOR:
An individual PIR sensor detects changes in the amount FIG 3.2 USB camera module
of infrared radiation impinging upon it, which varies A webcam is a video camera that feeds or
depending on the temperature and surface characteristics streams its image in real time to or through a computer to
of the objects in front of the sensor. computer network. When captured by the computer,
the video stream may be saved, viewed or sent on to
other networks via systems such as the internet, and
email as an attachment. When sent to a remote location,
the video stream may be saved, viewed or on sent there.
Unlike an IP camera (which connects using Ethernet or
Wi-Fi), a webcam is generally connected by a USB
cable, or similar cable, or built into computer hardware,
such as laptops.
WORKING OF WEBCAM:
A webcam is a compact digital camera that can
hook up to the computer to broadcast video images in
real time. Just like a digital camera, it captures light
through a small lens at the front using a tiny grid of
microscopic light-detectors built into an image-sensing
microchip (either a charge-coupled device (CCD)or,
Fig.3.1.PIR sensor more likely these days, CMOS IMAGE SENSOR).
Unlike a digital camera, a webcam has no built-in
When an object, such as a human, passes in front of the memory chip or flash memory card: it doesnt need to
background, such as a wall, the temperature at that point remember pictures because its designed to capture and
in the sensors field of view will rise from room transmit them immediately to a computer. Thats why
temperature to body temperature, and then back again. webcams have USB cables coming out of the back. The
The sensor converts the resulting change in the incoming USB cable supplies power to the webcam from the
infrared radiation into a change in the output voltage, and computer and takes the digital information captured by
this triggers the detection. Objects of similar temperature the webcams image sensor back to the computer-from
but different surface characteristics may also have a where it travels on to the Internet. The objects which are
different infrared emission pattern, and thus moving them needed to be counted are capture using USB camera.
with respect to the background may trigger the detector CHARACTERISTICS
as well.PIRs come in many configurations for a wide Webcams are known for their low
variety of applications. The most common models have manufacturing cost and their high flexibility, making
numerous Fresnel lenses or mirror segments, an effective them the lowest-cost form of video telephony. Despite
range of about ten meters (thirty feet), and a field of view the low cost, the resolution offered at present (2015) is
less than 180 degrees. Models with wider fields of view, rather impressive, with low-end webcams offering
including 360 degrees, are available-typically designed to resolutions of 320*240, medium webcams offering
mount on a ceiling. Some layer PIRs are made with 640*480 resolution, and high-end webcams offering
single segment mirrors and can sense changes in infrared 1280*720 (aka 720p) or even 1920*1080 (aka 1080p)
energy over one hundred feet away from the PIR. There resolution. They have also become a source of security
are also PIRs designed with reversible orientation mirrors and privacy issues, as some built-in webcams can be
which allow either broad coverage (110 wide) or very remotely activated by spyware.
narrow curtain coverage, or with individually 3.3 GSM Module:
selectable segments to shape the coverage. Global System for Mobile Communications, is
3.2 USB camera a standard developed by the European
USB camera are imaging cameras that use Telecommunications Standards Institute (ETSI) to
USB 2.0 or USB 3.0 technology to transfer image data. describe the protocols for second-generation (2G) digital
USB cameras are designed to easily interface with cellular networks used by mobile phones, first deployed
dedicated computer systems by using the same USB in Finland in July 1991.2G networks developed as a
technology that is found on most computers. replacement for first generation (1G) analog cellular
networks, and the GSM standard originally described a
digital, circuit-switched network optimized for full
being: LCDs are economical; easily programmable; have documentation on the chip and the commands it
no limitation of displaying special and even custom accepted. The very low price and the fact that there were
characters, animations and so on. very few external components on the module which
A 16x2 LCD means it can display 16 suggests that it could eventually be very inexpensive in
characters per line and there are 2 such lines. In this LCD volume, attracted many hackers to explore the module,
each character is displayed in 5x7 pixel matrix. This chip, and the software on it, as well as to translate the
LCD has two registers, namely, Command and Data. Chinese documentation. The ESP8285 is an ESP8266
The command register stores the command with 1 MB of built-in flash, allowing for single-chip
instructions given to the LCD. A command is an devices capable of connecting to Wi-Fi.SDKsIn late
instruction given to LCD to do a predefined task like October 2014, Espressif released a software development
initializing it, clearing its screen, setting the cursor kit (SDK) that allowed the chip to be programmed,
position, controlling display etc. The data register stores removing the need for a separate microcontroller. Since
the data to be displayed on the LCD. LCD display is used then, there have been many official SDK releases from
to display the number of objects counted using Raspberry Espressif; Espressif maintains two versions of the SDK
Pi processor. one that is based on RTOS and the other based on
callbacks.Other open source SDKs includeArduino: a
Fig.3.6 LCD module C++ based firmware. This core enables the ESP8266
CPU and its Wi-Fi components to be programmed like
Table3.6 Specification of LCD module any other Arduino device. The ESP8266 Arduino Core is
Pin available through GitHub they are collectively referred to
Function Name as "ESP-xx modules" and to form a workable
No
development system require additional components,
1 Ground (0V) Ground especially a serial TTL-to-USB adapter (sometimes
called a USB-to-UART bridge) and an external 3.3 Volt
2 Supply voltage; 5V (4.7V 5.3V) Vcc power supply. Novice ESP-8266 developers are
Contrast adjustment; through a encouraged to consider larger ESP8266 Wi-Fi
3 VEE development boards like the NodeMCU which includes
variable resistor
the USB-to-UART bridge and a Micro-USB connector
Selects command register when Register coupled with a 3.3 Volt power regulator already built into
4
low; and data register when high Select the board. When project development is complete, you
Low to write to the register; High to may not need these components and can consider using
5 Read/write these cheaper ESP-xx modules as a lower power, smaller
read from the register
footprint option for your production runs. The popularity
Sends data to data pins when a high
6 Enable of many of these "other boards" over the earlier ESP-xx
to low pulse is given
modules is the inclusion of an on-board USB-to-UART
7 DB0 bridge (like the Silicon Labs' CP2102 or the WHC
CH340G) and a Micro-USB connector coupled with a
8 DB1 3.3 Volt regulator to provide both power to the board and
connectivity to the host (software development)
9 DB2 computer commonly referred to as the console. With
earlier ESP-xx modules, these two items (the USB-to-
10 DB3 Serial adaptor and a 3.3 Volt regulator) had to be
8-bit data pins purchased separately and be wired into the ESP-xx
11 DB4 circuit. Modern ESP8266 boards like the NodeMCU
boards are a lot less painful and offer more GPIO pins to
12 DB5 play with. Most of these "other boards" are based on the
ESP-12E module, but new modules are being introduced
13 DB6 seemingly every few months.
14 DB7 It has GPIO, I2C, ADC, SPI, PWM and some
more
15 Backlight VCC (5V) Led+ It is wireless SoC