How To Make Ultrasonic Radar Project

Welcome to my collection of Arduino Projects. Even if you are just getting started with Arduino, you don’t have to worry about that. Each of the following DIY Arduino projects is covered with detailed step by step tutorial on how to do it yourself and includes circuit schematics, source codes and videos

This collection of Arduino Projects features:

  • Wireless control
  • Automation
  • Motors control
  • Robots
  • LEDs
  • and more.

Along with my DIY Arduino projects here you can also find project ideas backed up by my detailed Arduino tutorials for various sensors and modules. Using the comments section below, you can also suggest your ideas, as well as discuss anything related to these Arduino projects.

I will continuously update this article with all the different stuff that I make.

For this design, you just need two components along with an Arduino board, and that’s an ultrasonic sensor and small servo motor. The range of the radar can be adjusted to up to 4 meters with 180 degrees rotation.

Software Requirements :

The second most important part of this project is the software part, in the software part, we used two compilers Arduino IDE for instructional code and the second most important processing for display purpose.

ARDUINO CODE

int trigPin = 9;
int echoPin = 10;
int led = 7;


void setup() {
  Serial.begin(9600); 
   pinMode(led, OUTPUT);
   pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
  // put your setup code here, to run once:

}

void loop() {
  long duration, distance;
  digitalWrite(trigPin,HIGH);
  delayMicroseconds(1000);
  digitalWrite(trigPin, LOW);
  duration=pulseIn(echoPin, HIGH);
  distance =(duration/2)/29.1;
  Serial.print(distance);
  Serial.println("CM");
  delay(10);
 
 if((distance<=10)) 
  {
    digitalWrite(led, HIGH);
}
   else if(distance>10)
 {
     digitalWrite(led, LOW);
   }
}
Hafeez Ullah Khan

About Hafeez Ullah Khan

ᴍᴀʀᴋᴇᴛɪɴɢ ꜱᴋɪʟʟꜱ | ᴅɪɢɪᴛᴀʟ ᴍᴀʀᴋᴇᴛɪɴɢ | ᴡᴇʙ ᴅᴇᴠᴇʟᴏᴘᴍᴇɴᴛ | Business ᴍᴏᴅᴇʟ | ꜱeᴏ ᴇxᴘeʀᴛ

View all posts by Hafeez Ullah Khan →

Leave a Reply

Your email address will not be published. Required fields are marked *