0% found this document useful (0 votes)
32 views6 pages

Arduino Radar 1

This document provides instructions to build an Arduino radar using an ultrasonic sensor and servo motor. It details the components needed, which include an Arduino board, servo motor, ultrasonic sensor, breadboard, and jumper wires. It then lists the 8 steps to assemble the radar, attaching the components, connecting wires, and providing the Arduino and Processing code to read distances detected by the sensor.

Uploaded by

Quick Silver
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views6 pages

Arduino Radar 1

This document provides instructions to build an Arduino radar using an ultrasonic sensor and servo motor. It details the components needed, which include an Arduino board, servo motor, ultrasonic sensor, breadboard, and jumper wires. It then lists the 8 steps to assemble the radar, attaching the components, connecting wires, and providing the Arduino and Processing code to read distances detected by the sensor.

Uploaded by

Quick Silver
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

instructables

Arduino Radar

by JohnM1579

In this tutorial, we will learn how to make a cool looking Arduino Radar using ultrasonic sensor. Arduino radar
allows you to detect objects within a short range. This project is easy and fun to make, obviously. You can use this
project for showcasing in school science fair. I have added the video to help making this radar easily. Lets start
making it…..

Overview
To make this radar we need three basic components. First one is the Arduino which processes the data sent by
the sonar sensor. Sonar sensor has a transmitter which produces and transmits ultrasonic sound wave which later
is received by the receiver after reflecting from any object. However, servo motor is the third component which
revolves with in a particular degree and helps the radar to detect objects.

Components
The listed components are needed to make a arduino radar using ultrasonic sensor.

1. Arduino Board (i have used arduino Uno)


2. Servo motor (mg-996)
3. HC-SR04 Ultrasonic sensor
4. Bread board
5. Jumper wires

https://www.youtube.com/watch?v=b7Xnjc7lT0U

Step 1:

First of all, we have to cut a card board (15cm * 8cm). Then, glue arduino and servo motor on it.

Arduino Radar: Page 1


Step 2:

Now, we have to make a “L” shape stand for Ultrasonic sensor (HC-SR04) which keeps it still on the servo motor.

Step 3:

Now, we have to connect sonar sensor to arduino. Be careful while connecting VCC and GND of the sensor to 5v
and GND of arduino respectively. Later, connect the trig pin to 8 and echo pin to 9 of arduino.

Arduino Radar: Page 2


Step 4:

After connecting sensor to arduino it’s time to attach servo motor with it. Again, be cautious about connecting VCC
and GND of servomotor. Connect servo signal to pin 10 of arduino.

Step 5: Required Software for Arduino Radar:

You will need arduino IDE and Processing IDE to run Arduino IDE: https://www.arduino.cc/en/main/softwar
this radar e
project. Processing IDE will get the values sent from
arduino and illustrate the object area (red marked).
Follow the links to download them.

Processing IDE: https://processing.org/download/sup


port.html

Step 6: Arduino Code:

Arduino Radar: Page 3


#includeconst int TriggerPin = 8; Serial.begin(9600);

const int EchoPin = 9; }

const int motorSignalPin = 10; void loop(void)


const int startingAngle = 90;
{ static int motorAngle = startingAngle;
const int minimumAngle = 6;
static int motorRotateAmount = rotationSpeed;
const int maximumAngle = 175;
motor.write(motorAngle);
const int rotationSpeed = 1;
delay(10);
Servo motor;
SerialOutput(motorAngle, CalculateDistance());
void setup(void)
motorAngle += motorRotateAmount;
{ pinMode(TriggerPin, OUTPUT);
if(motorAngle <= minimumAngle || motorAngle >=
pinMode(EchoPin, INPUT); maximumAngle) { motorRotateAmount = -
motorRotateAmount;
motor.attach(motorSignalPin);

}} void SerialOutput(const int angle, const int distance)

int CalculateDistance(void) {

{ digitalWrite(TriggerPin, HIGH); String angleString = String(angle);

delayMicroseconds(10); String distanceString = String(distance);

digitalWrite(TriggerPin, LOW); Serial.println(angleString + "," + distanceString);

long duration = pulseIn(EchoPin, HIGH); }

float distance = duration * 0.017F;

return int(distance);

Arduino Radar: Page 4


Step 7: Processing IDE:

We can easily locate any object within the range (40 cm) by using processing IDE. If you don’t have the IDE on
your pc just download it.
Before using this IDE, we have to configure the font.

For this, we have to install “OCRAEXT.TTF” file which is located in Radar.zip .

Then, go to tools/create Font. Select “OCRAExtended” from the list, choose font size 25 and click OK.

Step 8:

Now, we have to find the COM Port number. Go to Arduino IDE and find the Com port(COM3 in photo). Put the
COM port number in line 13 of processing code (COM3 in photo).

Arduino Radar: Page 5


Step 9: Final

Finally, pressing the Run button will show a processing window. It will show both servo angle of the radar and the
object distance.

Follow our Blog to learn more interesting projects.... https://aboutsciences.com

You can download the Radar.zip file from here,

Download
https://www.instructables.com/ORIG/F8F/J3PJ/JYWVNNPS/F8FJ3PJJYWVNNPS.zip

Ok I found the file correct in https://aboutsciences.com/blog/arduino-radar-using-ultrasonic-sensor-


diy-cheapest-project/, please correct this .

Arduino Radar: Page 6

You might also like