Nerf Turret

by manumnadal in Circuits > Arduino

4874 Views, 60 Favorites, 0 Comments

Nerf Turret

NERF TURRET - "CREATIVE ELECTRONICS" - UMA

Óscar Pons Fernández and Manuel Maestre Nadal, students of 'Creative Electronics', a Beng Electronics module at the Univesity of Málaga, School of Telecommunications. We decide to make as final project a derivation of Bluetooth Nerf Turret.

Nerf Turret is controlled by a QT interface, moves right-left and up-down, fire five (nerf) bullets and can fire one bullet or the remaining bullets. However, you can reload with more or less bullets.

Supplies

  • Microcontroller: We decided to insert our one in the circuit. In this case, we used Sav-Maker-I (Arduino Leonardo) but you can use any Arduino.
  • Power Supply 5 V 3 A
  • 4x M5x20 countersunk screws
  • 4x M5x20 nut
  • 30x M2x10 self taping screw
  • 1x 1.5 mm metal rod
  • Wires
  • 2x Type 130 dc motors
  • 3x MG-90s servos
  • 1x Rubber band
  • 1x Pre-drilled PCB 5x7 cm
  • 1x Switch
  • Insulating tape
  • Turret Parts

Print Turret Parts

impresion3d.JPG

We started printing turret parts with a 3D printer. Then, you can view the number of each parts:

  • 1x Base MG-90s
  • 1x Charger 1
  • 1x Charger 2
  • 1x Bullet pusher 1
  • 1x Bullet pusher 2
  • 3x Legs
  • 1x Recoil arm 1
  • 1x Recoil arm 2
  • 2x Motor roller
  • 1x Servo base L1
  • 1x Servo base L2
  • 1x DC Motor support

Sav-Maker-I Code

arduino.png
sav-maker-i.jpeg

We had to program the microcontroller for turret movement and communication. We used Arduino IDE because it make work easier. Sav-Maker-I receives a movement message ("x" or "y" + "number"+ "*"), it maps the number between two numbers that they are the limit and sets movement servos. Also, it receives: a fire message ("d"+"*"), a burst message ("a"+"*") and a reload message ("r" + "*").

Movement message: it receives the mouse coordinates (one character between "x or "y" and the coordinate number) and the last character ("*") means the end of the message. The code maps the coodinate number between two predefined number (0 and 180) and sets the movement servos.

Fire message: if the turret is reloaded and it receives a fire message ("d" character and the last character), it will move the fire servo 100 degrades (reload mode) to 45 degrades (shoot mode).

Burst message: if there are bullets and it receives a burst message, it will repeat the same function that fire message a number of time depending of bullets remain in charge.

Reload message: it resets the counter bullets variable and it enables fire and burst functions.

Github repository with the code.

QT Interface Code

interfaz.png

Next, we had to program the QT interface for turret control through mouse movement. We programmed if you move the mouse while you are clicking, it will be sent a movement message to Sav-Maker-I and it will move. We had to programmed five buttons:

  1. Blue button: it sends a fire message.
  2. Orange button: it sends a burst message.
  3. Green button: it sends a reload message.
  4. Red button: it ends the QT interface.
  5. White button: it searches the microcontroller (the Sav-Maker-I) connected by serial port and it opens the device.

Github repository with the code.

Electronics

esquema.JPG
elec2.jpeg
elec3.jpeg

Now to make circuit, we must follow diagram above. The entire circuit will be integrated into a shield. We recommend taping the wiring to avoid corrosion and possible dsiconnections. Also, we suggest to incorporate a switch so you can turn on/off all motors.

It's recommendable to use a 5 V power supply because we have to feed all motors with maximum voltage and don't have current limitations.

Make the Turret

make1.jpeg
make2.jpeg
make3.jpeg
make4.jpeg

Finally it's the time to assemble the turret parts. We recommend you: first assemble the turret "legs", secondly assemble the turret "head" and finally join both parts. We suggest you to watch this video if you have any doubt about the process.

Only remains to paste Arduino shield to the turret using double sided tape and to connect pins.