Mini Radar With Arduino

by | Mar 29, 2023 | Arduino, Basic Coding, Coding

Home » Coding » Mini Radar With Arduino

Introduction of the Project

Are you fascinated by radar technology and want to build your own radar system? Look no further than this DIY mini radar with Arduino project! With just a few simple components and basic C++ coding skills, you can create a fully functioning radar system that detects objects in their range and displays their distance on a screen.

This project is perfect for electronics enthusiasts and beginners alike, as it provides a hands-on experience with both hardware and software development. So, roll up your sleeves and get ready to build your very own mini radar system with Arduino!



To build this Arduino Project, we will use a PIR sensor to sense any object’s motion in the sea and accordingly print the distance as text on the LCD screen. The following are the components required to build this Arduino project.


Circuit Diagram

Steps To Create A Mini Radar With Arduino

Step 1: Assemble all the components mentioned above on the Digital Board or Physical Table.

Step 2: Place the resistor in BreadBoard.

PIR Sensor:

Step 3: Connect the Power terminal of the PIR sensor to the 5V pin of the Arduino.

Step 4: Connect the Ground terminal of the PIR sensor to the Ground (GND) pin of the Arduino.

Step 5: Connect the Signal pin of the PIR sensor to the 9-number pin of the Arduino.


Step 6: Connect the Power and the anode terminal of the LCD to the 5V pin of the Arduino.

Step 7: Connect the Ground, Contrast, and Read/Write and cathode terminals of the LCD to the Ground (GND) pin of the Arduino, as shown in the circuit.

Step 8: Register Select, Enable, & DB4 to DB7 pins of the LCD are connected to the 2 to 7 number pins of the Arduino, respectively, as shown in the figure.

Source Code

#include <LiquidCrystal.h>
LiquidCrystal lcd(2, 3, 4, 5, 6, 7);
int status = 0;
void setup()
pinMode(9, INPUT);
void loop()
status = digitalRead(9);

if(status == 1)
lcd.setCursor(0, 0);
lcd.print(" Object detected ");
lcd.setCursor(0, 0);
lcd.print(" Way is secured ");

Explanation of the Code

1. At the beginning, we have included a header file for LCD.

2. After it, we initialized arrays and variables that will be required in the function.

3. Then, we declared the LCD in the setup function as having 2 rows and 16 columns.

4. Next step is to configure the pin mode for input purposes and begin the serial connection with 9600 bits per second.

5. After that, in the loop function, we are reading the value from pin number 9 and store its value in the status variable. After it, we use the if statement to print the respective text on the LCD wrt the status variable’s value.

6. We have used the following functions for displaying the result on the LCD.

  • lcd.clear(): This will help to clear the screen of the LCD.
  • lcd.print(): This prints the text on the LCD,
  • lcd.setCursor(): This helps to set the cursor in the LCD.
  • The delay function takes time in milliseconds, using which the candidate will be given 5 seconds of time to answer each question.


Mini Radar with Arduino

On starting the simulation, we will be able to see the display in LCD w.r.t whether any object is detected or the way is safe to travel.

Points To Remember

Here are some points to remember when building a simple DIY Mini Radar with Arduino:

  • Gather materials: You will need an Arduino board, a PIR sensor, a breadboard, wires, and a laptop or computer.
  • Set up the Arduino board: Connect the board to the laptop or computer, and download the Arduino software. Create a new project, and include the servo and ultrasonic sensor libraries.
  • Build the hardware: Connect the PIR sensor to the breadboard, and then connect them to the Arduino board using wires.
  • Write the code: Write the code to control the PIR sensor and display the distance on the screen. You can find sample code online or create your own code from scratch.
  • Test the system: Once you have completed the hardware and coding, test the system by moving objects in front of the sensor and observing the readings on the screen.
  • Fine-tune the system: If necessary, adjust the code and hardware to improve the accuracy and reliability of the radar system.
  • Enclose the system: Finally, enclose the system in a case or housing to protect it from damage and make it easier to use.

Remember to follow safety guidelines when working on physical projects with electronics and to consult online resources and tutorials for more detailed instructions and guidance. With some patience and practice, you can successfully build your own mini radar system with Arduino.


More Arduino Projects>>>

You May Also Like To Create…