# SoccerBot With IR Remote Control

2,261

10

3

In this Instructable I will discuss how the basis of building your own soccer rover. The rover will have a very simple design and simple code which is meant to help beginners to understand arduino and robotics. This is a great introduction to rover building and affordable in which the robot costs up to \$50 (not including arduino). We will learn how servos work and even how to hack them so that they can rotate continuously (most servos can only rotate up to 180 degrees).

### Why Build this?

Not only is this rover good for beginners, but it can lead to a lot of fun. This is great for soccer fans that can use the rover for fun. Or you can build many of them and form a team with your friends and compete against each other. There are many ways you can use the rover and have fun with it.

I recommend a 3D printer to create this project. It is not needed but it would be easier.

### Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

## Step 2: Continuous Servo Rotation

Of course, this project wouldn't work without having motors that can move the robot. The two reasons we are using servo motors and not dc motors like most rovers is because they are more difficult to code and because they cost more than servos (and the cost of motor shields breaks the bank). Here is the quick step by step process of hacking the Towerpro SG90 for continuous rotation or if you want you can follow this in-depth tutorial that I used. I am not responsible for any broken servos. Do this at your own risk.

1. Using a butter knife or a small screwdriver, unscrew the tiny screws seen on the bottom of the servo. Make sure to memorize the gear positions so that you can reattach it at the end.
2. Take the top gear which has the protection sticking out of it and with pliers, cut the protection which is responsible for the 180 degree rotation.
3. Remove all the gears until you see the top of the potentiometer. Use the small screwdriver to pry off the metal plates that you see. If that doesn't work, you can glue the potentiometer (I don't know if that actually works).
4. You do not need to solder anything.
5. Put everything back together as it was in the beginning.

Here is the test code to see if the hack worked:

## Step 3: Guide to Picking the Perfect Wheels

Wheels are very important for this project. How else is it going to move around? I recommend either 3d printing the wheels like I did or you can use the wheels from old toy cars that you have laying around. Make sure that your wheels aren't too heavy to turn or else the motors can overheat and break. The motors do not have that high enough torque and cannot turn heavy items.

The next part is the caster wheels. Caster wheels are using in the back of the rover so that the rover can stay balanced. It is also used as a pivot point that allows the rover to spin around. Caster wheels can be found all over the web or around your house. I used one that I found in my house as seen in the picture. I later found out that they are too big so I had to get creative. Make sure the caster wheel is high enough. You don't want them higher than your wheels though or else the robot will look silly. I recommend buying the caster wheel seen in the Bill of Materials and making the wheels from there.

## Step 4: Creating the Body of the Rover

Download the kicker and the base of the robot and print it out using a 3d printer and follow these steps to create the rover:

1. Attach the servo motor that wasn't hacked to the top of the body as seen in picture 1. Make sure that the servo shaft is closer to the front of the rover. Note: Make sure that the kicker servo is at 180 degrees This is the starting position.
2. Screw or glue the kicker to the servo arm and attach it to the servo.
3. Velcro the two continuous Towerpro to the bottom of the body Place the Velcro 2.28 inches from the front.
4. Connect the breadboard to the back right of the body. The breadboard should have its own stickiness but if it doesn't you can use Velcro
5. Screw the arduino to the back left of the body.
6. Velcro or glue the wheels to the Towerpro servo arms and attach it to the bottom servos.
7. Connect the caster wheels to the back of the rover.
8. Velcro the power supply to the front left of the robot.

What if I Don't Have a 3D Printer?

It's okay if you don't have one. There are different ways to make the rover's body and as long as you have the Velcro it should be easy to attach the servos to the body. Some of the stuff you can use, for example, are cardboard, Styrofoam, wood, or plastic. There are many possibilities to choose from. Just make sure that the size and design is the same as mine.

Here is the code to put the servo in starting position:

## Step 5: Connecting the Servos

Now let's talk about how to connect the servos. Servo motors have three different color wires that can be attached to the arduino. The following is the wiring for the Towerpro SG90:

• The brown wire found on the left side represents ground.
• The middle red wire is connected to the voltage to turn on the servo.
• The orange wire on the right side represents the signal that they get from the arduino.

WARNING: Each servo type has their own wiring. I strongly recommend to look up the datasheet of the servo you are using before continuing.

Looking from the back of the robot and using the diagram above:

• Connect the orange signal wire of the right SG90 servo to pin number 7 on the arduino.
• Connect the orange signal wire of the left servo to pin number 6.
• Connect the orange signal wire of the kicker servo to pin 8.
• Connect the 5 volts and the ground of the arduino to the breadboard.
• Connect the ground and voltage wires of the servos to the breadboard.

## Step 6: Setting Up the Controller

Now setup the IR controller so that you can control the robot. The IR receiver allows the arduino to read the button that you press on your controller. Once a button is pressed, the receiver will read the information and send it to the arduino which than do what the code tells it to do when the said button is pressed. It is important to set up the receiver the right way or else it will fry and not work. Looking at the above receiver datasheet, the pin connections are the following:

• The left pin needs to be connected to arduino's signal. For our bot it is connected to pin 3.
• The middle pin gets connected to the ground.
• The right pin gets connected to the voltage Vcc so that it can be powered.

Use the cables that came with the controller to connect the receiver to the arduino and breadboard. Follow the diagram above to set up the IR Controller with the servos. Make sure the controller is pointing at the sensor. It will not work if it isn't.

For this code, we are using the following buttons:

• 2= Forward
• 8= Backwards
• 4= Left
• 6= Right
• 5= Kick
• EQ= Stop

More information on the code can be found in the file. Now plug in the power supply and have fun! The code can be found here:

Participated in the

Participated in the
Arduino All The Things! Contest

## Recommendations

• ### Internet of Things Class

22,848 Enrolled

## 3 Discussions

where's the video mate !

where's the video mate !