Built to order

Ultrasonic Radar Scanner with Rotating Servo, Distance Heatmap and LCD Readout

This project builds a working radar-style scanner: an HC-SR04 ultrasonic sensor mounted on an SG90 servo sweeps 180°, and every distance reading is shown live on a 16×2 LCD with a heatmap row, while a companion Python script plots a radial heatmap on the PC over USB serial. It demonstrates embedded C, sensor interfacing, servo control and real-time display driving — all on a single Arduino UNO. Suitable for B.E./B.Tech final-year projects in Electronics and Telecommunication (E&TC).

Electronics / E&TC Arduino UnoHC-SR04 ultrasonic sensorSG90 micro servoBreadboard prototyping16x2 LCD · HD44780Arduino C++ · Arduino IDEPython 3 · pySerial · MatplotlibBuzzer alert · pushbutton UIHardware
Ultrasonic Radar Scanner with Rotating Servo, Distance Heatmap and LCD Readout — project thumbnail preview
More project photos (2)

The problem

Seeing how far away things are is one of the most useful things an embedded system can do — from parking sensors to obstacle-avoiding robots — yet students usually test an ultrasonic sensor by pointing it at a wall and reading numbers off the serial monitor. That teaches the sensor, but not the system. This project turns the HC-SR04 into a real instrument: the sensor rides on a servo that sweeps a full 180° arc, and every reading is mapped to its angle, displayed live on a 16×2 LCD as angle, distance and a scrolling heatmap row, and streamed to a PC that draws a radial heatmap of the scanned space. Building it forces the student to work through the genuine engineering of a scanning sensor — echo timing, servo settling, beam width, out-of-range handling and display driving — instead of treating the sensor as a black box. The result is a prototype that visibly "sees" a room, which makes both the demonstration and the viva far stronger than a static sensor demo.

SYSTEM FLOW

6 components 6 connections

Live flow
Drag to explore
100%
actuatorSG90 Servo

Steps the sensor through 0-180 degrees in 5-degree steps, pausing to settle at each angle.

Follow the working sequence

How it works

  1. At power-up the Arduino centers the servo at 90°, initializes the 16×2 LCD, and prints a ready screen; the sweep starts automatically.
  2. The servo horn rotates to the first step (0°) and pauses roughly 120 ms so the horn settles before the measurement.
  3. The HC-SR04 is triggered with a 10 µs pulse; it emits eight 40 kHz bursts and the echo pin stays HIGH for the round-trip time, which the Arduino measures with microsecond resolution and converts to centimetres (time ÷ 58.2).
  4. The reading is stored against its angle: valid echoes between 2 cm and 400 cm are kept, and timeouts are stored as "no echo" for that bin.
  5. The LCD updates immediately — line 1 shows the current angle and distance, while line 2 extends the heatmap row with a bar character sized for that bin.
  6. After the 37th reading the Arduino prints the complete angle,cm table over serial; the PC script redraws the radial heatmap, and the next sweep begins from 0°.

Tech stack:

  • Arduino UNO (ATmega328P)
  • HC-SR04 ultrasonic sensor
  • SG90 micro servo
  • 16×2 character LCD (HD44780)
  • Arduino IDE (C++)
  • Python 3 serial heatmap visualizer
  • pySerial, Matplotlib
  • Breadboard, jumper wires, piezo buzzer

Components & requirements

  • Arduino UNO board
  • HC-SR04 ultrasonic ranging module
  • SG90 180° micro servo with mounting horn
  • 16×2 LCD module (HD44780) with I2C backpack or direct 4-bit wiring
  • Piezo buzzer, pushbutton (start/stop), breadboard, jumper wires
  • USB cable and a computer with Arduino IDE 2.x and Python 3 (for the visualizer)
  • 5 V USB power; expected total draw under 500 mA
Parameter Value
Sensor ranging range 2–400 cm (HC-SR04 datasheet)
Sensor accuracy ~±3 mm typical (HC-SR04 datasheet; real-world results depend on surface, angle and temperature)
Ultrasonic beam angle ~15° (HC-SR04 datasheet)
Servo rotation 180° (standard SG90 variant)
Servo speed ~0.10 s / 60° at 4.8 V, no load (SG90 datasheet)
Servo torque ~1.8 kg·cm at 4.8 V (SG90 datasheet)
Angular step 5° default, configurable in firmware
Readings per sweep 37 (0–180° in 5° steps)
Full sweep time ~8–12 s expected (servo settle plus echo window)
Display 16×2 character LCD, HD44780 controller
Controller Arduino UNO (ATmega328P, 16 MHz)
Serial stream 9600 baud, angle,cm lines
Power 5 V via USB; expected draw under 500 mA

Project features

  • [180° Automatic Radar Sweep] The SG90 servo steps the HC-SR04 through 0–180° in 5° steps, triggering one ping per step; the Arduino converts each echo time to distance using the standard time/58.2 cm relation, producing 37 angle–distance readings per sweep.
  • [Live LCD Distance Readout] The 16×2 HD44780 LCD shows the current sweep angle and the measured distance in centimetres, updating with every reading so the scan is visible without a computer.
  • [On-LCD Sweep Heatmap] As the sweep progresses, the LCD's second row fills with a 16-column heatmap: each column is a custom bar-block character whose height represents the distance at that angle bin, so nearer objects appear as taller bars.
  • [PC Radial Heatmap Visualizer] The full sweep table is streamed over USB serial at 9600 baud; the included Python script plots it as a radial heatmap on the PC, giving a radar-screen view of the scanned area.
  • [Close-Range Alert Buzzer] A piezo buzzer sounds when any reading falls inside a configurable close-range threshold (default 30 cm), demonstrating threshold-based actuation on sensor data.
  • [Adjustable Scan Arc and Step Size] Scan range, step size and buzzer threshold are named constants at the top of the firmware — changing them is a one-line edit and re-upload.
  • [Echo-Timeout Handling] Echoes that never return (out of range, absorbed or scattered) are reported as "no echo" instead of junk distances, using the sensor's echo timeout.
  • [Single 5V Breadboard Build] The entire system — Arduino UNO, sensor, servo, LCD and buzzer — runs from one shared breadboard and USB power in the standard build, with no external supply needed.

What is included

  • Assembled and working prototype (Arduino UNO, HC-SR04 on SG90, 16×2 LCD, buzzer, breadboard wiring)
  • Arduino firmware source (.ino) with commented constants for scan arc, step size and buzzer threshold
  • Python PC heatmap visualizer script with serial reading and radial plot
  • Wiring/circuit diagram and complete component list
  • Calibration procedure document (temperature compensation, zero-offset check)
  • Project report PDF (10 sections), PPT presentation and viva Q&A document
  • Demonstration guidance for the final review

Delivery & support

  • Delivery information: the prototype is built to order; typical build and testing lead time is communicated at the quotation stage along with courier details for the assembled unit.
  • Support and explanation: build walkthrough over a video call, help with Arduino IDE setup and the Python visualizer, and viva preparation support are included with the order.

Limitations & prerequisites

  • The HC-SR04 has a blind zone below ~2 cm — targets closer than this cannot be ranged (datasheet minimum).
  • Soft or absorbent surfaces (cloth, foam, curtains) and steeply angled surfaces scatter the echo; the scanner reports "no echo" for those bins rather than a wrong distance.
  • The ~15° beam merges targets that fall inside one beam width at a given range — two close objects at the same distance read as one.
  • The SG90 is a hobby servo with visible positioning play; 5° steps are the practical resolution, and degree-level pointing accuracy is not claimed.
  • Distance is computed with the speed of sound at ~20°C; a ±10°C air-temperature shift changes results by roughly 2% (expected) — the calibration procedure covers compensation.
  • A full sweep takes ~8–12 s (expected), so the heatmap is a slow scan, not a real-time tracker for fast-moving objects.
  • This is an academic prototype and measuring aid, not a certified distance-measurement instrument.

Frequently Asked Questions

Which controller and sensor are used, and why?

An Arduino UNO drives the system and an HC-SR04 provides ranging on an SG90 servo. This combination keeps the build affordable and well-documented, and each part maps cleanly to viva topics: embedded C, ultrasonic time-of-flight, and PWM servo control.

How is the heatmap displayed?

Two ways. The LCD's second row draws a 16-column bar heatmap as the sweep runs, and the included Python script plots the streamed sweep table as a radial heatmap on the PC. Both come from the same angle–distance data.

Is the ranging accuracy guaranteed?

No. The ±3 mm figure is the sensor datasheet's typical value; real readings depend on target surface, angle and air temperature. The build ships with a calibration procedure so you can verify and document your own figures honestly.

Can the scan angle, step size or alert distance be changed?

Yes — scan arc, step size and the 30 cm buzzer threshold are named constants at the top of the firmware. A wider-range or finer-step variant, a different servo, or GSM/Bluetooth alerts can be quoted as customizations.

What power supply does it need?

The standard build runs entirely from USB 5 V power with an expected draw under 500 mA, so a laptop port or phone charger is enough. A standalone wall adapter or battery pack can be arranged as a customization.

Is this project suitable for a final-year project?

Yes — for Electronics and Telecommunication (E&TC) and related Electronics programs. It demonstrates sensor interfacing, actuator control, embedded C programming, display driving and serial data visualization, all in one demonstrable build. Suitable for B.E./B.Tech final-year projects in Electronics and Telecommunication (E&TC).

Components & software requirements
  • Arduino UNO (ATmega328P)
  • HC-SR04 ultrasonic sensor
  • SG90 micro servo
  • 16×2 character LCD (HD44780)
  • Arduino IDE (C++)
  • Python 3 serial heatmap visualizer
  • pySerial, Matplotlib
  • Breadboard, jumper wires, piezo buzzer

Components & requirements

  • Arduino UNO board
  • HC-SR04 ultrasonic ranging module
  • SG90 180° micro servo with mounting horn
  • 16×2 LCD module (HD44780) with I2C backpack or direct 4-bit wiring
  • Piezo buzzer, pushbutton (start/stop), breadboard, jumper wires
  • USB cable and a computer with Arduino IDE 2.x and Python 3 (for the visualizer)
  • 5 V USB power; expected total draw under 500 mA
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.

Download free synopsis (PDF)

Enter your name and email — the synopsis PDF downloads immediately. We may send occasional project updates; no spam, unsubscribe anytime.

Get a quotation