Arduino-based Ultrasonic Radar System via IOT


RADAR is an object-detection system which uses radio waves to determine the range, altitude, direction, or speed of objects. Radar systems come in a variety of sizes and have different performance specifications. Some radar systems are used for air-traffic control at airports, and others are used for long range surveillance and early-warning systems. A radar system is the heart of a missile guidance system. Small portable radar systems that can be maintained and operated by one person are available, as well as systems that occupy several large rooms.

Arduino-based Ultrasonic Radar System via IOT

Radar was secretly developed by several nations before and during World War II. The term RADAR itself, not the actual development, was coined in 1940 by the United States Navy as an acronym for Radio Detection and Ranging. The term radar has since entered English and other languages; as a common noun radar loses all capitalization.

The modern uses of radar are highly diverse, including:

  • Air traffic control
  • Aircraft anti-collision systems

High tech radar systems are associated with digital signal processing and are capable of extracting useful information from very high noise level.

Army, Navy and the Air Force make use of this technology. The use of such technology has been seen recently in the self-parking car systems launched by Audi, Ford, etc., and even the upcoming driverless cars by Google, like Prius and Lexus.

The project made by us can be used in any systems the customer may want to use like in a car, a bicycle or anything else. The use of Arduino [1] in the project provides even more flexibility of usage of the aforementioned module according to the requirements.

The idea of making an Ultrasonic RADAR came as a part of a study carried out on the working and mechanism of “Automobiles of Future”. Also, being students of EEE, we have always been curious about the latest ongoing technology in the world like Arduino, Raspberry Pi, Beagle-Bone boards, etc. Hence, this time we were able to get a hold of one of the Arduino boards, Arduino UNO R3. So, knowing about the power and vast processing capabilities of the Arduino, we thought of making it big and a day to day application specific module that can be used and configured easily at any place and by anyone.

Moreover, in this fast moving world there is an immense need for the tools that can be used for the betterment of the mankind rather than devastating their lives. Hence, we decided to make some of the changes and taking the advantage of the processing capabilities of Arduino [1], we decided to make up the module more application specific.

Hence, from the idea of the self driving cars came the idea of self-parking cars. The main problem of the people in India and even most of the countries is safety while driving. So, we came up with a solution to that by making use of this project to continuously scan the area for traffic, population, etc., as well as offer protection of the vehicles at the same time to prevent accidents or minor scratches to the vehicle

Now we are connecting them with the IOT to gain access wirelessly via the Internet and cloud storage.

Keywords: sonar + radar, ultrasonic, Arduino, processing, servo, 180 degree range, obstacle, IOT, cloud storage.


Introduction to Arduino

The Arduino is a microcontroller board based on the ATmega. It has 14 digital Input/Output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16MHz ceramic resonator, USB connection, a power jack, an ICSP header and a reset button. It contains everything needed to support the microcontroller; simply connect it to computer with a USB cable or power it with a AC-to-DC adapter or battery to get started. The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial driver chip. Instead, it features the Atmega16U2 programmed as a USB-to-serial converter.

Changes in Uno R3 [4]

1. Pin out: added SDA and SCL pins that are near to the AREF pin and two other new pins placed near to the reset pin, the IOREF that allow the shields to adapt to the voltage provided from the board. In future, shields will be compatible with both the board that uses the AVR, which operates with 5v and with the Arduino due that operates with 3.3v.

2. Stronger RESET circuit.

3. ATmega16U2 replace the 8U2.

“Uno” means one in Italian and is named to mark the upcoming release of Arduino 1.0. The Uno and version 1.0 will be the reference versions of Arduino, moving forward. The Uno is the latest in a series of USB Arduino boards, and the reference model for the Arduino platform; for a comparison with previous versions, see the index of Arduino Boards.

Microcontroller ATmega328 specifications

  • Operating Voltage: 5V
  • Input Voltage (recommended): 7-12V
  • Input Voltage (limits): 6-20V
  • Digital I/O Pins: 14 (of which 6 provide PWM output)
  • Analog Input Pins: 6
  • DC Current per I/O Pin: 40 mA
  • DC Current for 3.3V Pin: 50 mA
  • Flash Memory: 32 KB (of which 0.5 KB used by bootloader)
  • SRAM: 2 KB
  • EEPROM: 1 KB
  • Clock Speed: 16 MHz

AVR ATmega 328

The ATmega328 is a single chip micro-controller created by Atmel and belongs to the mega AVR series. The high-performance Atmel 8-bit AVR RISC-based microcontroller combines: 32 KB ISP flash memory with read-while-write capabilities; 1 KB EEPROM; 2 KB SRAM; 23 general purpose I/O lines; 32 general purpose working registers; three flexible timer/counters with compare modes; internal and external interrupts; serial programmable usart; a byte-oriented, 2-wire serial interface; spi serial-port; a 6-channel, 10-bit analog-to-digital converter (8 channels in tqfp and  qfn/mlf  packages); programmable watchdog timer with internal oscillator; and five software-selectable power saving modes. The device operates between 1.8-5.5 volts. By executing powerful instructions in a single clock cycle, the device achieves throughputs approaching 1 MIPS per MHz, balancing power consumption and processing speed.

Crystal Oscillator

A crystal oscillator is an electronic oscillator circuit that uses the mechanical resonance of a vibrating crystal of piezoelectric material to create an electrical signal with a very precise frequency. This frequency is commonly used to keep track of time (as in quartz wristwatches), to provide a stable clock signal for digital integrated circuits, and to stabilize frequencies for radio transmitters and receivers. The most common type of piezoelectric resonator used is the quartz crystal, so oscillator circuits incorporating them became known as crystal oscillators, but other piezoelectric materials including polycrystalline ceramics are used in similar circuits.

Quartz crystals are manufactured for frequencies from a few tens of kilohertz to hundreds of megahertz. More than two billion crystals are manufactured annually. Most are used for consumer devices such as wristwatches, clocks,radios, computers, and cell phones. Quartz crystals are also found inside test and measurement equipment, such as counters, signal generators, and oscilloscopes.

Servo Motor

A servomotor is a rotary actuator that allows for precise control of angular position, velocity and acceleration. It consists of a suitable motor coupled to a sensor for position feedback. It also requires a relatively sophisticated controller, often a dedicated module designed specifically for use with servomotors.

Servomotors are not a different class of motor, on the basis of fundamental operating principle, but uses servomechanism to achieve closed loop control with a generic open loop motor.

Servomotors are used in applications such as robotics, CNC machinery or automated manufacturing.

Voltage Regulator

A voltage regulator is an electrical regulator designed to automatically maintain a constant voltage level.

With the exception of shunt regulators, all modern electronic voltage regulators operate by comparing the actual output voltage to some internal fixed reference voltage. Any difference is amplified and used to control the regulation element. This forms a negative feedback servo control loop. If the output voltage is too low, the regulation element is commanded to produce a higher voltage

The 78XX series of three-terminal positive regulator are available in the TO-220/D-PAK package and with several fixed output voltages, making them useful in a wide range of applications. Each type employs internal current limiting, thermal shut down and safe operating area protection, making it essentially indestructible. If adequate heat sinking is provided, they can deliver over 1A output current. Although designed primarily as fixed voltage regulators, these devices can be used with external components to obtain adjustable voltages and currents. [6]

Ultrasonic Sensor

Ultrasonic sensors [7] (also known as transceivers when they both send and receive, but more generally called transducers) work on a principle similar to radar or sonar which evaluate attributes of a target by interpreting the echoes from radio or sound waves respectively. Ultrasonic sensors generate high frequency sound waves and evaluate the echo which is received back by the sensor. Sensors calculate the time interval between sending the signal and receiving the echo to determine the distance to an object.

This technology can be used for measuring wind speed and direction (anemometer), tank or channel level, and speed through air or water. For measuring speed or direction a device uses multiple detectors and calculates the speed from the relative distances to particulates in the air or water. To measure tank or channel level, the sensor measures the distance to the surface of the fluid. Further applications include: humidifiers, sonar, medical ultra sonography, burglar alarms and non-destructive testing.

Systems typically use a transducer which generates sound waves in the ultrasonic range, above 18,000 hertz, by turning electrical energy into sound, then upon receiving the echo turn the sound waves into electrical energy which can be measured and displayed.


Using the Arduino IDE

The Arduino integrated development environment (IDE) is a cross-platform application written in Java, and is derived from the IDE for the Processing programming language and the Wiring projects. It is designed to introduce programming to artists and other newcomers unfamiliar with software development. It includes a code editor with features such as syntax highlighting, brace matching, and automatic indentation, and is also capable of compiling and uploading programs to the board with a single click. A program or code written for Arduino is called a “sketch”.

Arduino programs are written in or C++. The Arduino IDE comes with a software library called “Wiring” from the original Wiring project, which makes many common input/output operations much easier. Users only need define two functions to make a run able cyclic executive program:

  • Setup() : a function run once at the start of a program that can initialize settings
  • Loop() : a function called repeatedly until the board powers off.

Open the Arduino IDE software and select the board in use. To select the board:

  • Go to Tools.
  • Select Board.
  • Under board, select the board being used, in this case Arduino Uno.
  • Go to Tools and to Port and select the port at which the Arduino board is connected.

Write the code in the space provided and click on compile. Once the code is compiled, click on upload to upload the sketch to the Arduino board.

Using the Processing Software

Processing is an open source programming language and integrated development environment (IDE) built for the electronic arts, new media art,and visual design communities with the purpose of teaching the fundamentals of computer programming in a visual context, and to serve as the foundation for electronic sketchbooks. The project was initiated in 2001 by Casey Reas and Benjamin Fry, both formerly of the Aesthetics and Computation Group at the MIT Media Lab. One of the stated aims of Processing is to act as a tool to get non-programmers started with programming, through the instant gratification of visual feedback. The language builds on the Java language,but uses a simplified syntax and graphics programming model.


The idea of making an Ultrasonic RADAR appeared to us while viewing the technology used in defense, be it Army, Navy or Air Force and now even used in the automobiles employing features like automatic/driverless parking systems, accident prevention during driving, etc. The applications of such have been seen recently in the self-parking car systems launched by Audi, Ford, etc., and even the upcoming driverless cars by Google, like Prius and Lexus.

The project made by us can be used in any systems you may want to use like in a car, a bicycle or anything else. The use of Arduino in the project provides the flexibility of usage of the aforementioned module according to the requirements.

Ultrasonic radar system and tracking results:

Applications in Air Force

In aviation, aircraft are equipped with radar devices that warn of aircraft or other obstacles in or approaching their path, display weather information, and give accurate altitude readings. The first commercial device fitted to aircraft was a 1938 Bell Lab unit on some United Air Lines aircraft. Such aircraft can land in fog at airports equipped with radar-assisted ground-controlled approach systems in which the plane’s flight is observed on radar screens while operators radio landing directions to the pilot.

Naval Applications

Marine radars are used to measure the bearing and distance of ships to prevent collision with other ships, to navigate, and to fix their position at sea when within range of shore or other fixed references such as islands, buoys, and lightships. In port or in harbor, vessel traffic service radar systems are used to monitor and regulate ship movements in busy waters.

Applications in Army

Two video cameras automatically detect and track individuals walking anywhere near the system, within the range of a soccer field. Low-level radar beams are aimed at them and then reflected back to a computer, which analyzes the signals in a series of algorithms. It does this by comparing the radar return signal (which emits less than a cell phone) to an extensive library of “normal responses.” Those responses are modeled after people of all different shapes and sizes (SET got around to adding females in 2009). It then compares the signal to another set of “anomalous responses” – any anomaly, and horns go off. Literally, when the computer detects a threat, it shows a red symbol and sounds a horn. No threat and the symbol turns green, greeting the operators with a pleasant piano riff.

Meteorological Applications

Meteorologists [13] use radar to monitor precipitation and wind. It has become the primary tool for short-term weather forecasting and watching for severe weather such as thunderstorms, tornadoes, winter storms, precipitation types, etc. Geologists use specialized ground-penetrating radars to map the composition of Earth’s crust.

Final Project RADAR Screen


Source :  Arduino-based Ultrasonic Radar System via IOT

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:

Leave a Comment

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

Scroll to Top