Arduino Project
Arduino Radar System Project with Ultrasonic Sensor V4
Course Introduction
This project implements a basic radar system using an Arduino Uno, a servo motor, an ultrasonic sensor (HC-SR04), an LED, and a buzzer.
The system scans the environment by rotating the ultrasonic sensor between 15 and 165 degrees, measuring distances to nearby objects.
If an object is detected within 15 cm, an LED lights up, and a buzzer sounds. The angle and distance data are sent to the serial port, allowing for real-time visualization using the Processing IDE.
Note
If this is your first time working with an Arduino project, we recommend downloading and reviewing the basic materials first.
1.1 Install Arduino IDE(Important)
1.2 Introduction of Arduino IDE
Required Components
In this project, we need the following components:
Wiring

Common Connections:
LED
Connect the LEDs cathode to a 1kΩ resistor then to the negative power bus on the breadboard,and the LEDs anode to a 1kΩ resistor then to 4 on the Arduino.
transistor
emitter: Connect to breadboard’s negative power bus.
base: Connect a 1kΩ resistor then to 5 on the Arduino.
collector: Connect to the buzzer.
Buzzer
+: Connect to breadboard’s positive power bus.
-: Connect to transistor .
Digital Servo Motor
Connect to breadboard’s positive power bus.
Connect to breadboard’s negative power bus.
Connect to 12 on the Arduino.
Ultrasonic Sensor Module
Trig: Connect to 10 on the Arduino.
Echo: Connect to 11 on the Arduino.
GND: Connect to breadboard’s negative power bus.
VCC: Connect to breadboard’s red power bus.
Writing the Code
Note
Build the circuit.
Upload the code to the Arduino board using Arduino IDE.
In the Arduino IDE, check the current Arduino port(COMx).
The ArduinoSonarGUI is used here. You can click here ArduinoSonarGUI.zip to download it.
Open ArduinoSonarGUI.pde in the Processing IDE .
Modify the code in line 35 to ensure the correct port number(COMx).
Run the Processing sketch to visualize the sonar data.
