How many of you wanted to create your own Car reverse parking sensor system??
Introduction:-
Hi friends today I am going to explain how to create a car reverse parking system. This might be already seen in almost all the latest cars. It is coming with different models. This is a very simple project. Here I am going to show you how to create this thing in a very less expensive. For this project you require some simple electronics circuits. And you can finish the project within a couple of hours. This can be used as application level.
components required:-
1.LCD 16x2 display
2.Arduino microcontroller
3.Sonar Sensor-HC-SR04 module
4.Buzzer and LED
5.Breadboard
6.Connection wires
7. Potentiometer
Do the connection as shown in figure. Upload the codes shown bellow to the Arduino microcontroller.
Your project is ready now. Enjoy!! Show the working to your friends. And be a hero.
Program:-
// ----------------------------- -------------------------- --------------------
// Example NewPing library sketch that does a ping about 20 times per second.
// ----------------------------- -------------------------- --------------------
#include <NewPing.h>
#include <LiquidCrystal.h>
// Pin 13 has an LED connected on most Arduino boards.
int led = 13;
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
#define TRIGGER_PIN 8 // Arduino pin tied to trigger pin on the ultrasonic sensor.
#define ECHO_PIN 9 // Arduino pin tied to echo pin on the ultrasonic sensor.
#define MAX_DISTANCE 200 // Maximum distance we want to ping for (in centimeters). Maximum sensor distance is rated at 400-500cm.
NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of pins and maximum distance.
void setup() {
pinMode(led, OUTPUT);
digitalWrite(led, LOW);
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
Serial.begin(115200); // Open serial monitor at 115200 baud to see ping results.
lcd.print("Car is in Rev");
lcd.setCursor(0,1);
lcd.print("**mode**");
delay(2000);
lcd.clear();
lcd.print("Calculating ");
lcd.setCursor(0,1);
lcd.print("**distance**");
delay(2000);
lcd.clear();
}
void loop() {
lcd.home();
delay(50); // Wait 50ms between pings (about 20 pings/sec). 29ms should be the shortest delay between pings.
unsigned int uS = sonar.ping(); // Send ping, get ping time in microseconds (uS).
int val;
val=uS / US_ROUNDTRIP_CM;
lcd.print(val); // Convert ping time to distance in cm and print result (0 = outside set distance range)
lcd.print("cm");
if(val<15)
{
lcd.clear();
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
lcd.print("PLz stop car");
delay(100);
}
else
{lcd.clear();
digitalWrite(led, LOW); // turn the LED on (HIGH is the voltage level)
lcd.print(val);
lcd.print("cm");
}
}
Watch the video:-
Introduction:-
Hi friends today I am going to explain how to create a car reverse parking system. This might be already seen in almost all the latest cars. It is coming with different models. This is a very simple project. Here I am going to show you how to create this thing in a very less expensive. For this project you require some simple electronics circuits. And you can finish the project within a couple of hours. This can be used as application level.
components required:-
1.LCD 16x2 display
2.Arduino microcontroller
3.Sonar Sensor-HC-SR04 module
4.Buzzer and LED
5.Breadboard
6.Connection wires
7. Potentiometer
Do the connection as shown in figure. Upload the codes shown bellow to the Arduino microcontroller.
Your project is ready now. Enjoy!! Show the working to your friends. And be a hero.
Program:-
//
// Example NewPing library sketch that does a ping about 20 times per second.
//
#include <NewPing.h>
#include <LiquidCrystal.h>
// Pin 13 has an LED connected on most Arduino boards.
int led = 13;
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
#define TRIGGER_PIN 8 // Arduino pin tied to trigger pin on the ultrasonic sensor.
#define ECHO_PIN 9 // Arduino pin tied to echo pin on the ultrasonic sensor.
#define MAX_DISTANCE 200 // Maximum distance we want to ping for (in centimeters). Maximum sensor distance is rated at 400-500cm.
NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of pins and maximum distance.
void setup() {
pinMode(led, OUTPUT);
digitalWrite(led, LOW);
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
Serial.begin(115200); // Open serial monitor at 115200 baud to see ping results.
lcd.print("Car is in Rev");
lcd.setCursor(0,1);
lcd.print("**mode**");
delay(2000);
lcd.clear();
lcd.print("Calculating ");
lcd.setCursor(0,1);
lcd.print("**distance**");
delay(2000);
lcd.clear();
}
void loop() {
lcd.home();
delay(50); // Wait 50ms between pings (about 20 pings/sec). 29ms should be the shortest delay between pings.
unsigned int uS = sonar.ping(); // Send ping, get ping time in microseconds (uS).
int val;
val=uS / US_ROUNDTRIP_CM;
lcd.print(val); // Convert ping time to distance in cm and print result (0 = outside set distance range)
lcd.print("cm");
if(val<15)
{
lcd.clear();
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
lcd.print("PLz stop car");
delay(100);
}
else
{lcd.clear();
digitalWrite(led, LOW); // turn the LED on (HIGH is the voltage level)
lcd.print(val);
lcd.print("cm");
}
}
Watch the video:-