This project was developed as the second major evaluation (AV2) for the Programming course in the Technical Electronics program at IFPE (Federal Institute of Pernambuco). The goal was to apply microprocessing logic and sensor integration to solve a common real-world
problem: vehicle safety during low-speed maneuvers.
Parking sensors are essential in modern automotive engineering. By creating a prototype from scratch, I was able to explore the intersection of ultrasonic physics, real-time data processing, and user feedback systems.
How it WorksThe heart of the system is the HC-SR04 ultrasonic sensor. It operates by emitting a high-frequency sound pulse and measuring the time it takes for the echo to bounce off an object and return.
To convert this "Time of Flight" into a readable distance in centimeters, the Arduino performs a calculation based on the speed of sound ($340 \text{ m/s}$ or $0.034 \text{ cm/us}$):
$$distance = \frac{time \times 0.034}{2}$$
The factor of 2 accounts for the sound traveling to the object and back.
The Hardware StackMicrocontroller: Arduino Uno (the brain).
- Microcontroller: Arduino Uno (the brain).
Sensor: HC-SR04 Ultrasonic for distance detection.
- Sensor: HC-SR04 Ultrasonic for distance detection.
Visual Feedback: A trio of LEDs (Green, Yellow, Red) to indicate safety zones.
- Visual Feedback: A trio of LEDs (Green, Yellow, Red) to indicate safety zones.
Auditory Feedback: A Piezo Buzzer that increases frequency as the distance decreases.
- Auditory Feedback: A Piezo Buzzer that increases frequency as the distance decreases.
One of the main challenges during the AV2 was fine-tuning the thresholds for the alerts. I programmed the system with three distinct states:
Safe Zone (> 50cm): The green LED remains steady, indicating plenty of space.
- Safe Zone (> 50cm): The green LED remains steady, indicating plenty of space.
Warning Zone (20cm - 50cm): The yellow LED blinks, and the buzzer emits intermittent beeps.
- Warning Zone (20cm - 50cm): The yellow LED blinks, and the buzzer emits intermittent beeps.
Critical Zone (< 20cm): The red LED stays on, and the buzzer emits a continuous high-frequency tone, signaling an immediate stop.
- Critical Zone (< 20cm): The red LED stays on, and the buzzer emits a continuous high-frequency tone, signaling an immediate stop.
Building this project for the IFPE electronics department allowed me to practice structured programming and hardware troubleshooting. More than just a grade, it was an exercise in building a reliable system that responds accurately to its environment in real-time.
Simulator link: https://www.tinkercad.com/things/5YMvnfJsUCW-sensor-de-estacionamento





_ztBMuBhMHo.jpg?auto=compress%2Cformat&w=48&h=48&fit=fill&bg=ffffff)









Comments