Introduction: Basic Doomsday Device

About: Mild-mannered IT manager by day, evil scientist by night, I'm currently building my first arsenal of doom.

So, I'm not saying this would help you in your plans of world domination, but it won't hurt, either.

The project here is for a laser that can be aimed by joystick. The joystick I used came from a broken RC helicopter toy, but should consist of two Potentiometers (ie, not 4 microswitches).

This is my first project, I'd love suggestions if I did something wrong.

Step 1: Parts Required

  1. A basic Pan/Tilt camera mount, with two servos. I used aliexpress for my parts, but I'm sure they're available elsewhere also. The mount can be bought with the servos (I'm using two SG90's), or they can all be bought separately. The mount cost me $0.40, and the servos us$1.20 each:
  2. An Arduino of some sort. I'm using an Uno. AliExpress has them for us$3.20:
  3. A Microswitch, for firing the laser. Can be any switch, but I would recommend a dead-man switch of some sort - if the laser is permanently switched on, it will overheat, and can destroy your project (instead of the world). us$3.00 gets you 20 of them:
  4. A laser diode. I'm using a "KY-008" 3pin 650nm Red Laser Diode, from Aliexpress. They cost us$0.69 each:
  5. A joystick. I salvaged one from an old broken RC helicopter toy, but AliExpress has them as well, for us$0.77:

  6. A white cat. C'mon people, you gotta take this stuff seriously. Admittedly, mine is a tabby, and he's not very evil. Yet. I'm working on it (see a later project, possibly).

Also, get yourself a breadboard and some cabling. I'm assuming you already have those.

Step 2: Set Up the Hardware

We're going to be using Analogue pins in this one, and both 3.3 volt as well as 5v for our inputs. The laser works on 3.3 volt but the stepper motors want a little more grunt.

First, unplug your Arduino. Never plug stuff into the board while your power is on. Avoid trouble.

Let's begin! First, the servos.

  1. Hook up the Arduino 5v to the "+" rail on the breadboard.
  2. Hook up the Arduino GND to your "-" rail on the breadboard.
  3. The two SG90 Stepper motors have 3 wires:
    1. GND (brown) - plug both into "-" rail on breadboard
    2. 5v (red) - plug both into "+" rail on breadboard
    3. DATA (orange) - plug into pins "A4" and "A5" on the Arduino.
      1. Left-Right goes into A4
      2. Up-Down goes into A5

Next, the joystick. It's made up of two potentiometers (10k is common, but others will probably work just as well). The Pots have three wires again:

  1. GND - plug both into "-" rail on breadboard
  2. 5v - plug both into "+" rail on breadboard
  3. DATA - plug into pins "A0" and "A1" on the Arduino.
    1. Left-Right goes into A1
    2. Up-Down goes into A0

Once the unit is up and running, if you find that your laser is not working the way you expected it to, you can interchange the GND and 5v pins of the pots to make them reverse direction of the servos.

Next, the laser. I'm using a KY-008 module, which already has the resistor on the mini-board, but if you're using a loose laser component, don't forget to add the resistor to this circuit.

  1. Plug the laser's Vdc pin into on pin of the microswitch, and the other pin into the 3.3v pin of your Arduino
  2. Plug the laser's GND pin into the "-" rail of your breadboard.
  3. I'm not using the REF pin (the middle one) as I'm not sure what it does. It seems to work without. (anyone?)

Step 3: The Code

Epilog Contest 8

Participated in the
Epilog Contest 8

Arduino Contest 2016

Participated in the
Arduino Contest 2016

First Time Authors Contest 2016

Participated in the
First Time Authors Contest 2016