Counter-Strike Robot

DISCLAIMER: Don't do anything silly with this instructables because this is purely for ejudimucation and science.

It was November 2013. On Thanksgiving day, my cousin and my brother's friend came over and we were enjoying the break by playing Left 4 Dead and CS:GO.
My mom asked me if I wanted this metal rack from the disposable baking tine.
For some reason after hours of CS:GO and a metal rack I got an idea: What if we could play CS:GO in real life? With robots, of course. What if you could control a physical body using WASD, ctrl, spacebar, and all of these game controls?
For the next few months my brother and I worked on this robot. Since it was our first time building one of these, we were both trying different things to see what worked and what didn't.

Counter-Strike Robot
The goal was to build a remote controlled robot (by remote I mean half way across the globe) that had a live camera feed and could be controlled using the typical keyboard game controls. So we decided to build something that used internet to control a tank-like machine that could fire pellets from an airsoft gun.
PS check out the original blog for hardware: nugget

Step 1: Stuff you need to gather

Now, first of all, I would like to defend myself.

This robot is a first: we never built anything like it before, and we have pretty much no experience doing this sort of thing, so a lot of it was guess and check, prototyping, and Thomas Edison style building.

SO, that being said, the material list below might not be totally complete; if you have any questions we appreciate them!

  • A motorized vehicle with differential (preferably) that has great torque.
  • MUCH plexiglass
  • 4 pairs of nuts and bolts
  • Zip ties
  • some tape
  • maybe some cardboard
  • some string
  • Airsoft pistol (preferably electric)
  • SG-5010 servo motor
  • SG-90 servo motor
  • 4 5v relays
  • 4 TIP31 NPN transistors
  • 6 1k resistors
  • 2 2n2222 NPN transistors
  • some PCB material
  • Rainbow bacon
  • Headers and wires
  • External 5vdc battery (Smartphone charger)
  • Raspberry Pi (in this we use Rev2)
  • An Arduino (optional)

Step 2: Dissassemble the chassis

This is actually a pretty big step. Once you accomplish this step you are probably 20% done!

First, take off the cover, remove all screws, etc, until you see a circuit board.

In my case, the circuit board was broken, so I removed it, keeping note of possible wires to motors
If your vehicle works, you might consider using the already installed H-bridge. It will require a lot of research and reverse engineering but it's less costly!

After noting the wires to the motors (there should be two motors, so four wires), you should strip them and convert the wires to something more breadboard friendly if they are not.

Then, using a 9v battery (or another battery with the appropriate power for your motors), test to see if the motors run.
In my case, the motors were locked by some locking mechanism, which I had to remove.

If your motors are broken, then don't bother using the chassis unless you have a replacement.

You can also use the battery to determine the polarity of the motor, to know which way the motor turns clockwise or counterclockwise. mark this down with wire color or some method that you will remember.

Step 3: Trigger pulling mechanism

This part is subjective to the airsoft gun you have.

If you have a spring airsoft gun, you will need to find a way to cock it each time the gun fires. Also, you will probably need a stronger servo motor to pull the trigger.
Using an electric airsoft gun was optimal for us, because it was automatic and required little force to pull the trigger. The one we bought was $15, so that was cool.

Securing the safety

I used zip ties to secure down the safety trigger system on the gun. From now on the gun fires if there is a battery inside, so try not to load it with pellets or you might forget and “shoot your eye out.”

Tying the servo

Us the single ended servo motor head on the SG90 and bring the servo to 120 degrees. When the servo is at 120 degrees, it should be pulling the trigger all the way back.

Tape overkill

In order to make sure stuff didn't shift around, I taped the gun with a whole lot of masking tape (so it doesn't leave residue).

After doing that, I taped on a piece of flat cardboard for the sake of the servo motor being on a stable surface.

Step 4: Gun trigger servo testing

Using an Arduino, your probably want to test out your mechanism before moving on.

Attached are two short movies showing how the servo motors should work.

Also attached is the Arduino sketch which I used in those movies.

The servo motor pinout should be self explanatory:

RED – Vcc (minimum 5v)

BROWN – GND

YELLOW – PWM signal (minimum 3.3 v)

Testing your servo motor would also be good in determining if you put on the servo head correctly.

// Sweep
// by BARRAGAN <http://barraganstudio.com> 
// This example code is in the public domain.


#include <Servo.h> 
 
Servo myservo;  // create servo object to control a servo 
                // a maximum of eight servo objects can be created 
 
int pos = 0;    // variable to store the servo position 
 
void setup() 
{ 
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object 
} 
 
 
void loop() 
{ 
  for(pos = 0; pos < 120; pos += 1)  // goes from 0 degrees to 180 degrees 
  {                                  // in steps of 1 degree 
    myservo.write(pos);              // tell servo to go to position in variable 'pos' 
    delay(5);                       // waits 15ms for the servo to reach the position 
  } 
  for(pos = 120; pos>=1; pos-=1)     // goes from 180 degrees to 0 degrees 
  {                                
    myservo.write(pos);              // tell servo to go to position in variable 'pos' 
    delay(5);                       // waits 15ms for the servo to reach the position 
  } 
}

Step 5: The handle plexiglass

We want the gun to be able to move up and down the the robot, right?

To accomplish this, I had to do some extreme googling to determine the servo motor with the right torque for the gun. It happens that the SG-5010 fit our budget, our power restraints, and torque needs.

The SG-5010 will serve as the servo motor to rotate the gun about it's butt. In order to hold the gun without destructing it, I assembled a plexiglass holder.

The scrap plexiglass was about 4.5 cm in width and 15cm in length.
Engineering principles about precise measurements were sort of disregarded in this section.

Counter-Strike Robot Diagram
How to bend plexiglass without expensive machinery

Not many of us own plexiglass benders at home. Besides, they take a long time to heat up a single bend.

There are two ways of bending:

  1. Using a soldering iron on a piece of plexiglass that spans less than the entire length of the iron; basically, you hold a soldering iron right below your bend line. The bend line must fit on the soldering iron, or it won't bend all the way. It takes some time to heat up, and steady hands not to come in contact with the plexiglass.
    I generally prefer not to use this method after I discovered method two.
  2. If you own a cigar lighter, or any sort of torch, this is the method for you. It takes less than 30 seconds.
    All you have to do is light up the torch and move it up and down along the plexiglass about 10 passes. Then flip over the plexiglass and do the same. You should notice the plexiglass becoming more malleable.
    When the plexiglass starts having small bubbles, it's time to bend. You generally want to bend before that happens.

In both these methods, after heating up the plexiglass, use a ruler as a flat edge to bend.

In the first bend, I sort of estimated what it should have been. It was just a random bend that was sort of reasonable.

In the next bend, I fit the plexiglass around the gun and sort of marked off where I needed to bend. I did this for the next bend also.

I did not have a fourth bend because I ran out of plexiglass, so I just glued on a random piece of scrap using Krazy Glue. Krazy Glue works like magic on plexiglass: strongest bond ever.

Step 6: The servo attached to the handle

After getting a snug fitting handle, drill a hole where you want to connect the servo motor. This creates a depression so the servo fits on nice and flat.

Again, I used Krazy Glue to secure the plastic together. Honestly I think it does a better job than screws.

Step 7: Gun<>Chassis stand

In this step, we will also be using plexiglass.

Standing bracket

In order to secure the servo motor to the chassis, I had to measure the minimum height the gun had to be (to give it the most flexible range of rotation)

It turns out that the gun had to be elevated about 6cm about the gun.

So, I made a bracket that was 2cm on each base and 6cm high. That means I used a 10cm * 10cm peice of plexiglass (it was 10 cm wide). This bracket will support the servo motor.

You will have to use the torch method or a plexiglass bending machine to bend plexiglass this long. 10cm was longer than my soldering iron, so it might be the same for you.

After bending it, I drilled two holes at the top for another piece of plexiglass (mentioned later)

Securing bracket

This thing was sort of unnecessary, but I made it anyways.

This piece of plexiglass was 2cm by 14 cm originally. The flat bottom parts are 3cm, the height is 2cm, and it is 4cm at the top.

The purpose of this part is to hold down the servo motor, so if your servo motor is a different size, you will need different dimensions.

Drilling

In order to guarantee flawless drilling, I taped the two pieces together before drilling, to make sure holes match.

Of course, the purpose of drilling is so that we can secure the nuts and bolts, so make sure the hole is wide enough and not too wide.

 

For more detail: Counter-Strike Robot


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top