Arduino Bomber Plane Mechanism + Missile Detector System

by 1069943 in Circuits > Arduino

56 Views, 0 Favorites, 0 Comments

Arduino Bomber Plane Mechanism + Missile Detector System

20260120_103050 (1).jpg
20260120_103050 (1).jpg
20260120_200000.jpg

VIDEO

https://drive.google.com/file/d/15euywVaja5sbQi7I2ZQ0DMl9ZEgVMzN-/view?usp=drive_link

https://drive.google.com/file/d/1mqW6BSMHi0Ori00R9sXjh5ZdiuMAI8E4/view?usp=drive_link


MY INVENTION

My invention is an Arduino Bomber Plane Mechanism + Missile Detector System. It uses a microcontroller to manage real-time data from sensors and execute physical tasks through servos.



Key Project Features

1. Proximity Radar (Input System)The system uses an HC-SR04 Ultrasonic Sensor to measure distance. It works by sending a sound pulse and timing how long it takes to return.



  1. Safe Zone: If no object is detected within 40cm, the Green LED is powered.
  2. Warning Zone: Between 15cm and 40cm, the Yellow LED is powered and the Piezo Buzzer starts a pulsing signal.
  3. Danger Zone: Under 15cm, the Red LED is powered and the buzzer makes a solid alarm sound.



2. Dynamic Audio Scaling Instead of a basic on/off sound, I used a command called map() to create a reactive alarm.

  1. Frequency (Pitch): As the distance decreases from 40cm to 15cm, the code automatically increases the pitch of the buzzer.
  2. Timing (Speed): The algorithm also scales the pause time between beeps. The beeps get faster as the object gets closer to the sensor, providing better feedback to the user.



3. Dual-Servo Actuation (Mechanical Output)The project uses two Micro Servos to perform physical movements.



  1. Automated Flare System: If the sensor detects an object in the "Danger Zone" (<15cm), the code automatically moves this motor. You can see this in my video when my hand triggers the alarm and the white cardboard arm moves.
  2. Manual Hatch: I have a second button on Pin A1 that allows me to open a "bomb hatch" whenever I press it.



How the Mechanism Works

In my video, you can see how the hardware and software work together.

  1. Input Data: The Ultrasonic Sensor on the breadboard constantly sends data to the Arduino. I also used Analog Pins (A0 and A1) as digital inputs for my buttons.


  1. Processing Logic: To make sure the system doesn't lag, I used non-blocking code called millis(). This is a Level 4 skill because it lets the Arduino multitask. As shown in the video, the sensor keeps scanning even while the motors are moving.
  2. Output Action: I used PWM (Pulse Width Modulation) to control the Servo Motors. I also used an RGB LED that turns Red when the flares are active to show the system status.




HOW THE CODE WORKS:

1. Data Acquisition (Inputs)


  1. Ultrasonic Sensor (HC-SR04): This component uses Time-of-Flight (ToF) sensing. The code triggers a sonic pulse and measures the duration until the return signal is received, calculating distance based on the speed of sound.


  1. Digital Input Interfacing: I utilized Analog Pins (A0 and A1) as digital inputs for my tactile switches. By enabling Internal Pull-Up Resistors in the software, I ensured a stable "High" logic state when the buttons are open, preventing floating signals.


2. Data Processing & Algorithms (Logic)

  1. Dynamic Variable Mapping: The code uses the map() function to translate raw distance integers into a proportional Duty Cycle for the buzzer. This creates an algorithm where the output frequency is a direct function of the input distance.


  1. Conditional Logic Gates: The flare deployment system operates on a Boolean OR logic gate. The system triggers if (ManualSwitch == LOW || SensorDistance < 15).


  1. Concurrency (Non-blocking code): To ensure the system remains responsive, I implemented Asynchronous Timing using the millis() function. This avoids the "processor blocking" caused by delay(), allowing the CPU to handle radar scanning and audio-visual output simultaneously.


3. Output Control (Actuators & Feedback)


  1. Pulse Width Modulation (PWM): I used PWM signals on pins 6 and 8 to control the Micro-Servo motors. The code sends specific pulse widths to position the motors at 0 or 180 degrees.


  1. Status Telemetry (RGB LED): A Common Cathode RGB LED provides a visual system-status interface. The code manages the intensity of the Red, Green, and Blue channels to indicate whether the system is in "Standby" or "Active Deployment" mode.


HOW IT MEETS LEVEL 4 CRITERIA


1. Knowledge (Circuitry and Software)

  1. Advanced Components: "I didn’t just use basic LEDs. I integrated Level 4 components like the HC-SR04 Ultrasonic Sensor for detection and two Micro Servo Motors for movement. You can see in my circuit that I used 330 Ohm resistors to protect my LEDs and used both digital and analog pins for my inputs."
  2. Software Mastery: "My code is Level 4 because I used new functions I defined myself to keep the logic clean. I also used the Servo library to control my motors and the map() function to scale my sensor data into different audio pitches."

2. Application (Functionality and Purpose)

  1. Clear Purpose: "This isn’t just a circuit; it’s a security device. It uses all the 'MUST' parts like buttons and resistors, and 'SHOULD' parts like motors and distance sensors."
  2. Reliable Execution: "As you saw in my video, the code compiles and the components work exactly as they should. When an object enters the danger zone, the system reacts instantly by firing the flares."


3. Communication (Organization)

  1. Professional Coding: "My code follows all the conventions. I declared every variable at the top, organized the code into chunks, and used indentation so it’s easy to read."
  2. Neat Build: "I built the physical project neatly. The wiring is organized so you can see all the peripheral parts, and my Instructable includes original photos and videos of every step."

4. Thinking (Efficiency and Complexity)


  1. Multitasking (Non-blocking Code): "The most complex part of my project is that I used non-blocking timers (millis()) instead of delays. This is a Level 4 program structure that makes the system efficient because it can scan for intruders while it’s beeping and moving the motors at the same time."
  2. Powerful Interactions: "By combining the distance sensor with motors and sound, the project becomes much more powerful than a simple alarm. It accounts for variations in distance by changing the beep speed and pitch automatically."

Supplies

Materials List


The document attached has a link and cost to buy each item and a picture of how it looks. Here is a generic list of items needed


  1. Arduino Uno
  2. Ultrasonic Distance Sensor HC-SR04
  3. Servo Motors x2
  4. RGB LED Common Cathode
  5. Standard LEDs x2 Red, x2 Yellow, x2 Green
  6. Piezo Buzzer
  7. Push Buttons
  8. Resistors 330 Ohms x3
  9. Breadboard
  10. Jumper Wires
  11. USB Cable
  12. Wires
  13. Breadboard
  14. Cardboard

The Circuit

20260113_224046.jpg
  1. Place the Sensor exactly at the Center of the board

The Circuit

20260113_225626.jpg
  1. Connect the positive and negative ends of the sensor to power rails
  2. Place the LEDs in parallel and connect their negative ends to a single column
  3. connect the column the negative power rail using a resistor
  4. Place the buzzer and connect its negative end to power rail

The Circuit

20260114_075304.jpg
  1. Place a button and ground it

The Circuit

20260114_160908.jpg
  1. Place another button and ground it

Creating the Prop

20260114_212020.jpg
bomber-military-plane-isolated-on-white-background-top-view-2B627BN.jpg
  1. Cut a piece of Cardboard and cut it into trapezoidal shape similar to the rudder on the back of a Bomber plane

The Circuit

20260114_212959.jpg
  1. Place the RGB LED and connect its negative ends to corresponding pins (11,12 and 13)
  2. Use a resistor to connect the LED to positive power rail

The Circuit

20260114_223659.jpg
  1. Connect the LEDs to their corresponding Pins

Flare Hatch

20260119_173829.jpg
RPM402B__20656.jpg
  1. Create a hollow box using cardboard that looks like a magazine of a Glock
  2. Make sure that it is 2 inches wide and 0.5 inches thick
  3. Use only 4 panels for the structure
  4. Then use glue gun to paste the servo and the lid onto the magazine for flare like in the picture

Bomb Hatch

20260119_173730.jpg
  1. Create this simple mechanism using cardboard and servo for the bomb hatch
  2. cut a piece of cardboard and cut a rectangle from it
  3. us that piece and that rectangular cut to create this mechanism
  4. Use Matchsticks or skewers for the shafts

The Final Circuit

20260120_103050.jpg
  1. Now connect the Servo control pins to their corresponding pins (6 and 8) for control and power them using wires to connect them to power rails on the breadboard
  2. And connect pushbuttons to control the bomb hatch and the flare control

The Code

  1. Connect your Arduino UNO to your computer using USB to B converter
  2. Plug in this code in Arduino IDE and you're done

Downloads

Common Mistakes

People can make a lot of mistakes while making this project I have made them and wrote them down so you don't have to:


  1. Confusing between 330 Ohm and 10k Ohm resistors as they look the same if they are not noticed properly and can decrease the current you are getting to LEDs if you are not noticing.
  2. Getting confused between pins as I have used almost all pins in the circuit and I have made a lot of mistakes and wasted a lot of time figuring them out.
  3. Miscalculating RGB pins if they are common cathode or common anode as it can result in doing opposite of what you want.
  4. Changing positive and negative pins of Servos as they are the most dangerous mistake you can make because if they are miscalculated, your Arduino will heat up and stop working, if untreated Arduino can fry