Ultrasonic Radar System Using Arduino
Abstract
In this project, an ultrasonic radar system is developed using an Arduino, a servo motor, a TFT LCD, an alphanumeric LCD, and an ultrasonic sensor. The system is designed to detect objects within a 20 cm range and display their distance and angle. The TFT LCD provides a radar scanning effect, while the alphanumeric LCD shows the distance and angle of the detected object. If no object is detected within the range, the system displays “Object Not Found” on the alphanumeric LCD. This report provides an in-depth analysis of the hardware and software implementation of the system, its working principle, and its potential applications.
Introduction
Radar technology is widely used for detecting and tracking objects in various fields, such as defense, security, and automation. This project replicates the working of radar using an ultrasonic sensor and Arduino. The objective is to scan an area within a 20 cm range and determine the presence of an object, its distance, and the angle at which it is detected. The scanning effect is visually represented on a TFT LCD, providing an intuitive understanding of the detected object’s position.
The system is beneficial for short-range applications such as obstacle detection in robotics, proximity sensing, and automated security systems. The key advantage of using an ultrasonic sensor is its cost-effectiveness and reliability in measuring distance accurately.
Components Used
1. Arduino Board
The Arduino microcontroller serves as the brain of the system, processing input signals from the ultrasonic sensor and controlling the servo motor and display modules.
2. Ultrasonic Sensor (HC-SR04)
This sensor is used to measure the distance of an object by emitting ultrasonic waves and measuring the time taken for the waves to return after hitting an object.
3. Servo Motor
A servo motor is used to rotate the ultrasonic sensor in a scanning motion, covering a wide detection area.
4. TFT LCD
The TFT LCD screen is used to create a visual radar-like scanning effect, helping users easily interpret object detection results.
5. Alphanumeric LCD
This display is used to show the exact distance of the detected object and the angle at which it is located.
6. Power Supply
The entire system is powered using a 5V power supply, typically provided by a battery or USB connection.
Working Principle
The ultrasonic radar system works on the following principle:
- The ultrasonic sensor emits an ultrasonic pulse.
- The pulse travels through the air and reflects when it encounters an object.
- The sensor calculates the time taken for the pulse to return and determines the distance using the formula:
- The servo motor continuously moves the ultrasonic sensor from 0° to 180°.
- As the servo motor moves, the sensor keeps sending distance data.
- The TFT LCD displays a real-time radar-like scanning effect, showing detected objects as blips.
- The alphanumeric LCD displays the detected object’s distance and the angle at which it was found.
- If no object is detected within 20 cm, the alphanumeric LCD displays “Object Not Found.”
Implementation
1. Circuit Design
The components are connected as follows:
- The ultrasonic sensor is connected to the Arduino’s digital pins (Trigger and Echo pins).
- The servo motor is connected to a PWM-enabled pin on the Arduino.
- The TFT LCD is interfaced with the Arduino via SPI communication.
- The alphanumeric LCD is connected using an I2C module for efficient communication.
- A power source supplies 5V to all components.
2. Programming the Arduino
The Arduino is programmed using the Arduino IDE. The code consists of the following key functions:
- Servo control: The servo motor rotates in steps from 0° to 180° and then resets back.
- Ultrasonic sensing: The HC-SR04 sensor continuously sends pulses and calculates distances.
- LCD display updates: The TFT LCD updates the radar effect, and the alphanumeric LCD displays distance and angle values.
#include <Servo.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <Adafruit_GFX.h>
#include <Adafruit_TFTLCD.h>
#define TRIG_PIN 9
#define ECHO_PIN 10
Servo myServo;
LiquidCrystal_I2C lcd(0x27, 16, 2);
Adafruit_TFTLCD tft;
void setup() {
pinMode(TRIG_PIN, OUTPUT);
pinMode(ECHO_PIN, INPUT);
myServo.attach(6);
lcd.begin();
tft.begin();
tft.fillScreen(BLACK);
}
void loop() {
for (int angle = 0; angle <= 180; angle += 5) {
myServo.write(angle);
int distance = getDistance();
lcd.setCursor(0, 0);
if (distance > 0 && distance <= 20) {
lcd.print(“Obj @ “);
lcd.print(angle);
lcd.print(” Deg “);
lcd.setCursor(0, 1);
lcd.print(“Dist: “);
lcd.print(distance);
lcd.print(” cm”);
} else {
lcd.print(“Object Not Found”);
}
delay(200);
}
}
int getDistance() {
digitalWrite(TRIG_PIN, LOW);
delayMicroseconds(2);
digitalWrite(TRIG_PIN, HIGH);
delayMicroseconds(10);
digitalWrite(TRIG_PIN, LOW);
int duration = pulseIn(ECHO_PIN, HIGH);
return duration * 0.034 / 2;
}
Results and Observations
- The system successfully detects objects within a 20 cm range and displays their position on both the TFT and alphanumeric LCDs.
- The radar effect on the TFT LCD provides a clear visual representation of object locations.
- The alphanumeric LCD accurately displays the object’s angle and distance.
- The system is responsive, with minimal delay between scanning and displaying results.
Applications
- Obstacle detection for robots: This system can be used in autonomous robots to avoid obstacles.
- Security systems: The radar can be used in security applications to detect intruders.
- Proximity detection: It can be applied in industrial automation for detecting nearby objects.
Conclusion
The ultrasonic radar system using Arduino is an effective and low-cost solution for object detection within a short range. It provides real-time distance measurement and object localization using a servo motor-controlled ultrasonic sensor. The implementation of a TFT LCD enhances the usability by visually representing the scanning process. Future improvements can include increasing the detection range, integrating wireless communication, or using multiple sensors for enhanced coverage.
Future Scope
- Expanding the range beyond 20 cm by using higher-frequency sensors.
- Integrating wireless modules for remote monitoring.
- Implementing machine learning for object classification based on detected patterns.
This project provides a strong foundation for further developments in radar-based detection and automation systems.





Reviews
There are no reviews yet.