Introduction: Making Radar Using Arduino, Ultrasonic Sensor, and MATLAB

In this project we are going to make a simple radar to detect obstacles.
Range depends on the range of the Ultrasonic sensor we used (in this project : 3 meter) .

Step 1: Components

Picture of Components

Components :

1 - Arduino Uno
2 - Ultrasonic Distance Sensor ( link : https://www.parallax.com/product/28015).
3- Servo Motor.

Step 2: Wiring and Connections

Picture of Wiring and Connections

1- Connect Ultrasonic sensor (5V and GND) to Arduino (5V and GND).
2- Connect Ultrasonic sensor (SIG) to Arduino (Digital pin 8).

3- Connect Servo motor (5V and GND) to Arduino (5V and GND).
4- Connect Servo motor (SIG) to Arduino (Digital pin 9).

5- Connect Arduino Uno to your Computer using USB cable.

Step 3: Coding

Picture of Coding

There are two code files attached in this step :
The first one for Arduino and the other of MATLAB.

for Arduino code :
you don't need to modify it , just upload it on Arduino.

for MATLAB code :
you need to modify line 28 ( s1 = serial('COM12'); )
to your new com port # .

NOTE : Before closing MATLAB, close the serial port by writing "s1.close()" in MATLAB workspace.

Comments

AkshayA44 (author)2017-07-02

i want to do that using python. can uh pls help me?

enriqueibarrasilva (author)2017-05-09

Hi, i'd like to know, how can include two ultrasonic sensors in the program?

I'm using the matlab one btw

thebookthief01 (author)2017-04-03

Can you make the radar sensor thing screen show up with Arduino? I've tried uploading the Arduino code to my Arduino Uno, but am not sure how you view the radar using Arduino. I have also tried looking at the Arduino serial monitor.

AkonW (author)Lintang_Wisesa2017-03-26

project in matlab I do not work properly you can help me...?

if you could e-mail me oke litang akonwandy@gmail.com
AkonW (author)Lintang_Wisesa2017-03-26

if you can help me in the face a small problem in matlab...?

sukeshr (author)2015-10-29

I WANT TO USE HCSR04

PLEASE HELP ME IN CONNECTING WITH ARDUINO

MrinalS (author)sukeshr2016-12-21

need it yet?

MinhN55 (author)sukeshr2016-04-24

I also want. You've done it yet?

RaheelZ2 (author)2016-10-22

hello.where is the coding for visual?

dannybarh (author)2016-04-23

Hey,

Nice work there. I like to know if the rotation can be 360' and will it work as same. Can it calculate the distance of objects it pick up too?

NickS142 made it! (author)2016-04-16

Mines still very much work in progress. I am using rPi, got it working through Python and am now trying to port over to Mathematica.

Ill post updates as and when I get it working

KiyingiA (author)2016-04-14

how do i get the my computer to display the radar

Aditya Goyal (author)2016-04-05

hey, when i did the project seeing your site, there was a problem with the speed. the speed of my servo motor while rotating is toooooo slow. how would i solve this problem. please give me a correct suggestion because i need to do it for my science fair. hope for your fast response

lheise (author)2015-10-11

Hello, i have a mac, and how do i do to know what its my port#???

Thanks

bushan (author)lheise2016-03-13

can you tell me y proxy is needed

bushan (author)lheise2016-03-13

can you tell me y proxy is needed

bushan (author)lheise2016-03-13

can you tell me y proxy is needed

bushan (author)lheise2016-03-13

can you tell me y proxy is needed

bushan (author)lheise2016-03-13

can you tell me y proxy is needed

bushan (author)lheise2016-03-13

can you tell me y proxy is needed

bushan (author)lheise2016-03-13

can you tell me y proxy is needed

bushan (author)lheise2016-03-13

can you tell me y proxy is needed

sthaduru (author)2016-03-07

nice one

garrett.mortimer.35 (author)2015-09-08

how would you increase the range from 3 meters?

it depends on the range of the Ultrasonic sensor
you can use another type

Can i use sr04 instead?

ánhq2 (author)2015-12-31

very good

MajidW (author)2015-12-10

Is there any other option instead of MATLAB?

Can anyone please guide me to use the codes in an easier way?

My email is: emailtomajidwahab@gmail.com

Raphango (author)2015-11-02

Awesome project!

Can I use SCILAB instead of MATLAB? Is there any change needed?

ZakariyeA (author)2015-10-10

great project

i wanna know how do you installed ultrasonic

bondana1 (author)2015-09-15

excuse me, i want to ask about this part "Before closing MATLAB, close the serial port by writing "s1.close()" in MATLAB workspace."

honestly, i can't use matlab, but i want make this one, can you help me?
thanks

dstmartinmaker (author)2015-09-09

I live it. Great write up

bfarm (author)2015-09-09

Like the sensor from Aliens, "they're outside the door!"

tomatoskins (author)2015-09-08

So cool! Thanks for sharing!