Arduino Project

Arduino Radar System Project with Ultrasonic Sensor V7

Course Introduction

In this lesson, we’ll build a Radar Bomb Simulator using an ultrasonic sensor, a servo, a 4-digit display, and a buzzer.

The servo sweeps the ultrasonic sensor to detect objects. If something enters within 15 cm, a countdown appears on the display with beeping sounds that speed up as the target gets closer. At just 2 cm, the system simulates an explosion with flashing and a continuous alarm.

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:

SN

COMPONENT INTRODUCTION

QUANTITY

PURCHASE LINK

1

Arduino UNO R4 Minima/Arduino UNO R4 WIFI

1

2

USB Type-C cable

1

×

3

Wires

Several

4

Breadboard

1

5

Ultrasonic Sensor Module

1

6

Passive Buzzer

1

7

I2C LCD 1602

1

8

4-Digit Segment Display Module

1

Wiring

5.webp__PID:225c08c5-84f3-4b15-b651-a87f14a2b66d

Common Connections:

Digital Servo Motor
Connect to breadboard’s positive power bus.
Connect to breadboard’s negative power bus. 
Connect to 9 on the Arduino.

Buzzer
Connect to breadboard’s negative power bus.
Connect to 3 on the Arduino.

4-Digit Segment Display Module
CLK: Connect to 5 on the Arduino.
DIO: Connect to 6 on the Arduino.
GND: Connect to breadboard’s negative power bus.
VCC: Connect to breadboard’s red power bus.

Ultrasonic Sensor Module
Trig:
Connect to 8 on the Arduino.
Echo: Connect to 7 on the Arduino.
GND: Connect to breadboard’s negative power bus.
VCC: Connect to breadboard’s red power bus.

OLED Display Module
SDA:
Connect to SDA on the Arduino.
SCK: Connect to SCL on the Arduino.
GND: Connect to breadboard’s negative power bus.
VCC: Connect to breadboard’s red power bus.

Writing the Code

Note
You can copy this code into Arduino IDE.
To install the library, use the Arduino Library Manager and search for TM1637Display and install it.
Don’t forget to select the board(Arduino UNO R4 WIFI) and the correct port before clicking the Upload button.