In this project, I will design a simple Arduino Car Reverse Parking Sensor Circuit using Arduino UNO and HC-SR04 Ultrasonic Sensor. This Arduino based Car Reverse Sensor can be used for an Autonomous Navigation, Robot Ranging, and other range related applications.


·      Overview of Arduino Car Reverse Parking Sensor

Parking a car in congested parking lots and tiny spaces is a tedious job and the important thing is that you must be very careful while reversing so that you do not damage the car (your car or the adjacent one).

Almost all modern cars are equipped with reverse parking sensors that is activated when the car is put in reverse gear and beep at variable rate depending on the distance between the car and the closest obstacle.

The Reverse Parking Sensors that are equipped in the car are basically Ultrasonic Proximity Sensors i.e. they use Ultrasonic Sensors to measure the distance between the car and the object and warn the driver if The car is too close.

In this project, I have built a simple prototype of a Car Reverse Parking Sensor with the help of Arduino UNO and the very famous HC-SR04 Ultrasonic Sensor.

                                       credit goes to the electronics hub

·      Circuit Diagram

The circuit diagram of the Arduino Car Reverse Parking Sensor circuit is given in the image below.



·      Components Required


·        Arduino UNO

·        HC-SR04 Ultrasonic Sensor 

·        BC548 NPN Transistor (any NPN Transistor can be used) 

·        5V Buzzer 

·        1N4007 PN Junction Diode 

·        1KΩ Resistor (1/4 Watt) 

·        Mini Breadboard 

·        Connecting Wires 

·        5V Power Supply 


·      Principle of the Circuit

As mentioned earlier, the Ultrasonic Sensor is the main unit (component) that is responsible for measuring the distance. Arduino UNO acts as the main controlling unit that will control the Ultrasonic Sensor, calculate the distance, and activate the buzzer.

The principle of the circuit is as follows: The Ultrasonic Sensor sends acoustic pulses and the Arduino measures the interval of each reflected signal. Based on this time interval, Arduino then calculates the distance of the object.

Arduino then activates the Buzzer if the distance between the sensor and object are less than a certain range.

·      Design of Arduino Car Reverse Parking Sensor Circuit

The design of the Arduino Car Reverse Parking Sensor Circuit is very simple. Starting with the Ultrasonic Sensor, it has 4 pins: VCC, TRIG, ECHO and GND.

The VCC and GND are connected to +5V and GND of the power supply while the TRIG and ECHO are connected to Digital I/O pins 11 and 10 of Arduino respectively.

Even though the buzzer used here is a 5V buzzer, I decided to use a driver circuit for the buzzer consisting of an NPN Transistor. I have used BC548 along with a 1KΩ Resistor (for the base) to drive the buzzer.


  • Arduino code


const int trigPin = 11;
const int echoPin = 10;
const int buzzPin = 6;

long duration;
float distance;

void setup() 
{
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT); 
  pinMode(buzzPin, OUTPUT);
}

void loop() 
{
  digitalWrite(trigPin, LOW);
  delayMicroseconds(2);
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);

  duration = pulseIn(echoPin, HIGH);
  distance = 0.034*(duration/2);

  if (distance < 100)
  {
    digitalWrite(buzzPin,HIGH);
  }
  else 
  {
    digitalWrite(buzzPin,LOW);
  }
  delay(300);
}

1 Comments

Post a Comment

Previous Post Next Post