Lego NXT Machine Gun

by Mr. Bombastopants in Living > LEGO & K'NEX

10410 Views, 4 Favorites, 0 Comments

Lego NXT Machine Gun

DSC_2663.JPG
DSC_2602.JPG
This is a gun made from the Lego NXT robotics set, but it is my own creation.  It is built so that the clip can be moved to fire either straight forward or around a corner.  It is best used mounted.

Materials: Lego NXT kit (I do not know the specifics because I did not know what parts I was going to use beforehand).

Also this is difficult to explain so please use the images to supplement the explanations.

Create Firing Arm

DSC_2603.JPG
DSC_2604.JPG
DSC_2605.JPG
Gather the materials shown and attach the arm to the motor with the black stick and a gray cylinder.  Then attach the motor to the NXT device using two or three black connectors.

Add Body

DSC_2606.JPG

To make the gun longer, add 6 connector-sticks (long) to the end of the NXT device opposite the motor.

Connect Body

DSC_2608.JPG
DSC_2607.JPG
To keep the body pieces together, find two connector-sticks 7 holes long and 6 connectors (for each stick) to attach to the bottom of the body.

Extend the Body

DSC_2609.JPG

Get 6 more connector sticks and 12 more connectors to attach to the body to extend it a bit further.

Make the Trigger

DSC_2610.JPG

Gather a touch sensor, four right-angle connectors and 8 blue connectors (they're double sided- so they have a different connector on each side).  Put a blue connector in each hole in the right-angle connectors and attach them to the touch sensor.

Attach Trigger

DSC_2611.JPG
Get two 3-hole connector sticks and attach them to the top of the body.  Then attach the touch sensor to the bottom of the body starting at the last holes (right underneath the 3-hole connectors).

Extend the Trigger

DSC_2612.JPG
Use a 3-way connector and attach a long stick to the bottom and two short ones to the sides.  On each of the side sticks, attach a right-angle connector, and then a blue connector on the right-angle connectors.  This will form a T-shape.

Attach Trigger Extension

DSC_2613.JPG

Place the long stick through the middle of the body (in front of the touch sensor) and attach the blue connectors to the body.  Then put a gear on the long stick in front of the touch sensor and a gray cap on the end.

Attach Touch Sensor to Body

DSC_2614.JPG
DSC_2615.JPG
Put one end of the cable in the touch sensor and the other end into port one on the NXT device.  Then place the cable in the gap in the middle of the body and place a connector-stick over the top of it to keep it out of the way.

Add Butt of Gun

DSC_2617.JPG
DSC_2616.JPG

Find two connector-sticks 9 holes long, two right-angle connectors, 4 blue connectors, a 3 hole connector-stick, and two black connectors.  Put the blue connectors in both ends of both right-angle connectors and attach them to one end of the right long connector-sticks.  Then attach the short connector-stick to the opposite end to hold the long sticks together.  Then attach the right-angle connectors to the 3 hole sticks on the body of the gun.

Connect Motor to NXT Device

DSC_2622.JPG
Run a cable through the gap in the body to motor port A on the NXT device.

Start the Clip

DSC_2631.JPG
DSC_2632.JPG
Get three 15-hole connector-sticks, a 3-way connector, and 6 extended connectors (longer on one side).  Put the longer end of the extended connectors in the 15-hole sticks (two per stick).  Put the short end of two of the extended connectors in the 3-way connector and attach it to one of the sticks with extended connectors in it.  Then attach the empty stick the the one with the 3-way in it.  Then attach the third stick on the side with the open 3-way connector piece.

Make Firing Base

DSC_2655.JPG
DSC_2663.JPG

Attach three 9-hole sticks perpendicular to the motor using black connectors.  Then attach three 13-hole sticks to the end of the 9-hole sticks facing to the left of the motor.  Then attach three 15-hole sticks to the end of the 13-hole sticks facing the back of the gun.

Build Platform for Clip

DSC_2633.JPG
Attach seven 7-hole sticks together and put a 3 hole stick on the end of each one.  In three of the 3-hole sticks (every other stick) put a blue connector in the end hole.  Then attach the 3-way connectors to the blue connectors.

Continue Clip

DSC_2636.JPG
DSC_2637.JPG
DSC_2640.JPG
DSC_2644.JPG

Attach a 15-hole stick to the center stick of the clip at the same height as the center stick.  Attach two side sticks at the same height as the other side sticks.  These side sticks however, will come down to the same height as the center stick (the center stick will be higher at the top, but they will all be even at the bottom, so the side sticks will be shorter).  Attach a few sticks to the side of the clip to close it off and keep parts from falling out.

Attach the Clip

DSC_2663.JPG

Attach the platform of the clip the the 3-sided base you made earlier.  If it is placed on the side it will shoot forward, and if it is on the front it will shoot sideways (good for around corners).  Make sure that it is the correct distance from the arm so that it reaches the ammo but does not get stuck.

Make the Pin

DSC_2657.JPG
To keep the ammo from just falling out, you need a pin.  This consists of two sticks stuck through holes next to each other passing through the clip.  You can extend and connect these sticks to make them easier to pull out.

Clip Support

DSC_2638.JPG
DSC_2639.JPG
DSC_2646.JPG

Program the Robot

The firing program consists of a 'wait' command followed by a 'switch' (if/else) command.  Set the 'wait' command to wait until the touch sensor is pressed.  Then insert the 'switch' command.  Set 'switch' to respond to the touch sensor, then in the top section (pressed), place a 'motor' command.  Set the 'motor' command to move backward with the power set to 100.  Then insert an 'end' command after the 'motor' command.  Set it to end the program when the touch sensor is released.  In the released section (bottom) of the 'switch' command, enter an 'end' command.

Final Product

DSC_2663.JPG

This is the result.  A fully automatic Lego machine gun.