The problem
Radar is one of those words students hear long before they understand — and a room-scale ultrasonic scanner is the most honest way to make it concrete. Real radar measures range by timing echoes; this project does exactly that with sound instead of radio waves. An HC-SR04 ultrasonic module rides on an SG90 servo that sweeps it across a 180-degree arc; at each step the Arduino measures echo time-of-flight, converts it to centimetres, and pushes angle-distance pairs over USB serial. A companion PC plot draws the classic radar sweep with blips where obstacles stand, while a small OLED on the rig shows live angle and distance for the bench demo. The physics is transparent and examinable: 40 kHz pulses, the speed of sound, beam width, and why soft or angled surfaces vanish from the plot. It is a first-principles sensing project with a genuinely satisfying visual payoff.
How it works
- The Arduino commands the SG90 servo to the next angle step in its 180° sweep pattern.
- After a short settle delay, it fires the HC-SR04 trigger pulse and times the returning echo with microsecond resolution.
- Echo time is converted to distance using the speed of sound (about 343 m/s at room temperature), with out-of-range echoes flagged.
- The angle-distance pair is shown on the OLED and transmitted over USB serial in CSV format.
- The PC plotting script converts each polar pair to Cartesian coordinates and paints the blip on the radar display.
- The sweep reverses at each end of the arc, producing the continuous back-and-forth scan, while the buzzer watches the warning radius.
Tech stack:
- Arduino Uno (ATmega328P)
- HC-SR04 ultrasonic sensor (40 kHz)
- SG90 micro servo (180°)
- OLED display (I2C, live readout)
- Buzzer for proximity alert
- USB serial link to PC
- Python radar-plot script (matplotlib/pygame-style polar display)
- Arduino IDE (C/C++ firmware)
| Parameter | Value |
|---|---|
| Controller | Arduino Uno (ATmega328P), 16 MHz |
| Sensor | HC-SR04, 40 kHz ultrasonic, datasheet range 2 cm–400 cm, ~15° beam width |
| Sweep | SG90 servo, 180° arc, configurable step (default 2°) and speed |
| Ranging method | Echo time-of-flight, microsecond timing, ~3 mm theoretical resolution |
| Display | OLED live angle/distance + PC polar radar plot over serial |
| Data format | CSV angle,distance lines at 115200 baud |
| Alert | Buzzer on obstacle within configurable radius (default 30 cm) |
| Power | 5 V USB; servo on separate supply rail recommended under load |
Project features
- [180-degree servo sweep] An SG90 servo steps the HC-SR04 through a 180° arc in configurable increments, giving full half-plane coverage from one fixed station.
- [Ultrasonic time-of-flight ranging] The HC-SR04 measures echo delay at each angle; the Arduino converts microseconds to centimetres using the speed of sound (datasheet range 2 cm–400 cm).
- [Live OLED readout] A small OLED shows the current sweep angle and measured distance in real time — the rig is demonstrable with no PC attached.
- [PC radar plot] A companion script reads the serial stream and draws a live polar radar display with sweep line and obstacle blips, the classic radar look.
- [Adjustable sweep parameters] Step size, sweep speed and dwell time are firmware constants, so the student can demonstrate the resolution-vs-speed tradeoff live.
- [Obstacle alert buzzer] When any reading falls inside a configurable warning radius, a buzzer sounds — a simple proximity-alarm behaviour on top of the scanner.
- [Serial data protocol] Angle-distance pairs stream as clean comma-separated lines, so the data can be logged or re-plotted in Excel/Python for the report.
What is included
- Working radar scanner rig (Arduino, HC-SR04 on SG90 mount, OLED, buzzer)
- Complete firmware source code (sweep control, ranging, serial protocol, OLED UI)
- PC radar-plot script with setup instructions
- Sweep-parameter tuning guide (resolution vs speed tradeoff)
- Circuit and wiring documentation
- Project report PDF (ultrasonic physics, time-of-flight math, servo control, test procedure)
- PPT presentation for final review
- Viva Q&A preparation document (echo timing, beam width, polar plotting, servo PWM)
- Setup and demonstration guide
Limitations & prerequisites
- This is ultrasonic sensing, not radio radar — the report states this clearly; the sweep visualisation borrows radar's display language, not its physics.
- The HC-SR04's ~15° beam and 400 cm datasheet ceiling bound the useful range; soft fabrics and sharply angled surfaces absorb or deflect echoes and read as absent.
- Distance accuracy depends on air temperature (speed of sound varies ~0.6 m/s per °C); the firmware uses a fixed constant, with temperature compensation noted as an extension.
- The SG90 is a hobby servo with limited torque and positional repeatability; scan geometry is approximate, not metrology-grade.
- The PC plot needs a computer with Python during the demo; the OLED covers standalone operation.
Frequently Asked Questions
Is this real radar?
It uses radar's core principle — measuring range by timing echoes — but with 40 kHz ultrasound instead of radio waves, so the honest name is an ultrasonic scanner with a radar-style display. The report states this distinction explicitly. The sweep visualisation is a genuine polar plot of real time-of-flight measurements, and the physics the examiner will probe — echo timing, beam width, surface reflectivity — is all real.
How far and how accurately does it see?
The HC-SR04 datasheet specifies 2 cm to 400 cm with roughly 3 mm theoretical resolution from microsecond echo timing. Practical accuracy depends on the target: hard flat surfaces facing the sensor read cleanly, while soft fabrics absorb sound and angled surfaces deflect the echo away. Air temperature also shifts the speed of sound, which the report quantifies.
What does the PC software do?
A Python script reads the comma-separated angle–distance stream over USB serial and draws a live polar display — sweep line, fading trail and obstacle blips, the classic radar look. Because the protocol is plain CSV at 115200 baud, the same data can be logged to a file and re-plotted in Excel or Python for analysis figures in the report.
Can it work without a PC?
Yes. The onboard OLED continuously shows the current sweep angle and measured distance, and the buzzer sounds whenever an obstacle enters the configurable warning radius. The rig is fully demonstrable standalone; the PC plot is the showpiece visualisation, not a requirement.
What are the main limitations?
It is ultrasonic sensing, not radio radar; the ~15° beam width and 4 m datasheet ceiling bound coverage; soft or angled surfaces can vanish from the plot; distance assumes a fixed speed of sound, so temperature shifts introduce error; and the hobby SG90 servo gives approximate rather than metrology-grade scan geometry.
Is this project suitable for a final-year project?
Yes — for Electronics, Mechatronics and Robotics programs. Ultrasonic time-of-flight physics, servo PWM control, polar-to-Cartesian plotting and a live serial data protocol give the examiner four independent technical threads to pull. The sweeping display also makes the demo instantly legible to any audience. Suitable for B.E./B.Tech final-year projects in Electronics, Mechatronics and Robotics.
Components & software requirements
- Arduino Uno (ATmega328P)
- HC-SR04 ultrasonic sensor (40 kHz)
- SG90 micro servo (180°)
- OLED display (I2C, live readout)
- Buzzer for proximity alert
- USB serial link to PC
- Python radar-plot script (matplotlib/pygame-style polar display)
- Arduino IDE (C/C++ firmware)
Delivery information
Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.
Support terms
Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.