SlideShare a Scribd company logo
1 of 135
Download to read offline
A Project Report
On
ADVANCED INDO BORDER SECURITY SYSTEM
Submitted by
AYOUSH JAISWAL (1343131006)
JITENDRA YADAV (1343131010)
MOHD. SHABAN ANSARI (1343131017)
SHAHBAZ KHAN (1343131035)
in partial fulfillment for the award of the degree
of
B. Tech
in
ELECTRONICS & COMMUNICATION ENGINEERING
Under the Guidance of
(Ms. Kiran Kumari)
B.N. College of Engineering & Technology, Lucknow
Dr. A.P.J Abdul Kalam Technical University, Lucknow
May, 2017
i
Certificate
This is to certify that this project report entitled “ADVANCED INDO BORDER
SECURITY SYSTEM” by AYOUSH JAISWAL (1343131006), JITENDRA YADAV
(1343131010), MOHD. SHABAN ANSARI (1343131017), SHAHBAZ KHAN
(1343131035) submitted in partial fulfillment of the requirement for the degree of Bachelor
of Technology in Electronics and Communication Engineering of Dr. A.P.J. Abdul Kalam
Technical University, Lucknow, during the academic year 2016-17, is a bonafide record of
work carried out under my guidance and supervision.
Ms. Kiran Kumari Mr. Santosh Kumar Tripathi
Assistant Professor Associate Professor
Electronics & Communication Engineering Head Of Department
B.N. College of Engineering and Technology, Electronics & Communication Engineering
Lucknow B.N. College of Engineering and
(Project Guide) Technology, Lucknow
ii
Acknowledgement
Like most effective endeavors, preparing this project was a collaborative effort. I owe
a great debt to many individuals who helped me in successful completion of this project.
I would not have completed this journey without the help, guidance and constant
support and co-operation of certain people who acted as guides and friends along the way. I
would like to express my deepest and sincere thanks to Mr. Santosh Kumar Tripathi (Head
of Electronics and Communication Engineering Department) and Ms. Kiran Kumari
(Assistant Professor, Electronics and Communication Engineering Department) for their
invaluable guidance and help. It would never be possible for me to take this project to this
level without their innovative ideas and their relentless support and encouragement.
In this connection I would like to express my gratitude to my parents and friends who
were constant source of inspiration during the project report. At last I thank to Almighty for
giving me the power to complete this project successfully.
AYOUSH JAISWAL (1343131006)
JITENDRA YADAV (1343131010)
MOHD. SHABAN ANSARI (1343131017)
SHAHBAZ KHAN (1343131035)
iii
Abstract
Advanced Indo Border Security System (AIBSS) now provide a new monitoring and control
capability for monitoring the borders of the country. Using this concept we can easily identify
a stranger or some terrorists entering the border. The border area is divided into number of
nodes. Each node is in contact with each other and with the main node. The noise produced
by the foot-steps of the stranger are collected using the sensor. This sensed signal is then
converted into power spectral density and the compared with reference value of our
convenience. Accordingly the compared value is processed using a microprocessor, which
sends appropriate signals to the main node. Thus the stranger is identified at the main node. A
series of interface, signal processing, and communication systems have been implemented in
micro power CMOS circuits. A micro power spectrum analyzer has been developed to enable
low power operation of the entire AIBSS system. Thus AIBSS require a Microwatt of power.
But it is very cheaper when compared to other security systems such as RADAR under use. It
is even used for short distance communication less than 100 Km. It produces a less amount of
delay. Hence it is reasonably faster. On a global scale, AIBS will permit monitoring of land,
water, and air resources for environmental monitoring. On a national scale, transportation
systems, and borders will be monitored for efficiency, safety, and security.
iv
TABLE OF CONTENTS
PAGE NO.
Certificate i
Acknowledgement ii
Abstract iii
Table of Content iv
List of Figures x
List of Tables xiii
Chapter 1: Ultrasonic 2-11
1.1 Introduction 2
1.2 Fundamental Ultrasonic Property 3
1.2.1 Speed of Sound in Air as Function of Temperature 3
1.2.2 Wavelength and Temperature 4
1.2.3 Reflection 4
1.2.4 Effect of Temperature 5
1.3 Working Principle 5
1.4 Transducer 6
1.5 Detector 7
1.6 features 7
1.7 Product Specification and limitation 7
1.8 Hardware Interface 7
1.9 Application 8
1.9.1 Use in Medicine 8
1.9.2 Use in Industry 8
1.10 Environmental Test 11
Chapter 2: PIR Sensor 12-24
2.1 Introduction 12
2.2 How PIRs Work 14
2.3 Lense 16
2.4 Connecting to a PIR 18
2.5 Testing of PIR 20
2.6 Retriggering 21
2.7 Changing Sensitivity 22
v
2.8 Hardware Interface 22
2.9 Application 23
Chapter 3: Pressure Sensor 24-25
3.1 Introduction 24
3.2 Sensor Mechanical Data 24
3.3 Exploded View 25
3.4 Device Characteristics 25
3.5 Application 25
Chapter 4: Servo Motor 26-34
4.1 Introduction 26
4.2 Principle of Operation 27
4.3 Types of Servo Motor 28
4.3.1 DC Servo Motor 28
4.3.1.1 Working Principle of DC Servo Motor 29
4.3.2 AC Servo Motor 31
4.3.2.1 Types of AC Servo Motor 31
4.3.2.1.1 Synchronous Type Servo Motor 31
4.3.2.1.2 Induction Type Servo Motor 32
4.3.3 Working Principle of AC Servo Motor 33
4.4 Specifications 33
4.5 Servomotors Connecting System 34
4.5.1 Power Cable Motion Connect 34
4.5.2 Encoder Cables 34
4.6 Application 34
Chapter 5: Electric fencing 35-44
5.1 Introduction 35
5.2 Temporary of Permanent 35
5.3 Energisers 36
5.4 Batteries 38
5.5 Insulators and Switches 38
5.6 Encounterin 39
5.7 Application 40
5.7.1 Agriculture 40
5.7.2 Security 41
vi
5.7.2.1 Nonlethal Fence 41
5.7.2.2 Stun lethal Fence 42
5.7.2.3 Lethal Fence 43
5.7.2.4 Laser Fencing 43
5.7.2.5 Application 44
Chapter 6: Bidirectional Counter 45-51
6.1 Introduction 45
6.2 Motivation 45
6.3 Basic Block Diagram 46
6.4 Block Diagram Description 46
6.5 Power Supply 46
6.6 IR Sensor 47
6.7 Arduino Uno R3 Microcontroller (Atmega 328P) 47
6.8 LCD Display 47
6.9 Schematic Diagram 48
6.10 Description 49
6.11 Working 49
6.12 List of Component 50
6.13 IR Sensor 50
6.13.1 Features 50
6.14 Advantages 51
6.15 Disadvantages 51
6.16 Application 51
6.17 Future Expansion 51
Chapter 7: Controllers 53-76
7.1 ATmega 328 53
7.1.1 Introduction 54
7.1.2 Elements of Assembly Language 55
7.1.3 Specification 55
7.1.4 Features 56
7.1.5 Processor Architecture 56
7.1.5.1 ALU 56
7.1.5.2 Insystem Reprogrammable Flash Program Memory 57
7.1.5.3 EEPROM Data Memory 57
vii
7.1.5.4 Program Counter 58
7.1.5.5 RAM 58
7.1.5.6 Instruction Execution Section (IES) 58
7.1.5.7 Input/output Ports 58
7.1.5.8 Analog Comparator A/D Converters 59
7.1.6 Pin Diagram & Description 59
7.1.7 Key Parameters 61
7.1.8 Serial Mode Programming 61
7.1.9 Programming 62
7.1.10 Application 62
7.1.11 Advantages 63
7.1.12 Disadvantages 63
7.2 GSM 64
7.2.1 Application Device 65
7.2.2 Features 65
7.2.2.1 General Characteristics 65
7.2.2.2 GSM/GPRS: Phase2+Compliance 65
7.2.2.3 Support SIM Interface 66
7.2.2.4 Hardware Output 66
7.2.2.5 Software Interface 67
7.2.2.6 Voice/Data Service 67
7.2.3 Supplementary Service 68
7.2.4 RF Functionality 68
7.2.4.1 Maximum Tx Power 68
7.2.4.2 Sensitivity 69
7.2.4.3 Radio Frequency 69
7.2.5 Hardware Description 70
7.2.5.1 Interface 70
7.2.6 Functional Diagram 71
7.2.7 Pin Diagram 71
7.2.8 UART/RS232 72
7.2.9 LED Driver 73
7.2.10 SIM Function 74
7.2.11 Connecting GSM Module to Aurduino 74
viii
7.2.12 Application of GSM/GPRS Module 76
Chapter 8: Designing and Testing 77-86
8.1.1 Designing 77
8.1.2 What is PCB Board Design? 78
8.1.3 Flow Chart For Steps of PCB Design 78
8.1.3.1 Processing 79
8.1.3.2 Etching 79
8.1.3.3 Drilling 81
8.1.3.4 Component Placement 81
8.1.3.5 Soldering 81
8.1.3.6 Masking 82
8.1.4 PCB Layout 83
8.2.1 Testing 84
8.2.2 Software 85
8.2.3 Working of Aurduino 85
Chapter 9: Functional Component 87-96
9.1 Voltage Regulator 87
9.1.1 Introduction 87
9.1.2 3-Terminal 1A Positive Voltage Regulators 88
9.1.3 Pin Architecture 88
9.1.4 Internal Block Diagram 89
9.1.5 Features 89
9.2 LCD 90
9.2.1 Introduction 90
9.2.2 Features 90
9.2.3 LCD Interface 90
9.3 Diode Bridge 91
9.3.1 Introduction 91
9.3.2 Basic Operation 92
9.3.3 Rectifier 92
9.4 Crystal Oscillator 93
9.4.1 Introduction 93
9.4.2 Crystal Oscillator of Different Frequency with Uses 95
9.4.3 Crystal Oscillator Uses in Microcontroller 95
ix
9.4.4 Application 96
Chapter 10: Accessories 97-99
10.1 Adapters 97
10.2 DIP Base 98
10.3 Power Jack 98
10.4 Switches 98
10.5 Connectors 99
10.6 DC Connectors 99
Chapter 11: Concluding Chapter 100-120
11.1 Advantages 100
11.2 Disadvantages 100
11.3 Result 101
11.4 Applications 101
11.5 Conclusion 101
11.6 Future Aspect 102
11.7 Annexure 1 (Cost Report) 103
Annexure 2 (Programming) 104
11.8 References 120
x
List of Figures
Sr. No. Name of Figure Page No.
Fig.0 Block Diagram of AIBSS………………………………………………....1
Fig.1.1 Ultrasonic Sensor top and bottom view…………………………………....2
Fig.1.2 Characteristics between sound and temperature…………………………...4
Fig.1.3 Working Mechanism of Ultrasonic sensor…………………………………6
Fig.1.4 Hardware interface with Arduino……………………………………….....7
Fig.1.5 Uses in Automobiles……………………………………………………….9
Fig.1.6 Graphical representation of ultrasonic waves………………………………10
Fig.2.1 PIR Sensor………………………………………………………………....12
Fig.2.2 Fresnel lence of PIR sensor………………………………………………..13
Fig.2.3 Old Architecture of PIR sensor…………………………………………....13
Fig.2.4 Modern Architecture of PIR sensor…………………………….…...........14
Fig.2.5 Representation of output signal……………………………………………15
Fig.2.6 Pyroelectric sensor………………………………………………………...15
Fig.2.7 Element window of JFET……………………………………………...….16
Fig.2.8 Internal schematic diagram of BIS0001…………………………………..16
Fig.2.9 Incident radian on plano convex lenses…………………………………...17
Fig.2.10 Plano Convex lenses………………………………………………………17
Fig.2.11 Circuit description of PIR sensor………………………………………....18
Fig.2.12 Macro shots of celling and wall mount…………………………………...18
Fig.2.13 Connection of PIR sensor…………………………………………………19
Fig.2.14 Wire connection of PIR sensor……………………………………………19
Fig.2.15 Testing of PIR Sensors…………………………………………………...20
Fig.2.16 Retriggering circuit……………………………………………………….21
Fig.2.17 Retriggering wave form of PIR Sensor……………………………….......21
xi
Fig.2.18 Sensitivity Changer……………………………………………………..22
Fig.2.19 Hardware Interface……………………………………………………..23
Fig.3.1 Pressure Sensor…………………………………….…………………...24
Fig.3.2 Exploded view………………………………………………………….25
Fig.4.1 Block diagram of servo motor………………………………………….26
Fig4.2 Servo motor…………………………………………………………….26
Fig.4.3 Characteristics between angle and time………………………………..28
Fig4.4 Internal architecture of servo motor…………………………………....29
Fig.4.5 Working diagram of servo motor……………………………………....30
Fig.4.6 Internal component……………………………………………………..31
Fig.4.7 Synchronous type AC servo motor……………………………............32
Fig.4.8 Induction type AC servo motor………………………………………..32
Fig.5.1 Insulator and switches…………………………………………………39
Fig.5.2 Temporary electric fence……………………………………………....41
Fig.5.3 Multizone security electric fence……………………………………...42
Fig.5.4 Lathal fencing………………………………………………………....43
Fig.5.5 Laser fencing on the Indian border……………………………………44
Fig.6.1 Block diagram of bidirectional counter……………………………….46
Fig.6.2 IR sensor module………………………………………………………47
Fig.6.3 LCD…………………………………………………………………...48
Fig 6.4 Schematic diagram of bidirectional counter…………………………..48
Fig.6.5 IR sensor………………………………………………………………50
Fig.7.1 Atmega 328 controller………………………………………………...54
Fig.7.2 Conversion of programming language………………………………..55
Fig.7.3 General Architecture of ALU…………………………………….......56
Fig.7.4 Internal architecture of Atmega 328…………………………………..57
Fig.7.5 Pin description of Atmega 328………………………………………..59
xii
Fig.7.6 GSM Module………………………………………………………….64
Fig.7.7 Block diagram of GSM……………………………………………….71
Fig.7.8 Hardware interface of GSM Atmega 328…………………………….75
Fig. 8.1 PCB Board……………………………………………………………77
Fig.8.2 Etching process of PCB………………………………………………80
Fig.8.3 Soldering of component………………………………………………82
Fig.8.4 PCB layout of Project (top view)……………………………………..83
Fig.8.5 PCB layout of Project (bottom view)…………………………………83
Fig.8.6 Arduino board burner…………………………………………………84
Fig.8.7 Arduino Application…………………………………………………..86
Fig.9.1 Power regulated IC………………………………….………………..87
Fig9.2 Pin diagram of IC 7805……………………………………………....89
Fig.9.3 Internal block diagram of IC 7805………………………………….89
Fig.9.4 LCD Diagram………………………………………………………...91
Fig.9.5 Diode Bridge…………...…………………………………………….91
Fig.9.6 Operational Diagram of Diode…………………….………………...92
Fig.9.7 Output Characteristics of HWR…. ………………………………….93
Fig.9.8 Output Characteristics of FWR ……………………………………...93
Fig.9.9 Symbol of Crystal Oscillator………..……………………………….94
Fig.10.1 Adapter Module…………..……………….……………………….....97
Fig.10.2 Architecture of DIP Base…………...……………………………..….97
Fig.10.3 Symbol of Power Jack…………………………….………………...98
Fig.10.4 Different Switches Symbol….…. ………………………………….98
Fig.10.5 Module Connectors………… ……………………………………...99
Fig.10.6 Symbol of DC Connectors………………………………………....101
Fig.11.1 Final Project Layput………………………...…………………..….101
xiii
List of Tables
Sr. No. Name of table Page No.
Table 1 Product Specification 7
Table 2 List of Application 10
Table 3 Environmental test List 11
Table 4 Device characteristics 25
Table 5 Working Condition List 36
Table 6 Key Parameter 61
Table 7 Serial Mode Programming 61
Table 8 Parallel Mode Programming 62
Table 9 General Characteristics of GSM 63
Table 10 Hardware Function Description 66
Table 11 Software Description 67
Table 12 Voice/Data Description 67
Table 13 Supplementary Services 68
Table 14 Band Description 68
Table 15 Sensitivity Mode 69
Table 16 Radio Frequency Ranges 69
Table 17 Pin Description 70
Table 18 All Pins Description of GSM 71
Table 19 UART Pins 73
Table 20 SIM Functions 74
xiv
Table 21 Characteristics of Etching 80
Table 22 List of Frequencies 95
Table 23 Cost Estimation Report of Project 103
1
Fig.0: Block diagram of Project
2
Chapter 1
ULTRASONIC
1.1. Introduction
The HC-SR04 ultrasonic sensor uses sonar to determine distance to an object like bats or dolphins
do. It offers excellent non-contact range detection with high accuracy and stable readings in an easy-to-use
package from 2cm to 400 cm or 1” to 13 feet. It operation is not affected by sunlight or black material like
Sharp rangefinders are (although acoustically soft materials like cloth can be difficult to detect). It comes
complete with ultrasonic transmitter and receiver module.
Ultrasonic sensors are commonly used for a wide variety of noncontact presence, proximity, or
distance measuring applications. These devices typically transmit a short burst of ultrasonic sound toward
a target, which reflects the sound back to the sensor. The system then measures the time for the echo to
return to the sensor and computes the distance to the target using the speed of sound in the medium.
The wide variety of sensors currently on the market differs from one another in their mounting
configurations , environmental sealing, and electronic features. Acoustically, they operate at different
frequencies and have different radiation patterns. It is usually not difficult to select a sensor that best
meets the environmental and mechanical requirements for a particular application, or to evaluate the
electronic features available with different models. Still, many users may not be aware of the acoustic
subtleties that can have major effects on ultrasonic sensor operation and the measurements being made
with them.
Fig.1.1 Ultrasonic sensor top and bottom view
The overall intent of this article is to help the user select an ultrasonic sensor with the best acoustical
properties, such as frequency and beam pattern, for a particular application, and how to obtain an optimum
measurement from the sensor. The first step in this process is to gain a better understanding of how
3
variations in the acoustical parameters of both the environment and the target affect the operation of the
sensor. Specifically, the following variables will be discussed:
• Variation in the speed of sound as a function of both temperature and the composition of the
transmission medium, usually air, and how these variations affect sensor measurement accuracy
and resolution.
• Variation in the wavelength of sound as a function of both sound speed and frequency, and how
this affects the resolution, accuracy, minimum target size, and the minimum and maximum target
distances of an Ultrasonic sensor
• Variation in the attenuation of sound as a function of both frequency and humidity, and how this
affects the maximum target distance for an ultrasonic sensor in air
• Variation of the amplitude of background noise as a function of frequency, and how this affects
the maximum target distance and minimum target size for an ultrasonic sensor.
• Variation in the sound radiation pattern (beam angle) of both the ultrasonic transducer and the
complete sensor system, and how this affects the maximum target distance and helps eliminate
extraneous targets.
• Variation in the amplitude of the return echo as a function of the target distance, geometry, surface,
and size, and how this affects the maximum target distance attainable with an ultrasonic sensor.
1.2. Fundamental Ultrasonic Property
Ultrasonic sound is a vibration at a frequency above the range of human hearing, usually >20 kHz.
The microphones and loudspeakers used to receive and transmit the ultrasonic sound are called
transducers. Most ultrasonic sensors use a single transducer to both transmit the sound pulse and receive
the reflected echo, typically operating at frequencies between 40 kHz and 250 kHz. A variety of different
types of transducers are used in these systems.
The following sections provide an overview of how the sound pulse is affected by some of the
fundamental ultrasonic properties of the medium in which the sound travels.
1.2.1. Speed Of Sound In Air As Function Of Temperature
In an echo ranging system, the elapsed time between the emission of the ultrasonic pulse and its
return to the receiver is measured. The range distance to the target is then computed using the speed of
sound in the transmission medium, which is usually air. The accuracy of the target distance measurement
is directly proportional to the accuracy of the speed of sound used in the calculation. The actual speed of
sound is a function of both the composition and temperature of the medium through which the sound
travels. The speed of sound in air varies as a function of temperature by the relationship,
4
The speed of sound in different gaseous media is a function of the bulk modulus of the gas, and is affected
by both the chemical composition and temperature. Table 1 gives the speed of sound for various gases at
0°.
Fig.1.2. Characteristics between sound and temperature
1.2.2. Wavelength and Radiation
Velocity of wave propagation is expressed by multiplication of frequency and wavelength. The velocity
of an electromagnetic wave is 3×108m/s, but the velocity of sound wave propagation in air is as slow as
about 344m/ s (at 20°C). At these slower velocities, wavelengths are short, meaning that higher resolution
of distance and direction can be obtained. Because of the higher resolution, it is possible to get higher
measurement made large accuracy. The surface dimension of the ultrasonic device can be easily to obtain
accurate radiation.
1.2.3. Reflection
In order to detect the presence of an object, ultrasonic waves are reflected on objects. Because
metal, wood, concrete, glass, rubber and paper, etc. reflect approximately 100% of ultrasonic waves, these
objects can be easily detected. Cloth, cotton, wool, etc. are difficult to detect because they absorb
ultrasonic waves. It may often be difficult, also, to detect objects having large surface undulation, because
of irregular reflection.
5
1.2.4. Effect of temperature
Velocity of sound wave propagation “c” is expressed by the following formula.
c=331.5+0.607t (m/s) where, t=temperature (°C)
That is as sound velocity varies according to circumferential temperature, it is necessary to verify the
temperature at all times to measure the distance to the object accurately.
1.3. Working Principle
Ultrasonic sensors (also known as trans-receivers when they both send and receive) work on a
principle similar to radar or sonar which evaluate attributes of a target by interpreting the echoes from
radio or sound waves respectively.
Ultrasonic sensors generate high frequency sound waves and evaluate the echo which is received
back by the sensor. Sensors calculate the time interval between sending the signal and receiving the echo
to determine the distance to an object. This technology can be used for measuring: wind speed and
direction (anemometer), fullness of a tank and speed through air or water.
For measuring speed or direction a device uses multiple detectors and calculates the speed from
the relative distances to particulates in the air or water. To measure the amount of liquid in a tank, the
sensor measures the distance to the surface of the fluid. Further applications include: humidifiers, sonar,
medical ultrasonography , burglar alarms and non-destructive testing.
Systems typically use a transducer which generates sound waves in the ultrasonic range, above
20,000 hertz, by turning electrical energy into sound, then upon receiving the echo turn the sound waves
into electrical energy which can be measured and displayed. The technology is limited by the shapes of
surfaces and the density or consistency of the material. For example foam on the surface of a fluid in a
tank could distort a reading. To start measurement, Trig of SR04 must receive a pulse of high (5V) for at
least 10us, this will initiate the sensor will transmit out 8 cycle of ultrasonic burst at 40kHz and wait for
the reflected ultrasonic burst.
When the sensor detected ultrasonic from receiver, it will set the Echo pin to high (5V) and delay
for a period (width) which proportion to distance. To obtain the distance, measure the width (Ton) of Echo
pin.
Time = Width of Echo pulse, in µS (micro second)
● Distance in centimeters = Time / 58
● Distance in inches = Time / 148
● Or you can utilize the speed of sound, which is 340m/s
6
Fig.1.3. Working mechanism of ultra sonic sensor
1.4. Transducer
Sound field of a non focusing 4MHz ultrasonic transducer with a near field length of N=67mm in
water. The plot shows the sound pressure at a logarithmic db-scale. Sound pressure field of the same
ultrasonic transducer (4MHz, N=67mm) with the transducer surface having a spherical curvature with the
curvature radius R=30mm.
An ultrasonic transducer is a device that converts energy into ultrasound, or sound waves above
the normal range of human hearing. While technically a dog whistle is an ultrasonic transducer that
converts mechanical energy in the form of air pressure into ultrasonic sound waves, the term is more apt to
be used to refer to piezoelectric transducers that convert electrical energy into sound.
Piezoelectric crystals have the property of changing size when a voltage is applied, thus applying
an alternating current (AC) across them causes them to oscillate at very high frequencies, thus producing
very high frequency sound waves.
The location, at which a transducer focuses the sound, can be determined by the active transducer
area and shape, the ultrasound frequency and the sound velocity of the propagation medium.
7
1.5. Detectors
Since piezoelectric crystals generate a voltage when force is applied to them, the same crystal can
be used as an ultrasonic detector. Some systems use separate transmitter and receiver components while
others combine both in a single piezoelectric transceiver.
1.6. Features:
• Power Supply :+5V DC
• Quiescent Current : <2mA
• Working Current: 15mA
• Effectual Angle: <15°
• Ranging Distance : 2cm – 400 cm/1" - 13ft
• Resolution : 0.3 cm
• Measuring Angle: 30 degree
• Trigger Input Pulse width: 10uS
• Dimension: 45mm x 20mm x 15mm
1.7. Product Specification And Limitations
Table 1: Product specifications
Parameter Min. Type Max. Unit
Operating Voltage 4.50 5.0 5.5 V
Quiescent Current 1.5 2 2.5 mA
Working Current 10 15 20 mA
Ultrasonic Frequency - 40 KHz
1.8. Hardware Interface
Fig.1.4. Hardware interface with Arduino
8
Here is example connection for Ultrasonic Ranging module to Arduino UNO board. It can be interface
with any microcontroller with digital input such as PIC, SK40C, SK28A, SKds40A, Arduino series.
1.9. Applications
1.9.1. Use In Medicine
Medical ultrasonic transducers (probes) come in a variety of different shapes and sizes for use in
making cross-sectional images of various parts of the body. The transducer may be passed over the surface
and in contact with the body, or inserted into a body opening such as the rectum. Clinicians who perform
ultrasound-guided procedures often use a probe positioning system to hold the ultrasonic transducer.
Air detection sensors are used in various roles. Non-invasive air detection is for the most critical
situations where the safety of a patient is mandatory. Many of the variables, which can affect performance
of amplitude or continuous-wave-based sensing systems, are eliminated or greatly reduced, thus yielding
accurate and repeatable detection.
One key principle in this technology is that the transmit signal consists of short bursts of ultrasonic
energy. After each burst, the electronics looks for a return signal within a small window of time
corresponding to the time it takes for the energy to pass through the vessel. Only signals received during
this period will qualify for additional signal processing. This principle is similar to radar range gating.
1.9.2. Use In Industry
Ultrasonic sensors can detect movement of targets and measure the distance to them in many automated
factories and process plants. Sensors can have an on or off digital output for detecting the movement of
objects, or an analog output proportional to distance. They can sense the edge of material as part of a web
guiding system.
Ultrasonic sensors are widely used in cars as parking sensors to aid the driver in reversing into
parking spaces. They are being tested for a number of other automotive uses including ultrasonic people
detection and assisting in autonomous UAV navigation.
Because ultrasonic sensors use sound rather than light for detection, they work in applications
where photoelectric sensors may not. Ultrasonics are a great solution for clear object detection, clear label
detection and for liquid level measurement, applications that photoelectrics struggle with because of target
translucence. As well, target color and/or reflectivity do not affect ultrasonic sensors, which can operate
reliably in high-glare environments.
9
Passive ultrasonic sensors may be used to detect high-pressure gas or liquid leaks, or other
hazardous conditions that generate ultrasonic sound. In these devices, audio from the transducer
(microphone) is converted down to human hearing range.
High-power ultrasonic emitters are used in commercially available ultrasonic cleaning devices. An
ultrasonic transducer is affixed to a stainless steel pan which is filled with a solvent (frequently water
or isopropanol). An electrical square wave feeds the transducer, creating sound in the solvent strong
enough to cause cavitation. Ultrasonic technology has been used for multiple cleaning purposes. One of
which that is gaining a decent amount of traction in the past decade is ultrasonic gun cleaning. Ultrasonic
testing is also widely used in metallurgy and engineering to evaluate corrosion, welds, and material
defects using different types of scans.
• Vehicle Detection in Barrier Systems with Ultrasonic Sensors
• Bottle Counting on Drink Filling Machines with Ultrasonic Sensors
• Transporting Printed Circuit Boards
• Pallet Detection on Forklift
Fig.1.5. Uses in automobiles
10
Table 2: List of applications
• Used in border security system
Fig.1.6. Graphical representation of ultrasonic waves
No. Function Method Application
1.
Measurement of pulse
reflection time.
Automatic doors
Level gauges
Automatic change-overs of traffic signals
Back sonars of automobiles
2.
Measurement of
direction propagation
time.
Densitometers
Flow meters
3.
Measurement of
Karman vortex.
Flow meters
11
1.9. Environment Test
Table 3: Environmental test list
No. Kind of test Condition Judgement
1. Humidity Resistance 60°C, 90 - 95%RH, 100 hours
Variation of sensitivity
and S.P.L. is within
3dB.
2. Humidity Resistance 85°C, 100 hours
3. Low Temperature
Storage
-40°C, 100 hours
4. Thermal Shock With -40°C (30 minutes) and +85°C (30
minutes) as one cycle, 100
cycles.(Resistance of 3.9kΩ connected
between terminals of sensor.)
5. Vibration Maximum Amplitude : 1.5mm
Vibrating frequency : 10 - 55Hz Vibrating
cycle : 1minute3 hours in each of 3
directions
6. Solder Heart
Resistance
Soldering terminal up to 2mm below base
at 350°C with soldering tip for 3 seconds.
7. Operating Frequency 40kHz, Sine 24Vp-p, 1000 hours Variation of S.P.L. is
within 6dB.
12
Chapter 2
PIR SENSORS
2.1. Introduction
Fig.2.1. PIR sensor
PIR sensors allow you to sense motion, almost always used to detect whether a human has
moved in or out of the sensors range. They are small, inexpensive, low-power, easy to use and
don't wear out. For that reason they are commonly found in appliances and gadgets used in homes
or businesses. They are often referred to as PIR, "Passive Infrared", "Pyroelectric".
PIRs are basically made of pyroelectric sensor (which you can see above as the round metal
can with a rectangular crystal in the center), which can detect levels of infrared radiation.
Everything emits some low level radiation, and the hotter something is, the more radiation is
emitted. The sensor in a motion detector is actually split in two halves. The reason for that is that
we are looking to detect motion (change) not average IR levels. The two halves are wired up so
that they cancel each other out. If one half sees more or less IR radiation than the other, the output
willswinghighorlow.
13
Fig.2.2. Fresnel lenses of PIR sensor
Along with the pyroelectic sensor is a bunch of supporting circuitry, resistors and
capacitors. It seems that most small hobbyist sensors use the, undoubtedly a very inexpensive
chip. This chip takes the output of the sensor and does some minor processing on it to emit a digital
output pulse from the analog sensor.
• Our older PIRs looked like this.
Fig.2.3. Old architecture of PIR sensor
14
• New look of PIR Sensor
Fig.2.4. Modern architecture of PIR sensor
2.2. How PIRs Work
The PIR sensor itself has two slots in it, each slot is made of a special material that is sensitive to
IR. The lens used here is not really doing much and so we see that the two slots can ‘see’ out past some
distance(basicallythesensitivityofthesensor).When the sensorisidle,bothslotsdetectthesameamountof
IR, the ambient amount radiated from the room or walls or outdoors. When a warm body like a human or
animal passes by, it first intercepts one half of the PIR sensor, which causes a positive differential change
between the two halves. When the warm body leaves the sensing area, the reverse happens, whereby the
sensor generates a negative differential change. The IR sensor itself is housed in a hermetically sealed
metal can to improve noise/temperature/humidity immunity. There is a window made of IR-transmissive
material (typically coated silicon since that is very easy to come by) that protects the sensing element.
Behind the window, there are the two balanced sensors.
15
Fig.2.5. Representation of output signal
Fig.2.6. Pyroelectric sensor
16
Fig.2.7. Element window of JFET
Youcanseeabovethediagramshowingtheelementwindow,thetwopiecesofsensing material.
Fig.2.8. Internal schematic diagram of BIS0001
This image shows the internal schematic. There is actually a JFET inside (a type of transistor)
which is very low-noise and buffers the extremely high impedance of the sensors into something a low-cost
chip (like the BIS0001) can sense.
2.3. Lenses
PIR sensors are rather generic and for the most part vary only in price and sensitivity. Most of the real
magic happens with the optics. This is a pretty good idea for manufacturing: the PIR sensor and circuitry is
fixed and costs a few dollars.The lens costs onlya few cents andcanchangethebreadth,range,sensingpattern,
veryeasily.
In the diagram up top, the lens is just a piece of plastic, but that means that the detection area is just two
17
rectangles. Usuallywe'd liketohaveadetection areathatis muchlarger. To do that, we use a simple lens such
as those found in a camera: they condenses a large area (such as a landscape) into a small one (on film or a
CCD sensor). For reasons that will be apparent soon, we would like to make the PIR lenses smallandthin
andmoldablefromcheapplastic,eventhoughitmayadddistortion.Forthis reason the sensors are actually
Fresnel lenses.
Fig.2.9. Incident radiation on plano convex lenses
The Fresnel lens condenses light, providing a larger range of IR to the sensor. OK, so now we have
a much larger range. However, remember that we actually have two sensors, and more importantly we don’t
want two really big sensing-area rectangles, but rather a scattering of multiple small areas. So what we do is
split up the lens into multiple section , each section of which is a fresnel lens. The different faceting and sub-
lenses create a range of detection areas, interleaved with each other. Thats why the lens centers in the facets
aboveare'inconsistant'-everyother onepointstoadifferenthalfofthePIRsensingelement.
Fig.2.10. Plano convex lens
18
Fig.2.11. Circuit description of PIR sensor
Fig.2.12. Macro shots of wall and celling mount
This macro shot shows the different Frenel lenses in each facet.
2.4 Connecting to a PIR
Most PIR modules have a 3-pin connection at the side or bottom. The pinout may vary between
modules so triple-check the pinout! It's often silkscreened on right next to the connection (at least, ours
is!) One pin will be ground, another will be signal and the final one will be power. Power is usually 3-5VDC
input but may be as high as 12V. Sometimes largermodulesdon'thavedirectoutputandinsteadjustoperatea
relayinwhichcasethere is ground, power and the two switch connections.
19
Fig.2.13. Connection of PIR sensor
Theoutputofsomerelaysmaybe'opencollector'-thatmeansitrequiresapull up resistor. If you're
not gettinga variableoutput besure totryattaching a10Kpullup between the signals and pins. An easy
wayofprototypingwithPIRsensorsistoconnectittoabreadboardsincethe connectionportis0.1"spacing.
Some PIRscome with headeronthemalready,theone's from adafruit have a straight 3-pin header on
them for connecting a cable.
Fig.2.15.Wire connection of PIR sensor
20
2.5. Testing of PIR
Fig.2.14. Testing of PIR Sensors
Now when the PIR detects motion, the output pin will go "high" to 3.3V and light up the LED. Once
you have the breadboard wired up, insert batteries and wait 30-60 seconds for the PIR to 'stabilize'. During
that time the LED may blink a little. Wait until the LED is off and then move around in front of it, waving a
hand,etc,toseetheLEDlightup!
21
2.6. Retriggering
Fig.2.16. Retriggering circuit
Onceyou have theLED blinking, look onthe back of thePIR sensor andmake sure that thejumperis
placedintheLpositionasshownbelow.
Fig.2.17.(a). Retriggering wave form of PIR Sensor
NowchangethejumpersothatitisintheHposition.Ifyousetupthetest,youwillnotice that nowthe
LEDdoes stayonthe entiretimethatsomethingis moving. That is called "retriggering".
22
Fig.2.17.(b). Retriggering wave form
2.7. Changing sensitivity
The Adafruit PIR has a trim pot on the back for adjusting sensitivity. You can adjust this if yourPIR istoo
sensitiveornotsensitiveenough-clockwisemakesitmoresensitive.
Fig.2.18. Sensitivity changer
2.8. Hardware Interface
Connecting PIR sensors to a microcontroller is really simple. The PIR acts as a digital output so all
you need to do is listen for the pin to flip high (detected) or low (not detected).It’s likely that you'll want
23
retriggering , so be sure to put the jumper in the H position! Power the PIR with 5V and connect ground to
ground.Thenconnecttheoutputtoadigital pin.Inthisexamplewe'llusepin2.
Fig.2.19. Hardware interface with arduino
2.9. Applications
• Human Detection.
• A PIR-based remote camera trigger.
• Rain Umbrella
• Home automation
• Security Areas
24
Chapter 3
Pressure Sensor
3.1. Introduction
Interlink Electronics FSR 400 Series is part of the single zone Force Sensing Resistor family.Force
Sensing Resistors, or FSR's, are robust polymer thick film (PTF) devices that exhibit a decrease in
resistance with increase in force applied to the surface of the sensor. This force sensitivity is optimized for
use in human touch control of electronics devices such as automotive electronics, medical systems,
industrial and robotics applications. The FSR 400 Series sensors come in six different models with four
different connectin options. A battery operated demo is available.
3.2. Sensor Mechanical Data
Fig.3.1. Pressure sensor
25
3.3. Exploded View
The exploded view is given below.
Fig.3.2. Exploded view
3.4. Device Characteristics
Table 4: Device characteristics
Actuation Force
0.2N min
Force Sensitivity Range
~0.2N – 20N
Force Repeatability
Single Part
+/- 2%
Force Repeatability Part to Part
+/- 6% (Single Batch)
Non-Actuated Resistance
>10 Mohms
Hysteresis
+10%Average(RF+RF)/RF+
Device Rise Time
< 3 Microseconds-5% average resistance change
Long Term Drift
1kg load, 35 days
< 5% log10(time)
Operating Temperature Change-15% average resistance change
3.5. Applications
• Nip alignment
• Electronic assembly
26
Chapter 4
Servomotor
4.1. Introduction
A servomotor is a rotary actuator that allows for precise control of angular position. It consists of a
motor coupled to a sensor for position feedback, through a reduction gearbox. It also requires a relatively
sophisticated controller, often a dedicated module designed specifically for use with servomotors.
Fig.4.1. Block Diagram of Servomotor
The electric motor and the servomechanism both serve as fundamental building blocks for modern
mechanical equipments and advance technological instruments. An electric motor is a device that uses
electrical energy to produce mechanical energy. A servomechanism, or servo, differs from a motor in that
it automatically corrects its performance using error-sensing feedback. A servo is typically implemented
with an electric motor as the source of mechanical force.
Fig. 4.2. Servomotor
Servomotors are designed to operate control surfaces. So they do not rotate continuously. Rather
they are designed to rotate through 180 degrees with precise position control. If you want to use them as
the main drive motor for a mobile robot you need to modify them so that they will rotate continuously.
They do not simply run on a DC voltage like a standard DC motor. They have 3 wires. Red is power
(generally 3V – 12V max), black is ground and then there is another wire, usually white or yellow that is
the “input signal wire”.
27
4.2. Principle of Operation
Servo motors are used in closed loop control systems in which work is the control variable. Servo
motors feature a motion profile, which is a set of instructions programmed into the controller that defines
the servo motor operation in terms of time, position, and velocity. The servo motor controller directs
operation of the motor by sending velocity command signals to the amplifier that drives the servo motor.
The servo compares its position and velocity feedbacks to its programmed motion profiles and adjusts the
motor velocity accordingly. A servomotor is controlled by sending a pulse signal that is HIGH for a brief
time, generally 1 – 2 ms. If you just connect a battery to power and ground, nothing will happen. You
must have a timer circuit that generates this pulsed signal and by varying the pulse ON time (or the pulse
width) the motor will move to a certain position over its range of motion and then stop as long as the input
pulse width is the same. Depending on the pulse width, you’ll get a different position. This diagram
shows some control signal pulses for a typical servo and the position to which it will rotate in response of
the pulse width .There is another element to the signal that also requires timing accuracy. The frequency
of the signal or its rate of refresh. Not only do you have to send the pulse, you have to keep sending them
as long as you want the motor to be in that position (or to keep rotating for modified servos). Generally a
frequency of 50 Hz is good. This means that you send the high pulse 50 times every second.
A servo will only rotate through 180 degrees unless you modify it for continuous rotation. One
interesting thing that comes out this modification is that you get a speed control function out of it, though
somewhat coarse.
When you make the modification you replace the circuitry in the motor that tells the motor what
position it is in. The modes you make tell the motor that it is always in the center position. So if you feed
a 1.75 ms pulse, it rotates to the 180 degree position, checks the feedback which tells it that “hey, you
haven’t moved yet. You’re still in the center position, keep going” so it does, checks and sees that it
hasn’t moved yet and keeps doing it. Since it thinks that it is in center position and it has to move to its
right most position it will move at its fastest rate.
Now suppose you send it a signal that says to rotate to 95 degrees, 5 degrees right of center. The
internal control system knows that it is now to move a very short distance. It also knows that if it rotates
at its fastest speed that it may overshoot this and has to come back, and overshoot again in the other
direction and try again, and so forth. This is called oscillation and is not a good thing. The advantage that
you get out of this is that the motor will move slower when you feed a signal that is close to the center
position. So you feed it a “go to 95 degree” signal and it will rotate CW at a slow rate. Give it “go to 180
degrees” and it will rotate CW at its fastest rate and the same for CCW.
28
Fig.4.3. Characteristics between angle and time
4.3. Types of Servomotor
• DC Servomotor
• AC Servomotor
4.3.1. DC Servomotor
A DC servo motor consists of a small DC motor, feedback potentiometer, gearbox, motor drive
electronic circuit and electronic feedback control loop. It is more or less similar to the normal DC motor.
The stator of the motor consists of a cylindrical frame and the magnet is attached to the inside of the
frame. The rotor consists of brush and shaft. A commutator and a rotor metal supporting frame are
attached to the outside of the shaft and the armature winding is coiled in the rotor metal supporting frame.
A brush is built with an armature coil that supplies the current to the commutator. At the back of the shaft,
a detector is built into the rotor in order to detect the rotation speed.
With this construction, it is simple to design a controller using simple circuitry because the torque is
proportional to the amount of current flow through the armature .And also the instantaneous polarity of the
control voltage decides the direction of torque developed by the motor.
Types of DC servo motors include series motors, shunt control motor, split series motor, and
permanent magnet shunt motor.
29
Fig.4.4. Internal architecture of servomotor
4.3.1.1. Working Principle of DC Servomotor
A DC servo motor is an assembly of four major components, namely a DC motor, a position
sensing device, a gear assembly, and a control circuit. The below figure shows the parts that consisting in
RC servo motors in which small DC motor is employed for driving the loads at precise speed and position.
A DC reference voltage is set to the value corresponding to the desired output. This voltage can be
applied by using another potentiometer, control pulse width to voltage converter, or through timers
depending on the control circuitry. The dial on the potentiometer produces a corresponding voltage which
is then applied as one of the inputs to error amplifier.
In some circuits, a control pulse is used to produce DC reference voltage corresponding to desired
position or speed of the motor and it is applied to a pulse width to voltage converter. In this converter, the
capacitor starts charging at a constant rate when the pulse high. Then the charge on the capacitor is fed to
the buffer amplifier when the pulse is low and this charge is further applied to the error amplifier. So the
length of the pulse decides the voltage applied at the error amplifier as a desired voltage to produce the
desired speed or position. In digital control, microprocessor or microcontroller are used for generating the
PWM pluses in terms of duty cycles to produce more accurate control signals.
30
Fig. 4.5. Working diagram of servomotor
The feedback signal corresponding to the present position of the load is obtained by using a
position sensor. This sensor is normally a potentiometer that produces the voltage corresponding to the
absolute angle of the motor shaft through gear mechanism.
Then the feedback voltage value is applied at the input of error amplifier (comparator).The error
amplifier is a negative feedback amplifier and it reduces the difference between its inputs. It compares the
voltage related to current position of the motor (obtained by potentiometer) with desired voltage related to
desired position of the motor (obtained by pulse width to voltage converter), and produces the error either
a positive or negative voltage. This error voltage is applied to the armature of the motor. If the error is
more, the more output is applied to the motor armature. As long as error exists, the amplifier amplifies the
error voltage and correspondingly powers the armature. The motor rotates till the error becomes zero. If
the error is negative, the armature voltage reverses and hence the armature rotates in the opposite
direction.
31
Fig.4.6. Internal component
4.3.2. AC Servo Motor
AC servo motors are basically two-phase squirrel cage induction motors and are used for low power
applications. Nowadays, three phase squirrel cage induction motors have been modified such that they can
be used in high power servo systems. The main difference between a standard split-phase induction motor
and AC motor is that the squirrel cage rotor of a servo motor has made with thinner conducting bars, so
that the motor resistance is higher.
4.3.2.1. Types of AC Servo Motor
Based on the construction there are two distinct types of AC servo motors, they are synchronous type
AC servo motor and induction type AC servo motor.
• Synchronous-type AC servo motor
• Induction-type AC servo motor
4.3.2.1.1. Synchronous-type AC servo motor
It consists of stator and rotor. The stator consists of a cylindrical frame and stator core. The
armature coil wound around the stator core and the coil end is connected to with a lead wire through
which current is provided to the motor. The rotor consists of a permanent magnet and hence they do not
rely on AC induction type rotor that has current induced into it. And hence these are also called as
brushless servo motors because of structural characteristics.
32
Fig.4.7. Synchronous-type AC servomotor
When the stator field is excited, the rotor follows the rotating magnetic field of the stator at the
synchronous speed. If the stator field stops, the rotor also stops. With this permanent magnet rotor, no
rotor current is needed and hence less heat is produced. Also, these motors have high efficiency due to the
absence of rotor current. In order to know the position of rotor with respect to stator, an encoder is placed
on the rotor and it acts as a feedback to the motor controller.
4.3.2.1.2. Induction-type AC servo motor
The induction-type AC servo motor structure is identical with that of general motor. In this motor,
stator consists of stator core, armature winding and lead wire, while rotor consists of shaft and the rotor
core that built with a conductor as similar to squirrel cage rotor.
Fig.4.8. Induction-type AC servomotor
33
The working principle of this servo motor is similar to the normal induction motor. Again the
controller must know the exact position of the rotor using encoder for precise speed and position control.
4.3.3. Working Principle of AC Servomotor
The schematic diagram of servo system for AC two-phase induction motor is shown in the figure
below. In this, the reference input at which the motor shaft has to maintain at a certain position is given to
the rotor of synchro generator as mechanical input theta. This rotor is connected to the electrical input at
rated voltage at a fixed frequency. The three stator terminals of a synchro generator are connected
correspondingly to the terminals of control transformer.
The angular position of the two-phase motor is transmitted to the rotor of control transformer
through gear train arrangement and it represents the control condition alpha. Initially, there exist a
difference between the synchro generator shaft position and control transformer shaft position. This error
is reflected as the voltage across the control transformer.
This error voltage is applied to the servo amplifier and then to the control phase of the motor. With
the control voltage, the rotor of the motor rotates in required direction till the error becomes zero. This is
how the desired shaft position is ensured in AC servo motors. Alternatively, modern AC servo drives are
embedded controllers like PLCs, microprocessors and microcontrollers to achieve variable frequency and
variable voltage in order to drive the motor. Mostly, pulse width modulation and Proportional-Integral-
Derivative (PID) techniques are used to control the desired frequency and voltage. The block diagram of
AC servo motor system using programmable logic controllers, position and servo controllers is given
below.
4.4. Specifications
• Weight: 9 g
• Dimension: 22.2 x 11.8 x 31 mm approx.
• Stall torque: 1.8kgf·cm
• Operating speed: 0.1 s/60 degree
• Operating voltage: 4.8 V (~5V)
• Dead band width: 10 µs
• Temperature range: 0 ºC – 55 ºC
34
4.5. Servomotors Connecting Systems
4.5.1. Power Cables Motion-Connector
• 500, 700 and 800 6FX5,
• 6FX8 and 6FX7, technical data 6FX5, 6FX8 and 6FX7, connection overview
• for 1FK., 1FT6, 1FS6, 1PH., 1PL6 6FX7, for 1FN3 linear motors, sold by the meter
• for 1PH7, 1PL6 and 1PH4 induction motors Flange for signal plug.
4.5.2. Encoder cables
• for connection to motors with an incremental encoder HTL
• for connection to motors with a resolver 2-pole /multi-pole
• for connection to motors with a sin/cos incremental encoder 1 Vpp
• for connection to motors with an absolute-value encoder (EnDat)
• for 1FN3 AC linear motors • for SIMODRIVE 611 universal
• Cables for SIMODRIVE POSMO CD/CA, SI
4.6. Applications
• Used in RC plane design
• Fixed angle motion
35
Chapter 5
Electric Fencing
5.1. Introduction
An electric fence usually consists of several conductors of bare wire, supported on insulators and
connected to a fence energizer which in turn is connected to a power source and earth rod(s). Electric
fences were first used in World War I to contain prisoners of war. These fences carried alternating
current (a.c.) and were designed to kill anyone coming into contact with them. It was not until the late
1930s that non-lethal fence energizers (also called controllers or fencer units) producing direct current
(d.c.) were developed to manage stock or wildlife. Nevertheless, these early energisers were still
dangerous, unreliable and easily short circuited. Then, in the late 1930s, better units were developed,
making the technique more successful and acceptable.
Over the last 30 years, improvements in energiser technology have continued to be made so that
now, in the early 2000s, a large range of energisers can be purchased. They are powered either from a
mains electricity supply or, where this is not available, by battery. In remote areas, wind and solar
power c1an be used to charge batteries. Energisers of varying power output, ranging from less than 1
joule to over 20 joules, can be purchased. (A joule (J) is the unit of energy used by manufacturers to
specify the energy level of pulses produced by their products).
Electricity flows as a result of electrical pressure which is measured in volts (V). Energisers
produce brief, high voltage pulses of electricity between the conducting wire and earth when the circuit
is closed by animal contact. An animal standing on the ground and touching the electrified wire
completes the circuit and receives intermittent but regular shocks to deter it. The pulsed nature of the
electricity enables animals to move away from the fence, so preventing electrocution, although lethal
fences still have a limited use in the Far East for control of rodents.
5.2. Temporary or Permanent?
The main value of electric fencing is as a temporary fence to contain stock or exclude wildlife. The
relatively low cost of the labour and materials required to erect this type of fence, and its high adaptability
compared with the equivalent requirements of a standard post and wire fence, makes it especially suitable
for this purpose. For example, electric fencing enables large fields to be easily subdivided to allow their
more efficient use by grazing stock. Electric fencing can also be used as a more permanent fence,
particularly where failure would not result in serious consequences. For example, it can be used in this
way to keep stock away from ditches, to control cattle in farmyards or to create access routes for cattle
36
between milking parlours and fields. It is, however, less suitable as a farm boundary fence where failure
could result in stock gaining access to neighbouring properties or roads.
Table 5: Working condition list
Component Temporary
fence
Permanent
fence
Energiser (mains powered) Yes
Energiser (battery powered) y Y
Battery charging system (wind solar) Y
Battery charging from mains y Y
Non-rechargeable battery Y
Straining post – wood Y Y
Contour post – wood Y
Turning post – wood Y Y
Strut – wood Y Y
Stake - wood, plastic, metal or fiberglass Y Y
Insulators integral with stake Y
Porcelain insulators Y
Plastic insulators y Y
Tube insulators Y
Off-set insulators Y
1.6 mm and 2.00 mm medium-tensile steel and
aluminium wire
y
2.5 mm high-tensile, 2.65 spring-steel and 3.15 mm
mild steel wire
Y
Multi-strand steel cable y Y
Polythene and stainless steel wire ‘Polywire’ and
‘Polytape’
y Y
Polywire electric mesh netting y
Barbed wire/mesh xx X
Copper coated steel earth rod Y Y
Zinc coated steel earth rod y
5.3. Energisers
The centre of any electric fence system is the energizer. There are two types: mains operated and
battery operated. The energiser converts a.c. or d.c.voltage, respectively, into repetitive high voltage
pulses of d.c. voltage which are delivered along the entire length of a fence connected to it. Each pulse
lasts for a very short time (approximately 500 microseconds) and is produced at one second intervals.
Thus, fence energizers are constantly switching on and off, and it is this characteristic which is responsible
for preventing a fatality under normal operating conditions. The voltage peak of each consecutive pulse
can rise to a limit of 10,000 V; values exceeding this limit are considered unsafe by present international
37
safety standards. Voltage is not the only aspect to be taken into consideration where safety is concerned.
Each pulse will contain a potential quantity of electrical energy. This quantity of electrical energy is
measured in joules (J). Energisers with an output in excess of 5 J are not recommended under UK Health
and Safety codes of practice, although those producing up to 20 J are nevertheless available on themarket.
Each of the mains operated and battery operated energisers are sub-divided into the two categories of
high or low power. Many of the energisers available allow the choice of either low or high energy
outputs. These outputs are usually available from colour coded terminals on the energiser. A red
coloured terminal will usually identify the higher output and a yellow coloured terminal the lower
output. The earth terminal, common to either output, is green. The most recent designs of energisers
have digital liquid crystal display providing certain characteristics of the output on the fence, such as
fence voltage and earth leakage.
There are three important factors to be considered when choosing an energiser:
• fence location
• animals to be controlled
• Fence Length
Under most circumstances, fence location will dictate the selection between a mains or battery
powered energiser. For example, in remote areas where no mains supply is available, the only option will
be a battery powered unit. When a battery powered energiser is selected, consideration must be given to
replacing or recharging the battery which, with a higher powered energiser, may be as frequently as every
two weeks. Thus, where there is a choice, mains operated energisers are preferable to avoid the problems
of battery charging and maintenance.
Different species of animals vary in their susceptibility to electric fence shocks. Some, such as
pigs, are relatively easy to control: as little as 300 millijoules (mJ) of energy on a well- insulated fence
with a sound earthing system will deter them. Animals with fur generally require more energy capacity
on the fence to receive an effective shock. Body size is also important. Generally the larger the animal
the greater the energy capacity needed. For example, rabbits and foxes require less energy (they need
about 1.5 J) than sheep and deer. Deer generally represent one of the most difficult animals to control by
electric fencing and high powered energisers areessential.
The fence manufacturer will usually specify the maximum length of fence that their energiser
will power effectively. The length of fence, for multi-strand fences, is the total length of conductor wire
used. Thus, an energiser capable of powering a 4 km (2.5 miles) length of fence can be used on either a
2 km (about 1.2 miles) fence of 2-line wires or 1 km (about 0.6 miles) fence of 4-line wires.
38
5.4. Batteries
Some low power energisers can be used with dry cell batteries which are designed to be used
and discarded. However, most energisers require rechargeable lead acid batteries. The required voltage
of the battery will be specified by the energiser manufacturer and the capacity of the battery can be
determined from the proposed usage and method of charging. Batteries that are not designed for cyclic
discharge and recharge (car starter batteries, for example) will deteriorate rapidly if not maintained at or
near full charge. Leisure batteries (for example, those used in caravans) are moreappropriate.
5.5. Insulators And Switches
Insulators are a fundamental component of any electric fence. They are made from a non-
conductive material, usually either porcelain or thermoplastic, and form a barrier between the electrified
wire and its support material to prevent current leakage to the ground.
Good quality insulators should have a smooth surface and be impervious, so that they will drain
and dry rapidly, to prevent moisture collecting in any cracks or splits and water accumulating on their
surface.
The total amount of energy in each pulse delivered by an energiser is relatively small but, as
already stated, the voltage peak of each pulse may be as high as 10 000 V. This high level of voltage
will 'jump' from any accumulated moisture on a poor quality insulator to any point that is effectively
earthed.
This leaking of electrical discharge may be in the form of an 'arc', which can be heard as clicking
from as far away as about 50 metres (55 yds), and can on occasion be visible to the eye as sparking.
Leakage of this nature will result in a reduction of the effectiveness of the fence. Not all leakage of
electric current is detectable without the aid of instrumentation.
It is therefore important to select the correct type and quality of insulator. The quality of some
types of insulator is variable. Therefore, experience gained from the use of insulators from particular
suppliers can help to guide future purchases. Choice of insulator will also depend to some extent on
whether the fence is to be permanent or temporary.
Porcelain insulators (Plate 1) have the best insulation properties and, if of good quality, are the
strongest. They are therefore particularly suitable to insulate tensioned line wires from straining and
turning posts (Figure 2). They are fire resistant and can prevent any electrical arcing causing a fire.
Their main disadvantage is their relatively high cost and, as a result, they are mainly used on permanent
fencing. Poor quality porcelain insulators may be fragile under tension; they may also crack allowing
absorption and retention of moisture giving rise to conductive deposits.
39
Fig.5.1. Insulator and Switches
5.6. Encountering
An electric fence encountered for the first time by a wild mammal is an unfamiliar object which
the animal will investigate, usually by touch, using its nose. Domestic stock familiar with electric
fencing are also likely to investigate new fences by touch with their nose. By contrast, stock unfamiliar
with electric fencing are more likely to try to push through the large spaces between wires, thereby
touching the wires with their neck, back or chest. Wild animals may also make this type of contact if
they do not see the fence before touching it, which can often be the case with nocturnal species.
The intensity of the shock felt by an animal determines its subsequent reaction to the fence. Different
species, as well as individual animals within a species, may react differently. An animal which touches a
wire with its nose, which is poorly insulated and highly innervated, usually receives a severe shock
which is likely to deter it from crossing the fence. By contrast, an animal which touches a wire with a
less sensitive area, such as its neck, back or chest, may not even receive a shock and may cross the
fence. Furthermore, if an animal is moving swiftly and has almost crossed before the electrical pulse is
generated, it is likely to complete the crossing. Similarly, if an animal jumps through and is off the
ground when it contacts live wires it will not receive a shock. A danger is that any animal that passes
through or over a fence will be retained within the fenced area.
40
5.7. Applications
5.7.1. Agriculture
Permanent electric fencing is used in many agricultural areas, as construction of electric fences
can be much cheaper and faster than conventional fences (it uses plain wire and much lighter
construction, as the fence does not need to physically restrain animals).
The risk of injury to livestock (particularly horses) is lower compared to fences made of barbed
wire or certain types of woven wire with large openings that can entangle the feet. Its disadvantages
include the potential for the entire fence to be disabled due to a break in the conducting wire, shorting
out if the conducting wire contacts any non electrified component that may make up the rest of the
fence, power failure, or forced disconnection due to the risk of fires starting by dry vegetation touching
an electrified wire.
Other disadvantages can be lack of visibility and the potential to shock an unsuspecting human
passerby who might accidentally touch or brush the fence. Many fences are made entirely of standard
smooth or high tensile wire, although high quality synthetic fencing materials are also beginning to be
used as part of permanent fences, particularly when visibility of the fence is a concern.
Conventional agricultural fencing of any type may be strengthened by the addition of a single
electric line mounted on insulators attached to the top or front of the fence. A similar wire mounted
close to the ground may be used to prevent pigs from excavating beneath other fencing. Substandard
conventional fencing can also be made temporarily usable until proper repairs are made by the addition
of a single electric line set on a "standoff" insulator.
Electric materials are also used for the construction of temporary fencing, particularly to support
the practice of managed intensive grazing (also known as rotational or "strip" grazing). It is also popular
in some places for confining horses and pack animals overnight when trail riding, hunting, or at
competitions such as endurance riding and competitive trail riding. Typically, one or more strands of
wire, synthetic tape or cord are mounted on metal or plastic posts with stakes at the bottom, designed to
be driven into the ground with the foot.
For a hand tightened temporary fence of electrified rope or web in a small area, these are
usually spaced at no more than 12 to 15 feet (about four metres) to prevent the fencing material from
sagging and touching the ground. Larger areas where tools are used to stretch wire may be able to set
step in posts at larger distances without risk that the fencing material will sag. With temporary electric
fencing, a large area can be fenced off in a short period.
Temporary fencing that is intended to be left in place for several weeks or months may be given
additional support by the use of steel T posts (which are quickly driven in with hand tools and unearthed
41
with relative ease, using a leverage device), to help keep the fence upright, particularly at corners.
Livestock owners using rotational grazing in set patterns that are similar from one year to the next, may
permanently drive a few permanent wooden fence posts in strategic locations.
Fig.5.2. A temporary electric fence of synthetic materials and plastic step in posts
5.7.2. Security
5.7.2.1. Nonlethal Fence
Security Electric Fences are electric fences constructed using specialised equipment and built for
perimeter security as opposed to animal management. Security electric fences consist of wires that carry
pulses of electric current to provide a nonlethal shock to deter potential intruders. Tampering with the
fence also results in an alarm that is logged by the security electric fence energiser, and can also trigger
a siren, strobe, and/or notifications to a control room or directly to the owner via email or phone.
In practical terms, security electric fences are a type of sensor array that acts as a (or part of a)
physical barrier, a psychological deterrent to potential intruders, and as part of a security alarm system.
Nonlethal electric fences are used by both private and government sector bodies to prevent trespass.
These include freight carriers, auto auctions, equipment rental companies, auto dealers, housing
communities, commercial factories or warehouses, prisons, military bases, and government buildings.
Many of these electric fences act as monitored security alarm systems in addition to causing an
uncomfortable shock. Electrified palisade fences are used to protect isolated property and high security
facilities, but also around some residential homes.
They can also be used inside a building, for example as a grid behind windows or skylights to
prevent people from climbing through. They have even been used on yachts and on large ships to deter
pirates. Electric fences are occasionally employed to discourage suicide attempts on tall structures, and
to reduce the incidence of graffiti and other petty crime. Due to the high levels of crime in South Africa,
it is common for residential houses to have perimeter defences. The City of Johannesburg promotes the
42
use of palisade fencing over opaque, usually brick, walls as criminals cannot hide as easily behind the
fence. In the City of Johannesburg manual on safety, one can read about best practices and maintenance
of palisade fencing, such as not growing vegetation in front of palisades as this allows criminals to make
an unseen breach.
Fig.5.3. Multizone security electric fence used alongside a physical barrier
5.7.2.2. Stunlethal Fence
Nope, the entire 3,323 km long Indo-Pak border is not fenced completely. Terrain is not plain
everywhere around the borders. Some places are marshy, mountaineous and river flowing areas :
• All borders couldn’t be fenced due to terrain. Many places of J&K are not fenced as those
regions are mountainous.
• Rivers flowing across the borders could not be fenced. Across the Jhelum river, there is no
fencing.
• Borders in Gujarat, near Rann of Kutchh, there are marshy lands which can not be fenced.
• Despite open borders, terrorists are unable to infilterate because BSF actively guards the border
day in, day out.
43
5.7.2.3. Lethal Fence
Electric fences designed to carry potentially lethal currents can be used for antipersonnel
purposes. In 1915, during World War I, the German occupiers of Belgium closed off the border with
neutral Netherlands, using a 300 km electric fence running from Vaals to Scheldt.
Germany also erected a similar fence to isolate thirteen Alsatian villages from Switzerland.
Electric fences were used to guard the concentration camps of Nazi Germany during World War II,
where potentially lethal voltages and currents were employed, continuously rather than in pulses. Some
prisoners used the electric barbed wire fence to commit suicide. During the Algerian War the French
erected the electrified Morice Line.
Fig.5.4. Lathal Fencing
5.7.2.4. Laser Fencing
• A laser wall is a mechanism to detect objects passing the line of sight between the laser source
and the detector.
• A laser beam over a river sets off a loud siren in case of a breach.
• The laser walls will cover stretches of treacherous terrain and riverine areas.
44
“By December 2018, entire Indo-Pak border will be sealed” - Home Minister Rajnath Singh
announced during a press conference.
Fig 5.5. Laser fencing on the Indian border
5.7.2.5. Applications
• It is used as security purpose in our project.
• It is used as home security purpose.
45
Chapter 6
Bidirectional Counter
6.1. Introduction
In today’s world, there is a continuous need for automatic appliances. With the increase in
standard of living, there is a sense of urgency for developing circuits that would ease the complexity of
life. Many times we need to monitor the people visiting some place like shopping mall. To provide
solution for this we are going to implement a project called “Bi Directional Digital Visitor Counter”
with automatic room light control.
This project has a “Visitor counter”. Basic concept behind this project is to measure and display
the number of persons entering in any room like seminar hall, conference room etc. LCD displays
number of person inside the room. We can use this project to count and display the number of visitors
entering inside any conference room or seminar hall.
This works in a two way. That means counter will be incremented if person enters the room and
will be decremented if a person leaves the room. In addition, it will automatically control room lights
.When the room is empty the lights will be automatically turn off.
6.2. Motivation
A few days back, we organized a seminar in Pearl Continental, Conference Hall. Main issues we
faced were that firstly, few people were trapped inside hall and security guards closed conference rooms
after finishing seminar, because they (security guards) were unaware of total number of people inside hall.
Moreover, we couldn’t analyse the feedback of people and number of people attending the seminar as
there wasn’t any registration process. Lastly, after ending of seminar, electrical appliances such as Air
coolers and fans were left unattended, this caused electricity wastage.
All these problems gave me perspective that if we could somehow analyse the number of people
entering and leaving halls, these drawbacks could be avoided. This promoted the idea of Bidirectional
Visitor Counter in our mind through which we can keep a check on number of people and allow all people
to leave any building before sealing it.
We can also count number of people to analyse the feedback of people on any event. And most
importantly, in case of all people leaving a premise, all electrical appliances will be turned off
automatically leading to saving of electricity.
46
6.3. Basic Block Diagram
Fig.6.1. Block diagram of bidirectional counter
6.4. Block Diagram Description
The basic block diagram of the bidirectional visitor counter with automatic light controller is
shown in the above figure. Mainly this block diagram consists of the following essential blocks.
➢ Power Supply
➢ IR Sensors
➢ Arduino UnoR3 micro-controller
➢ LED
➢ LCD Display
6.5. Power Supply
Here we used +5V dc power supply from computer USB. The main function of this block is to
provide the required amount of voltage to essential circuits. +5V is given to 2 IR sensors, transistor
(BC549C) and to a LCD display.
47
6.6. IR Sensors
This is the most fundamental type of sensor available in the market. The basic concept is simple.
There is an emitter which emits infrared (IR) rays. These IR rays are detected by a detector. This concept
is used to make proximity sensor (to check if something obstructs the path or not, etc), contrast sensors
(used to detect contrast difference between black and white, like in line follower robots), etc.
Fig.6.2. IR sensor module
6.7. Arduino Uno R3 Micro-controller (ATmega 328P):
An Atmel ATmega328P microcontroller in a 40 pin DIP package. It has 16 KB programmable
flash memory, static RAM of 1 KB and EEPROM of 512 Bytes. There are 14 digital I/O (input/output)
lines and 6 Analog I/O (input/output) pins.
6.8. LCD Display
LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of
applications. A 16x2 LCD display is very basic module and is very commonly used in various devices and
circuits. These modules are preferred over seven segments and other multi segment LEDs. The reasons
being: LCDs are economical; easily programmable; have no limitation of displaying special & even
custom characters (unlike in seven segments), animations and so on. A 16x2 LCD means it can display 16
characters per line and there are 2 such lines. In this LCD each character is displayed in 5x7 pixel matrix.
This LCD has two registers, namely, Command and Data. The command register stores the command
instructions given to the LCD. A command is an instruction given to LCD to do a predefined task like
initializing it, clearing its screen, setting the cursor position, controlling display etc. The data register
stores the data to be displayed on the LCD. The data is the ASCII value of the character to be displayed on
the LCD.
48
Fig.6.3. LCD
6.9. Schematic Diagram
Fig. 6.4. Schmetic diagram of bidirectional counter
49
6.10. Description
The IR transmitter will emit modulated 38 kHz IR signal and at the receiver we use TSOP1738
(Infrared Sensor). The output goes high when the there is an interruption and it return back to low when
there is no obstacle to the ray. Input is given to the Port 4 of the Arduino microcontroller. Port 8 to 13 is
used for the 7-Segment display purpose. Port 2 is used for the Relay/LED Turn On and Turn off
Purpose.LTS 542 (Common Anode) is used for 7-Segment display. And that time Relay/LED will get
Voltage and triggered so light will get voltage and it will turn on. And when counter will be 00 that time
Relay will be turned off. In this bidirectional circuit two infrared (IR) sensor components are used for up
and down counting, respectively.
Whenever an interruption is observed by the IR sensor then the IR sensor increment the value of
counter and whenever the second sensor detects any obstacle, the counter is decremented. The number of
interruption count depend upon the sensor’s input and displayed on a set of seven segment displays by
using the concept of multiplexing (for concept of multiplexing refer seven segment multiplexing).The IR
sensor input is defined as up and down selector mode for the counter in the code. Every time the first
sensor is blocked, the first sensor gives a high voltage signals and the count the value gets incremented.
The value of second sensor gets decremented when connected to second a sensor, gives high input. At
every setup, the value of the counter is sent and displayed it on the Sensor, gives high input. At every
setup, the value of the counter is sent and displayed it on the seven segments.
6.11. Working
➢ The IR sensor continuously senses the presence of any obstacles (a person in our case ).
➢ If sensor 1 senses a person, it informs the controller that a person has entered so that
controller can increment the count.
➢ At the same time it gives a delay of 1sec so that the person can cross the sensor 2 and the
count is maintained correctly.
➢ When a person exits, the sensor 2 informs the controller to decrement the count. Similarly
it also provides a delay of 1 sec to maintain count properly.
➢ The count is displayed on LCD by the controller.
➢ If there is at least 1 person is inside the hall, an LED will glow otherwise it is off.
50
6.12. List of Components
➢ Arduino UNO
➢ Resisters
➢ IR Sensor module
➢ 16x2 LCD display
➢ Bread Board
➢ Connecting Wires
➢ LED
➢ BC547 Transistor
6.13. IR Sensors
Fig.6.5. IR sensor
Series are miniaturized receivers for infrared remote control systems. PIN diode and preamplifier
are assembled on lead frame, the epoxy package is designed as IR filter. The demodulated output
signal can directly be decoded by a microprocessor. TSOP17 is the standard IR remote control
receiver series, supporting all major transmission codes.
6.13.1. Features
• Photo detector and preamplifier in one package
• Internal filter for PCM frequency
• Improved shielding against electrical field disturbance
• TTL and CMOS compatibility
• Output active low
51
• Low power consumption
• High immunity against ambient light
• Continuous data transmission possible (up to 2400 bps)
• Suitable burst length .10 cycles/burst
6.14. Advantages
• Low cost
• Easy to use.
• Can be implemented in single door.
• Can be used for counting purposes.
• Can be used for automatic room light control
6.15. Disadvantages
• It is used only when one person cuts the rays of the sensor hence cannot be used
when two or more persons cross the door simultaneously.
• When anybody is inside the room and we need to switch off the power then we’ve to do it
manually. So, in this case we fail to automatically control the light.
6.16. Applications
• For counting purposes.
• For automatic room light control.
• It can be used at homes and other places to keep a check on the number of persons entering
a secured place.
• It can also be used as home automation system to ensure energy saving by switching on the
loads and fans only when needed.
6.17. Future Prospects
• By using this circuit and proper power supply we can implement various applications, such
as fans, tube lights, etc.
52
• By modifying this circuit and using two relays we can achieve a task of opening and
closing the door.
• In bidirectional visitor counter the voice alarm may be added to indelicate room is full and
person can’t enter in the room.
53
Chapter 7
Controllers
7.1. ATmega 328
The Atmel AVR® core combines a rich instruction set with 32 general purpose working
registers. All the 32 registers are directly connected to the Arithmetic Logic Unit (ALU), allowing two
independent registers to be accessed in a single instruction executed in one clock cycle. The resulting
architecture is more code efficient while achieving throughputs up to ten times faster than conventional
CISC microcontrollers.
The ATmega328/P provides the following features: 32Kbytes of In-System Programmable Flash
with Read-While-Write capabilities, 1Kbytes EEPROM, 2Kbytes SRAM, 23 general purpose I/O lines,
32 general purpose working registers, Real Time Counter (RTC), three flexible Timer/Counters with
compare modes and PWM, 1 serial programmable USARTs , 1 byte-oriented 2-wire Serial Interface
(I2C), a 6- channel 10-bit ADC (8 channels in TQFP and QFN/MLF packages) , a programmable
Watchdog Timer with internal Oscillator, an SPI serial port, and six software selectable power saving
modes.
The Idle mode stops the CPU while allowing the SRAM, Timer/Counters, SPI port, and interrupt
system to continue functioning. The Power-down mode saves the register contents but freezes the
Oscillator, disabling all other chip functions until the next interrupt or hardware reset. In Power-save
mode, the asynchronous timer continues to run, allowing the user to maintain a timer base while the rest
of the device is sleeping. The ADC Noise Reduction mode stops the CPU and all I/O modules except
asynchronous timer and ADC to minimize switching noise during ADC conversions. In Standby mode,
the crystal/resonator oscillator is running while the rest of the device is sleeping. This allows very fast
start-up combined with low power consumption. In Extended Standby mode, both the main oscillator
and the asynchronous timer continue to run.
Atmel offers the QTouch® library for embedding capacitive touch buttons, sliders and wheels
functionality into AVR microcontrollers. The patented charge-transfer signal acquisition offers robust
sensing and includes fully debounced reporting of touch keys and includes Adjacent Key Suppression®
(AKS™) technology for unambiguous detection of key events.
The easy-to-use QTouch Suite tool chain allows you to explore, develop and debug your own
touch applications. The device is manufactured using Atmel’s high density non-volatile memory
technology. The On-chip ISP Flash allows the program memory to be reprogrammed In-System through
an SPI serial interface, by a conventional nonvolatile memory programmer, or by an On-chip Boot
54
program running on the AVR core.
The Boot program can use any interface to download the application program in the Application
Flash memory. Software in the Boot Flash section will continue to run while the Application Flash
section is updated, providing true Read-While-Write operation. By combining an 8-bit RISC CPU with
In-System Self-Programmable Flash on a monolithic chip, the Atmel ATmega328/P is a powerful
microcontroller that provides a highly flexible and cost effective solution to many embedded control
applications.
The ATmega328/P is supported with a full suite of program and system development tools
including: C Compilers, Macro Assemblers, Program Debugger/Simulators, In-Circuit Emulators, and
Evaluation kits.
Fig.7.1. ATmega 328 controller
7.1.1. Introduction
Microcontrollers and humans communicate through the medium of the programming language
called Assembly language. The word Assembler itself does not have any deeper meaning, it corresponds
to the names of other languages such as English or French. More precisely, assembly language is only a
passing solution. In order that the microcontroller can understand a program written in assembly language,
it must be compiled into a language of zeros and ones. Assembly language and Assembler do not have the
same meaning.
The first one refers to the set of rules used for writing program for the microcontroller, while the
later refers to a program on a personal computer used to translate assembly language statements into the
language of zeros and ones. A compiled program is also called Machine Code. A "Program" is a data file
55
stored on a computer hard disc (or in memory of the microcontroller, if loaded) and written according to
the rules of assembly or some other programming language.
Assembly language is understandable for humans because it consists of meaningful words and
symbols of the alphabet. Let us take, for example the command "RETURN" which is, as its name
indicates, used to return the microcontroller from a subroutine. In machine code, the same command is
represented by a 14-bit array of zeros and ones understandable by the microcontroller. All assembly
language commands are similarly compiled into the corresponding array of zeros and ones. A data file
used for storing compiled program is called an "executive file", i.e. "HEX data file".
The name comes from the hexadecimal presentation of a data file and has a suffix of "hex" as well,
for example "probe.hex". After has been generated, the data file is loaded into the microcontroller using a
programmer. Assembly language programs may be written in any program for text processing (editor)
able to create ASCII data files on a hard disc or in a specialized work environment such as MPLAB
described later.
7.1.2. Elements Of Assembly Language
A program written in assembly language consists of several elements being differently interpreted
while compiling the program into an executable data file. The use of these elements requires strict rules
and it is necessary to pay special attention to them during program writing in order to avoid errors.
Fig.7.2. Conversion programming language in machine language
7.1.3. Specification
The Atmel 8-bit AVR RISC-based microcontroller combines 32 kB ISP flash memory with
read-while-write capabilities, 1 kB EEPROM, 2 kB SRAM, 23 general purpose I/O lines, 32 general
purpose working registers, three flexible timer/counters with compare modes, internal and
external interrupts, serial programmable USART, a byte-oriented 2-wire serial interface, SPI serial port,
6-channel 10-bit A/D converter (8-channels in TQFP and QFN/MLF packages),
programmable watchdog timer with internal oscillator, and five software selectable power saving
56
modes. The device operates between 1.8-5.5 volts. The device achieves throughput approaching
1 MIPS per MHz.
7.1.4. Features
• RISC Architecture with CISC Instruction set
• Powerful C and assembly programming
• Scalable
• Same powerful AVR microcontroller core
• Low power consumption
• Both digital and analog input and output interfaces
7.1.5. Processor Architecture
AVR follows Harvard Architecture format in which the processor is equipped with separate memories and
buses for Program and the Data information. Here while an instruction is being executed, the next
instruction is pre-fetched from the program memory.
7.1.5.1. ALU
The high-performance AVR ALU operates in direct connection with all the 32 general purpose working
registers. Within a single clock cycle, arithmetic operations between general purpose registers or between
a register and an immediate are executed. The ALU operations are divided into three main categories –
arithmetic, logical, and bit-functions. Some implementations of the architecture also provide a powerful
multiplier supporting both signed/unsigned multiplication and fractional format.
Fig.7.3. General architecture of ALU
57
Fig.7.4. Architecture of Atmega328
7.1.5.2. In-System Reprogrammable Flash Program Memory
The ATmega48/88/328 contains 4K/8K/16K bytes On-chip In-System Reprogrammable Flash
memory for program storage. Since all AVR instructions are 16 or 32 bits wide, the Flash is organized as
2K/4K/8K × 16. For software security, the Flash Program memory space is divided into two sections,
Boot Loader Section and Application Program Section in ATmega88 and ATmega328.
7.1.5.3. EEPROM Data Memory
The Atmel ATmega48 /88/328 contains 256/512/512 bytes of data EEPROM memory. It is
organized as a separate data space e, in which single bytes can be read and written. The EEPROM has an
endurance of at least 100,000 write/erase cycles. The access between the EEPROM and the CPU is
58
described in the following, specifying the EEPROM Address Registers, the EEPROM Data Register, and
the EEPROM Control Register.
7.1.5.4. Program Counter
A program counter is a register in a computer processor that contains the address (location) of
the instruction being executed at the current time. As each instruction gets fetched, the program counter
increases its stored value by 1. After each instruction is fetched, the program counter points to the next
instruction in the sequence. When the computer restarts or is reset, the program counter normally reverts
to 0. In computing, a program is a specific set of ordered operations for a computer to perform. An
instruction is an order given to a computer processor by a program. Within a computer, an address is a
specific location in memory or storage. A register is one of a small set of data holding places that the
processor uses. Program counter is very important feature in the microcontrollers.
7.1.5.5. RAM
RAM stands for random access memory. This type of memory storage is temporary and volatile.
You might have heard that if your system is working slowly you say that increase the RAM processing
will increase. Let us understand in detail. Let us consider two cases to execute a task first the complete
task is execute at one place(A), second the task is distributed in parts and the small tasks are executed at
different places(A,B C)and finally assembled. It is clear the work will be finished in second case earlier.
The A, B, C basically represent different address allocation for temporary processing. This is the case with
RAM also if you increase the RAM the address basically increases for temporary processing so that no
data has to wait for its turn. On major importance of the RAM is address allocations. However the storage
is temporary every time u boot your system the data is lost but when you turn on the system The BIOS
fetch number of addresses available in the RAM. This memory supports read as well as write operations
both.
7.1.5.6. Instruction execution section (IES)
It has the most important unit—instruction register and instruction decoder to control the flow of
the instruction during the processing’s.
7.1.5.7. Input/Output Ports
To interact with the physical environment there are different input and output ports in every system
like in PC we have VGA port to connect the monitor, USB port for flash memory connections and many
more ports. Similarly ATMEGA 328 has its input and output ports with different configurations
59
depending on the architecture like only input, only output and bi-directional input output ports. The
accessing of this port is referred as input output interface design for microcontrollers. IT has analog input
port, analog output port, digital input port ,digital output port, serial communication pins, timer execution
pins etc.
7.1.5.8. Analog Comparator & A/D converters
The major question is that how a controller manage to detect variation of voltage in-spite it could
not understand the voltage but understand only digital sequence Most of the physical quantities around us
are continuous. By continuous we mean that the quantity can take any value between two extreme. For
example the atmospheric temperature can take any value (within certain range). If an electrical quantity is
made to vary directly in proportion to this value (temperature etc) then what we have is Analogue signal.
Now we have we have brought a physical quantity into electrical domain. The electrical quantity in most
case is voltage. To bring this quantity into digital domain we have to convert this into digital form. For
this a ADC or analog to digital converter is needed. Most modern MCU including AVRs has an ADC on
chip. An ADC converts an input voltage into a number. An ADC has a resolution. A 10 Bit ADC has a
range of 0-1023. (2^10=1024) The ADC also has a Reference voltage (ARef). When input voltage is GND
the output is 0 and when input voltage is equal to ARef the output is 1023. So the input range is 0-ARef
and digital output is 0-1023.
7.1.6. Pin Diagram and Description
Fig.7.5. PIN diagram of Atmega 328
60
• VCC: Digital supply voltage.
• GND: Ground.
(a) Port B (PB7:0) XTAL1/XTAL2/TOSC1/TOSC2
Port B is an 8-bit bi-directional I/O port with internal pull- up resistors (selected for each bit). The
Port B output buffers have symmetrical drive characteristics with both high sink and source Capability. As
inputs, Port B pins that are externally pulled low will source current if the pull-up resistors are activated.
The Port B pins are tri-stated when a reset condition becomes active, even if the clock is not running.
Depending on the clock selection fuse settings, PB6 can be used as input to the inverting Oscillator
amplifier and input to the internal clock operating circuit. Depending onthe clock selection fuse settings,
PB7 can be used as output from the inverting Oscillator amplifier. If the Internal Calibrated RC Oscillator
is used as chip clock source, PB7.6 is used as TOSC2.1 input for the Asynchronous Timer/Counter2 if the
AS2 bit in ASSR is set.
(b) Port C (PC5:0)
Port C is a 7-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The
PC5.0 output buffers have symmetrical drive characteristics with both high sink and source capability. As
inputs, Port C pins that are externally pulled low will source current if the pull-up resistors are activated.
The Port C pins are tri-stated when a reset condition becomes active, even if the clock is not running.
(c) PC6/RESET:
If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that the electrical
characteristics of PC6 differ from those of the other pins of Port C. If the RSTDISBL Fuse is
unprogrammed, PC6 is used as a Reset input. A low level on this pin for longer than the minimum pulse
length will generate a Reset, even if the clock is not running. Shorter pulses are not guarantee to generate
a reset.
(d) Port D (PD7:0):
Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The
Port D output buffers have symmetrical drive characteristics with both high sink and source capability. As
inputs, Port D pins that are externally pulled low will source current if the pull-up resistors are activated.
The Port D pin are tri-stated when a reset condition becomes active, even if the clock is not running.
61
(e) AVCC:
AVCC is the supply voltage pin for the A/D Converter PC3:0, and ADC7:6. It should be externally
connected to VCC, even if the ADC is not used. If the ADC is used, it should be connected to VCC
through a low-pass filter. Note that PC6.4 use digital supply voltage, VCC.
(f) AREF:
AREF is the analog reference pin for the A/D Converter.
7.1.7. Key Parameters
Table 6: Key parameter
Parameter Value
CPU Type 8 bit AVR
Perfornce 20 MIPS at 20 MHz
Flash Memory 32 kB
SRAM 2 kB
EEPROM 1 kB
Pin Count 28 Pin PDIP,MLF,32 Pin TQFP, MLF
Maximum Operating Frequency 20 MHz
Number of Touch Channes 16
Hardware QTouch Acuisition NO
Maximum I/O Pins 26
External Interrupts 2
USB Interface NO
USB Speed -
7.1.8. Serial Mode Programming
Table 7: Serial mode Programming
Symbol Pins I/O Description
MOSI PB3 I Serial data in
MISO PB4 O Serial Data out
SCK PB5 I Serial Clock
62
7.1.9. Programming
• Parallel Mode Programming
Table 8: Parallel programming
Programming
signal
Pin Name I/O Function
RDY/BSY PD1 O
High means the MCU is ready for a new command,
otherwise busy.
OE PD2 I Output Enable (Active low)
WR PD3 I Write Pulse (Active low)
BS1 PD4 I Byte Select 1 (“0” = Low byte, “1” = High byte)
XA0 PD5 I XTAL Action bit 0
XA1 PD6 I XTAL Action bit 1
PAGEL PD7 I Program memory and EEPROM Data Page Load
BS2 PC2 I Byte Select 2 (“0” = Low byte, “1” = 2nd High byte)
DATA PC[1:0]:PB[5:0] I/O Bi-directional data bus (Output when OE is low)
7.1.10. Applications
• Arduino Based Home Automation System.
• Arduino based Auto Intensity Control of Street Lights.
• The Obstacle Avoidance Robot Operated with Arduino.
• Arduino based Controlling of Electrical Appliances using IR.
7.1.11. Advantages
I. Ready to Use
The biggest advantage of Arduino is its ready to use structure. As Arduino comes in a complete
package form which includes the 5V regulator, a burner, an oscillator, a micro-controller, serial
communication interface, LED and headers for the connections. You don't have to think about
programmer connections for programming or any other interface. Just plug it into USB port of your
computer and that's it. Your revolutionary idea is going to change the world after just few words of
coding.
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file
Download file

More Related Content

What's hot

Home automation using blynk app with fan direction control and displaying sta...
Home automation using blynk app with fan direction control and displaying sta...Home automation using blynk app with fan direction control and displaying sta...
Home automation using blynk app with fan direction control and displaying sta...Diwash Kapil Chettri
 
IRJET- An IoT Based Forest Fire Detection and Prevention System using Raspber...
IRJET- An IoT Based Forest Fire Detection and Prevention System using Raspber...IRJET- An IoT Based Forest Fire Detection and Prevention System using Raspber...
IRJET- An IoT Based Forest Fire Detection and Prevention System using Raspber...IRJET Journal
 
Home automation using arduino
Home automation using arduinoHome automation using arduino
Home automation using arduinoIkram Arshad
 
seminar report iot based health monitoring system 2023.pdf
seminar report  iot based health monitoring system 2023.pdfseminar report  iot based health monitoring system 2023.pdf
seminar report iot based health monitoring system 2023.pdfriddheshbore97
 
Wireless charging
Wireless chargingWireless charging
Wireless chargingashwin106
 
Real Time ECG and Saline Level Monitoring System Using Arduino UNO Processor
Real Time ECG and Saline Level Monitoring System Using Arduino UNO ProcessorReal Time ECG and Saline Level Monitoring System Using Arduino UNO Processor
Real Time ECG and Saline Level Monitoring System Using Arduino UNO ProcessorAssociate Professor in VSB Coimbatore
 
Home automation using IoT
Home automation using IoTHome automation using IoT
Home automation using IoTAthira_1993
 
Silentsound documentation
Silentsound documentationSilentsound documentation
Silentsound documentationRaj Niranjan
 
SOLAR BASED MOBILE CHARGER IN RURAL AREAS
SOLAR BASED MOBILE CHARGER IN RURAL AREASSOLAR BASED MOBILE CHARGER IN RURAL AREAS
SOLAR BASED MOBILE CHARGER IN RURAL AREASJOLLUSUDARSHANREDDY
 
Gsm based fire alert system
Gsm based fire alert systemGsm based fire alert system
Gsm based fire alert systemNisha Kumari
 
Presentation on wireless charging
Presentation on wireless chargingPresentation on wireless charging
Presentation on wireless chargingpradeep shetty
 
IRJET- IoT based Smart Energy Meter
IRJET- IoT based Smart Energy MeterIRJET- IoT based Smart Energy Meter
IRJET- IoT based Smart Energy MeterIRJET Journal
 
Density Based Traffic System with Emergency override using Bluetooth
Density Based Traffic System with Emergency override using BluetoothDensity Based Traffic System with Emergency override using Bluetooth
Density Based Traffic System with Emergency override using BluetoothChull Productions
 
Touchscreenbasedhomeautomationsystem dca
Touchscreenbasedhomeautomationsystem dcaTouchscreenbasedhomeautomationsystem dca
Touchscreenbasedhomeautomationsystem dcavision2d16
 

What's hot (20)

Iot based home automation
Iot based home automationIot based home automation
Iot based home automation
 
Home automation using blynk app with fan direction control and displaying sta...
Home automation using blynk app with fan direction control and displaying sta...Home automation using blynk app with fan direction control and displaying sta...
Home automation using blynk app with fan direction control and displaying sta...
 
IRJET- An IoT Based Forest Fire Detection and Prevention System using Raspber...
IRJET- An IoT Based Forest Fire Detection and Prevention System using Raspber...IRJET- An IoT Based Forest Fire Detection and Prevention System using Raspber...
IRJET- An IoT Based Forest Fire Detection and Prevention System using Raspber...
 
Home automation using arduino
Home automation using arduinoHome automation using arduino
Home automation using arduino
 
Seminar report
Seminar reportSeminar report
Seminar report
 
Password Based Circuit Breaker
Password Based Circuit BreakerPassword Based Circuit Breaker
Password Based Circuit Breaker
 
Burglar Alarm Micro Project
Burglar Alarm Micro ProjectBurglar Alarm Micro Project
Burglar Alarm Micro Project
 
seminar report iot based health monitoring system 2023.pdf
seminar report  iot based health monitoring system 2023.pdfseminar report  iot based health monitoring system 2023.pdf
seminar report iot based health monitoring system 2023.pdf
 
Wireless charging
Wireless chargingWireless charging
Wireless charging
 
Real Time ECG and Saline Level Monitoring System Using Arduino UNO Processor
Real Time ECG and Saline Level Monitoring System Using Arduino UNO ProcessorReal Time ECG and Saline Level Monitoring System Using Arduino UNO Processor
Real Time ECG and Saline Level Monitoring System Using Arduino UNO Processor
 
Home automation using IoT
Home automation using IoTHome automation using IoT
Home automation using IoT
 
The E-Bomb
The E-BombThe E-Bomb
The E-Bomb
 
Amazon Alexa Technologies
Amazon Alexa TechnologiesAmazon Alexa Technologies
Amazon Alexa Technologies
 
Silentsound documentation
Silentsound documentationSilentsound documentation
Silentsound documentation
 
SOLAR BASED MOBILE CHARGER IN RURAL AREAS
SOLAR BASED MOBILE CHARGER IN RURAL AREASSOLAR BASED MOBILE CHARGER IN RURAL AREAS
SOLAR BASED MOBILE CHARGER IN RURAL AREAS
 
Gsm based fire alert system
Gsm based fire alert systemGsm based fire alert system
Gsm based fire alert system
 
Presentation on wireless charging
Presentation on wireless chargingPresentation on wireless charging
Presentation on wireless charging
 
IRJET- IoT based Smart Energy Meter
IRJET- IoT based Smart Energy MeterIRJET- IoT based Smart Energy Meter
IRJET- IoT based Smart Energy Meter
 
Density Based Traffic System with Emergency override using Bluetooth
Density Based Traffic System with Emergency override using BluetoothDensity Based Traffic System with Emergency override using Bluetooth
Density Based Traffic System with Emergency override using Bluetooth
 
Touchscreenbasedhomeautomationsystem dca
Touchscreenbasedhomeautomationsystem dcaTouchscreenbasedhomeautomationsystem dca
Touchscreenbasedhomeautomationsystem dca
 

Similar to Download file

AIR BAG CRASH USING MEMS
AIR BAG CRASH USING MEMS AIR BAG CRASH USING MEMS
AIR BAG CRASH USING MEMS Ganesh Gani
 
Automatic Object Detection and Target using Ultrasonic Sensor
Automatic Object Detection and Target using Ultrasonic SensorAutomatic Object Detection and Target using Ultrasonic Sensor
Automatic Object Detection and Target using Ultrasonic SensorIRJET Journal
 
REAL TIME HEART BEAT MONITORING SYSTEM USING PIC16F876 MICROCONTROLLER
REAL TIME HEART BEAT MONITORING SYSTEM USING PIC16F876 MICROCONTROLLERREAL TIME HEART BEAT MONITORING SYSTEM USING PIC16F876 MICROCONTROLLER
REAL TIME HEART BEAT MONITORING SYSTEM USING PIC16F876 MICROCONTROLLERVenkata Sai Kalyan Routhu
 
E Assistance for Elderly and Disabled Part 1
E Assistance for Elderly and Disabled Part 1E Assistance for Elderly and Disabled Part 1
E Assistance for Elderly and Disabled Part 1NISHANT SHRISTIRAJ
 
Maneuvering Robotic Vehicle based on Motion Sensor Feedback
Maneuvering Robotic Vehicle based on Motion Sensor FeedbackManeuvering Robotic Vehicle based on Motion Sensor Feedback
Maneuvering Robotic Vehicle based on Motion Sensor FeedbackIshanMalpotra
 
laser security alarm thesis
laser security alarm thesislaser security alarm thesis
laser security alarm thesisyash kumar singh
 
Major_project_b.tech_sem8_may_2018
Major_project_b.tech_sem8_may_2018Major_project_b.tech_sem8_may_2018
Major_project_b.tech_sem8_may_2018Dipen Kantariya
 
Door knock alarm with timer
Door knock alarm with timerDoor knock alarm with timer
Door knock alarm with timerSANDEEP GHOSH
 
Clap Pattern Based Electrical Appliance control
Clap Pattern Based Electrical Appliance controlClap Pattern Based Electrical Appliance control
Clap Pattern Based Electrical Appliance controlIRJET Journal
 
Major project report
Major project reportMajor project report
Major project reportPraveen Singh
 
Unmanned Aerial Vehicle for Surveillance
Unmanned Aerial Vehicle for Surveillance Unmanned Aerial Vehicle for Surveillance
Unmanned Aerial Vehicle for Surveillance Vedant Srivastava
 

Similar to Download file (20)

Main cerificate
Main cerificateMain cerificate
Main cerificate
 
AIR BAG CRASH USING MEMS
AIR BAG CRASH USING MEMS AIR BAG CRASH USING MEMS
AIR BAG CRASH USING MEMS
 
Automatic Object Detection and Target using Ultrasonic Sensor
Automatic Object Detection and Target using Ultrasonic SensorAutomatic Object Detection and Target using Ultrasonic Sensor
Automatic Object Detection and Target using Ultrasonic Sensor
 
REAL TIME HEART BEAT MONITORING SYSTEM USING PIC16F876 MICROCONTROLLER
REAL TIME HEART BEAT MONITORING SYSTEM USING PIC16F876 MICROCONTROLLERREAL TIME HEART BEAT MONITORING SYSTEM USING PIC16F876 MICROCONTROLLER
REAL TIME HEART BEAT MONITORING SYSTEM USING PIC16F876 MICROCONTROLLER
 
E Assistance for Elderly and Disabled Part 1
E Assistance for Elderly and Disabled Part 1E Assistance for Elderly and Disabled Part 1
E Assistance for Elderly and Disabled Part 1
 
Final Report Content
Final Report ContentFinal Report Content
Final Report Content
 
Major
MajorMajor
Major
 
Maneuvering Robotic Vehicle based on Motion Sensor Feedback
Maneuvering Robotic Vehicle based on Motion Sensor FeedbackManeuvering Robotic Vehicle based on Motion Sensor Feedback
Maneuvering Robotic Vehicle based on Motion Sensor Feedback
 
complet finalised
complet finalisedcomplet finalised
complet finalised
 
20
2020
20
 
final report
final reportfinal report
final report
 
laser security alarm thesis
laser security alarm thesislaser security alarm thesis
laser security alarm thesis
 
FINAL DOC
FINAL DOCFINAL DOC
FINAL DOC
 
Major_project_b.tech_sem8_may_2018
Major_project_b.tech_sem8_may_2018Major_project_b.tech_sem8_may_2018
Major_project_b.tech_sem8_may_2018
 
Door knock alarm with timer
Door knock alarm with timerDoor knock alarm with timer
Door knock alarm with timer
 
Clap Pattern Based Electrical Appliance control
Clap Pattern Based Electrical Appliance controlClap Pattern Based Electrical Appliance control
Clap Pattern Based Electrical Appliance control
 
Motion_ppt_final[1].pptx
Motion_ppt_final[1].pptxMotion_ppt_final[1].pptx
Motion_ppt_final[1].pptx
 
Part 1 master
Part 1 masterPart 1 master
Part 1 master
 
Major project report
Major project reportMajor project report
Major project report
 
Unmanned Aerial Vehicle for Surveillance
Unmanned Aerial Vehicle for Surveillance Unmanned Aerial Vehicle for Surveillance
Unmanned Aerial Vehicle for Surveillance
 

Recently uploaded

Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 

Recently uploaded (20)

Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 

Download file

  • 1. A Project Report On ADVANCED INDO BORDER SECURITY SYSTEM Submitted by AYOUSH JAISWAL (1343131006) JITENDRA YADAV (1343131010) MOHD. SHABAN ANSARI (1343131017) SHAHBAZ KHAN (1343131035) in partial fulfillment for the award of the degree of B. Tech in ELECTRONICS & COMMUNICATION ENGINEERING Under the Guidance of (Ms. Kiran Kumari) B.N. College of Engineering & Technology, Lucknow Dr. A.P.J Abdul Kalam Technical University, Lucknow May, 2017
  • 2. i Certificate This is to certify that this project report entitled “ADVANCED INDO BORDER SECURITY SYSTEM” by AYOUSH JAISWAL (1343131006), JITENDRA YADAV (1343131010), MOHD. SHABAN ANSARI (1343131017), SHAHBAZ KHAN (1343131035) submitted in partial fulfillment of the requirement for the degree of Bachelor of Technology in Electronics and Communication Engineering of Dr. A.P.J. Abdul Kalam Technical University, Lucknow, during the academic year 2016-17, is a bonafide record of work carried out under my guidance and supervision. Ms. Kiran Kumari Mr. Santosh Kumar Tripathi Assistant Professor Associate Professor Electronics & Communication Engineering Head Of Department B.N. College of Engineering and Technology, Electronics & Communication Engineering Lucknow B.N. College of Engineering and (Project Guide) Technology, Lucknow
  • 3. ii Acknowledgement Like most effective endeavors, preparing this project was a collaborative effort. I owe a great debt to many individuals who helped me in successful completion of this project. I would not have completed this journey without the help, guidance and constant support and co-operation of certain people who acted as guides and friends along the way. I would like to express my deepest and sincere thanks to Mr. Santosh Kumar Tripathi (Head of Electronics and Communication Engineering Department) and Ms. Kiran Kumari (Assistant Professor, Electronics and Communication Engineering Department) for their invaluable guidance and help. It would never be possible for me to take this project to this level without their innovative ideas and their relentless support and encouragement. In this connection I would like to express my gratitude to my parents and friends who were constant source of inspiration during the project report. At last I thank to Almighty for giving me the power to complete this project successfully. AYOUSH JAISWAL (1343131006) JITENDRA YADAV (1343131010) MOHD. SHABAN ANSARI (1343131017) SHAHBAZ KHAN (1343131035)
  • 4. iii Abstract Advanced Indo Border Security System (AIBSS) now provide a new monitoring and control capability for monitoring the borders of the country. Using this concept we can easily identify a stranger or some terrorists entering the border. The border area is divided into number of nodes. Each node is in contact with each other and with the main node. The noise produced by the foot-steps of the stranger are collected using the sensor. This sensed signal is then converted into power spectral density and the compared with reference value of our convenience. Accordingly the compared value is processed using a microprocessor, which sends appropriate signals to the main node. Thus the stranger is identified at the main node. A series of interface, signal processing, and communication systems have been implemented in micro power CMOS circuits. A micro power spectrum analyzer has been developed to enable low power operation of the entire AIBSS system. Thus AIBSS require a Microwatt of power. But it is very cheaper when compared to other security systems such as RADAR under use. It is even used for short distance communication less than 100 Km. It produces a less amount of delay. Hence it is reasonably faster. On a global scale, AIBS will permit monitoring of land, water, and air resources for environmental monitoring. On a national scale, transportation systems, and borders will be monitored for efficiency, safety, and security.
  • 5. iv TABLE OF CONTENTS PAGE NO. Certificate i Acknowledgement ii Abstract iii Table of Content iv List of Figures x List of Tables xiii Chapter 1: Ultrasonic 2-11 1.1 Introduction 2 1.2 Fundamental Ultrasonic Property 3 1.2.1 Speed of Sound in Air as Function of Temperature 3 1.2.2 Wavelength and Temperature 4 1.2.3 Reflection 4 1.2.4 Effect of Temperature 5 1.3 Working Principle 5 1.4 Transducer 6 1.5 Detector 7 1.6 features 7 1.7 Product Specification and limitation 7 1.8 Hardware Interface 7 1.9 Application 8 1.9.1 Use in Medicine 8 1.9.2 Use in Industry 8 1.10 Environmental Test 11 Chapter 2: PIR Sensor 12-24 2.1 Introduction 12 2.2 How PIRs Work 14 2.3 Lense 16 2.4 Connecting to a PIR 18 2.5 Testing of PIR 20 2.6 Retriggering 21 2.7 Changing Sensitivity 22
  • 6. v 2.8 Hardware Interface 22 2.9 Application 23 Chapter 3: Pressure Sensor 24-25 3.1 Introduction 24 3.2 Sensor Mechanical Data 24 3.3 Exploded View 25 3.4 Device Characteristics 25 3.5 Application 25 Chapter 4: Servo Motor 26-34 4.1 Introduction 26 4.2 Principle of Operation 27 4.3 Types of Servo Motor 28 4.3.1 DC Servo Motor 28 4.3.1.1 Working Principle of DC Servo Motor 29 4.3.2 AC Servo Motor 31 4.3.2.1 Types of AC Servo Motor 31 4.3.2.1.1 Synchronous Type Servo Motor 31 4.3.2.1.2 Induction Type Servo Motor 32 4.3.3 Working Principle of AC Servo Motor 33 4.4 Specifications 33 4.5 Servomotors Connecting System 34 4.5.1 Power Cable Motion Connect 34 4.5.2 Encoder Cables 34 4.6 Application 34 Chapter 5: Electric fencing 35-44 5.1 Introduction 35 5.2 Temporary of Permanent 35 5.3 Energisers 36 5.4 Batteries 38 5.5 Insulators and Switches 38 5.6 Encounterin 39 5.7 Application 40 5.7.1 Agriculture 40 5.7.2 Security 41
  • 7. vi 5.7.2.1 Nonlethal Fence 41 5.7.2.2 Stun lethal Fence 42 5.7.2.3 Lethal Fence 43 5.7.2.4 Laser Fencing 43 5.7.2.5 Application 44 Chapter 6: Bidirectional Counter 45-51 6.1 Introduction 45 6.2 Motivation 45 6.3 Basic Block Diagram 46 6.4 Block Diagram Description 46 6.5 Power Supply 46 6.6 IR Sensor 47 6.7 Arduino Uno R3 Microcontroller (Atmega 328P) 47 6.8 LCD Display 47 6.9 Schematic Diagram 48 6.10 Description 49 6.11 Working 49 6.12 List of Component 50 6.13 IR Sensor 50 6.13.1 Features 50 6.14 Advantages 51 6.15 Disadvantages 51 6.16 Application 51 6.17 Future Expansion 51 Chapter 7: Controllers 53-76 7.1 ATmega 328 53 7.1.1 Introduction 54 7.1.2 Elements of Assembly Language 55 7.1.3 Specification 55 7.1.4 Features 56 7.1.5 Processor Architecture 56 7.1.5.1 ALU 56 7.1.5.2 Insystem Reprogrammable Flash Program Memory 57 7.1.5.3 EEPROM Data Memory 57
  • 8. vii 7.1.5.4 Program Counter 58 7.1.5.5 RAM 58 7.1.5.6 Instruction Execution Section (IES) 58 7.1.5.7 Input/output Ports 58 7.1.5.8 Analog Comparator A/D Converters 59 7.1.6 Pin Diagram & Description 59 7.1.7 Key Parameters 61 7.1.8 Serial Mode Programming 61 7.1.9 Programming 62 7.1.10 Application 62 7.1.11 Advantages 63 7.1.12 Disadvantages 63 7.2 GSM 64 7.2.1 Application Device 65 7.2.2 Features 65 7.2.2.1 General Characteristics 65 7.2.2.2 GSM/GPRS: Phase2+Compliance 65 7.2.2.3 Support SIM Interface 66 7.2.2.4 Hardware Output 66 7.2.2.5 Software Interface 67 7.2.2.6 Voice/Data Service 67 7.2.3 Supplementary Service 68 7.2.4 RF Functionality 68 7.2.4.1 Maximum Tx Power 68 7.2.4.2 Sensitivity 69 7.2.4.3 Radio Frequency 69 7.2.5 Hardware Description 70 7.2.5.1 Interface 70 7.2.6 Functional Diagram 71 7.2.7 Pin Diagram 71 7.2.8 UART/RS232 72 7.2.9 LED Driver 73 7.2.10 SIM Function 74 7.2.11 Connecting GSM Module to Aurduino 74
  • 9. viii 7.2.12 Application of GSM/GPRS Module 76 Chapter 8: Designing and Testing 77-86 8.1.1 Designing 77 8.1.2 What is PCB Board Design? 78 8.1.3 Flow Chart For Steps of PCB Design 78 8.1.3.1 Processing 79 8.1.3.2 Etching 79 8.1.3.3 Drilling 81 8.1.3.4 Component Placement 81 8.1.3.5 Soldering 81 8.1.3.6 Masking 82 8.1.4 PCB Layout 83 8.2.1 Testing 84 8.2.2 Software 85 8.2.3 Working of Aurduino 85 Chapter 9: Functional Component 87-96 9.1 Voltage Regulator 87 9.1.1 Introduction 87 9.1.2 3-Terminal 1A Positive Voltage Regulators 88 9.1.3 Pin Architecture 88 9.1.4 Internal Block Diagram 89 9.1.5 Features 89 9.2 LCD 90 9.2.1 Introduction 90 9.2.2 Features 90 9.2.3 LCD Interface 90 9.3 Diode Bridge 91 9.3.1 Introduction 91 9.3.2 Basic Operation 92 9.3.3 Rectifier 92 9.4 Crystal Oscillator 93 9.4.1 Introduction 93 9.4.2 Crystal Oscillator of Different Frequency with Uses 95 9.4.3 Crystal Oscillator Uses in Microcontroller 95
  • 10. ix 9.4.4 Application 96 Chapter 10: Accessories 97-99 10.1 Adapters 97 10.2 DIP Base 98 10.3 Power Jack 98 10.4 Switches 98 10.5 Connectors 99 10.6 DC Connectors 99 Chapter 11: Concluding Chapter 100-120 11.1 Advantages 100 11.2 Disadvantages 100 11.3 Result 101 11.4 Applications 101 11.5 Conclusion 101 11.6 Future Aspect 102 11.7 Annexure 1 (Cost Report) 103 Annexure 2 (Programming) 104 11.8 References 120
  • 11. x List of Figures Sr. No. Name of Figure Page No. Fig.0 Block Diagram of AIBSS………………………………………………....1 Fig.1.1 Ultrasonic Sensor top and bottom view…………………………………....2 Fig.1.2 Characteristics between sound and temperature…………………………...4 Fig.1.3 Working Mechanism of Ultrasonic sensor…………………………………6 Fig.1.4 Hardware interface with Arduino……………………………………….....7 Fig.1.5 Uses in Automobiles……………………………………………………….9 Fig.1.6 Graphical representation of ultrasonic waves………………………………10 Fig.2.1 PIR Sensor………………………………………………………………....12 Fig.2.2 Fresnel lence of PIR sensor………………………………………………..13 Fig.2.3 Old Architecture of PIR sensor…………………………………………....13 Fig.2.4 Modern Architecture of PIR sensor…………………………….…...........14 Fig.2.5 Representation of output signal……………………………………………15 Fig.2.6 Pyroelectric sensor………………………………………………………...15 Fig.2.7 Element window of JFET……………………………………………...….16 Fig.2.8 Internal schematic diagram of BIS0001…………………………………..16 Fig.2.9 Incident radian on plano convex lenses…………………………………...17 Fig.2.10 Plano Convex lenses………………………………………………………17 Fig.2.11 Circuit description of PIR sensor………………………………………....18 Fig.2.12 Macro shots of celling and wall mount…………………………………...18 Fig.2.13 Connection of PIR sensor…………………………………………………19 Fig.2.14 Wire connection of PIR sensor……………………………………………19 Fig.2.15 Testing of PIR Sensors…………………………………………………...20 Fig.2.16 Retriggering circuit……………………………………………………….21 Fig.2.17 Retriggering wave form of PIR Sensor……………………………….......21
  • 12. xi Fig.2.18 Sensitivity Changer……………………………………………………..22 Fig.2.19 Hardware Interface……………………………………………………..23 Fig.3.1 Pressure Sensor…………………………………….…………………...24 Fig.3.2 Exploded view………………………………………………………….25 Fig.4.1 Block diagram of servo motor………………………………………….26 Fig4.2 Servo motor…………………………………………………………….26 Fig.4.3 Characteristics between angle and time………………………………..28 Fig4.4 Internal architecture of servo motor…………………………………....29 Fig.4.5 Working diagram of servo motor……………………………………....30 Fig.4.6 Internal component……………………………………………………..31 Fig.4.7 Synchronous type AC servo motor……………………………............32 Fig.4.8 Induction type AC servo motor………………………………………..32 Fig.5.1 Insulator and switches…………………………………………………39 Fig.5.2 Temporary electric fence……………………………………………....41 Fig.5.3 Multizone security electric fence……………………………………...42 Fig.5.4 Lathal fencing………………………………………………………....43 Fig.5.5 Laser fencing on the Indian border……………………………………44 Fig.6.1 Block diagram of bidirectional counter……………………………….46 Fig.6.2 IR sensor module………………………………………………………47 Fig.6.3 LCD…………………………………………………………………...48 Fig 6.4 Schematic diagram of bidirectional counter…………………………..48 Fig.6.5 IR sensor………………………………………………………………50 Fig.7.1 Atmega 328 controller………………………………………………...54 Fig.7.2 Conversion of programming language………………………………..55 Fig.7.3 General Architecture of ALU…………………………………….......56 Fig.7.4 Internal architecture of Atmega 328…………………………………..57 Fig.7.5 Pin description of Atmega 328………………………………………..59
  • 13. xii Fig.7.6 GSM Module………………………………………………………….64 Fig.7.7 Block diagram of GSM……………………………………………….71 Fig.7.8 Hardware interface of GSM Atmega 328…………………………….75 Fig. 8.1 PCB Board……………………………………………………………77 Fig.8.2 Etching process of PCB………………………………………………80 Fig.8.3 Soldering of component………………………………………………82 Fig.8.4 PCB layout of Project (top view)……………………………………..83 Fig.8.5 PCB layout of Project (bottom view)…………………………………83 Fig.8.6 Arduino board burner…………………………………………………84 Fig.8.7 Arduino Application…………………………………………………..86 Fig.9.1 Power regulated IC………………………………….………………..87 Fig9.2 Pin diagram of IC 7805……………………………………………....89 Fig.9.3 Internal block diagram of IC 7805………………………………….89 Fig.9.4 LCD Diagram………………………………………………………...91 Fig.9.5 Diode Bridge…………...…………………………………………….91 Fig.9.6 Operational Diagram of Diode…………………….………………...92 Fig.9.7 Output Characteristics of HWR…. ………………………………….93 Fig.9.8 Output Characteristics of FWR ……………………………………...93 Fig.9.9 Symbol of Crystal Oscillator………..……………………………….94 Fig.10.1 Adapter Module…………..……………….……………………….....97 Fig.10.2 Architecture of DIP Base…………...……………………………..….97 Fig.10.3 Symbol of Power Jack…………………………….………………...98 Fig.10.4 Different Switches Symbol….…. ………………………………….98 Fig.10.5 Module Connectors………… ……………………………………...99 Fig.10.6 Symbol of DC Connectors………………………………………....101 Fig.11.1 Final Project Layput………………………...…………………..….101
  • 14. xiii List of Tables Sr. No. Name of table Page No. Table 1 Product Specification 7 Table 2 List of Application 10 Table 3 Environmental test List 11 Table 4 Device characteristics 25 Table 5 Working Condition List 36 Table 6 Key Parameter 61 Table 7 Serial Mode Programming 61 Table 8 Parallel Mode Programming 62 Table 9 General Characteristics of GSM 63 Table 10 Hardware Function Description 66 Table 11 Software Description 67 Table 12 Voice/Data Description 67 Table 13 Supplementary Services 68 Table 14 Band Description 68 Table 15 Sensitivity Mode 69 Table 16 Radio Frequency Ranges 69 Table 17 Pin Description 70 Table 18 All Pins Description of GSM 71 Table 19 UART Pins 73 Table 20 SIM Functions 74
  • 15. xiv Table 21 Characteristics of Etching 80 Table 22 List of Frequencies 95 Table 23 Cost Estimation Report of Project 103
  • 17. 2 Chapter 1 ULTRASONIC 1.1. Introduction The HC-SR04 ultrasonic sensor uses sonar to determine distance to an object like bats or dolphins do. It offers excellent non-contact range detection with high accuracy and stable readings in an easy-to-use package from 2cm to 400 cm or 1” to 13 feet. It operation is not affected by sunlight or black material like Sharp rangefinders are (although acoustically soft materials like cloth can be difficult to detect). It comes complete with ultrasonic transmitter and receiver module. Ultrasonic sensors are commonly used for a wide variety of noncontact presence, proximity, or distance measuring applications. These devices typically transmit a short burst of ultrasonic sound toward a target, which reflects the sound back to the sensor. The system then measures the time for the echo to return to the sensor and computes the distance to the target using the speed of sound in the medium. The wide variety of sensors currently on the market differs from one another in their mounting configurations , environmental sealing, and electronic features. Acoustically, they operate at different frequencies and have different radiation patterns. It is usually not difficult to select a sensor that best meets the environmental and mechanical requirements for a particular application, or to evaluate the electronic features available with different models. Still, many users may not be aware of the acoustic subtleties that can have major effects on ultrasonic sensor operation and the measurements being made with them. Fig.1.1 Ultrasonic sensor top and bottom view The overall intent of this article is to help the user select an ultrasonic sensor with the best acoustical properties, such as frequency and beam pattern, for a particular application, and how to obtain an optimum measurement from the sensor. The first step in this process is to gain a better understanding of how
  • 18. 3 variations in the acoustical parameters of both the environment and the target affect the operation of the sensor. Specifically, the following variables will be discussed: • Variation in the speed of sound as a function of both temperature and the composition of the transmission medium, usually air, and how these variations affect sensor measurement accuracy and resolution. • Variation in the wavelength of sound as a function of both sound speed and frequency, and how this affects the resolution, accuracy, minimum target size, and the minimum and maximum target distances of an Ultrasonic sensor • Variation in the attenuation of sound as a function of both frequency and humidity, and how this affects the maximum target distance for an ultrasonic sensor in air • Variation of the amplitude of background noise as a function of frequency, and how this affects the maximum target distance and minimum target size for an ultrasonic sensor. • Variation in the sound radiation pattern (beam angle) of both the ultrasonic transducer and the complete sensor system, and how this affects the maximum target distance and helps eliminate extraneous targets. • Variation in the amplitude of the return echo as a function of the target distance, geometry, surface, and size, and how this affects the maximum target distance attainable with an ultrasonic sensor. 1.2. Fundamental Ultrasonic Property Ultrasonic sound is a vibration at a frequency above the range of human hearing, usually >20 kHz. The microphones and loudspeakers used to receive and transmit the ultrasonic sound are called transducers. Most ultrasonic sensors use a single transducer to both transmit the sound pulse and receive the reflected echo, typically operating at frequencies between 40 kHz and 250 kHz. A variety of different types of transducers are used in these systems. The following sections provide an overview of how the sound pulse is affected by some of the fundamental ultrasonic properties of the medium in which the sound travels. 1.2.1. Speed Of Sound In Air As Function Of Temperature In an echo ranging system, the elapsed time between the emission of the ultrasonic pulse and its return to the receiver is measured. The range distance to the target is then computed using the speed of sound in the transmission medium, which is usually air. The accuracy of the target distance measurement is directly proportional to the accuracy of the speed of sound used in the calculation. The actual speed of sound is a function of both the composition and temperature of the medium through which the sound travels. The speed of sound in air varies as a function of temperature by the relationship,
  • 19. 4 The speed of sound in different gaseous media is a function of the bulk modulus of the gas, and is affected by both the chemical composition and temperature. Table 1 gives the speed of sound for various gases at 0°. Fig.1.2. Characteristics between sound and temperature 1.2.2. Wavelength and Radiation Velocity of wave propagation is expressed by multiplication of frequency and wavelength. The velocity of an electromagnetic wave is 3×108m/s, but the velocity of sound wave propagation in air is as slow as about 344m/ s (at 20°C). At these slower velocities, wavelengths are short, meaning that higher resolution of distance and direction can be obtained. Because of the higher resolution, it is possible to get higher measurement made large accuracy. The surface dimension of the ultrasonic device can be easily to obtain accurate radiation. 1.2.3. Reflection In order to detect the presence of an object, ultrasonic waves are reflected on objects. Because metal, wood, concrete, glass, rubber and paper, etc. reflect approximately 100% of ultrasonic waves, these objects can be easily detected. Cloth, cotton, wool, etc. are difficult to detect because they absorb ultrasonic waves. It may often be difficult, also, to detect objects having large surface undulation, because of irregular reflection.
  • 20. 5 1.2.4. Effect of temperature Velocity of sound wave propagation “c” is expressed by the following formula. c=331.5+0.607t (m/s) where, t=temperature (°C) That is as sound velocity varies according to circumferential temperature, it is necessary to verify the temperature at all times to measure the distance to the object accurately. 1.3. Working Principle Ultrasonic sensors (also known as trans-receivers when they both send and receive) work on a principle similar to radar or sonar which evaluate attributes of a target by interpreting the echoes from radio or sound waves respectively. Ultrasonic sensors generate high frequency sound waves and evaluate the echo which is received back by the sensor. Sensors calculate the time interval between sending the signal and receiving the echo to determine the distance to an object. This technology can be used for measuring: wind speed and direction (anemometer), fullness of a tank and speed through air or water. For measuring speed or direction a device uses multiple detectors and calculates the speed from the relative distances to particulates in the air or water. To measure the amount of liquid in a tank, the sensor measures the distance to the surface of the fluid. Further applications include: humidifiers, sonar, medical ultrasonography , burglar alarms and non-destructive testing. Systems typically use a transducer which generates sound waves in the ultrasonic range, above 20,000 hertz, by turning electrical energy into sound, then upon receiving the echo turn the sound waves into electrical energy which can be measured and displayed. The technology is limited by the shapes of surfaces and the density or consistency of the material. For example foam on the surface of a fluid in a tank could distort a reading. To start measurement, Trig of SR04 must receive a pulse of high (5V) for at least 10us, this will initiate the sensor will transmit out 8 cycle of ultrasonic burst at 40kHz and wait for the reflected ultrasonic burst. When the sensor detected ultrasonic from receiver, it will set the Echo pin to high (5V) and delay for a period (width) which proportion to distance. To obtain the distance, measure the width (Ton) of Echo pin. Time = Width of Echo pulse, in µS (micro second) ● Distance in centimeters = Time / 58 ● Distance in inches = Time / 148 ● Or you can utilize the speed of sound, which is 340m/s
  • 21. 6 Fig.1.3. Working mechanism of ultra sonic sensor 1.4. Transducer Sound field of a non focusing 4MHz ultrasonic transducer with a near field length of N=67mm in water. The plot shows the sound pressure at a logarithmic db-scale. Sound pressure field of the same ultrasonic transducer (4MHz, N=67mm) with the transducer surface having a spherical curvature with the curvature radius R=30mm. An ultrasonic transducer is a device that converts energy into ultrasound, or sound waves above the normal range of human hearing. While technically a dog whistle is an ultrasonic transducer that converts mechanical energy in the form of air pressure into ultrasonic sound waves, the term is more apt to be used to refer to piezoelectric transducers that convert electrical energy into sound. Piezoelectric crystals have the property of changing size when a voltage is applied, thus applying an alternating current (AC) across them causes them to oscillate at very high frequencies, thus producing very high frequency sound waves. The location, at which a transducer focuses the sound, can be determined by the active transducer area and shape, the ultrasound frequency and the sound velocity of the propagation medium.
  • 22. 7 1.5. Detectors Since piezoelectric crystals generate a voltage when force is applied to them, the same crystal can be used as an ultrasonic detector. Some systems use separate transmitter and receiver components while others combine both in a single piezoelectric transceiver. 1.6. Features: • Power Supply :+5V DC • Quiescent Current : <2mA • Working Current: 15mA • Effectual Angle: <15° • Ranging Distance : 2cm – 400 cm/1" - 13ft • Resolution : 0.3 cm • Measuring Angle: 30 degree • Trigger Input Pulse width: 10uS • Dimension: 45mm x 20mm x 15mm 1.7. Product Specification And Limitations Table 1: Product specifications Parameter Min. Type Max. Unit Operating Voltage 4.50 5.0 5.5 V Quiescent Current 1.5 2 2.5 mA Working Current 10 15 20 mA Ultrasonic Frequency - 40 KHz 1.8. Hardware Interface Fig.1.4. Hardware interface with Arduino
  • 23. 8 Here is example connection for Ultrasonic Ranging module to Arduino UNO board. It can be interface with any microcontroller with digital input such as PIC, SK40C, SK28A, SKds40A, Arduino series. 1.9. Applications 1.9.1. Use In Medicine Medical ultrasonic transducers (probes) come in a variety of different shapes and sizes for use in making cross-sectional images of various parts of the body. The transducer may be passed over the surface and in contact with the body, or inserted into a body opening such as the rectum. Clinicians who perform ultrasound-guided procedures often use a probe positioning system to hold the ultrasonic transducer. Air detection sensors are used in various roles. Non-invasive air detection is for the most critical situations where the safety of a patient is mandatory. Many of the variables, which can affect performance of amplitude or continuous-wave-based sensing systems, are eliminated or greatly reduced, thus yielding accurate and repeatable detection. One key principle in this technology is that the transmit signal consists of short bursts of ultrasonic energy. After each burst, the electronics looks for a return signal within a small window of time corresponding to the time it takes for the energy to pass through the vessel. Only signals received during this period will qualify for additional signal processing. This principle is similar to radar range gating. 1.9.2. Use In Industry Ultrasonic sensors can detect movement of targets and measure the distance to them in many automated factories and process plants. Sensors can have an on or off digital output for detecting the movement of objects, or an analog output proportional to distance. They can sense the edge of material as part of a web guiding system. Ultrasonic sensors are widely used in cars as parking sensors to aid the driver in reversing into parking spaces. They are being tested for a number of other automotive uses including ultrasonic people detection and assisting in autonomous UAV navigation. Because ultrasonic sensors use sound rather than light for detection, they work in applications where photoelectric sensors may not. Ultrasonics are a great solution for clear object detection, clear label detection and for liquid level measurement, applications that photoelectrics struggle with because of target translucence. As well, target color and/or reflectivity do not affect ultrasonic sensors, which can operate reliably in high-glare environments.
  • 24. 9 Passive ultrasonic sensors may be used to detect high-pressure gas or liquid leaks, or other hazardous conditions that generate ultrasonic sound. In these devices, audio from the transducer (microphone) is converted down to human hearing range. High-power ultrasonic emitters are used in commercially available ultrasonic cleaning devices. An ultrasonic transducer is affixed to a stainless steel pan which is filled with a solvent (frequently water or isopropanol). An electrical square wave feeds the transducer, creating sound in the solvent strong enough to cause cavitation. Ultrasonic technology has been used for multiple cleaning purposes. One of which that is gaining a decent amount of traction in the past decade is ultrasonic gun cleaning. Ultrasonic testing is also widely used in metallurgy and engineering to evaluate corrosion, welds, and material defects using different types of scans. • Vehicle Detection in Barrier Systems with Ultrasonic Sensors • Bottle Counting on Drink Filling Machines with Ultrasonic Sensors • Transporting Printed Circuit Boards • Pallet Detection on Forklift Fig.1.5. Uses in automobiles
  • 25. 10 Table 2: List of applications • Used in border security system Fig.1.6. Graphical representation of ultrasonic waves No. Function Method Application 1. Measurement of pulse reflection time. Automatic doors Level gauges Automatic change-overs of traffic signals Back sonars of automobiles 2. Measurement of direction propagation time. Densitometers Flow meters 3. Measurement of Karman vortex. Flow meters
  • 26. 11 1.9. Environment Test Table 3: Environmental test list No. Kind of test Condition Judgement 1. Humidity Resistance 60°C, 90 - 95%RH, 100 hours Variation of sensitivity and S.P.L. is within 3dB. 2. Humidity Resistance 85°C, 100 hours 3. Low Temperature Storage -40°C, 100 hours 4. Thermal Shock With -40°C (30 minutes) and +85°C (30 minutes) as one cycle, 100 cycles.(Resistance of 3.9kΩ connected between terminals of sensor.) 5. Vibration Maximum Amplitude : 1.5mm Vibrating frequency : 10 - 55Hz Vibrating cycle : 1minute3 hours in each of 3 directions 6. Solder Heart Resistance Soldering terminal up to 2mm below base at 350°C with soldering tip for 3 seconds. 7. Operating Frequency 40kHz, Sine 24Vp-p, 1000 hours Variation of S.P.L. is within 6dB.
  • 27. 12 Chapter 2 PIR SENSORS 2.1. Introduction Fig.2.1. PIR sensor PIR sensors allow you to sense motion, almost always used to detect whether a human has moved in or out of the sensors range. They are small, inexpensive, low-power, easy to use and don't wear out. For that reason they are commonly found in appliances and gadgets used in homes or businesses. They are often referred to as PIR, "Passive Infrared", "Pyroelectric". PIRs are basically made of pyroelectric sensor (which you can see above as the round metal can with a rectangular crystal in the center), which can detect levels of infrared radiation. Everything emits some low level radiation, and the hotter something is, the more radiation is emitted. The sensor in a motion detector is actually split in two halves. The reason for that is that we are looking to detect motion (change) not average IR levels. The two halves are wired up so that they cancel each other out. If one half sees more or less IR radiation than the other, the output willswinghighorlow.
  • 28. 13 Fig.2.2. Fresnel lenses of PIR sensor Along with the pyroelectic sensor is a bunch of supporting circuitry, resistors and capacitors. It seems that most small hobbyist sensors use the, undoubtedly a very inexpensive chip. This chip takes the output of the sensor and does some minor processing on it to emit a digital output pulse from the analog sensor. • Our older PIRs looked like this. Fig.2.3. Old architecture of PIR sensor
  • 29. 14 • New look of PIR Sensor Fig.2.4. Modern architecture of PIR sensor 2.2. How PIRs Work The PIR sensor itself has two slots in it, each slot is made of a special material that is sensitive to IR. The lens used here is not really doing much and so we see that the two slots can ‘see’ out past some distance(basicallythesensitivityofthesensor).When the sensorisidle,bothslotsdetectthesameamountof IR, the ambient amount radiated from the room or walls or outdoors. When a warm body like a human or animal passes by, it first intercepts one half of the PIR sensor, which causes a positive differential change between the two halves. When the warm body leaves the sensing area, the reverse happens, whereby the sensor generates a negative differential change. The IR sensor itself is housed in a hermetically sealed metal can to improve noise/temperature/humidity immunity. There is a window made of IR-transmissive material (typically coated silicon since that is very easy to come by) that protects the sensing element. Behind the window, there are the two balanced sensors.
  • 30. 15 Fig.2.5. Representation of output signal Fig.2.6. Pyroelectric sensor
  • 31. 16 Fig.2.7. Element window of JFET Youcanseeabovethediagramshowingtheelementwindow,thetwopiecesofsensing material. Fig.2.8. Internal schematic diagram of BIS0001 This image shows the internal schematic. There is actually a JFET inside (a type of transistor) which is very low-noise and buffers the extremely high impedance of the sensors into something a low-cost chip (like the BIS0001) can sense. 2.3. Lenses PIR sensors are rather generic and for the most part vary only in price and sensitivity. Most of the real magic happens with the optics. This is a pretty good idea for manufacturing: the PIR sensor and circuitry is fixed and costs a few dollars.The lens costs onlya few cents andcanchangethebreadth,range,sensingpattern, veryeasily. In the diagram up top, the lens is just a piece of plastic, but that means that the detection area is just two
  • 32. 17 rectangles. Usuallywe'd liketohaveadetection areathatis muchlarger. To do that, we use a simple lens such as those found in a camera: they condenses a large area (such as a landscape) into a small one (on film or a CCD sensor). For reasons that will be apparent soon, we would like to make the PIR lenses smallandthin andmoldablefromcheapplastic,eventhoughitmayadddistortion.Forthis reason the sensors are actually Fresnel lenses. Fig.2.9. Incident radiation on plano convex lenses The Fresnel lens condenses light, providing a larger range of IR to the sensor. OK, so now we have a much larger range. However, remember that we actually have two sensors, and more importantly we don’t want two really big sensing-area rectangles, but rather a scattering of multiple small areas. So what we do is split up the lens into multiple section , each section of which is a fresnel lens. The different faceting and sub- lenses create a range of detection areas, interleaved with each other. Thats why the lens centers in the facets aboveare'inconsistant'-everyother onepointstoadifferenthalfofthePIRsensingelement. Fig.2.10. Plano convex lens
  • 33. 18 Fig.2.11. Circuit description of PIR sensor Fig.2.12. Macro shots of wall and celling mount This macro shot shows the different Frenel lenses in each facet. 2.4 Connecting to a PIR Most PIR modules have a 3-pin connection at the side or bottom. The pinout may vary between modules so triple-check the pinout! It's often silkscreened on right next to the connection (at least, ours is!) One pin will be ground, another will be signal and the final one will be power. Power is usually 3-5VDC input but may be as high as 12V. Sometimes largermodulesdon'thavedirectoutputandinsteadjustoperatea relayinwhichcasethere is ground, power and the two switch connections.
  • 34. 19 Fig.2.13. Connection of PIR sensor Theoutputofsomerelaysmaybe'opencollector'-thatmeansitrequiresapull up resistor. If you're not gettinga variableoutput besure totryattaching a10Kpullup between the signals and pins. An easy wayofprototypingwithPIRsensorsistoconnectittoabreadboardsincethe connectionportis0.1"spacing. Some PIRscome with headeronthemalready,theone's from adafruit have a straight 3-pin header on them for connecting a cable. Fig.2.15.Wire connection of PIR sensor
  • 35. 20 2.5. Testing of PIR Fig.2.14. Testing of PIR Sensors Now when the PIR detects motion, the output pin will go "high" to 3.3V and light up the LED. Once you have the breadboard wired up, insert batteries and wait 30-60 seconds for the PIR to 'stabilize'. During that time the LED may blink a little. Wait until the LED is off and then move around in front of it, waving a hand,etc,toseetheLEDlightup!
  • 36. 21 2.6. Retriggering Fig.2.16. Retriggering circuit Onceyou have theLED blinking, look onthe back of thePIR sensor andmake sure that thejumperis placedintheLpositionasshownbelow. Fig.2.17.(a). Retriggering wave form of PIR Sensor NowchangethejumpersothatitisintheHposition.Ifyousetupthetest,youwillnotice that nowthe LEDdoes stayonthe entiretimethatsomethingis moving. That is called "retriggering".
  • 37. 22 Fig.2.17.(b). Retriggering wave form 2.7. Changing sensitivity The Adafruit PIR has a trim pot on the back for adjusting sensitivity. You can adjust this if yourPIR istoo sensitiveornotsensitiveenough-clockwisemakesitmoresensitive. Fig.2.18. Sensitivity changer 2.8. Hardware Interface Connecting PIR sensors to a microcontroller is really simple. The PIR acts as a digital output so all you need to do is listen for the pin to flip high (detected) or low (not detected).It’s likely that you'll want
  • 38. 23 retriggering , so be sure to put the jumper in the H position! Power the PIR with 5V and connect ground to ground.Thenconnecttheoutputtoadigital pin.Inthisexamplewe'llusepin2. Fig.2.19. Hardware interface with arduino 2.9. Applications • Human Detection. • A PIR-based remote camera trigger. • Rain Umbrella • Home automation • Security Areas
  • 39. 24 Chapter 3 Pressure Sensor 3.1. Introduction Interlink Electronics FSR 400 Series is part of the single zone Force Sensing Resistor family.Force Sensing Resistors, or FSR's, are robust polymer thick film (PTF) devices that exhibit a decrease in resistance with increase in force applied to the surface of the sensor. This force sensitivity is optimized for use in human touch control of electronics devices such as automotive electronics, medical systems, industrial and robotics applications. The FSR 400 Series sensors come in six different models with four different connectin options. A battery operated demo is available. 3.2. Sensor Mechanical Data Fig.3.1. Pressure sensor
  • 40. 25 3.3. Exploded View The exploded view is given below. Fig.3.2. Exploded view 3.4. Device Characteristics Table 4: Device characteristics Actuation Force 0.2N min Force Sensitivity Range ~0.2N – 20N Force Repeatability Single Part +/- 2% Force Repeatability Part to Part +/- 6% (Single Batch) Non-Actuated Resistance >10 Mohms Hysteresis +10%Average(RF+RF)/RF+ Device Rise Time < 3 Microseconds-5% average resistance change Long Term Drift 1kg load, 35 days < 5% log10(time) Operating Temperature Change-15% average resistance change 3.5. Applications • Nip alignment • Electronic assembly
  • 41. 26 Chapter 4 Servomotor 4.1. Introduction A servomotor is a rotary actuator that allows for precise control of angular position. It consists of a motor coupled to a sensor for position feedback, through a reduction gearbox. It also requires a relatively sophisticated controller, often a dedicated module designed specifically for use with servomotors. Fig.4.1. Block Diagram of Servomotor The electric motor and the servomechanism both serve as fundamental building blocks for modern mechanical equipments and advance technological instruments. An electric motor is a device that uses electrical energy to produce mechanical energy. A servomechanism, or servo, differs from a motor in that it automatically corrects its performance using error-sensing feedback. A servo is typically implemented with an electric motor as the source of mechanical force. Fig. 4.2. Servomotor Servomotors are designed to operate control surfaces. So they do not rotate continuously. Rather they are designed to rotate through 180 degrees with precise position control. If you want to use them as the main drive motor for a mobile robot you need to modify them so that they will rotate continuously. They do not simply run on a DC voltage like a standard DC motor. They have 3 wires. Red is power (generally 3V – 12V max), black is ground and then there is another wire, usually white or yellow that is the “input signal wire”.
  • 42. 27 4.2. Principle of Operation Servo motors are used in closed loop control systems in which work is the control variable. Servo motors feature a motion profile, which is a set of instructions programmed into the controller that defines the servo motor operation in terms of time, position, and velocity. The servo motor controller directs operation of the motor by sending velocity command signals to the amplifier that drives the servo motor. The servo compares its position and velocity feedbacks to its programmed motion profiles and adjusts the motor velocity accordingly. A servomotor is controlled by sending a pulse signal that is HIGH for a brief time, generally 1 – 2 ms. If you just connect a battery to power and ground, nothing will happen. You must have a timer circuit that generates this pulsed signal and by varying the pulse ON time (or the pulse width) the motor will move to a certain position over its range of motion and then stop as long as the input pulse width is the same. Depending on the pulse width, you’ll get a different position. This diagram shows some control signal pulses for a typical servo and the position to which it will rotate in response of the pulse width .There is another element to the signal that also requires timing accuracy. The frequency of the signal or its rate of refresh. Not only do you have to send the pulse, you have to keep sending them as long as you want the motor to be in that position (or to keep rotating for modified servos). Generally a frequency of 50 Hz is good. This means that you send the high pulse 50 times every second. A servo will only rotate through 180 degrees unless you modify it for continuous rotation. One interesting thing that comes out this modification is that you get a speed control function out of it, though somewhat coarse. When you make the modification you replace the circuitry in the motor that tells the motor what position it is in. The modes you make tell the motor that it is always in the center position. So if you feed a 1.75 ms pulse, it rotates to the 180 degree position, checks the feedback which tells it that “hey, you haven’t moved yet. You’re still in the center position, keep going” so it does, checks and sees that it hasn’t moved yet and keeps doing it. Since it thinks that it is in center position and it has to move to its right most position it will move at its fastest rate. Now suppose you send it a signal that says to rotate to 95 degrees, 5 degrees right of center. The internal control system knows that it is now to move a very short distance. It also knows that if it rotates at its fastest speed that it may overshoot this and has to come back, and overshoot again in the other direction and try again, and so forth. This is called oscillation and is not a good thing. The advantage that you get out of this is that the motor will move slower when you feed a signal that is close to the center position. So you feed it a “go to 95 degree” signal and it will rotate CW at a slow rate. Give it “go to 180 degrees” and it will rotate CW at its fastest rate and the same for CCW.
  • 43. 28 Fig.4.3. Characteristics between angle and time 4.3. Types of Servomotor • DC Servomotor • AC Servomotor 4.3.1. DC Servomotor A DC servo motor consists of a small DC motor, feedback potentiometer, gearbox, motor drive electronic circuit and electronic feedback control loop. It is more or less similar to the normal DC motor. The stator of the motor consists of a cylindrical frame and the magnet is attached to the inside of the frame. The rotor consists of brush and shaft. A commutator and a rotor metal supporting frame are attached to the outside of the shaft and the armature winding is coiled in the rotor metal supporting frame. A brush is built with an armature coil that supplies the current to the commutator. At the back of the shaft, a detector is built into the rotor in order to detect the rotation speed. With this construction, it is simple to design a controller using simple circuitry because the torque is proportional to the amount of current flow through the armature .And also the instantaneous polarity of the control voltage decides the direction of torque developed by the motor. Types of DC servo motors include series motors, shunt control motor, split series motor, and permanent magnet shunt motor.
  • 44. 29 Fig.4.4. Internal architecture of servomotor 4.3.1.1. Working Principle of DC Servomotor A DC servo motor is an assembly of four major components, namely a DC motor, a position sensing device, a gear assembly, and a control circuit. The below figure shows the parts that consisting in RC servo motors in which small DC motor is employed for driving the loads at precise speed and position. A DC reference voltage is set to the value corresponding to the desired output. This voltage can be applied by using another potentiometer, control pulse width to voltage converter, or through timers depending on the control circuitry. The dial on the potentiometer produces a corresponding voltage which is then applied as one of the inputs to error amplifier. In some circuits, a control pulse is used to produce DC reference voltage corresponding to desired position or speed of the motor and it is applied to a pulse width to voltage converter. In this converter, the capacitor starts charging at a constant rate when the pulse high. Then the charge on the capacitor is fed to the buffer amplifier when the pulse is low and this charge is further applied to the error amplifier. So the length of the pulse decides the voltage applied at the error amplifier as a desired voltage to produce the desired speed or position. In digital control, microprocessor or microcontroller are used for generating the PWM pluses in terms of duty cycles to produce more accurate control signals.
  • 45. 30 Fig. 4.5. Working diagram of servomotor The feedback signal corresponding to the present position of the load is obtained by using a position sensor. This sensor is normally a potentiometer that produces the voltage corresponding to the absolute angle of the motor shaft through gear mechanism. Then the feedback voltage value is applied at the input of error amplifier (comparator).The error amplifier is a negative feedback amplifier and it reduces the difference between its inputs. It compares the voltage related to current position of the motor (obtained by potentiometer) with desired voltage related to desired position of the motor (obtained by pulse width to voltage converter), and produces the error either a positive or negative voltage. This error voltage is applied to the armature of the motor. If the error is more, the more output is applied to the motor armature. As long as error exists, the amplifier amplifies the error voltage and correspondingly powers the armature. The motor rotates till the error becomes zero. If the error is negative, the armature voltage reverses and hence the armature rotates in the opposite direction.
  • 46. 31 Fig.4.6. Internal component 4.3.2. AC Servo Motor AC servo motors are basically two-phase squirrel cage induction motors and are used for low power applications. Nowadays, three phase squirrel cage induction motors have been modified such that they can be used in high power servo systems. The main difference between a standard split-phase induction motor and AC motor is that the squirrel cage rotor of a servo motor has made with thinner conducting bars, so that the motor resistance is higher. 4.3.2.1. Types of AC Servo Motor Based on the construction there are two distinct types of AC servo motors, they are synchronous type AC servo motor and induction type AC servo motor. • Synchronous-type AC servo motor • Induction-type AC servo motor 4.3.2.1.1. Synchronous-type AC servo motor It consists of stator and rotor. The stator consists of a cylindrical frame and stator core. The armature coil wound around the stator core and the coil end is connected to with a lead wire through which current is provided to the motor. The rotor consists of a permanent magnet and hence they do not rely on AC induction type rotor that has current induced into it. And hence these are also called as brushless servo motors because of structural characteristics.
  • 47. 32 Fig.4.7. Synchronous-type AC servomotor When the stator field is excited, the rotor follows the rotating magnetic field of the stator at the synchronous speed. If the stator field stops, the rotor also stops. With this permanent magnet rotor, no rotor current is needed and hence less heat is produced. Also, these motors have high efficiency due to the absence of rotor current. In order to know the position of rotor with respect to stator, an encoder is placed on the rotor and it acts as a feedback to the motor controller. 4.3.2.1.2. Induction-type AC servo motor The induction-type AC servo motor structure is identical with that of general motor. In this motor, stator consists of stator core, armature winding and lead wire, while rotor consists of shaft and the rotor core that built with a conductor as similar to squirrel cage rotor. Fig.4.8. Induction-type AC servomotor
  • 48. 33 The working principle of this servo motor is similar to the normal induction motor. Again the controller must know the exact position of the rotor using encoder for precise speed and position control. 4.3.3. Working Principle of AC Servomotor The schematic diagram of servo system for AC two-phase induction motor is shown in the figure below. In this, the reference input at which the motor shaft has to maintain at a certain position is given to the rotor of synchro generator as mechanical input theta. This rotor is connected to the electrical input at rated voltage at a fixed frequency. The three stator terminals of a synchro generator are connected correspondingly to the terminals of control transformer. The angular position of the two-phase motor is transmitted to the rotor of control transformer through gear train arrangement and it represents the control condition alpha. Initially, there exist a difference between the synchro generator shaft position and control transformer shaft position. This error is reflected as the voltage across the control transformer. This error voltage is applied to the servo amplifier and then to the control phase of the motor. With the control voltage, the rotor of the motor rotates in required direction till the error becomes zero. This is how the desired shaft position is ensured in AC servo motors. Alternatively, modern AC servo drives are embedded controllers like PLCs, microprocessors and microcontrollers to achieve variable frequency and variable voltage in order to drive the motor. Mostly, pulse width modulation and Proportional-Integral- Derivative (PID) techniques are used to control the desired frequency and voltage. The block diagram of AC servo motor system using programmable logic controllers, position and servo controllers is given below. 4.4. Specifications • Weight: 9 g • Dimension: 22.2 x 11.8 x 31 mm approx. • Stall torque: 1.8kgf·cm • Operating speed: 0.1 s/60 degree • Operating voltage: 4.8 V (~5V) • Dead band width: 10 µs • Temperature range: 0 ºC – 55 ºC
  • 49. 34 4.5. Servomotors Connecting Systems 4.5.1. Power Cables Motion-Connector • 500, 700 and 800 6FX5, • 6FX8 and 6FX7, technical data 6FX5, 6FX8 and 6FX7, connection overview • for 1FK., 1FT6, 1FS6, 1PH., 1PL6 6FX7, for 1FN3 linear motors, sold by the meter • for 1PH7, 1PL6 and 1PH4 induction motors Flange for signal plug. 4.5.2. Encoder cables • for connection to motors with an incremental encoder HTL • for connection to motors with a resolver 2-pole /multi-pole • for connection to motors with a sin/cos incremental encoder 1 Vpp • for connection to motors with an absolute-value encoder (EnDat) • for 1FN3 AC linear motors • for SIMODRIVE 611 universal • Cables for SIMODRIVE POSMO CD/CA, SI 4.6. Applications • Used in RC plane design • Fixed angle motion
  • 50. 35 Chapter 5 Electric Fencing 5.1. Introduction An electric fence usually consists of several conductors of bare wire, supported on insulators and connected to a fence energizer which in turn is connected to a power source and earth rod(s). Electric fences were first used in World War I to contain prisoners of war. These fences carried alternating current (a.c.) and were designed to kill anyone coming into contact with them. It was not until the late 1930s that non-lethal fence energizers (also called controllers or fencer units) producing direct current (d.c.) were developed to manage stock or wildlife. Nevertheless, these early energisers were still dangerous, unreliable and easily short circuited. Then, in the late 1930s, better units were developed, making the technique more successful and acceptable. Over the last 30 years, improvements in energiser technology have continued to be made so that now, in the early 2000s, a large range of energisers can be purchased. They are powered either from a mains electricity supply or, where this is not available, by battery. In remote areas, wind and solar power c1an be used to charge batteries. Energisers of varying power output, ranging from less than 1 joule to over 20 joules, can be purchased. (A joule (J) is the unit of energy used by manufacturers to specify the energy level of pulses produced by their products). Electricity flows as a result of electrical pressure which is measured in volts (V). Energisers produce brief, high voltage pulses of electricity between the conducting wire and earth when the circuit is closed by animal contact. An animal standing on the ground and touching the electrified wire completes the circuit and receives intermittent but regular shocks to deter it. The pulsed nature of the electricity enables animals to move away from the fence, so preventing electrocution, although lethal fences still have a limited use in the Far East for control of rodents. 5.2. Temporary or Permanent? The main value of electric fencing is as a temporary fence to contain stock or exclude wildlife. The relatively low cost of the labour and materials required to erect this type of fence, and its high adaptability compared with the equivalent requirements of a standard post and wire fence, makes it especially suitable for this purpose. For example, electric fencing enables large fields to be easily subdivided to allow their more efficient use by grazing stock. Electric fencing can also be used as a more permanent fence, particularly where failure would not result in serious consequences. For example, it can be used in this way to keep stock away from ditches, to control cattle in farmyards or to create access routes for cattle
  • 51. 36 between milking parlours and fields. It is, however, less suitable as a farm boundary fence where failure could result in stock gaining access to neighbouring properties or roads. Table 5: Working condition list Component Temporary fence Permanent fence Energiser (mains powered) Yes Energiser (battery powered) y Y Battery charging system (wind solar) Y Battery charging from mains y Y Non-rechargeable battery Y Straining post – wood Y Y Contour post – wood Y Turning post – wood Y Y Strut – wood Y Y Stake - wood, plastic, metal or fiberglass Y Y Insulators integral with stake Y Porcelain insulators Y Plastic insulators y Y Tube insulators Y Off-set insulators Y 1.6 mm and 2.00 mm medium-tensile steel and aluminium wire y 2.5 mm high-tensile, 2.65 spring-steel and 3.15 mm mild steel wire Y Multi-strand steel cable y Y Polythene and stainless steel wire ‘Polywire’ and ‘Polytape’ y Y Polywire electric mesh netting y Barbed wire/mesh xx X Copper coated steel earth rod Y Y Zinc coated steel earth rod y 5.3. Energisers The centre of any electric fence system is the energizer. There are two types: mains operated and battery operated. The energiser converts a.c. or d.c.voltage, respectively, into repetitive high voltage pulses of d.c. voltage which are delivered along the entire length of a fence connected to it. Each pulse lasts for a very short time (approximately 500 microseconds) and is produced at one second intervals. Thus, fence energizers are constantly switching on and off, and it is this characteristic which is responsible for preventing a fatality under normal operating conditions. The voltage peak of each consecutive pulse can rise to a limit of 10,000 V; values exceeding this limit are considered unsafe by present international
  • 52. 37 safety standards. Voltage is not the only aspect to be taken into consideration where safety is concerned. Each pulse will contain a potential quantity of electrical energy. This quantity of electrical energy is measured in joules (J). Energisers with an output in excess of 5 J are not recommended under UK Health and Safety codes of practice, although those producing up to 20 J are nevertheless available on themarket. Each of the mains operated and battery operated energisers are sub-divided into the two categories of high or low power. Many of the energisers available allow the choice of either low or high energy outputs. These outputs are usually available from colour coded terminals on the energiser. A red coloured terminal will usually identify the higher output and a yellow coloured terminal the lower output. The earth terminal, common to either output, is green. The most recent designs of energisers have digital liquid crystal display providing certain characteristics of the output on the fence, such as fence voltage and earth leakage. There are three important factors to be considered when choosing an energiser: • fence location • animals to be controlled • Fence Length Under most circumstances, fence location will dictate the selection between a mains or battery powered energiser. For example, in remote areas where no mains supply is available, the only option will be a battery powered unit. When a battery powered energiser is selected, consideration must be given to replacing or recharging the battery which, with a higher powered energiser, may be as frequently as every two weeks. Thus, where there is a choice, mains operated energisers are preferable to avoid the problems of battery charging and maintenance. Different species of animals vary in their susceptibility to electric fence shocks. Some, such as pigs, are relatively easy to control: as little as 300 millijoules (mJ) of energy on a well- insulated fence with a sound earthing system will deter them. Animals with fur generally require more energy capacity on the fence to receive an effective shock. Body size is also important. Generally the larger the animal the greater the energy capacity needed. For example, rabbits and foxes require less energy (they need about 1.5 J) than sheep and deer. Deer generally represent one of the most difficult animals to control by electric fencing and high powered energisers areessential. The fence manufacturer will usually specify the maximum length of fence that their energiser will power effectively. The length of fence, for multi-strand fences, is the total length of conductor wire used. Thus, an energiser capable of powering a 4 km (2.5 miles) length of fence can be used on either a 2 km (about 1.2 miles) fence of 2-line wires or 1 km (about 0.6 miles) fence of 4-line wires.
  • 53. 38 5.4. Batteries Some low power energisers can be used with dry cell batteries which are designed to be used and discarded. However, most energisers require rechargeable lead acid batteries. The required voltage of the battery will be specified by the energiser manufacturer and the capacity of the battery can be determined from the proposed usage and method of charging. Batteries that are not designed for cyclic discharge and recharge (car starter batteries, for example) will deteriorate rapidly if not maintained at or near full charge. Leisure batteries (for example, those used in caravans) are moreappropriate. 5.5. Insulators And Switches Insulators are a fundamental component of any electric fence. They are made from a non- conductive material, usually either porcelain or thermoplastic, and form a barrier between the electrified wire and its support material to prevent current leakage to the ground. Good quality insulators should have a smooth surface and be impervious, so that they will drain and dry rapidly, to prevent moisture collecting in any cracks or splits and water accumulating on their surface. The total amount of energy in each pulse delivered by an energiser is relatively small but, as already stated, the voltage peak of each pulse may be as high as 10 000 V. This high level of voltage will 'jump' from any accumulated moisture on a poor quality insulator to any point that is effectively earthed. This leaking of electrical discharge may be in the form of an 'arc', which can be heard as clicking from as far away as about 50 metres (55 yds), and can on occasion be visible to the eye as sparking. Leakage of this nature will result in a reduction of the effectiveness of the fence. Not all leakage of electric current is detectable without the aid of instrumentation. It is therefore important to select the correct type and quality of insulator. The quality of some types of insulator is variable. Therefore, experience gained from the use of insulators from particular suppliers can help to guide future purchases. Choice of insulator will also depend to some extent on whether the fence is to be permanent or temporary. Porcelain insulators (Plate 1) have the best insulation properties and, if of good quality, are the strongest. They are therefore particularly suitable to insulate tensioned line wires from straining and turning posts (Figure 2). They are fire resistant and can prevent any electrical arcing causing a fire. Their main disadvantage is their relatively high cost and, as a result, they are mainly used on permanent fencing. Poor quality porcelain insulators may be fragile under tension; they may also crack allowing absorption and retention of moisture giving rise to conductive deposits.
  • 54. 39 Fig.5.1. Insulator and Switches 5.6. Encountering An electric fence encountered for the first time by a wild mammal is an unfamiliar object which the animal will investigate, usually by touch, using its nose. Domestic stock familiar with electric fencing are also likely to investigate new fences by touch with their nose. By contrast, stock unfamiliar with electric fencing are more likely to try to push through the large spaces between wires, thereby touching the wires with their neck, back or chest. Wild animals may also make this type of contact if they do not see the fence before touching it, which can often be the case with nocturnal species. The intensity of the shock felt by an animal determines its subsequent reaction to the fence. Different species, as well as individual animals within a species, may react differently. An animal which touches a wire with its nose, which is poorly insulated and highly innervated, usually receives a severe shock which is likely to deter it from crossing the fence. By contrast, an animal which touches a wire with a less sensitive area, such as its neck, back or chest, may not even receive a shock and may cross the fence. Furthermore, if an animal is moving swiftly and has almost crossed before the electrical pulse is generated, it is likely to complete the crossing. Similarly, if an animal jumps through and is off the ground when it contacts live wires it will not receive a shock. A danger is that any animal that passes through or over a fence will be retained within the fenced area.
  • 55. 40 5.7. Applications 5.7.1. Agriculture Permanent electric fencing is used in many agricultural areas, as construction of electric fences can be much cheaper and faster than conventional fences (it uses plain wire and much lighter construction, as the fence does not need to physically restrain animals). The risk of injury to livestock (particularly horses) is lower compared to fences made of barbed wire or certain types of woven wire with large openings that can entangle the feet. Its disadvantages include the potential for the entire fence to be disabled due to a break in the conducting wire, shorting out if the conducting wire contacts any non electrified component that may make up the rest of the fence, power failure, or forced disconnection due to the risk of fires starting by dry vegetation touching an electrified wire. Other disadvantages can be lack of visibility and the potential to shock an unsuspecting human passerby who might accidentally touch or brush the fence. Many fences are made entirely of standard smooth or high tensile wire, although high quality synthetic fencing materials are also beginning to be used as part of permanent fences, particularly when visibility of the fence is a concern. Conventional agricultural fencing of any type may be strengthened by the addition of a single electric line mounted on insulators attached to the top or front of the fence. A similar wire mounted close to the ground may be used to prevent pigs from excavating beneath other fencing. Substandard conventional fencing can also be made temporarily usable until proper repairs are made by the addition of a single electric line set on a "standoff" insulator. Electric materials are also used for the construction of temporary fencing, particularly to support the practice of managed intensive grazing (also known as rotational or "strip" grazing). It is also popular in some places for confining horses and pack animals overnight when trail riding, hunting, or at competitions such as endurance riding and competitive trail riding. Typically, one or more strands of wire, synthetic tape or cord are mounted on metal or plastic posts with stakes at the bottom, designed to be driven into the ground with the foot. For a hand tightened temporary fence of electrified rope or web in a small area, these are usually spaced at no more than 12 to 15 feet (about four metres) to prevent the fencing material from sagging and touching the ground. Larger areas where tools are used to stretch wire may be able to set step in posts at larger distances without risk that the fencing material will sag. With temporary electric fencing, a large area can be fenced off in a short period. Temporary fencing that is intended to be left in place for several weeks or months may be given additional support by the use of steel T posts (which are quickly driven in with hand tools and unearthed
  • 56. 41 with relative ease, using a leverage device), to help keep the fence upright, particularly at corners. Livestock owners using rotational grazing in set patterns that are similar from one year to the next, may permanently drive a few permanent wooden fence posts in strategic locations. Fig.5.2. A temporary electric fence of synthetic materials and plastic step in posts 5.7.2. Security 5.7.2.1. Nonlethal Fence Security Electric Fences are electric fences constructed using specialised equipment and built for perimeter security as opposed to animal management. Security electric fences consist of wires that carry pulses of electric current to provide a nonlethal shock to deter potential intruders. Tampering with the fence also results in an alarm that is logged by the security electric fence energiser, and can also trigger a siren, strobe, and/or notifications to a control room or directly to the owner via email or phone. In practical terms, security electric fences are a type of sensor array that acts as a (or part of a) physical barrier, a psychological deterrent to potential intruders, and as part of a security alarm system. Nonlethal electric fences are used by both private and government sector bodies to prevent trespass. These include freight carriers, auto auctions, equipment rental companies, auto dealers, housing communities, commercial factories or warehouses, prisons, military bases, and government buildings. Many of these electric fences act as monitored security alarm systems in addition to causing an uncomfortable shock. Electrified palisade fences are used to protect isolated property and high security facilities, but also around some residential homes. They can also be used inside a building, for example as a grid behind windows or skylights to prevent people from climbing through. They have even been used on yachts and on large ships to deter pirates. Electric fences are occasionally employed to discourage suicide attempts on tall structures, and to reduce the incidence of graffiti and other petty crime. Due to the high levels of crime in South Africa, it is common for residential houses to have perimeter defences. The City of Johannesburg promotes the
  • 57. 42 use of palisade fencing over opaque, usually brick, walls as criminals cannot hide as easily behind the fence. In the City of Johannesburg manual on safety, one can read about best practices and maintenance of palisade fencing, such as not growing vegetation in front of palisades as this allows criminals to make an unseen breach. Fig.5.3. Multizone security electric fence used alongside a physical barrier 5.7.2.2. Stunlethal Fence Nope, the entire 3,323 km long Indo-Pak border is not fenced completely. Terrain is not plain everywhere around the borders. Some places are marshy, mountaineous and river flowing areas : • All borders couldn’t be fenced due to terrain. Many places of J&K are not fenced as those regions are mountainous. • Rivers flowing across the borders could not be fenced. Across the Jhelum river, there is no fencing. • Borders in Gujarat, near Rann of Kutchh, there are marshy lands which can not be fenced. • Despite open borders, terrorists are unable to infilterate because BSF actively guards the border day in, day out.
  • 58. 43 5.7.2.3. Lethal Fence Electric fences designed to carry potentially lethal currents can be used for antipersonnel purposes. In 1915, during World War I, the German occupiers of Belgium closed off the border with neutral Netherlands, using a 300 km electric fence running from Vaals to Scheldt. Germany also erected a similar fence to isolate thirteen Alsatian villages from Switzerland. Electric fences were used to guard the concentration camps of Nazi Germany during World War II, where potentially lethal voltages and currents were employed, continuously rather than in pulses. Some prisoners used the electric barbed wire fence to commit suicide. During the Algerian War the French erected the electrified Morice Line. Fig.5.4. Lathal Fencing 5.7.2.4. Laser Fencing • A laser wall is a mechanism to detect objects passing the line of sight between the laser source and the detector. • A laser beam over a river sets off a loud siren in case of a breach. • The laser walls will cover stretches of treacherous terrain and riverine areas.
  • 59. 44 “By December 2018, entire Indo-Pak border will be sealed” - Home Minister Rajnath Singh announced during a press conference. Fig 5.5. Laser fencing on the Indian border 5.7.2.5. Applications • It is used as security purpose in our project. • It is used as home security purpose.
  • 60. 45 Chapter 6 Bidirectional Counter 6.1. Introduction In today’s world, there is a continuous need for automatic appliances. With the increase in standard of living, there is a sense of urgency for developing circuits that would ease the complexity of life. Many times we need to monitor the people visiting some place like shopping mall. To provide solution for this we are going to implement a project called “Bi Directional Digital Visitor Counter” with automatic room light control. This project has a “Visitor counter”. Basic concept behind this project is to measure and display the number of persons entering in any room like seminar hall, conference room etc. LCD displays number of person inside the room. We can use this project to count and display the number of visitors entering inside any conference room or seminar hall. This works in a two way. That means counter will be incremented if person enters the room and will be decremented if a person leaves the room. In addition, it will automatically control room lights .When the room is empty the lights will be automatically turn off. 6.2. Motivation A few days back, we organized a seminar in Pearl Continental, Conference Hall. Main issues we faced were that firstly, few people were trapped inside hall and security guards closed conference rooms after finishing seminar, because they (security guards) were unaware of total number of people inside hall. Moreover, we couldn’t analyse the feedback of people and number of people attending the seminar as there wasn’t any registration process. Lastly, after ending of seminar, electrical appliances such as Air coolers and fans were left unattended, this caused electricity wastage. All these problems gave me perspective that if we could somehow analyse the number of people entering and leaving halls, these drawbacks could be avoided. This promoted the idea of Bidirectional Visitor Counter in our mind through which we can keep a check on number of people and allow all people to leave any building before sealing it. We can also count number of people to analyse the feedback of people on any event. And most importantly, in case of all people leaving a premise, all electrical appliances will be turned off automatically leading to saving of electricity.
  • 61. 46 6.3. Basic Block Diagram Fig.6.1. Block diagram of bidirectional counter 6.4. Block Diagram Description The basic block diagram of the bidirectional visitor counter with automatic light controller is shown in the above figure. Mainly this block diagram consists of the following essential blocks. ➢ Power Supply ➢ IR Sensors ➢ Arduino UnoR3 micro-controller ➢ LED ➢ LCD Display 6.5. Power Supply Here we used +5V dc power supply from computer USB. The main function of this block is to provide the required amount of voltage to essential circuits. +5V is given to 2 IR sensors, transistor (BC549C) and to a LCD display.
  • 62. 47 6.6. IR Sensors This is the most fundamental type of sensor available in the market. The basic concept is simple. There is an emitter which emits infrared (IR) rays. These IR rays are detected by a detector. This concept is used to make proximity sensor (to check if something obstructs the path or not, etc), contrast sensors (used to detect contrast difference between black and white, like in line follower robots), etc. Fig.6.2. IR sensor module 6.7. Arduino Uno R3 Micro-controller (ATmega 328P): An Atmel ATmega328P microcontroller in a 40 pin DIP package. It has 16 KB programmable flash memory, static RAM of 1 KB and EEPROM of 512 Bytes. There are 14 digital I/O (input/output) lines and 6 Analog I/O (input/output) pins. 6.8. LCD Display LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of applications. A 16x2 LCD display is very basic module and is very commonly used in various devices and circuits. These modules are preferred over seven segments and other multi segment LEDs. The reasons being: LCDs are economical; easily programmable; have no limitation of displaying special & even custom characters (unlike in seven segments), animations and so on. A 16x2 LCD means it can display 16 characters per line and there are 2 such lines. In this LCD each character is displayed in 5x7 pixel matrix. This LCD has two registers, namely, Command and Data. The command register stores the command instructions given to the LCD. A command is an instruction given to LCD to do a predefined task like initializing it, clearing its screen, setting the cursor position, controlling display etc. The data register stores the data to be displayed on the LCD. The data is the ASCII value of the character to be displayed on the LCD.
  • 63. 48 Fig.6.3. LCD 6.9. Schematic Diagram Fig. 6.4. Schmetic diagram of bidirectional counter
  • 64. 49 6.10. Description The IR transmitter will emit modulated 38 kHz IR signal and at the receiver we use TSOP1738 (Infrared Sensor). The output goes high when the there is an interruption and it return back to low when there is no obstacle to the ray. Input is given to the Port 4 of the Arduino microcontroller. Port 8 to 13 is used for the 7-Segment display purpose. Port 2 is used for the Relay/LED Turn On and Turn off Purpose.LTS 542 (Common Anode) is used for 7-Segment display. And that time Relay/LED will get Voltage and triggered so light will get voltage and it will turn on. And when counter will be 00 that time Relay will be turned off. In this bidirectional circuit two infrared (IR) sensor components are used for up and down counting, respectively. Whenever an interruption is observed by the IR sensor then the IR sensor increment the value of counter and whenever the second sensor detects any obstacle, the counter is decremented. The number of interruption count depend upon the sensor’s input and displayed on a set of seven segment displays by using the concept of multiplexing (for concept of multiplexing refer seven segment multiplexing).The IR sensor input is defined as up and down selector mode for the counter in the code. Every time the first sensor is blocked, the first sensor gives a high voltage signals and the count the value gets incremented. The value of second sensor gets decremented when connected to second a sensor, gives high input. At every setup, the value of the counter is sent and displayed it on the Sensor, gives high input. At every setup, the value of the counter is sent and displayed it on the seven segments. 6.11. Working ➢ The IR sensor continuously senses the presence of any obstacles (a person in our case ). ➢ If sensor 1 senses a person, it informs the controller that a person has entered so that controller can increment the count. ➢ At the same time it gives a delay of 1sec so that the person can cross the sensor 2 and the count is maintained correctly. ➢ When a person exits, the sensor 2 informs the controller to decrement the count. Similarly it also provides a delay of 1 sec to maintain count properly. ➢ The count is displayed on LCD by the controller. ➢ If there is at least 1 person is inside the hall, an LED will glow otherwise it is off.
  • 65. 50 6.12. List of Components ➢ Arduino UNO ➢ Resisters ➢ IR Sensor module ➢ 16x2 LCD display ➢ Bread Board ➢ Connecting Wires ➢ LED ➢ BC547 Transistor 6.13. IR Sensors Fig.6.5. IR sensor Series are miniaturized receivers for infrared remote control systems. PIN diode and preamplifier are assembled on lead frame, the epoxy package is designed as IR filter. The demodulated output signal can directly be decoded by a microprocessor. TSOP17 is the standard IR remote control receiver series, supporting all major transmission codes. 6.13.1. Features • Photo detector and preamplifier in one package • Internal filter for PCM frequency • Improved shielding against electrical field disturbance • TTL and CMOS compatibility • Output active low
  • 66. 51 • Low power consumption • High immunity against ambient light • Continuous data transmission possible (up to 2400 bps) • Suitable burst length .10 cycles/burst 6.14. Advantages • Low cost • Easy to use. • Can be implemented in single door. • Can be used for counting purposes. • Can be used for automatic room light control 6.15. Disadvantages • It is used only when one person cuts the rays of the sensor hence cannot be used when two or more persons cross the door simultaneously. • When anybody is inside the room and we need to switch off the power then we’ve to do it manually. So, in this case we fail to automatically control the light. 6.16. Applications • For counting purposes. • For automatic room light control. • It can be used at homes and other places to keep a check on the number of persons entering a secured place. • It can also be used as home automation system to ensure energy saving by switching on the loads and fans only when needed. 6.17. Future Prospects • By using this circuit and proper power supply we can implement various applications, such as fans, tube lights, etc.
  • 67. 52 • By modifying this circuit and using two relays we can achieve a task of opening and closing the door. • In bidirectional visitor counter the voice alarm may be added to indelicate room is full and person can’t enter in the room.
  • 68. 53 Chapter 7 Controllers 7.1. ATmega 328 The Atmel AVR® core combines a rich instruction set with 32 general purpose working registers. All the 32 registers are directly connected to the Arithmetic Logic Unit (ALU), allowing two independent registers to be accessed in a single instruction executed in one clock cycle. The resulting architecture is more code efficient while achieving throughputs up to ten times faster than conventional CISC microcontrollers. The ATmega328/P provides the following features: 32Kbytes of In-System Programmable Flash with Read-While-Write capabilities, 1Kbytes EEPROM, 2Kbytes SRAM, 23 general purpose I/O lines, 32 general purpose working registers, Real Time Counter (RTC), three flexible Timer/Counters with compare modes and PWM, 1 serial programmable USARTs , 1 byte-oriented 2-wire Serial Interface (I2C), a 6- channel 10-bit ADC (8 channels in TQFP and QFN/MLF packages) , a programmable Watchdog Timer with internal Oscillator, an SPI serial port, and six software selectable power saving modes. The Idle mode stops the CPU while allowing the SRAM, Timer/Counters, SPI port, and interrupt system to continue functioning. The Power-down mode saves the register contents but freezes the Oscillator, disabling all other chip functions until the next interrupt or hardware reset. In Power-save mode, the asynchronous timer continues to run, allowing the user to maintain a timer base while the rest of the device is sleeping. The ADC Noise Reduction mode stops the CPU and all I/O modules except asynchronous timer and ADC to minimize switching noise during ADC conversions. In Standby mode, the crystal/resonator oscillator is running while the rest of the device is sleeping. This allows very fast start-up combined with low power consumption. In Extended Standby mode, both the main oscillator and the asynchronous timer continue to run. Atmel offers the QTouch® library for embedding capacitive touch buttons, sliders and wheels functionality into AVR microcontrollers. The patented charge-transfer signal acquisition offers robust sensing and includes fully debounced reporting of touch keys and includes Adjacent Key Suppression® (AKS™) technology for unambiguous detection of key events. The easy-to-use QTouch Suite tool chain allows you to explore, develop and debug your own touch applications. The device is manufactured using Atmel’s high density non-volatile memory technology. The On-chip ISP Flash allows the program memory to be reprogrammed In-System through an SPI serial interface, by a conventional nonvolatile memory programmer, or by an On-chip Boot
  • 69. 54 program running on the AVR core. The Boot program can use any interface to download the application program in the Application Flash memory. Software in the Boot Flash section will continue to run while the Application Flash section is updated, providing true Read-While-Write operation. By combining an 8-bit RISC CPU with In-System Self-Programmable Flash on a monolithic chip, the Atmel ATmega328/P is a powerful microcontroller that provides a highly flexible and cost effective solution to many embedded control applications. The ATmega328/P is supported with a full suite of program and system development tools including: C Compilers, Macro Assemblers, Program Debugger/Simulators, In-Circuit Emulators, and Evaluation kits. Fig.7.1. ATmega 328 controller 7.1.1. Introduction Microcontrollers and humans communicate through the medium of the programming language called Assembly language. The word Assembler itself does not have any deeper meaning, it corresponds to the names of other languages such as English or French. More precisely, assembly language is only a passing solution. In order that the microcontroller can understand a program written in assembly language, it must be compiled into a language of zeros and ones. Assembly language and Assembler do not have the same meaning. The first one refers to the set of rules used for writing program for the microcontroller, while the later refers to a program on a personal computer used to translate assembly language statements into the language of zeros and ones. A compiled program is also called Machine Code. A "Program" is a data file
  • 70. 55 stored on a computer hard disc (or in memory of the microcontroller, if loaded) and written according to the rules of assembly or some other programming language. Assembly language is understandable for humans because it consists of meaningful words and symbols of the alphabet. Let us take, for example the command "RETURN" which is, as its name indicates, used to return the microcontroller from a subroutine. In machine code, the same command is represented by a 14-bit array of zeros and ones understandable by the microcontroller. All assembly language commands are similarly compiled into the corresponding array of zeros and ones. A data file used for storing compiled program is called an "executive file", i.e. "HEX data file". The name comes from the hexadecimal presentation of a data file and has a suffix of "hex" as well, for example "probe.hex". After has been generated, the data file is loaded into the microcontroller using a programmer. Assembly language programs may be written in any program for text processing (editor) able to create ASCII data files on a hard disc or in a specialized work environment such as MPLAB described later. 7.1.2. Elements Of Assembly Language A program written in assembly language consists of several elements being differently interpreted while compiling the program into an executable data file. The use of these elements requires strict rules and it is necessary to pay special attention to them during program writing in order to avoid errors. Fig.7.2. Conversion programming language in machine language 7.1.3. Specification The Atmel 8-bit AVR RISC-based microcontroller combines 32 kB ISP flash memory with read-while-write capabilities, 1 kB EEPROM, 2 kB SRAM, 23 general purpose I/O lines, 32 general purpose working registers, three flexible timer/counters with compare modes, internal and external interrupts, serial programmable USART, a byte-oriented 2-wire serial interface, SPI serial port, 6-channel 10-bit A/D converter (8-channels in TQFP and QFN/MLF packages), programmable watchdog timer with internal oscillator, and five software selectable power saving
  • 71. 56 modes. The device operates between 1.8-5.5 volts. The device achieves throughput approaching 1 MIPS per MHz. 7.1.4. Features • RISC Architecture with CISC Instruction set • Powerful C and assembly programming • Scalable • Same powerful AVR microcontroller core • Low power consumption • Both digital and analog input and output interfaces 7.1.5. Processor Architecture AVR follows Harvard Architecture format in which the processor is equipped with separate memories and buses for Program and the Data information. Here while an instruction is being executed, the next instruction is pre-fetched from the program memory. 7.1.5.1. ALU The high-performance AVR ALU operates in direct connection with all the 32 general purpose working registers. Within a single clock cycle, arithmetic operations between general purpose registers or between a register and an immediate are executed. The ALU operations are divided into three main categories – arithmetic, logical, and bit-functions. Some implementations of the architecture also provide a powerful multiplier supporting both signed/unsigned multiplication and fractional format. Fig.7.3. General architecture of ALU
  • 72. 57 Fig.7.4. Architecture of Atmega328 7.1.5.2. In-System Reprogrammable Flash Program Memory The ATmega48/88/328 contains 4K/8K/16K bytes On-chip In-System Reprogrammable Flash memory for program storage. Since all AVR instructions are 16 or 32 bits wide, the Flash is organized as 2K/4K/8K × 16. For software security, the Flash Program memory space is divided into two sections, Boot Loader Section and Application Program Section in ATmega88 and ATmega328. 7.1.5.3. EEPROM Data Memory The Atmel ATmega48 /88/328 contains 256/512/512 bytes of data EEPROM memory. It is organized as a separate data space e, in which single bytes can be read and written. The EEPROM has an endurance of at least 100,000 write/erase cycles. The access between the EEPROM and the CPU is
  • 73. 58 described in the following, specifying the EEPROM Address Registers, the EEPROM Data Register, and the EEPROM Control Register. 7.1.5.4. Program Counter A program counter is a register in a computer processor that contains the address (location) of the instruction being executed at the current time. As each instruction gets fetched, the program counter increases its stored value by 1. After each instruction is fetched, the program counter points to the next instruction in the sequence. When the computer restarts or is reset, the program counter normally reverts to 0. In computing, a program is a specific set of ordered operations for a computer to perform. An instruction is an order given to a computer processor by a program. Within a computer, an address is a specific location in memory or storage. A register is one of a small set of data holding places that the processor uses. Program counter is very important feature in the microcontrollers. 7.1.5.5. RAM RAM stands for random access memory. This type of memory storage is temporary and volatile. You might have heard that if your system is working slowly you say that increase the RAM processing will increase. Let us understand in detail. Let us consider two cases to execute a task first the complete task is execute at one place(A), second the task is distributed in parts and the small tasks are executed at different places(A,B C)and finally assembled. It is clear the work will be finished in second case earlier. The A, B, C basically represent different address allocation for temporary processing. This is the case with RAM also if you increase the RAM the address basically increases for temporary processing so that no data has to wait for its turn. On major importance of the RAM is address allocations. However the storage is temporary every time u boot your system the data is lost but when you turn on the system The BIOS fetch number of addresses available in the RAM. This memory supports read as well as write operations both. 7.1.5.6. Instruction execution section (IES) It has the most important unit—instruction register and instruction decoder to control the flow of the instruction during the processing’s. 7.1.5.7. Input/Output Ports To interact with the physical environment there are different input and output ports in every system like in PC we have VGA port to connect the monitor, USB port for flash memory connections and many more ports. Similarly ATMEGA 328 has its input and output ports with different configurations
  • 74. 59 depending on the architecture like only input, only output and bi-directional input output ports. The accessing of this port is referred as input output interface design for microcontrollers. IT has analog input port, analog output port, digital input port ,digital output port, serial communication pins, timer execution pins etc. 7.1.5.8. Analog Comparator & A/D converters The major question is that how a controller manage to detect variation of voltage in-spite it could not understand the voltage but understand only digital sequence Most of the physical quantities around us are continuous. By continuous we mean that the quantity can take any value between two extreme. For example the atmospheric temperature can take any value (within certain range). If an electrical quantity is made to vary directly in proportion to this value (temperature etc) then what we have is Analogue signal. Now we have we have brought a physical quantity into electrical domain. The electrical quantity in most case is voltage. To bring this quantity into digital domain we have to convert this into digital form. For this a ADC or analog to digital converter is needed. Most modern MCU including AVRs has an ADC on chip. An ADC converts an input voltage into a number. An ADC has a resolution. A 10 Bit ADC has a range of 0-1023. (2^10=1024) The ADC also has a Reference voltage (ARef). When input voltage is GND the output is 0 and when input voltage is equal to ARef the output is 1023. So the input range is 0-ARef and digital output is 0-1023. 7.1.6. Pin Diagram and Description Fig.7.5. PIN diagram of Atmega 328
  • 75. 60 • VCC: Digital supply voltage. • GND: Ground. (a) Port B (PB7:0) XTAL1/XTAL2/TOSC1/TOSC2 Port B is an 8-bit bi-directional I/O port with internal pull- up resistors (selected for each bit). The Port B output buffers have symmetrical drive characteristics with both high sink and source Capability. As inputs, Port B pins that are externally pulled low will source current if the pull-up resistors are activated. The Port B pins are tri-stated when a reset condition becomes active, even if the clock is not running. Depending on the clock selection fuse settings, PB6 can be used as input to the inverting Oscillator amplifier and input to the internal clock operating circuit. Depending onthe clock selection fuse settings, PB7 can be used as output from the inverting Oscillator amplifier. If the Internal Calibrated RC Oscillator is used as chip clock source, PB7.6 is used as TOSC2.1 input for the Asynchronous Timer/Counter2 if the AS2 bit in ASSR is set. (b) Port C (PC5:0) Port C is a 7-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The PC5.0 output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port C pins that are externally pulled low will source current if the pull-up resistors are activated. The Port C pins are tri-stated when a reset condition becomes active, even if the clock is not running. (c) PC6/RESET: If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that the electrical characteristics of PC6 differ from those of the other pins of Port C. If the RSTDISBL Fuse is unprogrammed, PC6 is used as a Reset input. A low level on this pin for longer than the minimum pulse length will generate a Reset, even if the clock is not running. Shorter pulses are not guarantee to generate a reset. (d) Port D (PD7:0): Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The Port D output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port D pins that are externally pulled low will source current if the pull-up resistors are activated. The Port D pin are tri-stated when a reset condition becomes active, even if the clock is not running.
  • 76. 61 (e) AVCC: AVCC is the supply voltage pin for the A/D Converter PC3:0, and ADC7:6. It should be externally connected to VCC, even if the ADC is not used. If the ADC is used, it should be connected to VCC through a low-pass filter. Note that PC6.4 use digital supply voltage, VCC. (f) AREF: AREF is the analog reference pin for the A/D Converter. 7.1.7. Key Parameters Table 6: Key parameter Parameter Value CPU Type 8 bit AVR Perfornce 20 MIPS at 20 MHz Flash Memory 32 kB SRAM 2 kB EEPROM 1 kB Pin Count 28 Pin PDIP,MLF,32 Pin TQFP, MLF Maximum Operating Frequency 20 MHz Number of Touch Channes 16 Hardware QTouch Acuisition NO Maximum I/O Pins 26 External Interrupts 2 USB Interface NO USB Speed - 7.1.8. Serial Mode Programming Table 7: Serial mode Programming Symbol Pins I/O Description MOSI PB3 I Serial data in MISO PB4 O Serial Data out SCK PB5 I Serial Clock
  • 77. 62 7.1.9. Programming • Parallel Mode Programming Table 8: Parallel programming Programming signal Pin Name I/O Function RDY/BSY PD1 O High means the MCU is ready for a new command, otherwise busy. OE PD2 I Output Enable (Active low) WR PD3 I Write Pulse (Active low) BS1 PD4 I Byte Select 1 (“0” = Low byte, “1” = High byte) XA0 PD5 I XTAL Action bit 0 XA1 PD6 I XTAL Action bit 1 PAGEL PD7 I Program memory and EEPROM Data Page Load BS2 PC2 I Byte Select 2 (“0” = Low byte, “1” = 2nd High byte) DATA PC[1:0]:PB[5:0] I/O Bi-directional data bus (Output when OE is low) 7.1.10. Applications • Arduino Based Home Automation System. • Arduino based Auto Intensity Control of Street Lights. • The Obstacle Avoidance Robot Operated with Arduino. • Arduino based Controlling of Electrical Appliances using IR. 7.1.11. Advantages I. Ready to Use The biggest advantage of Arduino is its ready to use structure. As Arduino comes in a complete package form which includes the 5V regulator, a burner, an oscillator, a micro-controller, serial communication interface, LED and headers for the connections. You don't have to think about programmer connections for programming or any other interface. Just plug it into USB port of your computer and that's it. Your revolutionary idea is going to change the world after just few words of coding.