How to Make an Ultrasonic Reverse Parking Sensor System Using Arduino, Buzzer, and LCD

Meta Description: Learn how to build an ultrasonic reverse parking sensor using Arduino, HC-SR04 sensor, buzzer and LCD. Follow the circuit connections, programming code and step-by-step construction guide.

1. Introduction

Parking a vehicle in a limited space can be challenging, particularly when reversing towards walls, other vehicles or obstacles. Drivers may sometimes struggle to estimate the distance between the rear of their vehicle and nearby objects.

An Ultrasonic Reverse Parking Sensor System Using Arduino, Buzzer, and LCD is an electronic project designed to assist drivers during reversing.

The system uses an HC-SR04 ultrasonic sensor to detect obstacles behind a vehicle. An Arduino Uno processes the distance measurements and provides feedback through a buzzer and an LCD display.

As the vehicle approaches an obstacle, the buzzer produces increasingly frequent warning sounds. The LCD simultaneously displays the measured distance, helping the driver estimate how much space remains.

This project demonstrates the practical application of ultrasonic sensing, microcontroller programming and electronic warning systems in automotive technology.

HC-SR04 Arduino Parking Alert with LCD & Buzzer — Tutorial | SolderHub

2. Objectives of the Project

The main objectives are:

  • To design an ultrasonic parking assistance system using Arduino.
  • To measure the distance between a vehicle and nearby obstacles.
  • To display obstacle distance on an LCD screen.
  • To generate audible warning signals using a buzzer.
  • To increase warning frequency as the vehicle approaches an obstacle.
  • To improve parking awareness and reduce accidental collisions.
  • To demonstrate the use of sensors in automotive applications.

3. Components and Materials Required

The following components are required to construct the project.

No.ComponentQuantityPurpose
1Arduino Uno1Main microcontroller
2HC-SR04 ultrasonic sensor1Detects obstacles
316×2 LCD with I2C module1Displays distance
4Active buzzer1Produces warning sounds
5220 Ω resistor1Optional current limiting
6Breadboard1Circuit assembly
7Jumper wiresAs neededElectrical connections
8USB cable1Programming and power
9Cardboard or model vehicle1Demonstration structure
105V power supply1Powers the circuit

4. Understanding the Main Components

A. Arduino Uno

![ARDUINO® Uno Rev3

    – Robot Pi Shop](https://images.openai.com/static-rsc-4/-VZiTTzES99mwibSZu3wDQe-H0lb8Rw3rrhCg-BxKaGsrqwfMa4W5QMP_N-a1Z1EuqOy6a1u5TKuj03hFxkMPljcZZ9Ryc4Y25fceDWv6n22olP4QrPaNIiMPVlWudEAFHgvBldW08zps0YNGH6wD0JSWA2rrluNl3mZlWivGVwLsfIjQ0haHySUDbaOF3Sr?purpose=fullsize)

The Arduino Uno is the main controller of the system. It receives distance information from the ultrasonic sensor, processes the measurements and controls the LCD and buzzer.

B. HC-SR04 Ultrasonic Sensor

HC-SR04 Ultrasonic Module Distance Sensor | Ultrasonic Distance Sensor | Rapid Robotics Australia

The HC-SR04 measures the distance between the sensor and an obstacle using ultrasonic sound waves. It has four pins: VCC, TRIG, ECHO and GND.

C. 16×2 LCD Display with I2C

16x2 (1602) LCD Display + I2C Interface | Australia – Zaitronics

The LCD displays the measured distance in centimetres and provides parking instructions such as SAFE, CAUTION and STOP.

D. Buzzer

Active Buzzer (5V)– JvZ Digital Sourcing

The buzzer produces audible warning signals. Its beeping frequency increases as the distance between the vehicle and obstacle decreases.

5. Circuit Diagram and Arduino Connections

The circuit connects the HC-SR04 ultrasonic sensor, LCD display and buzzer to the Arduino Uno.

MEMBUAT SENSOR PARKIR DENGAN SENSOR ULTRASONIK BERBASIS ARDUINO - DAVINVO

Pin connection table

ComponentPinArduino Uno
HC-SR04VCC5V
HC-SR04GNDGND
HC-SR04TRIGDigital 9
HC-SR04ECHODigital 10
LCD I2CVCC5V
LCD I2CGNDGND
LCD I2CSDAA4
LCD I2CSCLA5
Active buzzerPositive (+)Digital 8
Active buzzerNegative (-)GND

Important: All components must share a common GND connection. Check the buzzer’s voltage and current requirements before connecting it directly to an Arduino output. Use a transistor driver if it exceeds the pin’s safe output capability.

6. Step-by-Step Project Construction

Follow these steps to assemble the ultrasonic reverse parking sensor.

Step 1: Prepare the Arduino Uno

Place the Arduino Uno on a breadboard or mounting surface. Connect it to a computer using a USB cable.

Step 2: Connect the ultrasonic sensor

Connect the HC-SR04 VCC to 5V and GND to GND. Connect TRIG to digital pin 9 and ECHO to digital pin 10.

Step 3: Connect the LCD display

Connect the LCD I2C module’s VCC and GND to the Arduino power supply. Connect SDA to A4 and SCL to A5.

Step 4: Connect the buzzer

Connect the positive terminal of the active buzzer to digital pin 8 and its negative terminal to GND.

Step 5: Assemble the circuit

Check all connections carefully, ensuring that the sensor faces the direction in which obstacles will be detected.

Step 6: Upload the Arduino program

Open Arduino IDE, enter the program provided below and upload it to the Arduino Uno.

Step 7: Test the system

Place an object in front of the ultrasonic sensor and gradually move it closer. Observe the LCD readings and listen to the buzzer warning sounds.

Circuit design Ultrasonic sensor i2c display with buzzer trigger - Tinkercad

7. Arduino IDE Programming Code

The following program measures the distance to an obstacle, displays the result on the LCD and controls the buzzer according to the measured distance.

Required Arduino library

Install the following library using Arduino IDE Library Manager:

– LiquidCrystal_I2C

The example uses the common LCD I2C address 0x27. Some modules use 0x3F; change the address if necessary.


#include <Wire.h>
#include <LiquidCrystal_I2C.h>

// LCD address and dimensions
LiquidCrystal_I2C lcd(0x27, 16, 2);

// Ultrasonic sensor pins
const int trigPin = 9;
const int echoPin = 10;

// Buzzer pin
const int buzzerPin = 8;

float distance;
long duration;

// Buzzer timing variables
unsigned long previousBeep = 0;
const unsigned long beepDuration = 100;

void setup() {

  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
  pinMode(buzzerPin, OUTPUT);

  Serial.begin(9600);

  lcd.init();
  lcd.backlight();

  lcd.setCursor(0, 0);
  lcd.print("Reverse Parking");

  lcd.setCursor(0, 1);
  lcd.print("System Ready");

  delay(2000);
  lcd.clear();
}

void loop() {

  // Send ultrasonic pulse
  digitalWrite(trigPin, LOW);
  delayMicroseconds(2);

  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);

  digitalWrite(trigPin, LOW);

  // Measure reflected pulse
  duration = pulseIn(echoPin, HIGH, 30000);

  if (duration == 0) {

    noTone(buzzerPin);

    lcd.setCursor(0, 0);
    lcd.print("No Object Found ");

    lcd.setCursor(0, 1);
    lcd.print("Check Sensor    ");

    delay(200);
    return;
  }

  // Calculate distance in centimetres
  distance = duration * 0.0343 / 2.0;

  // Display distance
  lcd.setCursor(0, 0);
  lcd.print("Distance: ");
  lcd.print(distance, 1);
  lcd.print(" cm   ");

  Serial.print("Distance: ");
  Serial.print(distance);
  Serial.println(" cm");

  unsigned long currentTime = millis();

  // More frequent warnings as obstacle approaches
  if (distance > 100) {

    noTone(buzzerPin);

    lcd.setCursor(0, 1);
    lcd.print("Status: SAFE    ");

  }

  else if (distance > 50) {

    lcd.setCursor(0, 1);
    lcd.print("Status: CAUTION ");

    if (currentTime - previousBeep >= 1000) {
      tone(buzzerPin, 2000);
      previousBeep = currentTime;
    }

    if (currentTime - previousBeep >= beepDuration) {
      noTone(buzzerPin);
    }

  }

  else if (distance > 20) {

    lcd.setCursor(0, 1);
    lcd.print("Status: WARNING ");

    if (currentTime - previousBeep >= 400) {
      tone(buzzerPin, 2500);
      previousBeep = currentTime;
    }

    if (currentTime - previousBeep >= beepDuration) {
      noTone(buzzerPin);
    }

  }

  else {

    lcd.setCursor(0, 1);
    lcd.print("STOP! TOO CLOSE ");

    tone(buzzerPin, 3000);
  }

  delay(50);
}

Explanation of the Arduino program

Code instructionFunction
LiquidCrystal_I2C lcd(0x27,16,2)Initializes the LCD
trigPin = 9Defines the ultrasonic trigger pin
echoPin = 10Defines the ultrasonic echo pin
buzzerPin = 8Defines the buzzer output
pulseIn()Measures the echo pulse duration
duration * 0.0343 / 2Calculates distance in centimetres
lcd.print()Displays information on the LCD
tone()Produces an audible warning
noTone()Stops the buzzer sound

Note: This is a beginner demonstration program. For a finished installation, improve the buzzer timing with a dedicated non-blocking beep controller, filter unstable distance readings and validate the sensor’s minimum and maximum operating range.

8. Understanding the Distance Measurement Formula

The ultrasonic sensor calculates the distance to an obstacle using the time taken by sound waves to travel to the obstacle and return.

The formula is:

d=\frac{v\times t}{2}

Where:

  • = Distance to the obstacle.
  • = Speed of sound in air (approximately 343 m/s).
  • = Time taken for the sound wave to travel to the obstacle and return.

For measurements in centimetres:

\boxed{d=\frac{t\times0.0343}{2}}

Example calculation

Suppose the ultrasonic sensor records a return time of 2,000 microseconds.

d=\frac{2000\times0.0343}{2}d=34.3\text{ cm}

The obstacle is approximately 34.3 cm away from the sensor.

Lekce 13 - Arduino - Měření vzdálenosti ultrasonickým modulem HC-SR04

9. Buzzer Warning Levels

The system uses different warning levels depending on the distance between the sensor and the obstacle.

DistanceLCD indicationBuzzer response
Above 100 cmSAFESilent
51–100 cmCAUTIONSlow beeping
21–50 cmWARNINGFaster beeping
20 cm or lessSTOP! TOO CLOSEContinuous sound
Radar Parking Distance Control (PDC) USA, Canada, Mexico, License Plate Frame Backup Camera with LED - BLACK

The warning levels can be adjusted depending on the vehicle, sensor mounting position and parking environment.

10. How the Reverse Parking Sensor System Works

The system operates through the following sequence:

  • The HC-SR04 sensor sends ultrasonic sound waves towards an obstacle.
  • The sound waves bounce off the obstacle and return to the sensor.
  • The sensor produces an Echo pulse corresponding to the travel time.
  • The Arduino calculates the distance using the measured pulse duration.
  • The LCD displays the distance in centimetres.
  • The Arduino compares the distance with programmed warning thresholds.
  • The buzzer produces warning sounds depending on how close the obstacle is.
How do parking sensors work? Radar and remote parking technology explained | CarExpert

11. Testing and Expected Results

After uploading the program, test the system using different objects placed at varying distances from the ultrasonic sensor.

TestObject distanceExpected response
1150 cmLCD displays SAFE
290 cmSlow buzzer beeps
340 cmFaster buzzer beeps
415 cmContinuous buzzer sound
5No detected echoLCD displays sensor warning

For the demonstration, use a cardboard box, wall or another flat object as the obstacle.

12. Applications of the Project

The Ultrasonic Reverse Parking Sensor System has several practical applications.

  • Vehicles: Assists drivers when reversing into parking spaces.
  • Residential garages: Helps prevent vehicles from hitting walls.
  • Parking facilities: Supports safer vehicle positioning.
  • Robotics: Helps robots detect nearby obstacles.
  • Industrial automation: Supports object detection and distance measurement.
  • STEM education: Demonstrates practical applications of sensors and microcontrollers.

13. Advantages of the System

  • Provides real-time distance measurements.
  • Produces audible warnings when obstacles are detected.
  • Displays distance information on an LCD.
  • Uses affordable and readily available electronic components.
  • Reduces dependence on visual distance estimation.
  • Can be modified for different parking environments.
  • Provides practical experience in Arduino programming and automation.

14. Possible Project Improvements

The basic system can be upgraded with additional components to improve its functionality.

Community | Schematik
후방 장애물 감지 및 LED 거리 표시 화면이 있는 차량 주차 레이더 시스템
Sensor De Ré : 7 Steps - Instructables
ESP32 With Ultrasonic Sensor : 8 Steps - Instructables
Hướng dẫn chi tiết cách lắp cảm biến lùi ô tô ngay tại nhà
arduino car reverse parking alert system
LCD Display 22mm Sensor Diameter Radar Car Parking Sensors System
Real-Time Parking Availability with ESP32 – ECE 196
Parking Sensor Assistant - Hackster.io
2025 New Car Reversing Sensor, Auto Parking System Reversing Radar with Bibi Buzzer Alarm and 4 Sensors - Gray | Fruugo UK
Arduino - Ultrasonic Sensor With LED's and Buzzer : 5 Steps - Instructables
IoT Smart Parking System | Jose Edgar Hernandez

A. Multiple Ultrasonic Sensors

Additional sensors can be installed at different positions around the vehicle to detect obstacles on the left, right and centre.

B. LED Distance Indicator

Red, yellow and green LEDs can be integrated to provide visual warnings alongside the buzzer.

C. Wireless Monitoring

An ESP32 or ESP8266 can be added to transmit distance measurements to a smartphone or web dashboard.

D. Automatic Camera Integration

A rear-view camera can be integrated to provide visual assistance while reversing.

E. Adjustable Warning Levels

The system can be programmed with adjustable distance thresholds to suit different vehicle sizes and parking conditions.

15. Troubleshooting Common Arduino Upload Errors

ProblemPossible causeSolution
LCD displays nothingIncorrect I2C addressCheck whether address is 0x27 or 0x3F
LCD displays squaresLCD initialization problemCheck library and contrast adjustment
Sensor gives incorrect readingsIncorrect wiringCheck TRIG and ECHO connections
Buzzer does not soundIncorrect polarityCheck buzzer connections
Arduino fails to uploadWrong board or portSelect Arduino Uno and correct COM port
Distance readings fluctuateSensor reflections or unstable targetsFilter readings and reposition sensor

Important: This is an educational parking assistance prototype, not a certified vehicle safety device. The HC-SR04 can be affected by rain, dirt, angled surfaces, temperature and other environmental conditions. A real vehicle installation requires automotive-grade waterproof sensors, proper mounting, electrical protection and independent safety testing. Drivers should never rely on this prototype as a replacement for mirrors, cameras or direct observation.

16. Conclusion

The Ultrasonic Reverse Parking Sensor System Using Arduino, Buzzer, and LCD demonstrates how electronic sensors and microcontrollers can improve vehicle parking assistance.

By combining an HC-SR04 ultrasonic sensor with an Arduino Uno, the project measures the distance between a vehicle and nearby obstacles. The LCD displays the measured distance while the buzzer provides audible warnings as the vehicle approaches an object.

The project is affordable, practical and suitable for students interested in electronics, automotive technology, robotics and automation.

With further improvements such as multiple sensors, LED indicators, wireless monitoring and camera integration, the system can be developed into a more advanced smart parking assistance solution.

mbeva

Dominic Mbeva is a science teacher, experienced researcher, innovator, and creative technologist with expertise in STEM education, digital media, and scientific research. As a Kenya Science and Engineering Fair (KSEF) advisor and projects manager, he mentors young scientists, guiding them in developing award-winning innovations. He is also an IC Technorat, leading advancements in science and technology. Beyond education, Dominic is a skilled photographer and video editor, using visual storytelling to make science more engaging. His philosophy, “If you take care of minutes, hours will take care of themselves,” reflects his belief in consistent effort, strategic thinking, and innovation to drive success in both research and creativity.

Related Posts

How to Make a Smart River Water Level and Pollution Monitoring Boat / Buoy Using ESP32 and GPS

Meta Description: Learn how to build a smart river water level and pollution monitoring boat using ESP32, GPS and water quality sensors. Includes components, circuit connections, Arduino code and IoT…

Read more

How to build an automatic street light controller using Arduino and an LDR sensor.

Meta Description: Learn how to build an automatic street light controller using Arduino and an LDR sensor. Explore circuit connections, components, Arduino code and how the system works. 1. Introduction…

Read more

Leave a Reply

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