Make Your Own‎ > ‎

Wiring

How you do your wiring (and how much wiring you need to do) depends on which microcontroller you are using. Choose the section below that applies to your microcontroller.



Directions for Arduino Uno:

The Arduino connects to the computer through the USB A to B cord. This also powers the Arduino board itself (but not the servos).

You will need a separate power source for your servo's. I recommend 4 C-cell or D-cell batteries, wired in series to make 6V. Check the data sheet to find the power consumption for your servos!
  1. Servo motors have three wires: power, ground, and signal. Each servo's power wire is typically red, and should be connected to the (+) wire from your servo power source. Some users add a switch in series with this wire so they can turn the power to the servos on and off (see diagram below).
  2. The ground wire is typically black or brown and should be connected to a ground pin on the Arduino board, and to the (-) wire of your power source.
  3. The signal wire is typically yellow, orange or white and should be connected as follows:
    • x-axis servo's signal wire goes to the Arduino's digital I/O pin 8
    • y-axis servo to pin 9
    • trigger servo to pin 10.
  4. Make sure that the (-) wire of the servo power source is also connected to the GND pin on the Arduino board. 
  5. Here's a diagram that should help:

With your servos and power source wired, you're good to go. However there are some optional parts that you can add, for extra functionality:
  1. Power, Status, USB, and Fire indicator LEDs - these LED's will light up as indicators. Fire tells when the software is firing, status shows the mode the software is running in, USB shows if the board is receiving commands via USB, and Power shows if the board is getting power via USB.
  2. Reload Switch - this switch usually goes on the back of the sentry. When the switch is flipped 'on', it overrides the automatic targeting and puts the sentry gun in the "Reload Position" - the default servo positions that are defined in the Arduino code. This functionality helps when the gun runs out of ammo and you need to reload it, as it holds the gun stationary while you reload. Flip the switch back to the 'off' position, and the sentry resumes it's automatic targeting.
  3. Disable Plate - in a paintball or airsoft game, the sentry can be unfair and take the fun out of a game. To fix this, you can add a disable plate. This usually takes the form of a small metal plate mounted on a hinge on the front of the sentry, with a button placed behind it. When the plate is shot, the sentry is disabled for 8 seconds.
  4. Electric trigger function - this one is tough to wire up, but very useful. If you are using an electric airsoft gun, this allows you to wire the Arduino directly to the electric motor inside your gun, instead of using a trigger servo. This reduces weight and improves response time. You'll need a logic-level N-channel MOSFET transistor for this (Q1 in the schematic below).
Here's a schematic diagram showing how to wire each of these optional peripherals:
  


First, assemble the circuitry on the solderless breadboard. Then solder everything if you can. If you want, make your own Arduino 'shield' with all the connections. This allows you to "plug" the shield into the Arduino, and "unplug" it when the Arduino is needed elsewhere, without losing track of which wires go to which pins.




Directions for the Standalone Sentry Controller:

  1. The sentry controller connects to the computer through the USB A to mini-B cord.
  2. Plug your pan and tilt servos into the labelled ports on the Sentry Controller. For each servo, make sure the black/brown wire lines up with the pin labeled by a minus sign. If you are using a trigger servo, plug that in as well.
  3. Plug your servo power source into the black power jack (5.5mm, center positive). Make sure your servo power source is the proper voltage for your servo motors. If you want to bypass the power jack or use your own jack, you can wire the power source directly to the connections labelled "Servo Power" on the bottom of the board.
 
At this point, everything should work. The following steps are optional:

Electric Trigger:
If you have an electric airsoft gun (or some paintball guns with electric triggers), you can replace the trigger servo with a direct electrical connection to the gun. Besides eliminating the cost and weight of one servo, this gives the sentry a slightly faster response time. 
  1. Find the plug that the gun's battery normally would plug into (if used in normal gameplay).
  2. Use a zip tie or hose clamp to hold the gun's trigger in the squeezed position.
  3. With the trigger held down completing the circuit, the battery plug now provides direct connections to the electric motor inside the gun.
  4. Wire the red (+) wire of the battery plug to the "GM +" connection on the Sentry Controller. (GM stands for Gun Motor)
  5. Wire the black (-) wire of the battery plug to the "GM -" connection on the Sentry Controller.
  6. Wire the + terminal of the battery itself to the "GB +" connection on the Sentry Controller. (GB stands for Gun Battery)
  7. Wire the - terminal of the battery to the "GB -" connection on the Sentry Controller.

Optional peripherals:
  1. Servo power switch - if you want to add your own external switch, you can bypass the switch on the board by wiring directly to the solder connections labelled "Bypass" on the bottom of the board. Leave the switch on the board in the 'off' position, and control will be transferred to your external switch. This is also recommended if your servos draw more than 1A of current together.
  2. Reload Switch - this switch usually goes on the back of the sentry. When the switch is flipped 'on', it overrides the automatic targeting and puts the sentry gun in the "Reload Position" - the default servo positions that are defined in the Arduino code. This functionality helps when the gun runs out of ammo and you need to reload it, as it holds the gun stationary while you reload. Flip the switch back to the 'off' position, and the sentry resumes it's automatic targeting. Wire this switch to the solder connections labelled "RL" on the side of the board.
  3. Disable Plate - in a paintball or airsoft game, the sentry can be unfair and take the fun out of a game. To fix this, you can add a disable plate. This usually takes the form of a small metal plate mounted on a hinge on the front of the sentry, with a button placed behind it. When the plate is shot, the sentry is disabled for 8 seconds. Wire the button to the solder connections labelled "DP" on the side of the board.


Here's a video tutorial showing basic setup (skip to 1:55 for the wiring stuff):





Next step: Arduino IDE & Processing IDE

Comments