Docsity

Ultrasonic range Finder, Essays (high school) of Computer science

Partial preview of the text

Download Ultrasonic range Finder and more Essays (high school) Computer science in PDF only on Docsity!

Module title: Engineering Software Development

Module code: PDE

Name:

ID:

Abstract

This project is about ultrasonic range finder using Arduino. The ultrasonic range finder is used to measure the distance from any object or also used to detect the objects. The aim of this project is to detect the object and then measure the distance of that object. After measuring the distance it will generate the signal through Arduino and display the result on the LCD screen. The Arduino is used for measuring the distance by sending the signal through air. The human can listen up to the frequency of 20hz to 20k Hz. The ultrasonic sensor HC-SR04 is to measure the accurate distance between objects. This ultrasonic sensor is then interfaced with the Arduino. The ultrasonic sensor is the most economical method. Hence, by this method accurate distance can be measured within small distances.

Introduction

Distance measurement is one of the important thing that is used in several projects. These projects may be on large level or small. Various types of sensors and devices are used in these projects. These devices are designed in such a way so that cost should be minimum and good accuracy and speed can be obtained. In this project we have used the ultrasonic sensor and Arduino to measure the distance. This sensor is suitable to measure the distance between the stationary objects and moving objects. This sensor generates the output analog signal with the ultrasonic frequency and this signal is then feed to the Arduino for further processing. The Arduino output is attached to the LCD screen that is used to display the output distance on the screen. These sensors are also used in the security systems, navigation and for the detection of obstacles. These can be work only in the light. The sensor that is being used in this project can measure distance of almost 400cm with the accuracy of 3 mm. These sensor can measure the distance irrespective of surface type, color or shape. Following are the applications in which these sensors are being used. ⚫ Loop control ⚫ Robotics ⚫ Counting objects ⚫ Stacking height control ⚫ Automatic doors ⚫ Monitor traffic

Objectives

The main goal of this project is to detect the distance from the object through the sensor and then pass this signal to Arduino. The Arduino will decode the distance and display the data on LCD screen.

Literature Review

Various methods have designed for the measurement of distance from the sensor to the target. A lot of errors can occur if we will measure the distance manually. The IR rays were used for the measurement of distance in the past but this method gave errors in the measurements. Here, we have proposed the method of ultrasonic sensor that eliminate the errors and provide accuracy in the measurement. These sensors process in the mm range because of environment accuracy. There are several environments factors that are influencing on the sensor accuracy. Following are some related projects using different technology. Automated grass Cutter Solar energy is one of the most important source of energy. This is being used in many applications. As we know, in the past people were gardens there lawn manually and cut the growing grass by hand. But now due to advancement in technology lawn movers are used for cutting the grass. However, these devices are being powered by the voltage source connected by the long wires. The areas in which power is not available we cannot use these devices there. The ultrasonic range sensors and the battery is used in latest devices to use the lawn movers at any place now. Figure 1 : Grass cutter

Figure 3 : Ultrasonic Range Finder using Micro controller

Project Planning

Following is the work breakdown structure of the project and the Gantt chart is given. This project is completed in three weeks. The activities are divide into days and completed accordingly. Table 1 : Project deadlines Sr. No Activities Deadline 1 Analysis 2 days 2 Designing 4 days 3 Selecting the components 3 days 4 Implementation of circuit 3 days 5 Hardware and software integration 3 days 6 Perform system testing 2 days

Methodology

This project is using the mechanism of pulse echo to find the distance of object from the sensor. The ultrasonic sensor emits the pulse of sound that targets the object by the air. After hitting the object the pulse return back to the ultrasonic sensor. The ultrasonic range finder find the time of return back of the pulse after hitting the object. After that it will send the signal to the Arduino and pass the information. The Arduino calculate the distance by checking the speed and time of the pulse by using the following formula. speed = distance time distance = speed × time The speed is the parameter at which the pulse is moving by the air. The time of the pulse after hitting the object and return back to the sensor is calculated to find the required distance. The parameters such as temperature of the air and the humidity effects on the speed of the pulse. Following is the bock diagram of the project in which ultrasonic sensor, Arduino, LCD screen and servo motor are used. Figure 5 : Ultrasonic Range Sensor with Arduino Here, the sensor is also connected to the servo motor to find the polar distance. Hardware components that are used in project are explained below.

Ultrasonic Sensor The HC-SR04 sensor is used in this project. As this sensor is providing the high accuracy as well as good performance that is why this is being used in the market at large level. Moreover, this sensor is inexpensive as compared to other sensors. This sensor is operate on 5V dc, 500 cm distance range, 40k HZ frequency and 2m A current rating. This sensor emits the sound pulse of 40k HZ that can pass through the air and it can return back to the sensor in case of any obstacle on the way.by measuring the speed of the pulse and time taken to travel the pulse we can measure the distance of the object from the sensor. This sensor has four pins including VCC in which power from voltage source is applied to the circuit. Second is the ground pin. Third is Trig pin that is used to transmit the signals to start the pulse. Fourth pin is Echo is used to send the signal to the Arduino having information of travel time. Arduino The Arduino is a micro-controller based board. It has total 14 digital I/O ports. There are 6 pins that is being used for PWM and other 6 pins are used as an analog pins. It can be connected to the computer via USB port. It can be store up to 32 KB memory. The C program can be feed to the Arduino. Moreover, there is also a reset button on the Arduino board. The power of 5V can be given directly to the Arduino otherwise power supply can also be connected to it. LCD LCD stands for liquid crystal display. This is being used in large number of applications. We have used the LCD display with 16*2 display to display the distance on the screen. On this device we can show any type of data whether it is integer, alphabetic or special characters. Moreover, this is also inexpensive as compared to other devices such as seven segments and LEDs. This display has 16 columns and 2 rows. On each line total 16 characters can display at a time. It contains two registers such as data and command. Servo Motor A servomotor provides the rotatory motion. This is used to control the velocity, acceleration and position of the system. The motor is connected to the sensor for the purpose of position control. This is operate on the closed loop feedback mechanism to

Results

After connecting the Arduino, servo motor, LCD and required resistor with the breadboard. The power is provided to the circuit by battery or any voltage source. The following results will be shown on the screen. The LCD display have 14 pins that are connected to the Arduino. The 5V power supply and ground is given to the breadboard. Figure 6 : Ultrasonic Range Finder

Conclusion

The main objective of this project was to design an ultrasonic range finder. The designed device can measure the distance of the object from the sensor and then display the distance on screen. This ultrasonic range finder is economical and a very simple device for the measurement of distance. It can measure the distance with accuracy and resolution. Moreover, it is very small and easy to carry. This can be used in many applications such as in automation, robotics, car braking system, detect water level in tank, depth of the snow and in production lines. The ultrasonic sensor has high power and sensitivity. These sensors should be used carefully in water because it can be damage if they are not water resistive. The detection of the range is based on the reflected signal, size and position of the target. Therefore, the ultrasonic range finder is very useful device and this can be applied anywhere because it is effective and easy to use.