This project implements a radar style distance detection and visualization system using an Arduino microcontroller, an ultrasonic distance sensor, a servo motor, and a Processing 4 (Java) application. The system demonstrates a complete embedded sensing pipeline from real time data acquisition to graphical visualization over serial communication.
An Arduino Uno controls a servo mounted ultrasonic sensor that scans an area by sweeping through a defined angular range. At each angular position, the system measures the distance to nearby objects using ultrasonic time-of-flight principles. The measured angle and distance data are transmitted over a serial connection to a Processing 4 application, which renders the data as a real-time radar display.
During development, the team encountered both hardware and software-related issues under a constrained timeline. To efficiently identify and resolve problems, responsibilities were divided based on technical strengths.
One group focused on software debugging, identifying issues related to serial data formatting and visualization logic that prevented detected objects from rendering correctly in the Processing radar display. Multiple code revisions were created and tested to validate data transmission and parsing behavior.
The second group focused on hardware troubleshooting, verifying wiring integrity, sensor connections, and servo operation. This group identified issues that contributed to slow servo movement and inconsistent sensor readings.
Frequent communication between both groups was critical to correlating hardware behavior with software output. By isolating issues in parallel and integrating revised solutions, the system was stabilized and achieved the intended real-time radar functionality within the project timeframe.
- Arduino Uno
- Ultrasonic Distance Sensor
- Servo Motor
- Breadboard and jumper wires
- External power source
- The servo motor is controlled using a PWM capable digital pin to precisely set angular position.
- The ultrasonic sensor uses separate trigger and echo pins to measure distance based on sound wave reflection.
- Distance is calculated by measuring the echo pulse duration and converting time of flight into distance.
- The Arduino acts as the central controller, coordinating sensor measurements and data transmission.
The Arduino firmware is responsible for:
- Sweeping the servo motor across a defined angular range.
- Triggering the ultrasonic sensor at each angular position.
- Measuring the echo pulse width using microsecond timing.
- Calculating distance from time of flight measurements.
- Transmitting angle and distance data over the serial interface.
This portion of the system demonstrates real time control, timing sensitive measurements, and sensor driven logic.
The radar visualization is using Processing 4 and communicates with the Arduino using serial communication.
The Processing application is responsible for:
- Establishing a serial connection with the Arduino
- Parsing incoming angle and distance data
- Converting polar coordinate data into a 2D graphical representation
- Rendering a live radar style sweep display with detected objects
This component highlights cross-language integration and real time data visualization.
- Embedded systems programming (Arduino C/C++)
- PWM based servo control
- Ultrasonic time of flight distance measurement
- Serial communication between microcontroller and host application
- Real time sensor data acquisition
- Java-based graphical visualization (Processing 4)
- Hardware–software system integration