This is Frontmatter (keep original file structure)
Smart Car Parking Sensor Project
In today's automotive world, safety while reversing is paramount. This project was developed as a prototype of a preventative safety system, aiming to warn drivers when their vehicle approaches obstacles at a potentially dangerous distance. I designed and developed this project to present to professors in related courses, demonstrating the application of Embedded Systems in real-world scenarios.
Engineering Concept and Principles
This system employs the principle of "Bio-mimicry", mimicking nature, similar to how bats use sound waves for navigation. The system consists of 3 main parts:
- Sensing: Uses an Ultrasonic Sensor to emit high-frequency waves (40kHz) that hit an object and then waits to receive the reflected waves.
- Processing: Uses an Arduino board as the main brain to calculate the distance from the "time" it takes for the wave to travel back and forth.
- Feedback: When the distance is less than the defined threshold, the system activates an LED to flash and a Buzzer to sound an alarm in Real-time.
Key Components and Technical Operation
1. Arduino Board (Microcontroller)
Acts like the brain, receiving data from sensors, calculating according to the Logic we've written, and sending Digital Signals to Output devices.
2. Ultrasonic Sensor (HC-SR04)
This device operates with high precision, based on the following principles:
- Trigger Pin: Receives commands from Arduino to emit an Ultrasonic wave for 10 microseconds.
- Echo Pin: Waits to receive the reflected wave. If a wave is received, it sends a High signal back to the Arduino to start counting time.
- Calculation: Uses the physics formula $Distance = (Time \times Speed\ of\ Sound) / 2$ (divided by two because it's the round-trip distance).
3. LED and Buzzer (Alarm System)
This is a dual alarm system (Visual & Audio Feedback) to ensure the driver is aware of danger even in noisy environments or poor visibility conditions.
In-depth Program Logic (Code Logic)
Based on the system's operational analysis, the program logic is systematically written to ensure responsive operation:
- Initialization: Defines the mode of various Pins (Input/Output) and starts communication via Serial Monitor for data Debugging.
- Distance Measurement: The board briefly triggers the sensor to measure the distance every millisecond.
- Conditional logic: The program uses
if-elsestatements to check the distance:- If distance > Safe Zone: The LED will be off, and there will be no sound alarm.
- If distance enters Warning Zone: The system calculates the LED flash rate and sound frequency (the closer, the more frequent the sound) to inform the user that "danger is approaching."
- Action: When the distance reaches the Critical Distance, the board immediately sends a
digitalWritecommand to set the Buzzer and LED pins to HIGH simultaneously.
Demonstration Video
You can watch the detailed operational steps and system testing in a simulated environment in the video below:
Conclusion
This project not only helps understand the fundamentals of Microcontroller systems but also demonstrates the collaboration of Hardware and Software in Real-world Problem Solving. In the future, it can be further developed by adding an LCD screen to display distance in centimeters or by incorporating an Automatic Emergency Braking system.
Sincerely,