You are on page 1of 56

CHAPTER 1

INTRODUCTION
Security is important for everyone, everywhere, in the world and due to the emerging
technology, risks have been raised higher and improvement in safety measurements has become
a necessity. Home automation is quite a hot debate and has a high demand due to the helping
nature of the technology for handicapped, paralyzed and elder people. In this paper main focus is
to develop an offline smart home by making both face recognition and speech recognition
independent of the internet connection for the use in remote areas. Many countries are embracing
advanced security systems. Accuracy in the identification is the main concern and this can be
achieved by many different topologies as biometric finger print, key passwords, sensors and
facial recognition techniques . Technology of Face Recognition is beneficial for a wide range of
applications. Image Detection and recognition of a low- resolution up to 21x21 pixels is possible
and is the most suitable solution for the controlled environment, which makes it perfect for the
guard system of our smart home. In previous research, vast amount of work has been done to
make the face recognition technology more reliable and accurate. Face recognition has already
been done by various different techniques; Principle Component Analysis, Linear Discriminant
Analysis, Local Binary Pattern, Haar-Cascade Classifier, each having a competitive advantage
over others. Priyanka and Namrata distinguished the spoof images from genuine faces by
analyzing factors i.e. reflection, blurriness, chromatic effects and color-density. Kim, Park, Hong
and Chung worked in adjusting the location of the camera by the sound localization technique
used on the door to capture better CCTV footage. To confirm the identity of visitor, local
communication with the owner’s phone has been done by many means Zigbee, Bluetooth, GSM
and UWB. Mrutyunjaya, Chiranjiv, Abhijeet and Biswajeet introduced a GSM and FPGA based
system to update the owner about the security of home and ask for the permission of the entrance
of visitors. Nasimuzzaman, Shiblee and Srijon used IOT (internet of things) to send the image of
the visitor to the owner and to enable the owner to communicate back to the visitor by sending a
message back on the door screen. In the proposed offline system, face is detected and then
recognized by matching the image taken in the real time with the prestored database as also done
in [7], without any communication with the owner, for a faster, easy to use/install and cheap
system to help technologically uneducated people in remote areas. Raspberry-Pi microcontroller
is programmed with Python language to work with OpenCV algorithms for offline face
recognition of smart home. Bienvenido Bartido studied different algorithms of OpenCV, i.e.
eigenface, fisherface and LBPH, and has discussed that pre-processing techniques, pose and
illumination, affect the accuracy of algorithms in hugely different manners and paper mainly
start camera Face detection Face detected No Yes Face recognized Yes Open door Face
recognition Execute profile end showed that pose and pose + illumination techniques highly
improved the speed and threshold of LBPH compared to the other algorithms of OpenCV [5].
LBP is used for the improvement in the accuracy of results
In the present era, crime rates are increasing dramatically. A lot of incidents like theft, burglary,
and unwanted intrusions happen abruptly. This gives rise to the need of a security system which
can prevent unauthorized access to high-security zones such as locker room of banks, casinos,
garage, military sites etc. Till date, many Security Systems such as RFID, OTP based system,
biometrics are used to prevent unauthorized access. But merely preventing unauthorized access
is not enough. We need a system which would aid in catching the intruder as well as in unfolding
his motives. Here, we present a design of Door security system which solves this underlying
problem.
It must take into account the actions of people attempting to trespass or cause destruction.
Security is the degree of protection against danger, loss and criminals. Throughout history,
human have sought to protect their life, property and professions. The busy lifestyle of people is
leading to the necessity of controlling the devices at home remotely and increasing the necessity
of keeping surveillance over their home. Now when everything is available to us we can now
design something that provides us complete security. The very basic of this began with the
simple alarm system which include notifying suspicious activities at a very low cost [1] .The
need for security system have rapidly grown from being specialized for high –risk areas such as
banks ,companies ,governmental institutions),to be available and demanded rapidly by the
average public. Some of the common characteristics of motion detection alarm and security
system as follow 24hours monitoring, difficult to hack, Ability to control doors and motion
sensor. The motion sensor used in this work is the pyroelectric device that detects motion by
measuring changes in the infrared levels emitted by surrounding objects. This motion can be
detected by checking for a high signal on a single I/O pin. Its special features include single bit
output small size which makes it easy to conceal, compatible with all parallax embedded
microcontroller 3.3V& 5V and operation and operation with<100μA current draw. A typical
motion detection alarm and security system should consist of a control panel, Alarm/siren,
Window and door sensor plus at least one motion detector. In addition, some motion detection
alarm and security system can incorporate home automation, smoke detectors and glass break
detector. The main objective of this research work is to design a system that can sense human
movement, buzzes an alarm along with this captures an image of the intruder which is further
compared with the image of owner. In this research work, will designed a well-organized and
intelligent intruder motion detector alarm and security that can sensed the presence of humanly
bodies and notifies this to the owners just immediately. This system provides a very cost
effective security system that can be placed anywhere in the house with less maintenance cost
Door Lock Security is of prime importance because it is the first step toward ensuring the safety
of valuable assets and people. So many authors have come up with different kinds of door lock
system such as automatic password-based lock, software-based door lock which is being used in
various offices and homes. Various door lock systems are categorized on the basis of technology
to our survey, maximum projects existing till now don’t provide an instant alert in case of any
unauthorized entry. It requires manual work to monitor in order to assure security. Some of the
projects giving immediate alert only notify the user about intrusion but do not provide the
necessary information or facility to take countermeasures. Some systems employing CCTV
cameras capture the video and stores in a memory while some others use cloud storage for the
same purpose. The establishment cost for such systems is quite expensive also, the entire process
for viewing the video for any reference is time consuming and a very tedious process. Radio
frequency identification (RFID) uses radio waves to automatically identify the person or objects.
RFID constitutes of a reader and multiple tags to transmit radio frequency energy. These systems
are costly and also do not cover large surveillance area.
The security cameras in IoT networks have main issues such as continuous usage resulting in
high power consumption, requirement for data storage and long length videos, uneasy access of
video data and requirement of manual work are solved by our system. Our proposed system uses
a special PIR motion detection system to trigger camera (webcam) and sensor network on
appearance of living beings in its field of view. A notification e-mail is sent to the owner or
concerned authority with the link of the live video feed to monitor the actions of that person. The
live video can be seen from any place. A keypad lock is provided to grant entry only to the
authorized user. If the person enters the correct password, then he is granted entry else his image
is captured and sent over via an e-mail to the concerned authority along with a message of an
unauthorized user. The webcam still keeps an eye on the intruder. So, the concerned authority
can take quick action to capture him before it’s too late
CHAPTER 2
EMBEDDED SYSTEM
2.1 EMBEDDED SYSTEMS:
An embedded system is a computer system designed to perform one or a few dedicated functions
often with real-time computing constraints. It is embedded as part of a complete device often
including hardware and mechanical parts. By contrast, a general-purpose computer, such as a
personal computer (PC), is designed to be flexible and to meet a wide range of end-user needs.
Embedded systems control many devices in common use today.
Embedded systems are controlled by one or more main processing cores that are typically either
microcontrollers or digital signal processors (DSP). The key characteristic, however, is being
dedicated to handle a particular task, which may require very powerful processors. For example,
air traffic control systems may usefully be viewed as embedded, even though they involve
mainframe computers and dedicated regional and national networks between airports and radar
sites. (Each radar probably includes one or more embedded systems of its own.)
Since the embedded system is dedicated to specific tasks, design engineers can optimize it to
reduce the size and cost of the product and increase the reliability and performance. Some
embedded systems are mass-produced, benefiting from economies of scale.
Physically embedded systems range from portable devices such as digital watches and MP3
players, to large stationary installations like traffic lights, factory controllers, or the systems
controlling nuclear power plants. Complexity varies from low, with a single microcontroller
chip, to very high with multiple units, peripherals and networks mounted inside a large chassis or
enclosure.
In general, "embedded system" is not a strictly definable term, as most systems have some
element of extensibility or programmability. For example, handheld computers share some
elements with embedded systems such as the operating systems and microprocessors which
power them, but they allow different applications to be loaded and peripherals to be connected.
Moreover, even systems which don't expose programmability as a primary feature generally need
to support software updates. On a continuum from "general purpose" to "embedded", large
application systems will have subcomponents at most points even if the system as a whole is
"designed to perform one or a few dedicated functions", and is thus appropriate to call
"embedded".
In many ways, programming for an embedded system is like programming PC 15 years ago. The
hardware for the system is usually chosen to make the device as cheap as possible. Spending an
extra dollar a unit in order to make things easier to program can cost millions. Hiring a
programmer for an extra month is cheap in comparison. This means the programmer must make
do with slow processors and low memory, while at the same time battling a need for efficiency
not seen in most PC applications. Below is a list of issues specific to the embedded field.
2.2 RESOURCES:
To save costs, embedded systems frequently have the cheapest processors that can do the job.
This means your programs need to be written as efficiently as possible. When dealing with large
data sets, issues like memory cache misses that never matter in PC programming can hurt you.
Luckily, this won't happen too often- use reasonably efficient algorithms to start, and optimize
only when necessary. Of course, normal profilers won't work well, due to the same reason
debuggers don't work well.
Memory is also an issue. For the same cost savings reasons, embedded systems usually have the
least memory they can get away with. That means their algorithms must be memory efficient
(unlike in PC programs, you will frequently sacrifice processor time for memory, rather than the
reverse). It also means you can't afford to leak memory. Embedded applications generally use
deterministic memory techniques and avoid the default "new" and "malloc" functions, so that
leaks can be found and eliminated more easily. Other resources programmers expect may not
even exist. For example, most embedded processors do not have hardware FPUs (Floating-Point
Processing Unit). These resources either need to be emulated in software, or avoided altogether.
2.3 REAL TIME ISSUES:
Embedded systems frequently control hardware, and must be able to respond to them in real
time. Failure to do so could cause inaccuracy in measurements, or even damage hardware such
as motors. This is made even more difficult by the lack of resources available. Almost all
embedded systems need to be able to prioritize some tasks over others, and to be able to put
off/skip low priority tasks such as UI in favor of high priority tasks like hardware control.
2.3.1 Real-time embedded systems:
Embedded systems which are used to perform a specific task or operation in a specific time
period those systems are called as real-time embedded systems. There are two types of real-time
embedded systems.
 Hard Real-time embedded systems:
These embedded systems follow an absolute dead line time period i.e.., if the tasking is not done
in a particular time period then there is a cause of damage to the entire equipment.
Eg: consider a system in which we have to open a valve within 30 milliseconds. If this valve is
not opened in 30 ms this may cause damage to the entire equipment. So in such cases we use
embedded systems for doing automatic operations.
 Soft Real Time embedded systems:
These embedded systems follow a relative dead line time period i.e.., if the task is not done in a
particular time that will not cause damage to the equipment.
Eg: Consider a TV remote control system ,if the remote control takes a few milliseconds delay it
will not cause damage either to the TV or to the remote control. These systems which will not
cause damage when they are not operated at considerable time period those systems comes under
soft real-time embedded systems.

2.3.2 Different types of processing units:


The central processing unit (c.p.u) can be any one of the following microprocessor, micro
controller, digital signal processing.
 Among these Microcontroller is of low cost processor and one of the main advantage of
microcontrollers is, the components such as memory, serial communication interfaces, analog to
digital converters etc.., all these are built on a single chip. The numbers of external components
that are connected to it are very less according to the application.
 Microprocessors are more powerful than microcontrollers. They are used in major applications
with a number of tasking requirements. But the microprocessor requires many external
components like memory, serial communication, hard disk, input output ports etc.., so the power
consumption is also very high when compared to microcontrollers.
 Digital signal processing is used mainly for the applications that particularly involved with
processing of signals
2.4 APPLICATIONS OF EMBEDDED SYSTEMS:
2.4.1 Consumer applications:
At home we use a number of embedded systems which include microwave oven, remote control,
vcd players, dvd players, camera etc…
2.4.2. Industrial automation:
Today a lot of industries are using embedded systems for process control. In industries we design
the embedded systems to perform a specific operation like monitoring temperature, pressure,
humidity ,voltage, current etc.., and basing on these monitored levels we do control other
devices, we can send information to a centralized monitoring station.In critical industries where
human presence is avoided there we can use robots which are programmed to do a specific
operation.
CHAPTER 3
LITERATURE REVIEW
Integrated OTP-based user authentication scheme using smart cards in home networks by J.
Jeong, M. Y. Chung and H. Choo
In this paper, we propose a new user authentication (UA) scheme based on one-time password
(OTP) protocol using smart cards for home networks. The proposed scheme is to authenticate
home users who uses home devices. Several techniques using technology based on biometrics,
passwords, certificates, and smart cards can be used for user authentication in the similar
environments. However, such user authentication techniques must be examined before being
employed in an environment where home devices have low efficiency and performance. Here,
we present the important security functions of home networks. The proposed authentication
protocol is designed to accept the existing home networks based on the one-time password
protocol. Also, it is a well suited solution and is quite satisfactory in terms of the security
requirements of home networks, because of requiring low computation by performing simple
operations using one-way hash functions. Our proposed scheme can protect against illegal access
for home services and devices and does not allow unnecessary service access by legitimate users.
Therefore, it allows the user to provide real-time privilege control and good implementation in
secure home networks.
low-cost GSM/GPRS based wireless home security system by Y. Zhao and Z. Ye
Home security system is needed for occupants' convenience and safety. In this paper, we present
the design and implementation of a low cost, low power consumption, and GSM/GPRS (global
system for mobile communication /general packet radio service) based wireless home security
system. The system is a wireless home network which contains a GSM/GPRS gateway and three
kinds of wireless security sensor nodes that are door security nodes, infrared security nodes and
fire alarm nodes. The nodes are easy installing. The system can response rapidly to alarm
incidents and has a friendly user interface including a LCD (liquid crystal display) and a
capacitive sensor keyboard. The wireless communication protocol between the gateway and the
nodes is also suitable for other home appliances. Furthermore, some methods are taken to ensure
the security of system information.
Access Control of Door and Home Security by Raspberry Pi Through Internet by M. N.
Chowdhury, M. S. Nooman and S. Sarker,
In the present age Internet of things (IOT) has entered a golden era of rapid growth. The Internet
of things is a concept that aims to extend the benefits of the regular Internet—constant
connectivity, remote control ability, data sharing, and so on—to goods in the physical world.
Everyday things are getting connected with the internet. This concept can be used to manage the
security concerned issues in a cost effective way. In ths paper work a system is being developed
to connect any door with the internet, so that the access control system can be controlled from
any where in the world. In a case that one is not at home and a visitor is at his door steps then the
authorized person will be notified about the visitor via twitter and the person can see the visitor
from the web through the camera from any where and the system will take a picture of the visitor
and keep a record by sending an attachment through E-mail or tweet in twitter. If the authorized
person wants to give a message the visitor it can be sent easily through the internet and it will
appear in a screen on the front face of the door. The door lock can be controlled through the
internet. With the help of this system an evidence of the visitor can be kept as a record if any
emergency case or situation occurs.
Design and implementation of an embedded home surveillance system by use of multiple
ultrasonic sensors by Y. W. Bai, L. S. Shen and Z. H. Li,
In this paper we design and implement a home surveillance system based on an embedded
system with multiple ultrasonic sensor modules to enhance the system's reliability. Each
ultrasonic sensor module includes a transmitter and a receiver, and the modules are placed in a
line direction. Because the ultrasonic transmission will spread at a beam angle, we use multiple
ultrasonic receivers to receive the ultrasonic transmission. If any intruder passes through the
ultrasonic sensing area, the ultrasonic transmission will be blocked by the human body. As the
receivers will not receive any transmission from the ultrasonic transmitter, the system will sense
when someone is passing through the surveillance area. We use a Majority Voting Mechanism
(MVM) for a group of sensors. If over half the sensors in a sensor group sense a signal blocking,
the majority voting program starts the Web camera. The mathematical equation and the sensing
experiment show that we improve the system's reliabilities.
Design and Implementation of Security Systems for Smart Home based on GSM technology by
J. Bangali and A. Shaligram,
Security has becoming an important issue everywhere. Home security is becoming necessary
nowadays as the possibilities of intrusion are increasing day by day. Safety from theft, leaking of
raw gas and fire are the most important requirements of home security system for people. A
traditional home security system gives the signals in terms of alarm. However, the GSM (Global
System for Mobile communications) based security systems provides enhanced security as
whenever a signal from sensor occurs, a text message is sent to a desired number to take
necessary actions. This paper suggests two methods for home security system. The first system
uses web camera. Whenever there is a motion in front of the camera, it gives security alert in
terms of sound and a mail is delivered to the owner. The second method sends SMS which uses
GSM-GPS Module (sim548c) and Atmega644p microcontroller, sensors, relays and buzzers.
CHAPTER 4
EXISTING SYSTEM

As technology is still evolving, there is not a specific appropriate standard to define a ‘smart
home’ nor a distinctive features to classifying ‘smart home’ in relation to various related terms
used and from similar other systems. We can say home system as ‘smarter’ due to collective
intelligence of individual home appliances, all electronics and non electronic items in
collaboration with other devices in surroundings. The term ‘smart home’ is used for all residence
those are equipped with something that makes inhabitants to monitoring all things automatically
and facilitates home environment so as optimize and automate all facilities designed for basic
day today need of an individual.
Development in technology from last few decades open doors to various threats to human and
his surroundings. Individuals with the advancement in security had taken several measures to
control the threats for safeguarding their belongings. From time to time various intrusion
detection systems established for earmark intruders from home environment and provide tangible
benefits to users, but can also expose users to significant security risk. Smart home security
system is gaining popularity for industry, government, and academia as well as for individual
that has the potential to bring significant personal, professional and economic benefits. This
paper presents design and implementation of smart home security system based on GSM/GPRS
(Global System for Mobile Communication /General Packet Radio Service)and response rapidly
to alarm incidents and has a friendly user interface including a LCD (Liquid Crystal Display) and
keypad. Special emphasis is placed on the empirical security analysis of such emerging smart
home platformby dividing into two case scenarios. The paper will conclude by discussing future
perspective and challenges associated with the development of security system for home.
The huge need of automated equipment in our day to day lives is going on increasing in order to
meet that need automated equipment is coming into limelight Automatic electronic door opener
is such a system through which a door can be opened easily & automatically ,through voice
control , motion sensors ,PIR sensor. Performance of automatic electronic door opener is through
sensors ,energy level & efficiency of automatic electronic door opener is better but the operating
capacity of this system is area limited and inconvenience problems are introduced .
CHAPTER 5
PROPOSED SYSTEM
The objective is to develop the real time face recognition from the facial images. it is performed
using real time database which is collection of images from 10 subjects. The images of each
subject is stored in specific directory with 30 images .Each image size is of about 100*130pixels.
The viola Jones detection algorithm is used for face detection whereas PCA algorithm is used for
feature extraction and then Adaboost classifier is used for face recognition. Raspberry pi II is the
credit card sized computer which contains system on chip Broadcom BCM 2836 with CPU,
GPU, DSP, SDRAM .The CPU is made up of quad core ARM cortex running at 200 MHz The
architecture of proposed system is displayed in Figure b and explained as follows: The input
image is captured from web camera and fed into the real time face recognition system as input.
The real time face recognition is deployed with the Raspberry pi II which gives the identified
image as output. This output is displayed in the monitor of the system

POWER SUPPLY LCD

Raspberry pi

CAMERA

PIR SENSOR L2923D

DOOR LOCK
MODULE
With the fast advancement of human–machine interaction, full of feeling figuring is as of now
picking up ubiquity in research and thriving in the business space. It expects to outfit figuring
gadgets with easy and normal correspondence. The capacity to perceive human full of feeling
state will enable the smart PC to translate, comprehend, and react to human. This is like the way
that people depend on their faculties to evaluate each other’s full of feeling state. Numerous
potential applications, for example, clever car frameworks, diversion and media outlets,
intelligent video, ordering and recovery of picture or video databases, can profit by this ability.
Our framework is composed by utilizing ARM 32-bit miniaturized scale controller which
underpins distinctive components and calculations for improvement of first facial
acknowledgment. The webcam consolidates video detecting, video handling and communication
inside a solitary gadget. It catches a video stream registers the data and exchanges the video
stream to the ARM miniaturized scale controller. The picture it got is handled by utilizing picture
preparing calculations and processed picture is grouped. In grouping Human is detected by
utilizing Haar calculation and identified people are shown in plain view unit in particular format.
Our framework is outlined by utilizing BSC2836 smaller scale processor created by
BROADCOM which was called as RaspberryPi.
FACEDETECTION

A Boost classifier is used with Here and Local Binary Pattern highlights however Support Vector
Machine classifier is used with Histogram of Oriented Gradients highlights for face revelation
evaluation. Here-like components are surveyed utilizing another photo depiction that creates an
extensive plan of parts and usages the boosting computation A Boost to lessen degenerative tree
of the helped classifiers for fiery and fast impedances simply direct rectangular Here like
components are used that gives different focal points like sort of uniquely delegated space
learning is deduced and furthermore a speed increase over pixel based systems, suggestive to
Here commence limits practically identical to compel qualification readings are extremely easy
to enroll. Execution of a system that used such parts would give a rundown of capacities that was
outrageously broad, in this manner the rundown of abilities must be quite recently bound to
couple of essential components which is refined by boosting computation, Adaboost. The
primary LBP overseer names the pixels of a photo by thresholding the 3-by-3 neighbourhood of
each pixel with the centre pixel regard and considering the result as a twofold number. Each face
picture can be considered as a production of littler scale outlines which can be suitably perceived
by the LBP chairman. To consider the shape information of goes up against, they detached face
pictures into N little non-covering territories T0, T1... TN. The LBP histograms isolated from
each sub-territory are then connected into a singular, spatially overhauled highlight histogram
described as:Hi, j= _x ,yI(fl(x,y)=i)I((x,y)_Tj) Where i = 0, ... , L-1; j = 0, ..., N-1. The removed
element histogram portrays the neighborhood surface and worldwide state of facepictures.

Face Recognition

Eigen faces considered as 2-D goes up against affirmation issue, faces will be for the most part
upright and frontal. That is the reason 3-D information about the face is not required that
abatements multifaceted nature by a basic piece. It change over the face pictures into a course of
action of introduce limits which essentially are the main fragments of the face pictures searches
for headings in which it is more beneficial to address the data. This is generally significant for
reduction the computational effort. Straight discriminate examination is on a very basic level
used here to decrease the amount of components to a more manageable number before
affirmation since face is addressed by a generous number of pixel qualities. Each of the new
estimations is an immediate mix of pixel qualities, which outline an emulate. The immediate
mixes got using Fisher's straight discriminate are called Fisher faces . LBP is a demand set of
matched relationships of pixel strengths between within pixel and its eight incorporating pixels.
In Face recognition a real time image is given to the system and through feature extraction
process that image is checked against the database already stored in the system. Features of test
image will later be compared to the features of database. Minimum difference in the features will
help in identification of the profile of person in the test image. In the first phase of making a
smart lock system using facial recognition, raspberry pi 3B (the source hardware) having python
& open-cv (open source computer vision) was used to make this work precise and fast. Face
detection was done by using Haar cascade classifiers of open cv, that detected the faces and then
the detected faces were being stored by using python commands in a database. Training was
done so that the images inside the data base were converted to yml file for further use in
recognition process. Finally, recognition process was done by using LBPH while keeping check
on a yml file created during training this process, if the image of the person in front of the
camera matched with the database records, which meant that the difference of two images did
not increase the given threshold, then it goes into the door is not open and image will be send to
the mail. Same data will be updated into server

CHAPTER 6
RASPBERRY PI
6.1 The Idea to create the Raspberry Pi
The idea behind a tiny and affordable computer for kids came in 2006, when Eben Upton, Rob
Mullins, Jack Lang and Alan Mycroft, based at the University of Cambridge’s Computer
Laboratory, became concerned about the year-on-year decline in the numbers and skills levels of
the A Level students applying to read Computer Science. From a situation in the 1990s where
most of the kids applying were coming to interview as experienced hobbyist programmers, the
landscape in the 2000s was very different; a typical applicant might only have done a little web
design.
Something had changed the way kids were interacting with computers. A number of problems
were identified: majority of curriculums with lessons on using Word and Excel, or writing
webpages; the end of the dot-com boom; and the rise of the home PC and games console to
replace the Amigas, BBC Micros, Spectrum ZX and Commodore 64 machines that people of an
earlier generation learned to program on.

Figure 6.1: A complete Commodore 64 System

There isn’t much any small group of people can do to address problems like an inadequate
school curriculum or the end of a financial bubble. But those students felt that they could try to
do something about the situation where computers had become so expensive and arcane that
programming experimentation on them had to be forbidden by parents; and to find a platform
that, like those old home computers, could boot into a programming environment. Thus came the
idea of creating the device which kids could buy and learn programming or hardware on – The
Raspberry Pi.
6.2 Initial Design Considerations
From 2006 to 2008 they created many designs and prototypes of what we now know as the
Raspberry Pi. One of the earliest prototypes is shown below:

Figure 6.2: One of the earliest prototype of the Pi

These boards use an Atmel ATmega644 microcontroller clocked at 22.1MHz, and a 512K
SRAM for data and frame buffer storage.
By 2008, processors designed for mobile devices were becoming more affordable, and powerful
enough to provide excellent multimedia, a feature which would make the board desirable to kids
who wouldn’t initially be interested in a purely programming-oriented device. The project started
to look very realisable and feasible. Eben (now a chip architect at Broadcom), Rob, Jack and
Alan, teamed up with Pete Lomas, MD of hardware design and manufacture company Norcott
Technologies, and David Braben, co-author of the BBC Micro game Elite, to form the Raspberry
Pi Foundation to make it a reality. Three years later, the Raspberry Pi Model B entered mass
production through licensed manufacture deals with Element 14/Premier Farnell and RS
Electronics, and within two years it had sold over two million units!
6.3 HARDWARE

Hardware Layout

Figure 6.3 : Block Diagram of Raspberry Pi3


6.3.1 A brief description of the components on the Pi.
1) Processor / SoC (System on Chip)
The Raspberry Pi has a Broadcom BCM2835 System on Chip module. It has a
ARM1176JZF-S processor
The Broadcom SoC used in the Raspberry Pi is equivalent to a chip used in an old
smartphone (Android or iPhone). While operating at 700 MHz by default, the Raspberry
Pi provides a real world performance roughly equivalent to the 0.041 GFLOPS. On the
CPU level the performance is similar to a 300 MHz Pentium II of 1997-1999, but the
GPU, however, provides 1 Gpixel/s, 1.5 Gtexel/s or 24 GFLOPS of general purpose
compute and the graphics capabilities of the Raspberry Pi are roughly equivalent to the
level of performance of the Xbox of 2001. The Raspberry Pi chip operating at 700 MHz
by default, will not become hot enough to need a heatsink or special cooling.
2) Power source
The Pi is a device which consumes 700mA or 3W or power. It is powered by a
MicroUSB charger or the GPIO header. Any good smartphone charger will do the work
of powering the Pi.
3) SD Card
The Raspberry Pi does not have any onboard storage available. The operating system is
loaded on a SD card which is inserted on the SD card slot on the Raspberry Pi. The
operating system can be loaded on the card using a card reader on any computer.
4) GPIO
GPIO – General Purpose Input Output
General-purpose input/output (GPIO) is a generic pin on an integrated circuit whose
behaviour, including whether it is an input or output pin, can be controlled by the user at
run time.
GPIO pins have no special purpose defined, and go unused by default. The idea is that
sometimes the system designer building a full system that uses the chip might find it
useful to have a handful of additional digital control lines, and having these available
from the chip can save the hassle of having to arrange additional circuitry to provide
them.
GPIO capabilities may include:
 GPIO pins can be configured to be input or output
 GPIO pins can be enabled/disabled
 Input values are readable (typically high=1, low=0)
 Output values are writable/readable
 Input values can often be used as IRQs (typically for wakeup events)
The production Raspberry Pi board has a 26-pin 2.54 mm (100 mil) expansion header,
marked as P1, arranged in a 2x13 strip. They provide 8 GPIO pins plus access to I²C, SPI,
UART), as well as +3.3 V, +5 V and GND supply lines. Pin one is the pin in the first
column and on the bottom row.

Figure 5.4: GPIO connector on RPi


5) DSI Connector
The Display Serial Interface (DSI) is a specification by the Mobile Industry Processor
Interface (MIPI) Alliance aimed at reducing the cost of display controllers in a mobile
device. It is commonly targeted at LCD and similar display technologies. It defines a
serial bus and a communication protocol between the host (source of the image data) and
the device (destination of the image data).
A DSI compatible LCD screen can be connected through the DSI connector, although it
may require additional drivers to drive the display.
6) RCA Video
RCA Video outputs (PAL and NTSC) are available on all models of Raspberry Pi. Any
television or screen with a RCA jack can be connected with the RPi.

Figure6.5: RCA Video Connector

7) Audio Jack
A standard 3.5 mm TRS connector is available on the RPi for stereo audio output. Any
headphone or 3.5mm audio cable can be connected directly. Although this jack cannot be
used for taking audio input, USB mics or USB sound cards can be used.
8) Status LEDs
There are 5 status LEDs on the RPi that show the status of various activities as follows:
“OK” - SDCard Access (via GPIO16) - labelled as "OK" on Model B Rev1.0 boards and
"ACT" on Model B Rev2.0 and Model A boards
“POWER” - 3.3 V Power - labelled as "PWR" on all boards
“FDX” - Full Duplex (LAN) (Model B) - labelled as "FDX" on all boards
“LNK” - Link/Activity (LAN) (Model B) - labelled as "LNK" on all boards
“10M/100” - 10/100Mbit (LAN) (Model B) - labelled (incorrectly) as "10M" on Model B
Rev1.0 boards and "100" on Model B Rev2.0 and Model A boards

Figure 6.6: Status LEDs


9) USB 2.0 Port
USB 2.0 ports are the means to connect accessories such as mouse or keyboard to the
Raspberry Pi. There is 1 port on Model A, 2 on Model B and 4 on Model B+. The
number of ports can be increased by using an external powered USB hub which is
available as a standard Pi accessory.
10) Ethernet
Ethernet port is available on Model B and B+. It can be connected to a network or
internet using a standard LAN cable on the Ethernet port. The Ethernet ports are
controlled by Microchip LAN9512 LAN controller chip.
11) CSI connector
CSI – Camera Serial Interface is a serial interface designed by MIPI (Mobile Industry
Processor Interface) alliance aimed at interfacing digital cameras with a mobile
processor.
The RPi foundation provides a camera specially made for the Pi which can be connected
with the Pi using the CSI connector.
12) JTAG headers
JTAG is an acronym for ‘Joint Test Action Group', an organisation that started back in
the mid 1980's to address test point access issues on PCB with surface mount devices.
The organisation devised a method of access to device pins via a serial port that became
known as the TAP (Test Access Port). In 1990 the method became a recognised
international standard (IEEE Std 1149.1). Many thousands of devices now include this
standardised port as a feature to allow test and design engineers to access pins.
13) HDMI
HDMI – High Definition Multimedia Interface
HDMI 1.3 a type A port is provided on the RPi to connect with HDMI screens.
6.3.2 Specifications

Table 1 Specifications

6.3.4 Brief description of System on Chip (SoC)


Since smartphones and tablets are basically smaller computers, they require pretty much the
same components we see in desktops and laptops in order to offer us all the amazing things they
can do (apps, music and video playing, 3D gaming support, advanced wireless features, etc).
But smartphones and tablets do not offer the same amount of internal space as desktops and
laptops for the various components needed such as the logic board, the processor, the RAM, the
graphics card, and others. That means these internal parts need to be as small as possible, so that
device manufacturers can use the remaining space to fit the device with a long-lasting battery
life.
Thanks to the wonders of miniaturization, SoC manufacturers, like Qualcomm, Nvidia or Texas
Instruments, can place some of those components on a single chip, the System on a Chip that
powers smartphones.
A system on a chip or system on chip (SoC or SOC) is an integrated circuit (IC) that integrates
all components of a computer or other electronic system into a single chip. It may contain digital,
analog, mixed-signal, and often radio-frequency functions—all on a single chip substrate. SoCs
are very common in the mobile electronics market because of their low power consumption. A
typical application is in the area of embedded systems.
The contrast with a microcontroller is one of degree. Microcontrollers typically have under 100
kB of RAM (often just a few kilobytes) and often really are single-chip-systems, whereas the
term SoC is typically used for more powerful processors, capable of running software such as the
desktop versions of Windows and Linux, which need external memory chips (flash, RAM) to be
useful, and which are used with various external peripherals. In short, for larger systems, the
term system on a chip is a hyperbole, indicating technical direction more than reality: increasing
chip integration to reduce manufacturing costs and to enable smaller systems. Many interesting
systems are too complex to fit on just one chip built with a process optimized for just one of the
system's tasks.
A typical SoC consists of:
 A microcontroller, microprocessor or DSP core(s). Some SoCs—called multiprocessor
system on chip (MPSoC)—include more than one processor core.
 memory blocks including a selection of ROM, RAM, EEPROM and flash memory
 timing sources including oscillators and phase-locked loops
 peripherals including counter-timers, real-time timers and power-on reset generators
 external interfaces, including industry standards such as USB, FireWire, Ethernet,
USART, SPI
 analog interfaces including ADCs and DACs
 voltage regulators and power management circuits
 A bus - either proprietary or industry-standard such as the AMBA bus from ARM
Holdings - connects these blocks. DMA controllers route data directly between external
interfaces and memory, bypassing the processor core and thereby increasing the data
throughput of the SoC.
CHAPTER 7
HARDWARE COMPONENTS
7.1 POWER SUPPLY
Power supply is a reference to a source of electrical power. A device or system that
supplies electrical or other types of energy to an output load or group of loads is called a power
supply unit or PSU. The term is most commonly applied to electrical energy supplies, less often
to mechanical ones, and rarely to others
This power supply section is required to convert AC signal to DC signal and also to
reduce the amplitude of the signal. The available voltage signal from the mains is 230V/50Hz
which is an AC voltage, but the required is DC voltage(no frequency) with the amplitude of +5V
and +12V for various applications.
In this section we have Transformer, Bridge rectifier, are connected serially and voltage
regulators for +5V and +12V (7805 and 7812) via a capacitor (1000µF) in parallel are connected
parallel as shown in the circuit diagram below. Each voltage regulator output is again is
connected to the capacitors of values (100µF, 10µF, 1 µF, 0.1 µF) are connected parallel through
which the corresponding output(+5V or +12V) are taken into consideration.

Circuit Explanation
1) Transformer
A transformer is a device that transfers electrical energy from one circuit to another
through inductively coupled electrical conductors. A changing current in the first circuit (the
primary) creates a changing magnetic field; in turn, this magnetic field induces a changing
voltage in the second circuit (the secondary). By adding a load to the secondary circuit, one can
make current flow in the transformer, thus transferring energy from one circuit to the other.
The secondary induced voltage VS, of an ideal transformer, is scaled from the primary VP
by a factor equal to the ratio of the number of turns of wire in their respective windings:

Basic principle
The transformer is based on two principles: firstly, that an electric current can produce a
magnetic field (electromagnetism) and secondly that a changing magnetic field within a coil of
wire induces a voltage across the ends of the coil (electromagnetic induction). By changing the
current in the primary coil, it changes the strength of its magnetic field; since the changing
magnetic field extends into the secondary coil, a voltage is induced across the secondary.
A simplified transformer design is shown below. A current passing through the primary
coil creates a magnetic field. The primary and secondary coils are wrapped around a core of very
high magnetic permeability, such as iron; this ensures that most of the magnetic field lines
produced by the primary current are within the iron and pass through the secondary coil as well
as the primary coil.

An ideal step-down transformer showing magnetic flux in the core


Induction law
The voltage induced across the secondary coil may be calculated from Faraday's law of
induction, which states that:

Where VS is the instantaneous voltage, NS is the number of turns in the secondary coil
and Φ equals the magnetic flux through one turn of the coil. If the turns of the coil are oriented
perpendicular to the magnetic field lines, the flux is the product of the magnetic field strength B
and the area A through which it cuts. The area is constant, being equal to the cross-sectional area
of the transformer core, whereas the magnetic field varies with time according to the excitation
of the primary. Since the same magnetic flux passes through both the primary and secondary
coils in an ideal transformer, the instantaneous voltage across the primary winding equals

Taking the ratio of the two equations for VS and VP gives the basic equation for stepping
up or stepping down the voltage

Ideal power equation


If the secondary coil is attached to a load that allows current to flow, electrical power is
transmitted from the primary circuit to the secondary circuit. Ideally, the transformer is perfectly
efficient; all the incoming energy is transformed from the primary circuit to the magnetic field
and into the secondary circuit. If this condition is met, the incoming electric power must equal
the outgoing power.
Pincoming = IPVP = Poutgoing = ISVS
giving the ideal transformer equation
Pin-coming = IPVP = Pout-going = ISVS
giving the ideal transformer equation

If the voltage is increased (stepped up) (VS > VP), then the current is decreased (stepped
down) (IS < IP) by the same factor. Transformers are efficient so this formula is a reasonable
approximation.
If the voltage is increased (stepped up) (VS > VP), then the current is decreased (stepped
down) (IS < IP) by the same factor. Transformers are efficient so this formula is a reasonable
approximation.
The impedance in one circuit is transformed by the square of the turns ratio. For example,
if an impedance ZS is attached across the terminals of the secondary coil, it appears to the
primary circuit to have an impedance of

This relationship is reciprocal, so that the impedance ZP of the primary circuit appears to
the secondary to be

Detailed operation
The simplified description above neglects several practical factors, in particular the
primary current required to establish a magnetic field in the core, and the contribution to the field
due to current in the secondary circuit.
Models of an ideal transformer typically assume a core of negligible reluctance with two
windings of zero resistance. When a voltage is applied to the primary winding, a small current
flows, driving flux around the magnetic circuit of the core. The current required to create the flux
is termed the magnetizing current; since the ideal core has been assumed to have near-zero
reluctance, the magnetizing current is negligible, although still required to create the magnetic
field.
The changing magnetic field induces an electromotive force (EMF) across each winding.
Since the ideal windings have no impedance, they have no associated voltage drop, and so the
voltages VP and VS measured at the terminals of the transformer, are equal to the corresponding
EMFs. The primary EMF, acting as it does in opposition to the primary voltage, is sometimes
termed the "back EMF". This is due to Lenz's law which states that the induction of EMF would
always be such that it will oppose development of any such change in magnetic field.
2) Bridge Rectifier
A diode bridge or bridge rectifier is an arrangement of four diodes in a bridge
configuration that provides the same polarity of output voltage for any polarity of input voltage.
When used in its most common application, for conversion of alternating current (AC) input into
direct current (DC) output, it is known as a bridge rectifier. A bridge rectifier provides full-wave
rectification from a two-wire AC input, resulting in lower cost and weight as compared to a
center-tapped transformer design, but has two diode drops rather than one, thus exhibiting
reduced efficiency over a center-tapped design for the same output voltage.
Basic Operation
When the input connected at the left corner of the diamond is positive with respect to the
one connected at the right hand corner, current flows to the right along the upper colored path to
the output, and returns to the input supply via the lower one.
When the right hand corner is positive relative to the left hand corner, current flows along
the upper colored path and returns to the supply via the lower colored path.

In each case, the upper right output remains positive with respect to the lower right one.
Since this is true whether the input is AC or DC, this circuit not only produces DC power when
supplied with AC power: it also can provide what is sometimes called "reverse polarity
protection". That is, it permits normal functioning when batteries are installed backwards or DC
input-power supply wiring "has its wires crossed" (and protects the circuitry it powers against
damage that might occur without this circuit in place).
Prior to availability of integrated electronics, such a bridge rectifier was always
constructed from discrete components. Since about 1950, a single four-terminal component
containing the four diodes connected in the bridge configuration became a standard commercial
component and is now available with various voltage and current ratings.
Output smoothing (Using Capacitor)
For many applications, especially with single phase AC where the full-wave bridge
serves to convert an AC input into a DC output, the addition of a capacitor may be important
because the bridge alone supplies an output voltage of fixed polarity but pulsating magnitude
(see diagram above).

The function of this capacitor, known as a reservoir capacitor (aka smoothing capacitor)
is to lessen the variation in (or 'smooth') the rectified AC output voltage waveform from the
bridge. One explanation of 'smoothing' is that the capacitor provides a low impedance path to the
AC component of the output, reducing the AC voltage across, and AC current through, the
resistive load. In less technical terms, any drop in the output voltage and current of the bridge
tends to be cancelled by loss of charge in the capacitor.
This charge flows out as additional current through the load. Thus the change of load
current and voltage is reduced relative to what would occur without the capacitor. Increases of
voltage correspondingly store excess charge in the capacitor, thus moderating the change in
output voltage / current. Also see rectifier output smoothing.
The simplified circuit shown has a well deserved reputation for being dangerous,
because, in some applications, the capacitor can retain a lethal charge after the AC power source
is removed. If supplying a dangerous voltage, a practical circuit should include a reliable way to
safely discharge the capacitor. If the normal load can not be guaranteed to perform this function,
perhaps because it can be disconnected, the circuit should include a bleeder resistor connected as
close as practical across the capacitor. This resistor should consume a current large enough to
discharge the capacitor in a reasonable time, but small enough to avoid unnecessary power
waste.
Because a bleeder sets a minimum current drain, the regulation of the circuit, defined as
percentage voltage change from minimum to maximum load, is improved. However in many
cases the improvement is of insignificant magnitude.
The capacitor and the load resistance have a typical time constant τ = RC where C and R
are the capacitance and load resistance respectively. As long as the load resistor is large enough
so that this time constant is much longer than the time of one ripple cycle, the above
configuration will produce a smoothed DC voltage across the load.
In some designs, a series resistor at the load side of the capacitor is added. The smoothing
can then be improved by adding additional stages of capacitor–resistor pairs, often done only for
sub-supplies to critical high-gain circuits that tend to be sensitive to supply voltage noise.
The idealized waveforms shown above are seen for both voltage and current when the
load on the bridge is resistive. When the load includes a smoothing capacitor, both the voltage
and the current waveforms will be greatly changed. While the voltage is smoothed, as described
above, current will flow through the bridge only during the time when the input voltage is greater
than the capacitor voltage. For example, if the load draws an average current of n Amps, and the
diodes conduct for 10% of the time, the average diode current during conduction must be 10n
Amps. This non-sinusoidal current leads to harmonic distortion and a poor power factor in the
AC supply.
In a practical circuit, when a capacitor is directly connected to the output of a bridge, the
bridge diodes must be sized to withstand the current surge that occurs when the power is turned
on at the peak of the AC voltage and the capacitor is fully discharged. Sometimes a small series
resistor is included before the capacitor to limit this current, though in most applications the
power supply transformer's resistance is already sufficient.
Output can also be smoothed using a choke and second capacitor. The choke tends to
keep the current (rather than the voltage) more constant. Due to the relatively high cost of an
effective choke compared to a resistor and capacitor this is not employed in modern equipment.
Some early console radios created the speaker's constant field with the current from the
high voltage ("B +") power supply, which was then routed to the consuming circuits, (permanent
magnets were considered too weak for good performance) to create the speaker's constant
magnetic field. The speaker field coil thus performed 2 jobs in one: it acted as a choke, filtering
the power supply, and it produced the magnetic field to operate the speaker.
3) Voltage Regulator
A voltage regulator is an electrical regulator designed to automatically maintain a
constant voltage level.
The 78xx (also sometimes known as LM78xx) series of devices is a family of self-
contained fixed linear voltage regulator integrated circuits. The 78xx family is a very popular
choice for many electronic circuits which require a regulated power supply, due to their ease of
use and relative cheapness. When specifying individual ICs within this family, the xx is replaced
with a two-digit number, which indicates the output voltage the particular device is designed to
provide (for example, the 7805 has a 5 volt output, while the 7812 produces 12 volts). The 78xx
line is positive voltage regulators, meaning that they are designed to produce a voltage that is
positive relative to a common ground. There is a related line of 79xx devices which are
complementary negative voltage regulators. 78xx and 79xx ICs can be used in combination to
provide both positive and negative supply voltages in the same circuit, if necessary.
78xx ICs have three terminals and are most commonly found in the TO220 form factor,
although smaller surface-mount and larger TrO3 packages are also available from some
manufacturers. These devices typically support an input voltage which can be anywhere from a
couple of volts over the intended output voltage, up to a maximum of 35 or 40 volts, and can
typically provide up to around 1 or 1.5 amps of current (though smaller or larger packages may
have a lower or higher current rating).

7.2 LCD (LIQUID CRISTAL DISPLAY)


A liquid crystal display (LCD) is a thin, flat display device made up of any number of color or
monochrome pixels arrayed in front of a light source or reflector. Each pixel consists of a
column of liquid crystal molecules suspended between two transparent electrodes, and two
polarizing filters, the axes of polarity of which are perpendicular to each other. Without the
liquid crystals between them, light passing through one would be blocked by the other. The
liquid crystal twists the polarization of light entering one filter to allow it to pass through the
other.
A program must interact with the outside world using input and output devices that communicate
directly with a human being. One of the most common devices attached to an controller is an
LCD display. Some of the most common LCDs connected to the contollers are 16X1, 16x2 and
20x2 displays. This means 16 characters per line by 1 line 16 characters per line by 2 lines and
20 characters per line by 2 lines, respectively.
available.
Many microcontroller devices use 'smart LCD' displays to output visual information. LCDLine lengths of
displays designed around LCD NT-C1611 module, are inexpensive, easy to use, and it is even 8, 16,
possible to produce a readout using the 5X7 dots plus cursor of the display. They have a 20, 24,
standard ASCII set of characters and mathematical symbols. For an 8-bit data bus, the display 32 and
requires a +5V supply plus 10 I/O lines (RS RW D7 D6 D5 D4 D3 D2 D1 D0). For a 4-bit data 40
bus it only requires the supply lines plus 6 extra lines(RS RW D7 D6 D5 D4). When the LCD charact
display is not enabled, data lines are tri-state and they do not interfere with the operation of the ers are
microcontroller. all
standar
d, in
one,
two
Features:
(1) Interface with either 4-bit or 8-bit microprocessor.
(2) Display data RAM
(3) 80x8 bits (80 characters).
(4) Character generator ROM
(5). 160 different 5 7 dot-matrix character patterns.
(6). Character generator RAM
(7) 8 different user programmed 5 7 dot-matrix patterns.
(8).Display data RAM and character generator RAM may be
Accessed by the microprocessor.
(9) Numerous instructions
(10) .Clear Display, Cursor Home, Display ON/OFF, Cursor ON/OFF,
Blink Character, Cursor Shift, Display Shift.
(11). Built-in reset circuit is triggered at power ON.
(12). Built-in oscillator.
Data can be placed at any location on the LCD. For 16×1 LCD, the address locations are:

Fig : Address locations for a 1x16 line LCD


Shapes and sizes:
Even limited to character based modules,there is still a wide variety of shapes and sizes
available. Line lenghs of 8,16,20,24,32 and 40 charecters are all standard, in one, two and four
line versions.
Several different LC technologies exists. “supertwist” types, for example, offer Improved
contrast and viewing angle over the older “twisted nematic” types. Some modules are available
with back lighting, so so that they can be viewed in dimly-lit conditions. The back lighting may
be either “electro-luminescent”, requiring a high voltage inverter circuit, or simple LED
illumination.

PIN DESCRIPTION:
Most LCDs with 1 controller has 14 Pins and LCDs with 2 controller has 16 Pins (two pins are
extra in both for back-light LED connections).
Fig: pin diagram of 1x16 lines lcd

CONTROL LINES:
EN:
Line is called "Enable." This control line is used to tell the LCD that you are sending it data. To
send data to the LCD, your program should make sure this line is low (0) and then set the other
two control lines and/or put data on the data bus. When the other lines are completely ready,
bring EN high (1) and wait for the minimum amount of time required by the LCD datasheet (this
varies from LCD to LCD), and end by bringing it low (0) again.
RS:
Line is the "Register Select" line. When RS is low (0), the data is to be treated as a command or
special instruction (such as clear screen, position cursor, etc.). When RS is high (1), the data
being sent is text data which sould be displayed on the screen. For example, to display the letter
"T" on the screen you would set RS high.
RW:
Line is the "Read/Write" control line. When RW is low (0), the information on the data bus is
being written to the LCD. When RW is high (1), the program is effectively querying (or reading)
the LCD. Only one instruction ("Get LCD status") is a read command. All others are write
commands, so RW will almost always be low.
Finally, the data bus consists of 4 or 8 lines (depending on the mode of operation selected by the
user). In the case of an 8-bit data bus, the lines are referred to as DB0, DB1, DB2, DB3, DB4,
DB5, DB6, and DB7.
Logic status on control lines:
• E - 0 Access to LCD disabled
- 1 Access to LCD enabled
• R/W - 0 Writing data to LCD
- 1 Reading data from LCD
• RS - 0 Instructions
- 1 Character
Writing data to the LCD:
1) Set R/W bit to low
2) Set RS bit to logic 0 or 1 (instruction or character)
3) Set data to data lines (if it is writing)
4) Set E line to high
5) Set E line to low
Read data from data lines (if it is reading)on LCD:
1) Set R/W bit to high
2) Set RS bit to logic 0 or 1 (instruction or character)
3) Set data to data lines (if it is writing)
4) Set E line to high
5) Set E line to low
Entering Text:
First, a little tip: it is manually a lot easier to enter characters and commands in hexadecimal
rather than binary (although, of course, you will need to translate commands from binary couple
of sub-miniature hexadecimal rotary switches is a simple matter, although a little bit into hex so
that you know which bits you are setting). Replacing the d.i.l. switch pack with a of re-wiring is
necessary.
The switches must be the type where On = 0, so that when they are turned to the zero position, all
four outputs are shorted to the common pin, and in position “F”, all four outputs are open circuit.
All the available characters that are built into the module are shown in Table 3. Studying the table,
you will see that codes associated with the characters are quoted in binary and hexadecimal, most
significant bits (“left-hand” four bits) across the top, and least significant bits (“right-hand” four
bits) down the left.
Most of the characters conform to the ASCII standard, although the Japanese and Greek
characters (and a few other things) are obvious exceptions. Since these intelligent modules were
designed in the “Land of the Rising Sun,” it seems only fair that their Katakana phonetic symbols
should also be incorporated. The more extensive Kanji character set, which the Japanese share
with the Chinese, consisting of several thousand different characters, is not included!
Using the switches, of whatever type, and referring to Table 3, enter a few characters onto the
display, both letters and numbers. The RS switch (S10) must be “up” (logic 1) when sending the
characters, and switch E (S9) must be pressed for each of them. Thus the operational order is: set
RS high, enter character, trigger E, leave RS high, enter another character, trigger E, and so on.
The first 16 codes in Table 3, 00000000 to 00001111, ($00 to $0F) refer to the CGRAM. This is
the Character Generator RAM (random access memory), which can be used to hold user-defined
graphics characters. This is where these modules really start to show their potential, offering such
capabilities as bar graphs, flashing symbols, even animated characters. Before the user-defined
characters are set up, these codes will just bring up strange looking symbols.
Codes 00010000 to 00011111 ($10 to $1F) are not used and just display blank characters. ASCII
codes “proper” start at 00100000 ($20) and end with 01111111 ($7F). Codes 10000000 to
10011111 ($80 to $9F) are not used, and 10100000 to 11011111 ($A0 to $DF) are the Japanese
characters.
7.5 PI CAMERA
The Camera Module can be used to take high-definition video, as well as stills photographs. It’s
easy to use for beginners, but has plenty to offer advanced users if you’re looking to expand your
knowledge. There are lots of examples online of people using it for time-lapse, slow-motion, and
other video cleverness. You can also use the libraries we bundle with the camera to create
effects.
You can read all the gory details about IMX219 and the Exmor R back-illuminated sensor
architecture on Sony’s website, but suffice to say this is more than just a resolution upgrade: it’s
a leap forward in image quality, colour fidelity, and low-light performance. It supports 1080p30,
720p60 and VGA90 video modes, as well as still capture. It attaches via a 15cm ribbon cable to
the CSI port on the Raspberry Pi.
The camera works with all models of Raspberry Pi 1, 2, 3 and 4. It can be accessed through the
MMAL and V4L APIs, and there are numerous third-party libraries built for it, including the
Picamera Python library. See the Getting Started with Picamera resource to learn how to use it.
The camera module is very popular in home security applications, and in wildlife camera traps.
7.6 L293,L293D(QUADRUPLE HALF H-DRIVERS)
The L293 and L293D are quadruple high-current half-H drivers. The L293 is designed to provide
bidirectional drive currents of up to 1 A at voltages from 4.5 V to 36 V. The L293D is designed
to provide bidirectional drive currents of up to 600-mA at voltages from 4.5 V to 36 V. Both
devices are designed to drive inductive loads such as relays, solenoids, dc and bipolar stepping
motors, as well as other high-current/high-voltage loads in positive-supply applications. All
inputs are TTL compatible. Each output is a complete totem-pole drive circuit, with a Darlington
transistor sink and a pseudo- Darlington source. Drivers are enabled in pairs, with drivers 1 and 2
enabled by 1,2EN and drivers 3 and 4 enabled by 3,4EN. When an enable input is high, the
associated drivers are enabled, and their outputs are active and in phase with their inputs. When
the enable input is low, those drivers are disabled, and their outputs are off and in the high-
impedance state. With the proper data inputs, each pair of drivers forms a full-H (or bridge)
reversible drive suitable for solenoid or motor applications.
Features:
 Featuring Unitrode L293 and L293D
Products Now From Texas Instruments
 Wide Supply-Voltage Range: 4.5 V to 36 V
 Separate Input-Logic Supply
 Internal ESD Protection
 Thermal Shutdown
 High-Noise-Immunity Inputs
 Functionally Similar to SGS L293 and
SGS L293D
 Output Current 1 A Per Channel
(600 mA for L293D)
 Peak Output Current 2 A Per Channel
(1.2 A for L293D)

 Output Clamp Diodes for Inductive


Transient Suppression (L293D)

Pin diagram:
Description:
On the L293, external high-speed output clamp diodes should be used for inductive transient
suppression. A VCC1 terminal, separate from VCC2, is provided for the logic inputs to minimize
device power dissipation. The L293and L293D are characterized for operation from 0C to
70C.
7.7 DC MOTOR
DC motor is designed to run on DC electric power. Two examples of pure DC designs are
Michael Faraday's homopolar motor (which is uncommon), and the ball bearin motor, which is
(so far) a novelty. By far the most common DC motor types are the brushed and brushless types,
which use internal and external commutation respectively to create an oscillating AC current
from the DC source -- so they are not purely DC machines in a strict sense.

Types of dcmotors:
1. Brushed DC Motors
2. Brushless DC motors
3. Coreless DC motors
Brushed DC motors:
The classic DC motor design generates an oscillating current in a wound rotor with a split
ring commutator, and either a wound or permanent magnet stator. A rotor consists of a coil
wound around a rotor which is then powered by any type of battery.
Many of the limitations of the classic commutator DC motor are due to the need for brushes to
press against the commutator. This creates friction. At higher speeds, brushes have increasing
difficulty in maintaining contact. Brushes may bounce off the irregularities in the commutator
surface, creating sparks. This limits the maximum speed of the machine. The current density per
unit area of the brushes limits the output of the motor. The imperfect electric contact also causes
electrical noise. Brushes eventually wear out and require replacement, and the commutator itself
is subject to wear and maintenance. The commutator assembly on a large machine is a costly
element, requiring precision assembly of many parts. there are three types of dc motor 1. dc
series motor 2. dc shunt motor 3. dc compound motor - these are also two type a. cummulative
compound b. deffercial compounnd
Brushless DC motors:
Some of the problems of the brushed DC motor are eliminated in the brushless design. In this
motor, the mechanical "rotating switch" or commutator/brushgear assembly is replaced by an
external electronic switch synchronised to the rotor's position. Brushless motors are typically 85-
90% efficient, whereas DC motors with brushgear are typically 75-80% efficient.
Midway between ordinary DC motors and stepper motors lies the realm of the brushless DC
motor. Built in a fashion very similar to stepper motors, these often use a permanent magnet
external rotor, three phases of driving coils, one or more Hall effect sensors to sense the position
of the rotor, and the associated drive electronics. The coils are activated, one phase after the
other, by the drive electronics as cued by the signals from the Hall effect sensors. In effect, they
act as three-phase synchronous motors containing their own variable-frequency drive electronics.
A specialized class of brushless DC motor controllers utilize EMF feedback through the main
phase connections instead of Hall effect sensors to determine position and velocity. These motors
are used extensively in electric radio-controlled vehicles. When configured with the magnets on
the outside, these are referred to by modelists as outrunner motors.
Brushless DC motors are commonly used where precise speed control is necessary, as in
computer disk drives or in video cassette recorders, the spindles within CD, CD-ROM (etc.)
drives, and mechanisms within office products such as fans, laser printers and photocopiers.
They have several advantages over conventional motors:
 Compared to AC fans using shaded-pole motors, they are very efficient, running much cooler
than the equivalent AC motors. This cool operation leads to much-improved life of the fan's
bearings.
 Without a commutator to wear out, the life of a DC brushless motor can be significantly longer
compared to a DC motor using brushes and a commutator. Commutation also tends to cause a
great deal of electrical and RF noise; without a commutator or brushes, a brushless motor may be
used in electrically sensitive devices like audio equipment or computers.
 The same Hall effect sensors that provide the commutation can also provide a convenient
tachometer signal for closed-loop control (servo-controlled) applications. In fans, the tachometer
signal can be used to derive a "fan OK" signal.
 The motor can be easily synchronized to an internal or external clock, leading to precise speed
control.
 Brushless motors have no chance of sparking, unlike brushed motors, making them better suited
to environments with volatile chemicals and fuels. Also, sparking generates ozone which can
accumulate in poorly ventilated buildings risking harm to occupants' health.
 Brushless motors are usually used in small equipment such as computers and are generally used
to get rid of unwanted heat.
 They are also very quiet motors which is an advantage if being used in equipment that is affected
by vibrations.
Modern DC brushless motors range in power from a fraction of a watt to many kilowatts. Larger
brushless motors up to about 100 kW rating are used in electric vehicles. They also find
significant use in high-performance electric model aircraft.
Coreless DC motors:
Nothing in the design of any of the motors described above requires that the iron (steel) portions
of the rotor actually rotate; torque is exerted only on the windings of the electromagnets. Taking
advantage of this fact is the coreless DC motor, a specialized form of a brush or brushless DC
motor. Optimized for rapid acceleration, these motors have a rotor that is constructed without
any iron core. The rotor can take the form of a winding-filled cylinder inside the stator magnets,
a basket surrounding the stator magnets, or a flat pancake (possibly formed on a printed wiring
board) running between upper and lower stator magnets. The windings are typically stabilized by
being impregnated with Electrical epoxy potting systems. Filled epoxies that have moderate
mixed viscosity and a long gel time. These systems are highlighted by low shrinkage and low
exotherm. Typically UL 1446 recognized as a potting compound for use up to 180C (Class H)
UL File No. E 210549.
Because the rotor is much lighter in weight (mass) than a conventional rotor formed from copper
windings on steel laminations, the rotor can accelerate much more rapidly, often achieving a
mechanical time constant under 1 ms. This is especially true if the windings use aluminum rather
than the heavier copper. But because there is no metal mass in the rotor to act as a heat sink, even
small coreless motors must often be cooled by forced air.
These motors were commonly used to drive the capstan(s) of magnetic tape drives and are still
widely used in high-performance servo-controlled systems, like radio-controlled
vehicles/aircraft, humanoid robotic systems, industrial automation, medical devices, etc.
CHAPTER 8
SOFTWARE REQUIREMENTS
8.1 OPERATING SYSTEM
The Raspberry Pi primarily uses Linux kernel-based operating systems. The ARM11 is based on
version 6 of the ARM which is no longer supported by several popular versions of Linux,
including Ubuntu. The install manager for Raspberry Pi is NOOBS. The OSs included with
NOOBS are:
 Archlinux ARM
 OpenELEC
 Pidora (Fedora Remix)
 Raspbmc and the XBMC open source digital media center
 RISC OS – The operating system of the first ARM-based computer
 Raspbian (recommended) – Maintained independently of the Foundation; based on ARM
hard-float (armhf)-Debian 7 'Wheezy' architecture port, that was designed for a newer
ARMv7 processor whose binaries would not work on the Rapberry Pi, but Raspbian is
compiled for the ARMv6 instruction set of the Raspberry Pi making it work but with
slower performance. It provides some available deb software packages, pre-compiled
software bundles. A minimum size of 2 GB SD card is required, but a 4 GB SD card or
above is recommended. There is a Pi Store for exchanging programs. The 'Raspbian
Server Edition (RSEv2.4)', is a stripped version with other software packages bundled as
compared to the usual desktop computer oriented Raspbian.
8.2 BOOT PROCESS
The Raspberry Pi does not boot as a traditional computer. The VideoCore i.e. the Graphics
processor actually boots before the ARM CPU.
The boot process of the Raspberry Pi can be explained as follows:
 When the power is turned on, the first bits of code to run is stored in a ROM chip in the
SoC and is built into the Pi during manufacture. This is the called the first-stage
bootloader.
 The SoC is hardwired to run this code on startup on a small RISC Core (Reduced
Instruction Set Computer). It is used to mount the FAT32 boot partition in theSDCard so
that the second-stage bootloader can be accessed. So what is this ‘second-stage
bootloader’ stored in the SD Card? It’s ‘bootcode.bin’. This file can be seen while mount
process of an operating system on the SD Card in windows.
 Now here’s something tricky. The first-stage bootloader has not yet initialized the ARM
CPU (meaning CPU is in reset) or the RAM. So, the second-stage bootloader also has to
run on the GPU. The bootloader.bin file is loaded into the 128K 4 way set associative L2
cache of the GPU and then executed. This enables the RAM and loads start.elf which is
also in the SD Card. This is the third-stage bootloader and is also the most important.
It is the firmware for the GPU, meaning it contains the settings or in our case, has
instructions to load the settings from config.txt which is also in the SD Card.  We can
think of the config.txt as the ‘BIOS settings’.
 The start.elfalso splits the RAM between the GPU and the ARM CPU. The ARM only
has access the to the address space left over by the GPU address space. For example, if
the GPU was allocated addresses from 0x000F000 – 0x0000FFFF, the ARM has access
to addresses from 0x00000000 – 0x0000EFFF.
 The physical addresses perceived by the ARM core is actually mapped to another address
in the VideoCore (0xC0000000 and beyond) by the MMU (Memory Management Unit)
of the VideoCore.
 The config.txt is loaded afterthe split is done so the splitting amounts cannot be specified
in the config.txt. However, different .elf files having different splits exist in the SD Card.
So, depending on the requirement, the file can be renamed to start.elf and boot the Pi. In
the Pi, the GPU is King!
 Other than loading config.txt and splitting RAM, the start.elfalso loads cmdline.txt if it
exists. It contains the command line parameters for whatever kernel that is to be loaded.
This brings us to the final stage of the boot process. The start.elf finally
loads kernel.img which is the binary file containing the OS kernel and releases the
reset on the CPU. The ARM CPU then executes whatever instructions in the
kernel.img thereby loading the operating system.
 After starting the operating system, the GPU code is not unloaded. In fact, start.elf is not
just firmware for the GPU, It is a proprietary operating system called VideoCore OS
(VCOS). When the normal OS (Linux) requires an element not directly accessible to it,
Linux communicates with VCOS using the mailbox messaging system

Figure 8.1: Boot process of Raspberry Pi


8.3 THE NOOBS INSTALLER
The Raspberry Pi package only comes with the main board and nothing else. It does not come
shipped with an operating system. Operating systems are loaded on a SD card from a computer
and then the SD card is inserted in the Pi which becomes the primary boot device.
Installing operating system can be easy for some enthusiasts, but for some beginners working
with image files of operating systems can be difficult. So the Raspberry Pi foundation made a
software called NOOBS – New Out Of Box Software which eases the process of installing an
operating system on the Pi.
The NOOBS installer can be downloaded from the official website. A user only needs to connect
a SD card with the computer and just run the setup file to install NOOBS on the SD card. Next,
insert the card on the Raspberry Pi. On booting the first time, the NOOBS interface is loaded and
the user can select from a list of operating systems to install. It is much convenient to install the
operating system this way. Also once the operating system is installed on the card with the
NOOBS installer, every time the Pi boots, a recovery mode provided by the NOOBS can be
accessed by holding the shift key during boot. It also allows editing of the config.txt file for the
operating system
7.5 RASPBERRY PI COMPATIBLE OPERATING SYSTEMS

Distribution Type Memory Packages


footprint
Arch Linux ARM Linux 8,700
BerryTerminal Linux
Bodhi Linux Raspbian 35,000+
ARMHF
Debian ARM Linux 20,000+
Fedora Remix Linux 16,464?
Gentoo Linux Linux ~23 MiB
IPFire Linux ~20 MiB 144
I2PBerry Linux 20,000+

Meego MER + XBMC Linux (embedded) ~34 MiB + ~320 (core)


XBMC
Moebius Raspbian ~20 MiB (core) + Raspbian
Repositories
nOS Linux ~90 MiB 35,000+
openSUSE Linux 3.11 28 MiB (inc. 6300
X11)
OpenWRT Linux 3,3MiB 3358
PiBang Linux Linux_3.6.11
&SystemD
PwnPi Linux 20,000+
QtonPi Linux
VPNbian Linux ~40 MiB w/o 35,000+
desktop
Raspbian Linux ~30 MiB w/o 35,000+
desktop
OpenELEC Linux 3.10.16 95 MiB (incl. ~140 (+ 7 via xbmc)
(embedded) XBMC)
XBian Raspbian 35,000+
raspbmc Raspbian 20,000+
RISC OS RISC OS
Aros hosted on Raspbian Mixed Debian6 and <~50 MiB
Limited Demo Aros
Plan9 Plan 9
SlaXBMCRPi Linux 3.10.36+ 476
(+ Official SlackwareARM
14.1 Packages)
PiMAME Linux
PiBox Linux/Buildroot
pipaOS Raspbian ~32 MiB 37.500
Raspberry WebKiosk Raspbian
Volumio Raspbian
Nard SDK Embedded Linux ~40 MB

Table 1: List of supported Operating Systems


CHAPTER 9
RESULTS
CHAPTER 10
CONCLUSION

Smart home works as a robust and effective online security and automation system for
handicapped and paralyzed people as it is an easy to use/install, cheap and fast system. Face
recognition is highly accurate and efficient technology and harr cascade classifier is flawless in
detecting the face like features. Open CV functions ensure the recognition of the closest known
faces in the minimal delay possible with a few improvements i.e. using preprocessing techniques,
diverse options in database per person and optimal threshold difference in python code. For
speech recognition without internet offered the least possible delay of 0.4second and accuracy is
tested out to be 96% due to the noisy environments, sometimes the correct catch of the command
is lost. Internet independency opens a new path for working of this modern technique in the
remote areas for technology illiterate population as well as for emergency situations
In the proposed security system, face recognition with Raspberry pi is combined with the help of
these technologies we can develop many things.
REFERENCES
[1] A. Jules, "RFID security and privacy: A research survey," IEEE Journal on Selected Areas in
Communications, vol. 24, no. 2, pp. 381- 394, 2006.
[2] J. Jeong, M. Y. Chung and H. Choo, "Integrated OTP-based user authentication scheme using
smart cards in home networks," In Proceedings of the 41st IEEE Annual Hawaii International
Conference on System Sciences, pp. 294-294,2008.
[3] A. K. Jain, A. Ross, and S. Prabhakar, "An introduction to biometric recognition," IEEE
Transactions on Circuits and Systems for Video Technology, vol. 14, no. 1, pp. 4-20, 2004.
[4] Y. Zhao and Z. Ye, "A low-cost GSM/GPRS based wireless home security system," IEEE
Transactions on Consumer Electronics, vol. 54, no. 2, pp. 567-572, 2008.
[5] J. Potts and S. Sukittanon, "Exploiting Bluetooth on Android mobile devices for a home
security application," In Proceedings of IEEE Southeastcon, pp. 1- 4, 2012.
[6] M. N. Chowdhury, M. S. Nooman and S. Sarker, "Access Control of Door and Home
Security by Raspberry Pi Through Internet," Int. J.Sci. Eng. Res, vol. 4, pp. 550-558, 2013.
[7] Y. W. Bai, L. S. Shen and Z. H. Li, "Design and implementation of an embedded home
surveillance system by use of multiple ultrasonic sensors," IEEE Transactions on Consumer
Electronics, vol. 56, no. 1,pp. 119-124, 2010.
[8] J. Bangali and A. Shaligram, "Design and Implementation of Security Systems for Smart
Home based on GSM technology," International Journal of Smart Home, vol. 7, no. 6, pp. 201-
208, 2013.
[9] S. N. Basha, S. A. K. Jilani and S. Arun, "An Intelligent Door System using Raspberry Pi and
Amazon Web Services IoT," International Journal of Engineering Trends and Technology, vol.
33, no. 2, pp. 84-89, 2016.
[10] S. N. Jyothi and K. V. Vardhan, "Design and implementation of real time security
surveillance system using IoT," In International Conference on Communication and Electronics
Systems (ICCES- 2016), pp. 1-5,2016.
[11] P. R. Ramesh and J. Kumar, "Low-Cost Energy Efficient Smart Camera with Information
Stamping for IoT Networks," In 3rd IEEE International Conference on Internet of Things: Smart
Innovation and Usages (IoT-SIU 2018), pp. 1-5, 2018.
[12] N. Haering, P. L. Venetianer and A. Lipton, “The evolution of video surveillance: An
overview,” Machine Vision and Applications, vol. 19, no. 5–6, pp. 279–290, 2008.
[13] R. Chuimurkar and V. Bagdi, “Smart Surveillance Security and Monitoring System Using
Raspberry PI and PIR Sensor,” International Journal of Scientific Engineering and Applied
Science, vol. 2, no. 1, pp. 159–165, 2016.
[14] G. A. Naidu and J. Kumar, " Wireless Protocols: Wi-Fi SON Bluetooth Zigbee Z-Wave Wi-
Fi," in 7th International Conference on Innovation in Electronics and communication
Engineering (ICIECE-2018) ,pp. 1-6, 2018
[15]C. Twumasi, K. A. Dotche, W. Banuenumah and F. Sekyere, "Energy saving system using a
PIR sensor for classroom monitoring," IEEE PES Power Africa, pp. 347-351,2017
[16]T. Winkler and B. Rinner. "Security and privacy protection in visual sensor networks: A
survey," ACM Computing Surveys (CSUR), vol. 47, no. 1, article no. 2, 2014.
[17] Raspberry Pi 3 Model B, [Online]. Available: ____http://www.raspberrypi.org. [Accessed:
20- Jun- 2018].
[18] Details of Webcam [Online]. Available: ____https://en.wikipedia.org/wiki/Webcam.
[Accessed: 20- Jun- 2018].
[19] Details of Keypad [Online]. Available: ____http://wiki.sunfounder.cc/index.php?
title=4X4_Matrix_Keypad_Module. [Accessed: 20- Jun- 2018].

You might also like