MCA MiniProject
MCA MiniProject
ENGINEERING TECHNOLOGY
BTO1313 – SECTION 1
MINI PROJECT
ULTRASONIC RADAR
Prepared by
Student
Group Members Section
ID
Mohammad Zaaim Bin Molsar TH21031 01
Nurul Hannah Binti Mohd Rizal TH21030 01
Zul Khahlib Bin MD Yasin TH20038 01
Nur Aqilah Kamaludin TH20062 01
Page |2
Contents
1) Introduction ……………………………………………………………………………………………………… 3
6) Flowchart ………………………………………………………………………………………………………… 7
9) Conclusion ………………………………………………………………………………………………………. 18
INTRODUCTION
Ultrasonic sensors are used in a variety of technical fields. In automation, robotics, and
instrumentation, "no-contact" distance measurement is extremely valuable. Ultrasonic
sensing is one of the most reliable ways to sense proximity and detect levels. An
ultrasonic sensor is a device that uses ultrasonic sound waves to determine the distance
to an item. An ultrasonic sensor employs a transducer to emit and receive ultrasonic
pulses that reflect information about an object’s vicinity. High-frequency sound waves
reverberate off surfaces, creating different echo patterns. Ultrasonic sensors function
by emitting a sound wave that is above the human hearing range. The ultrasonic sensor
(also known as a transducer) works in the same way that a radar system does. Electrical
energy can be converted into acoustic waves and vice versa using an ultrasonic sensor.
The acoustic wave signal is a high-frequency ultrasonic wave that travels over 18khz.
SYSTEM DESCRIPTION
The system is made up of a simple ultrasonic sensor mounted on a servo motor that rotates
at a specific angle and speed. This ultrasonic sensor is connected to Arduino digital input
output pins, as is the servo motor. This is an object-detection system that employs radio
waves to assess whether or not there is an obstruction in a 180-degree viewing angle. The
Arduino uno will serve as the messenger for the processing application in this setup. The
ultrasonic sensor will use radio waves to identify an item, and the servo motor will spin the
ultrasonic sensor to 180 degrees. When the ultrasonic sensor detects an obstruction, the
processing application will display a red region where the impediment was identified.
Page |4
LIST OF COMPONENTS
NO NAME PRICE
1 UNO ARDUINO RM 32.99
2 ULTRASONIC SENSOR (HC SR04) RM 3.30
3 MICRO SERVO RM 8.39
4 BREADBOARD RM 2.50
5 MALE TO MALE JUMPER WIRE RM 3.49
6 FEMALE TO MALE JUMPER WIRE RM 3.49
7 PUSH BUTTON RM 1.20
TOTAL RM 55.36
Page |5
DESCRIPTION OF COMPONENTS
FLOWCHART
START
i=0
F
i<=10
T
Object detected? Red signal shows on radar
T
Object detected? Red signal shows on radar
i = i+1
STOP
Page |8
Schematic and Simulation for Thinker CAD Diagram and Arduino Ide
Page |9
#include <Servo.h>.
long duration;
int distance;
Servo myServo; // Creates a servo object for controlling the servo motor
void setup() {
Serial.begin(9600);
void loop() {
for (pos = 0; pos<= 180; pos +=1) {//goes from 0 degrees to 180 degrees
distance = calculateDistance();// Calls a function for calculating the distance measured by the Ultrasonic sensor for
each degree
Serial.print(","); // Sends addition character right next to the previous value needed later in the Processing IDE for
indexing
Serial.print("."); // Sends addition character right next to the previous value needed later in the Processing IDE for
indexing
distance = calculateDistance();
Serial.print(pos);
Serial.print(",");
Serial.print(distance);
Serial.print(".");
int calculateDistance(){
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
P a g e | 11
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH); // Reads the echoPin, returns the sound wave travel time in microseconds
distance= duration*0.034/2;
return distance;
}
P a g e | 12
namespace RADAR_lll
{
public partial class Form1 : Form
{
Timer t = new Timer();
Bitmap bmp;
Pen p, p1;
Graphics g;
serialPort1.Open();
bmp = new Bitmap(WIDTH + 1, HEIGHT + 1);
this.BackColor = Color.Black;
cx = WIDTH / 2;
cy = HEIGHT / 2;
u = 0;
t.Interval = 5;
t.Start();
}
public Form1()
{
InitializeComponent();
serialPort1.BaudRate = 9600;
serialPort1.Parity = System.IO.Ports.Parity.None;
serialPort1.DataBits = 8;
serialPort1.StopBits = System.IO.Ports.StopBits.One;
//update
dongu++;
u++;
if (u == 360)
{
u = 0;
}
}
}
}
P a g e | 17
CONCLUSION
This tool can be custom made to fit various applications such as being fitted in cars to aid
when reversing, could tell the level of water in a well or storage tanks etc. The
technique can also be implemented with the GSM for proper remote monitoring.
The technique can also be recommended to be used in the tunnels such as train or
vehicle tunnels to give signal in case there are complications.
iThe objective of this project was to design and implement an Ultrasonic Distance
Measurement device. As described in this report a system is developed that can calculate
the distance of the tracked object. With respect to the requirements for an ultrasonic
rangefinder the followings can be concluded.
1.The system can calculate the distance of the obstruction with sufficient accuracy.
2.The device has the capability to interact with other peripheral if used as a secondary
device.
3.This can also communicate with PC through its serial port.
4.This offers a low cost and efficient solution for non-contact type distance measurements.
The range can be considerately increased by using high power drive circuit.
- Using temperature compensation, it can be used over wide temperature range.
- Increase the number of moving objects that can be detected
- Expanding the range of tracking moving object