Build Radar System with Arduino Uno and Ultrasonic Sensor.

Sanyukta Suman
3 min readNov 14, 2020
Photo by Moe Mvp on Unsplash

Have you ever wondered how ships or submarine detects object underwater?

In general sonar and cameras are two typical sensors widely used for underwater object detection. In this project we will only talk about sonar sensors. Sonar, short for Sound Navigation and Ranging, is helpful for exploring and mapping the ocean because sound waves travel farther in the water than light waves.

What is radar system?

RADAR system is an object detection or tracking system that uses radio waves to calculate or track the distance, height, direction, or speed of objects.

About ultrasonic sensor

For this project we are using Ultrasonic Sensor — HC-SR04. HC-SR04 transmits the sound waves at 40KHz. Those sound waves hit the object and come back and the receiver of HC-SR04 gives you the total time taken by the sound waves from transmitter to reach the receiver.

Working principle of Ultrasonic sensor

Things used in this project-

Hardware Component:

Hardware components for radar system.

Software needed:

  1. Arduino IDE
  2. Processing IDE

Connection

Follow the diagram for the connection:

Cable connection for radar system using Arduino Uno and Ultrasonic Sensor

Arduino Code:

Processing code:

Before using this IDE, we have to configure the font.

Go to tools →create Font. Select “ArialNarrow” from the list, choose the font size 20 and click OK.

Once the Arduino is connected with the computer, look for the port number in Arduino IDE. Go to tools → Port → check the port number of Arduino Uno, Put the COM port number in line 13 of processing code. In my case arduino port in COM4.

Arduino Uno port configuration.

Finally, the Run button in the processing IDE will prompt the processing window. It will show both the servo angle of the radar and the distance of the object. That is it, you have a radar system!

Conclusion

Following video shows the result of the monitor screen of Processing IDE. In our design when the sensor rotates through the area and detects obstacle in the way. The red area indicates the presence of obstacle and below the angle of incident and distance is being displayed.

References

S. Hameed, N. J. D. Rashid and F. Shoaib, “Arduino based radar system,” 3C Tecnología. Glosas de innovación aplicadas a la pyme, no. Special Issue on Recent Trends in Computer Science and Electronics, pp. 157–166, 2019.

https://www.instructables.com/Arduino-Radar-1. (Thank you for sharing).

--

--

Sanyukta Suman

Engineer + Loves Computer Vision, ML, Programming, Robotics and Technology. https://sanyuktasuman.com.np