Arduino Autonomous Defense System

An autonomous object-detection defense system built using Arduino. It scans the environment, detects nearby objects, and reacts with visual and auditory alarms. The system features an LCD that shows system status and distance feedback when an object is detected.

Demo Video

This video demonstrates the automated scanning, detection, and alert mechanisms triggered by nearby objects.

Components used

  1. Arduino Uno (R4 WiFi used during demo)
  2. HC-SR04 ultrasonic sensor
  3. SG90 servo motor x2
  4. Joystick module
  5. LCD (I2C)
  6. Passive buzzer
  7. Laser diode
  8. RGB LED module
  9. Breadboard x1
  10. Jumper Wires x a lot
  11. USB cable x 1

How It Works

1. In automated mode, the servo rotates to scan surroundings.

2. If an object is detected within range:

  • The system stops scanning and becomes stationary
  • Triggers the buzzer and laser
  • Displays a warning on the LCD

3. When the object is gone, it resumes scanning and becomes mobile again.

4. Joystick control:

  • Single click = manual mode
  • Double click = return to automated mode

5. Serial admin (via serial monitor):

  • Dynamically adjust servo motor movement speed
  • Change LED blink rates
  • Modify LCD display intervals
  • Update object detection thresholds

The Code

The full Arduino Defense System code is available on GitHub for easy viewing, download, and use:
View Code on GitHub

Author

Back to Projects
© 2025 Ohmly