Introduction: Automatic Attacking Machine

Reference: DIY Home Alarm System

Ever had the annoying experience where others might bother you while you are trying to concentrate whether on work or a study session. During this time, an Automatic Attacking Machine might prevent you to be irritated by those annoying people. This machine would eventually stop them before they enter your room or office.

Through the reference website, you can see that only the LED Light and LCD Monitor would appear warning the user; however, in my project, I decided to use a direct current motor to confuse the "invader" by using cardboard which contains a fancy drawing on it, before they come near to further bother you.


Arduino Leonardo Board * 1

Bread Board * 1

Wires * 10~20

Ultrasonic Sensor * 1

LCD Monitor + I2C * 1

LED Light (Recommended Red) * 1

DC Motor * 1

L298N * 1

Card Board * As many as you can get

Pearl Plate * A big one to place your model on

White Glue * 1

USB Type-A to Micro-USB Cable * 1

Power Bank (5V or more) * 1

Step 1: Step 1: Connect the Circuit


- Trig Pin

- Echo Pin

- GND Pin & VCC (5V) Pin

LCD Monitor

- SCL Pin & SDA Pin
- GND Pin & VCC (5V) Pin

LED Light

- D-Pin

- GND Pin

DC Motor

- Connect to L298N


- Connect to power bank

- GND Pin

Step 2: Step 2: Create the Model

In this project, I decided to create the model by using cardboard, with a base of a flat pearl plate. The model shape can be seen down there with the 3ds Max drawing.

In the drawing, you can see that I've created exact holes for the different pieces of equipment to stuck in, and this would vary throughout the different type of equipment you use. Also, the scale can be decided by your own depending on the size of your board. So, this 3ds Max drawing is only for sampling, just take it as a reference, take the pieces you need, but do not copy exactly!

Step 3: Step 3: Forming the Outlook


1. Cardboard

2. White Glue (Polyfoam Tape)

3. Pearl Plate

4. Round Cutter

5. Utility Knife


1. Use the utility knife to cut the cardboard into the shapes you need

2. Use the white glue or polyfoam tape to form the factor of the final work

3. The round cutter would cut out the round for the attacking hole

4. At last place the board into the model, and do some finalising work

Step 4: Step 4: Start Coding

The coding process is relatively easy, just simply paste on the code that I had already written under the entire webpage.

If anyone wants to change any parts in the code, feel free to do so.

Code is in this link.

Step 5: Step 5: Enjoy Your Success!

This is the video of the finished project, your project should also be alike, else you should be concerned(LOL)!

Watch the VIDEO Here!!!