I am finally able to park in a garage, which takes some getting used to. I like to have as much space as possible to access the workbench along the back wall, but trying to get as close to the garage door has caused some...problems.
This device senses the distance of the object in front of it (a vehicle) and depending on range, one of three lights will turn on.

This project is the definitive Masterclass in Precision Spatial-Sensing and Interactive Human-Machine Orchestration. The Parking Assist Stoplight is a high-performance Automotive-Asset designed to provide professional-grade garage safety. By leveraging Ultrasonic Pulse-Time-of-Flight and **OLED real-time calibration HUDs**, this project empowers you to build a sophisticated "Guidance Hub" that manages real-time car-proximity and variable-stop distances with industrial-level accuracy.
Garage Infrastructure and Logic Architecture Overview
The Parking-Guidance Framework functions through a specialized Pulse-Calculate-Display lifecycle. The system is built on a high-reliability Sonar-to-Screen Model:
- HC-SR04 Ultrasonic-Perception Hub: The "Spatial-Analysis Node." Transmitting 40KHz sound-pulses, the sensor measures the Echo-Return Duration. The Arduino converts this time-delta into centimeters, providing a sub-centimeter Distance-Baseline for your vehicle's approach HUD.
- Triple-State LED Phase Matrix: The logic core. The Arduino Nano compares the current vehicle-depth against Dynamic-Threshold Shunts:
- Green: Approach phase (> 100cm) - Keep Driving
- Yellow: Caution phase (50cm - 100cm) - Approaching Stopping Point
- Red: Critical Stop phase (< 50cm, user-tunable) - Stop!
- OLED High-Contrast Calibration HUD: Through a specialized I2C Drawing-Engine, the system reaches professional control. The operator views the current real-time distance and the "Set-Stop-Point" simultaneously, providing a bit-perfect Dashboard-Interface.
Hardware Infrastructure & The Design Tier
- Arduino Nano R3 (The Coordinator): A chosen compact microcontroller that acts as the Sonar-to-LED bridge, coordinating the high-frequency echo-timing pulses and the real-time graphic rendering for the OLED HUD.
- Rotary Encoder Input Node: Specifically selected for its Infinite-Detent Accuracy. This node allows the operator to "Turn-to-Tune" the red-light stop-distance without reprogramming, providing a 100% "User-Input" experience.
- Micro-LED Phase-Actuator Shunt: To ensure "High-Visibility," the workstation features logic for Color-Coded Status. These nodes provide the instant "Visual-Feedback" required for high-stakes car-maneuvering missions in tight garage spaces.
- I2C Integrated Low-Wire Bus: The system reaches professional-grade efficiency through Signal-Bus Shunting. By using the I2C protocol for the display and digital interrupts for the encoder, the Nano maintains a clean "Zero-Clutter" profile on the logic rail.
The Stopping point can be adjusted via a rotary encoder on the side of the device, current range and the set stopping distance can be observed on the OLED display.
The Red light the variable that can be adjusted, and the ranges of the yellow and green lights are based on that variable.
Technological Logic and Execution Algorithms
The system reaches professional-grade reliability through several Firmware Orchestration Strategies:
- NewPing High-Frequency Delta Shunt: The firmware utilizes Median-Filter Logic. By taking multiple sonar samples and averaging them, the system eliminates "Distance-Spikes" caused by atmospheric noise on the visual HUD.
- Quadrature-Encoder Tuning HUD Mode: The system reaches professional efficiency through a Pulse-State Mode. The encoder's A/B pins are tracked via high-priority interrupts, ensuring the stop-distance variable updates instantly on the Calibration-HUD.
- Real-Time Variable Thresholding: The project is "Calibration-Hardened," featuring specialized software constants. The yellow and green light-thresholds automatically "Scale" based on the red-stop distance, providing a Self-Adjusting Logic for different car lengths.
- Hardware Scalability: Validated for garage-use, this modular architecture is "Industrial-Ready," with an option to link an active-buzzer for "Audible-Collision" warnings or ESP8266 WiFi-bridges for remote "Empty-Bay" notifications on a mobile HUD.
Why This Project is Important
Mastering Sonar-Timing and Graphic HMI Calibrations is an essential skill for Consumer Electronics Designers and Automotive Systems Engineers. It teaches you how to design a "Safety-Critical Assistant" that interprets invisible physical data into intuitive visual commands—a critical skill for designing industrial-level level-monitors, autonomous-rover obstacle avoiders, and secure facility-perimeter monitors. Beyond parking lights, these same principles are used in Industrial Liquid-Tanks, Medical Ultrasonic Devices, and Tactical Proximity Beacons. Building this project proves you can engineer a professional-grade smart asset that prioritizes sensor-logic accuracy, HMI-interaction reliability, and real-time world-state visualization.
Technical Engineering Tip: If your distance reading is "Jittery" or ghosting, check your Sensor-Angle Orientation Shunt. Ultrasonic waves bounce off flat surfaces. For a professional-grade "Lock-On" experience, mount the HC-SR04 perfectly perpendicular to the car's bumper, ensuring your sonar-HUD remains perfectly stable for a "Zero-Read-Error" parking experience every single mission.