automatic-shooting-gun-1

I made an Automatic Shooting Gun which shoots just by the click of a computer mouse! For this I used a Strongarm Nerf gun... This is the video of me making the Automatic Shooting Gun ↓

So first talking about this.. let's say its semi-automatic and not fully automatic.. I have planned for making a full automatic gun which i will upload in the upcoming month.. So in this post i am gonna tell you how to make an easy gun like how i did!

HERE IS THE TUTORIAL FOR MAKING A SEMI-AUTOMATIC SHOOTING GUN!! I will also put the project repository in this post!!

First off.. before starting this tutorial.. let me tell the required items for it. Click on the points down below to know how they look like! We need:

Softwares required:

Make sure your power sources says OUTPUT-5V like this ↓

5V

Or it must say DC 5V like this ↓

dc-5V

And if your 5V chargers have two wires attached like this ↓ The one which has a line on it is the negative wire.. For normal chargers the black colour is the negative and the red colour is positive.

attached-wires

So First, let's start by doing the hardware.. Lets start with 5V power supply we got.. So you have to cut the bottom part of the wire which is the side were you connect your charger to your phone **DO NOT CUT THE SIDE WITH THE ADAPTER** After cutting it must have two Black and Red wires like this:

wire-separation

A jumper wire is attached to it in the above pic.. you must also do like that.. for a clear pic of Step 2 see this ↓

Jumper with 5V

You can use a soldering gun to attach the jumper and the wires or use a tape.. Here i used soldering gun and taped it at its metal exposed areas so that they don't touch each other.

And if your using a laser diode for your gun.. you can directly attatch the laser diode to the 5V power supply like this ↓ Check after the pic to know how to connect.

laser diode 5V

You have to connect the negative wire of the cable to the blue wire of the laser diode and the positive wire of the cable to the red wire of the laser i.e. blue wire of the laser to the black wire of the cable and red wire of the laser to the red wire of the cable. And again I strictly recomend using a soldering gun for this or hot glue gun is also ok but.. if you use tape the wiring can come out..

Now lets start with the MG995R Servos. You can actually use any servos. Take the attachment gears given with the servos and attach the one given in this pic.

Servo attachment pic

After connecting the attachment, lets talk about the 3 wires hanging out from the servos. So the brown wire or the black wire is the ground, the red wire is the 5V input for the servo, the yellow wire is the PWM signal input for the servo (Here the PWM signals are the signals through which an Arduino communicates with a servo). This picture ↓ will be much clear.

Servo wire description pic

Connect the Servos with a breadboard which connects the 5V power source like in the picture below. Here in this picture, the yellow wire comming out from the servo is the signal wire, the red wire which comes out of the servo is the 5V input and the black wire is its ground.

circuit diagram

Now connect the servo with a thread and keep the thread as it can pull the trigger like this ↓

gun with servo

You can also attach the laser to your gun at this point like this ↓

gun with laser

You can download the code repository for this gun from here.

Then upload the code from arduino studio to your arduino board. Make sure you choose your correct port on which your arduino is connected

port of arduino

After that open my other code file on visual studio. Make sure you choose the correct port on that also for it to work! You can do it by going to form design and double click serialport1 from below the form and click properties (it will mostly be open in properties tab automatically) then in PortName type the Port which your arduino is connected as you saw from visual studio.

port of visual studio

Congratulations you have succesfully completed the tutorial and you gun is ready! just plug in the power supplies run the visual studio program and now you have an automatic shooting gun!