Servo Dist Ind Report
Servo Dist Ind Report
CHAPTER 1
INTRODUCTION
Movement detection of living beings or any other object might be interesting in numerous
domains, like security systems, radars, the locations of industrial robots, depth of snow banks,
liquid levels in reservoirs and automatic guidance systems. Majority of these applications
require that the objects detection device to be non-invasive and not disturb the normal work
environment, living beings or other devices in the detection's area. This includes the choice of
detached vectors for transporting the necessary information, with a high degree of immunity to
other various factors except the state of movement. The objects detection device may be passive,
but in this case, the moving organisms or objects must have a particular property that can be
discovered. However, this condition limits the domain of the device applicability, but offers the
feature of high discretion for detector. In active detection devices, a transmitter and a receiver
detect the objects in a manner that does not affect the path of the process being monitored and
does not impose any special restrictions for the detected objects.
Measuring the distance in the narrow areas or dangerous regions that contains chemical or
radioactive solution can be problematic sometimes. The tape measure is not suitable for this
kind of distance measurement because the place is not appropriate or for any other reason.
Various mechanisms have been suggested and developed for contactless distance measurements,
while each method has their own features and disadvantages. Infrared or optical sensors present
good accuracy but a poor distance measurement domain. On the other side, laser or microwave-
based systems offer the possibility of a large range measurement of distance, with a rather weak
resolution.
At most, the use of ultrasonic sensing technology (ultrasonic sensor) is the most inexpensive and
reliable method for measurement of the distance. Ultrasonic sensors are useful in various
applications areas under which other sensors (such as infrared or vision-based sensors) fail to
give accurate results or operate such as poor lighting conditions or the presence of many
transparent
calculating the time difference between the pulses transmitted and received, the distance to the
detected object can be located. An effective measurement depends on the reflection of the
waves from the targets to the ultrasonic sensor. There are different influences that affect the
reflection such as wind speed, random noises and the change of temperature. The dimensions of
the target also effect on the reflection and target detection, as explained below:
Surface: The target which has hard, smooth surface reflects large wave than soft surface. A soft
target has a weak echo and the accuracy of the ultrasonic sensor will decrease.
Distance: The reflected signal decreases as the distance between the target and the ultrasonic
sensor increases.
Angle: Objects tilting degree ultrasonic waves are affected by the reflection method of the
object. The echo is gained only from regions normal to the sensor otherwise no echo will be
detected due to the scattering of the signal as it is reflected from the object.
Size: A large target has bigger surface area to reflect the wave than a small target.
There are many great applications of ultrasonic sensing technique since its inception, such as
obstacles detection for guidance in mobile robotics applications, home security systems,
measuring water or liquid level in tanks, distance measurement and objects proximity detection
systems. These innumerable smart applications have made it easy to solve different technical
issues quickly and less expensive without compromising stability, safety and quality. Many
examples on that are present in academic literature as can be seen in the following review. In
Singh et al. presented a security system for buildings and homes to detect the movement of the
human body and produce a necessary alarming message using ultrasonic sensor. Dey et al.
designed and implemented in smart walking stick for visually impaired people that uses
ultrasonic sensor HC-SR04 to detect obstacles in the blind person's path and uses the buzzer as
an alert. A smart collision avoidance system has been proposed as a prototype in which uses
ultrasonic sensor for obstacle detection to
avoid vehicle accidents and provides maximum safety to the drivers. Gupta et al. in addressed
the utilization of ultrasonic sensing capability for water depth measuring. Distance measurement
CHAPTER 2
LITERATURE SURVEY
2.1. Introduction:
Bats are wonderful creatures. Blind from the eyes but the vision is sharper than humans,
Ultrasonic ranging is the technique used by bats. Ultrasonic sensor provides an easy way in
distance measurement. The sensor is perfect for distance measurements between moving or
stationary objects. Ultrasonic Sensor measures the distance of the objects in air through non-
contact technique. These distance measurement sensors connect with all common types of
automation and telemetry equipment. Machinery and processes in a wide range of industries
use distance measurement sensors where size or position feedback is required. The echo
time response of ultrasonic sensor detector is based on time of travel after trigger pulse to
the surrounding objects is non-linear and depends on the reflectance characteristics of the
object surface. Ultra-Sonic sensors are widely used for distance measurement purposes.
They offer low cost and a precision of less than 1 cm in distance measurements of up to 6m.
However, the most popular method used in these measurements is based on the time of
flight (TOF) measurement. This TOF is the time elapsed between the emission and
subsequent arrival after reflection of an Ultrasonic pulse train travelling at the speed of
sound. This causes large response times for a single measurement.
To solve this problem initially IR Range Finder modules were used but they had small range.
Later to solve all these problems ultrasonic range finder module was used. These modules use
ultrasonic
sound waves inaudible to human. These modules consist of ultrasonic transmitter that emits
ultrasonic waves, the waves after striking the objects gets reflected back and is detected by the
ultrasonic receiver. By measuring the time taken in the whole process we can detect the distance
of the object from the sensor.
Ultrasonic sensor can detect the object in the range of 400cm which makes it the ideal for
distance measurement application.
These are used in several areas: -
1. Speed check in roads
2. Driverless cars to detect obstacles.
3. Radars for robotics.
4. Fuel level in the tank.
CHAPTER 3
SYSTEM DESCRIPTION
3.1. Components Used:
1. Arduino UNO
2. Ultrasonic Sensor (HC-SR04)
3. Servo motor
4. A to B Male type peripheral USB cable
5. Jumper wires
6. Bread Board
3.2. Arduino (UNO):
3.2.1 Introduction: - Arduino refers to an open-source electronics platform or board and the
software used to program it. An Arduino board can be purchased preassembled or, because the
hardware design is open source, built by hand. A pre-assembled Arduino board includes a
microcontroller, which is programmed using Arduino programming language and the Arduino
development environment. Arduino programming language is a simplified from of C/C++
programming language based on what Arduino calls "sketches," which use basic programming
structures, variables, and functions. These are then converted into a C++ program.
3.2.2 Hardware: - Arduino is open-source hardware. Most Arduino boards consist of an Atmel
8-bit AVR microcontroller (ATmega8, ATmega168, ATmega328, ATmega1280, ATmega2560)
with varying amounts of flash memory, pins, and features. We have Arduino with AT mega 328.
power saving modes. The device operates between 1.8-5.5 volts. The device achieves throughput
approaching 1 MIPS per MHz.
Parameter Value
CPU type 8-bit AVR
Performance 20 MIPS at 20 MHz
Flash memory 32 kb
SRAM 2 kb
EEPROM 1 kb
Pin count 28-pin PDIP, MLF, 32-pin
TQPF, MLF
Maximum operating frequency 20 MHz
Number of touch channels 16
Hardware Q Touch Acquisition No
Maximum I/O pins 23
External interrupts 2
USB interface No
3.2.6 Features: -
Microcontroller: ATmega328
Operating Voltage: 5V
Input Voltage (recommended): 7-12V
Input Voltage (limits): 6-20V
Digital I/O Pins: 14 (of which 6 provide PWM output)
Analog Input Pins: 6
DC Current per I/O Pin: 40 mA
DC Current for 3.3V Pin: 50 mA
3.3.2 Working: -
Ultrasonic distance sensors use pulses of ultrasonic sound (sound above the range of human
hearing) to detect the distance between them and nearby solid objects. The sensors consist of two
main components:
An Ultrasonic Transmitter – This transmits the ultrasonic sound pulses, it operates at 40 KHz
An Ultrasonic Receiver – The receiver listens for the transmitted pulses. If it receives them it
produces an output pulse whose width can be used to determine the distance the pulse
travelled.
The HC-SR04 has the following four connections:
VCC – This is the 5 Volt positive power supply.
Trig – This is the “Trigger” pin, the one driven to send the ultrasonic pulses.
Echo – This is the pin that produces a pulse when the reflected signal is received. The
length of the pulse is proportional to the time it took for the transmitted signal to be
detected.
GND – This is the Ground pin.
The illustration below shows the dimensions of the HC-SR04 Ultrasonic Distance Sensor as well
as the effective angle of operation. As you can see the sensor is most accurate when the object to
be detected is directly in front of it but you do get a response from objects within a 45 degree
“window”. The documentation recommends confining that window to 30 degrees (15 degrees on
either side) for accurate readings.
CHAPTER 4
SOFTWARE DESCRIPTION
4.1. Arduino IDE: -
4.1.1 Introduction: - Arduino consists of both a physical programmable circuit board (often
referred to as a microcontroller) and a piece of software, or IDE (Integrated Development
Environment) that runs on your computer, used to write and upload computer code to the
physical board.
4.1.2 Programming Language used: -
First, the Arduino compiler/IDE accepts C and C++ as-is. In fact many of the libraries are written
in C++. Much of the underlying system is not object oriented, but it could be. Thus, "The arduino
language" is C++ or C.
4.1.3 Getting started with Arduino IDE: -
1. Open Arduino 1.0.3
4.2.1 Introduction: -
Processing (programming language) Processing is an open-source computer programming
language and integrated development environment (IDE) built for the electronic arts, new media
art, and visual design communities with the purpose of teaching non-programmers the
fundamentals of computer programming in a visual context.
Word processing software is used to manipulate a text document, such as a resume or a report.
You typically enter text by typing, and the software provides tools for copying, deleting and
various types of formatting.
The Arduino IDE and the Processing IDE will communicate with each other through serial
communication. The Processing IDE has a serial library which makes it easy to communicate
with the Arduino.
CHAPTER 5
METHODOLOGY
5.1 Schematic Diagram: -
5.2 Implementation: -
[Link] distance measurement system is used to measure the distance between two object
precisely.
In this particular project we are using an ultrasonic sensor to measure the distance and we placed
the ultrasonic sensor on the top of a servo motor to rotate it at a range of 15 degree to 165 degree.
So, by this angle range up to 400cm distance the ultrasonic senses can locate and measure the
distance of any object.
2. Now for the hardware port first we take a male-to-male jumper wire and connect it with 5V
pin and connect the other end to the positive rail of breadboard.
Next we take another male to male jumper wire and connect it to the ‘GND’ pin of Arduino and
we connect the other port to negative rail of the breadboard.
After that we connect ‘Vcc’ and ‘GND’ pin of both ultrasonic sensor and servo motor to the
positive and negative rail of the breadboard respectively. Next we connect the trigger pin of
ultrasonic sensor to ‘pin 9’ of Arduino board and we connect pin of ultrasonic sensor to ‘pin 11’
of Arduino board and we connect the data pin of servo motor to ’pin 12’ of Arduino board. And
hence the connection of Arduino is completed.
Next, we write the code on Arduino IDE and burn it to the Arduino board.
3. We use ‘processing 3.3.7’ software. It is mainly programming language and environment built
for the electronics art and graphics used design.
We use this software to locate the object on the computer screen. And print the distance of the
object measured by the ultrasonic sensor.
4. We use ‘processing IDE’ to write the code processing IDE similar to the ‘Arduino IDE’. And
the ‘processing IDE’ communicate through serial communication with the ‘Arduino IDE.’
5. For the communication process we send the data received from ultrasonic sensor to the serial
monitor with the same additional characters. These data in the serial monitor will be later
received by the ‘processing IDE’ and hence the communication between Arduino IDE and
processing IDE is completed.
6. Now we can see the distance of the object at which angle it is located as well as the location of
the object in the monitor.
CHAPTER 6
EXPERIMENTAL RESULTS
The system prototype with the dual Arduino boards and XBee modules, servo motor, ultrasonic
sensor and buzzer was tested in real time. The materials such as wood, aluminum and glass (due
to their popularity in many applications) were chosen as obstacles or objects to validate the
proposed system operations. The above-mentioned prototype was tested in different scenarios
regarding positioning of the sensor node and sink node and the distance that can be covered
using XBee modules. In addition to that many tests have been performed to measure the distance
and angle of targets in the system’s sensing area and determine the exact location of these
objects. The tests were achieved by placing a set of targets on different distances and angles from
the proposed system. Some of these tests are explained below: The sensing node with the
ultrasonic sensor fixed on the servo motor is shown at the back of the picture, while the sink
node is shown at the front of the picture with a personal computer acting as the main control unit
and a display screen in the same time as shown in Figure 6.1 (a). A blue shape representing the
fixed target was placed at 8 cm away from the sensing node in the first test as can be seen in
Figure 6.1 (a). The red points displayed on the GUI represent the target at a distance 8 cm from
the ultrasonic sensor with some error as shown in Figure 6.1 (b).
Fig 6.1. (a) One fixed target at 8 cm distance. (b) The monitor screen in case target at 8 cm
In the second test, the same target that used in the test 1 was used but now at 27 cm away from
the system as shown in figure 6.2 (a). From Figure 6.2 (b) it can be seen that the target on the
Fig 6.2.(a) One fixed target at 27 cm distance. (b) The monitor screen in case target at 27 cm
The targets was fixed at different angles to the right and the left of the sensor and the ultrasonic
sensor detected them successfully as shown in the Figure 6.3 (a) and (b) and Figure 6.4 (a) and
(b) respectively.
Fig 6.3.(a) One fixed target at 29 cm distance (b) The monitor screen in case target at 29 cm
Fig 6.4. (a) One fixed target at 36 cm distance (b) The monitor screen in case target at 36 cm
In the third test, two fixed targets were used as shown in Figure 18 (a). The ultrasonic sensor is
located in the back of the picture with two different objects in front of it at different distances.
The objects are shown by two series of continuous dots that define the shape, distance and angle
of the targets as represented on the computer screen graphically in Figure 18 (b).
Fig 6.5. (a) Two fixed targets at different distances (b) The monitor screen in case target at different distances
CHAPTER 7
7.1 ADVANTAGES: -
Not affected by color or transparency of objects.
Can be used in dark environments.
Low-cost option.
Not highly affected by dust, dirt, or high-moisture environments
In civil and mechanical field for precise and small measurements.
7.2 APPLICATIONS: -
CHAPTER 8
8.1 Conclusion: -
In this Report, a simple working of distance measurement and object detection system using
Zigbee technology and ultrasonic sensing technology is explained detailed. This system can
monitor a particular area and detect the location, direction and distance of the object that comes
its way and convert it into a model that can be visually represented. This system was developed
by using XBee chip which enabled the transmission of the information wirelessly, giving the
system the ability to monitor an area away from the control room. Many tests were conducted on
the designed system with one or more than one object at different distances and orientations, the
tests included a moving object also.
The readings were in close margin to reality and the obtained error proved to be negligible. The
employment of XBee module for the transmission of sensed data between the system nodes
presented advantage such as security and low power consumption to the system while covering a
wider range as compared to other communication technologies. In addition to that Zigbee
protocol and XBee module allows the implementation of several nodes at different locations
which can be further developed or modified according to the arising needs.
The proposed system can be used in robotics systems to avoid obstacles and collisions,
automated guided vehicles, finding the depth or level of any medium and measuring general
distances, etc. Moreover, the proposed system can be used in areas that are inaccessible to
humans and also in areas where there is a risk to their lives. We can enhance the proposed system
in the future by increasing the range of objects detection, by utilizing a fully 360 degrees
rotational servo motor and also by mounting surveillance webcam to it which turns on when an
object is detected. Further modifications, the proposed system could be a mobile robot system
capable of avoiding obstacles or detecting objects and measuring the distance at the same time.
Internet of things technology serves well in such applications. It can be integrated into the
proposed system, and so the sensed data can be monitored using a smartphone remotely.
REFERENCES
[1] V. Chen, F. Li, S.-S. Ho and H. Wechsler, “Micro-Doppler Effect in Radar: Phenomenon,
Model, and Simulation Study,” IEEE Transactions on Aerospace and Electronic Systems, vol. 42,
no. 1, pp. 2-21, 2006.
[3] M. V. Paulet, A. Salceanu, and O. M. Neacsu, “Ultrasonic Radar,” in Proc 2016 Int. Conf.
and
Exposition on Electrical and Power Engineering (EPE), 2016, pp. 551-554.
[7] D. Grumney, “Ultrasonic Transmitters vs. Guided Wave Radar for Level Measurement,”
2011.
[9] A. P. Singh, A. K. Sharma, A. Pandey and P. Kriti, “A Review on Ultrasonic Radar Sensor
for
Security System,” Journal of Emerging Technologies and Innovative Research (JETIR), vol. 3,
no. 4, pp. 137-139, 2016.
[10] N. Dey, A. Paul, P. Ghosh, C. Mukherjee, R. De and S. Dey, “Ultrasonic Sensor Based
Smart
Blind Stick,” Proc IEEE Int. Conf. on Current Trends towards Converging Technologies
(ICCTCT), 2018, pp. 1-4.
[13] H. He, and J. Liu, “The Design of Ultrasonic Distance Measurement System Based
on S3C2410,” IEEE [Link]. on Intelligent Computation Technology and Automation, 2008, pp.
44-47.
[18] K. Srilakshmi, K. Anitha, P. Rajesh Kumar and G.R.L.V.N. Srinivas Raju, “Design
and Implementation of Distance Measuring Digital Hardware,” International Journal of
Electronics & Communication Technology (IJECT ), vol. 2, no. 1, pp. 222-225, 2011.