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

Components :

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

Step 2: 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

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

author
AkshayA44 (author)2017-07-02

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

author
enriqueibarrasilva (author)2017-05-09

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

author

I'm using the matlab one btw

author
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.

author
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
author
AkonW (author)Lintang_Wisesa2017-03-26

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

author
sukeshr (author)2015-10-29

I WANT TO USE HCSR04

PLEASE HELP ME IN CONNECTING WITH ARDUINO

author
MrinalS (author)sukeshr2016-12-21

need it yet?

author
MinhN55 (author)sukeshr2016-04-24

I also want. You've done it yet?

author
RaheelZ2 (author)2016-10-22

hello.where is the coding for visual?

author
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?

author
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

20160416_214822.jpg
author
KiyingiA (author)2016-04-14

how do i get the my computer to display the radar

author
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

author
lheise (author)2015-10-11

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

Thanks

author
bushan (author)lheise2016-03-13

can you tell me y proxy is needed

author
bushan (author)lheise2016-03-13

can you tell me y proxy is needed

author
bushan (author)lheise2016-03-13

can you tell me y proxy is needed

author
bushan (author)lheise2016-03-13

can you tell me y proxy is needed

author
bushan (author)lheise2016-03-13

can you tell me y proxy is needed

author
bushan (author)lheise2016-03-13

can you tell me y proxy is needed

author
bushan (author)lheise2016-03-13

can you tell me y proxy is needed

author
bushan (author)lheise2016-03-13

can you tell me y proxy is needed

author
sthaduru (author)2016-03-07

nice one

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

how would you increase the range from 3 meters?

author

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

author

Can i use sr04 instead?

author
ánhq2 (author)2015-12-31

very good

author
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

author
Raphango (author)2015-11-02

Awesome project!

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

author
ZakariyeA (author)2015-10-10

great project

i wanna know how do you installed ultrasonic

author
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

author
dstmartinmaker (author)2015-09-09

I live it. Great write up

author
bfarm (author)2015-09-09

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

author
tomatoskins (author)2015-09-08

So cool! Thanks for sharing!