/ Saturday, 25 February 2017 / 1 Comment / , ,

How to make Soccer Robot for Robocup

How to make Soccer Robot for Robocup

Hey Everyone..!!!
The news is that We have some great and most exciting events coming ahead.Some of us are very curious about robotics.Sometimes just for the fun and sometimes for the sake of academic projects.
And believe me when first time i made a robot i was too much excited to play with it.After that i participated in some robotics competitions and then i heard about something that could be the
Dream.That is something Big..!!.I hope You are aware about this event.Yes i'm talking about Robocup.
 I made a robot for small soccer league that was held in my institute.On that basis we were preparing for the robocup. So here i'm going to tell you about small soccer league (SSL).After that we will see some setup for robocup senior category.
we will design an omni directional robot for small size soccer league.


This guide will cover the following topics:

Contents:



  1. Introduction to Soccer Robot and Robocup SSL
  2. Basics of Robot
  3. Manual Controlling of Robot
  4. Basics of Autonomous Robots
  5. Mechanical design
  6. Mechanical Parts
  7. Designing of robot base
  8. Omni Wheels design 
  9. Dribbler
  10. Kicker
  11. Electronic design
  12. Electronic Parts
  13. Wireless Communication using nRF24L01
  14. Solenoid
  15. Ball Detector Circuit
  16. Booster
  17. Motor Driver
  18. Programming and Algorithms

Introduction to Soccer Robot and Robocup SSL

This guide is based on Small Size League (SSL) and making of Soccer playing Robot .The entire
system has been divided into four main parts, the first one is Vision system second one is Artificial
Intelligence (AI) system, third is Referee Box and finally five remotely controlled robots. It includes
mechanics, electronics, mechatronics and programming skills
The vision system is digitally processed with two signals capturing from camera mounted on top of the field. The position and orientation of ball and robots are computed by the vision system through camera. The information of vision system is transmitted to AI system which is responsible for making, deciding and providing the strategic game decisions. The roles of robots provide the teams to be acted according to the commands transmitted by database. The controls are goalkeeper, defense and forward. The main factor is to avoid the collision with the robots and specifically avoid the collisions with opponents. The decisions for game are to play with commands given to the wireless receiver. The robot is capable enough to execute the commands that converted by the AI system. This cycle is repeated 30 times per second. Moreover, the referee transmits relevant decisions such as penalties, goals, start of game, end of game, etc. These commands are sent to the AI system through a serial link. All robots are responsible and capable enough to execute effectively the commands sent via AI system. Our robot includes specialized and effective electronics with such accuracy to communicate with remote computer and control locomotion and all defined actions. Similarly mechanical section which is explained ahead and has four main parts movements, control of ball, shoot and protection, strong chases and reduced friction Omni wheels.

Complete guide on how to make robot for robocup. soccer robot with autonomous and manual controlling


Basics of Robot

Robot is the machine
which performs the human work and tasks automatically or manually. Therefore the robot is
defined as the mechanical devise which can be programmed to let work as per command defined,
such as moving, picking the tools, dropping the tools and dragging etc. The action of robot can
be categorized with three steps that are sense, think and act.

This project is based on the AI ( Artificial intellegence )system and the control signals are given and processed through wireless module. The basic is the design of AI system, communication done through NRF wireless module, strong chases and selection of the motors using required motor drivers.

Manual Controlling of Robot

The robots are designed with a test bench where you can test your algorithms and signal processing. The batteries to power-up the modules must be efficient and their current rating must meet the requirement.
The motors are selected such that their RPM should be enough to bear the weight of the robot. The speed must not be reduced. Chases of the robot and structure of the robot must be designed with sharp precision.
The tires must be selected as to have locomotion in large number of varieties. Manual controlling of robot works through wireless remotes and through other medium of wireless communication like Bluetooth, infra-red, internet protocol using router and or joystick. The block diagram for manually controlling robot.



Basics of Autonomous Robots

The autonomous robots have their own algorithms otherwise it can be easy by connecting sensors at different places of the robots. Autonomous robot is entirely different with respect to its controlling explained in next section. The basic of Autonomous robot is mainly consists of AI and the vision system. The vision system is designed to give information of the field to AI system and the AI has algorithms built in it. The decisions are taken according to the information received. The game decisions are totally dependent on AI system.
AI works on two algorithms mainly. Programmer
can go with Dijktra Algorithm or A* Algorithm. Dijktra is old one and it is not followed these days
usually, but A* is being followed and many projects of AI has been designed using many other algorithm. The other operation and working is same as the defined in manual controlling section. The robots have their locomotion defined and all the signals are always predefined, therefore the main part of robot is the motors. The motors get the signals from their respective drivers and the drivers get signals from the receiver of the wireless module. The communication is totally based on wireless and between two nodes there will be no wired connections. The receiver is NRF module and getting signals from database wirelessly. The programming and algorithms are built for the receiver to understand the transmitting signals coming from the transmitter of the database. These all summarize the basics of Autonomous robot and its controlling.

Mechanical design

This section explains about the details of mechanical work and design of robot and its
mechanics. Since we are designing the robot having circular base with omni wheels therefore we
have to be very carefully about alignment and chases. The purpose of using omni wheels is to
provide a motion in different direction like front, back, diagonal, left, right, clockwise and
counter clockwise. The base of the robot is such that it supports the rigidity to the structure. The
base of any robot must be dynamically strong that it must be following the direction and must
not be distract from the given commands. The design must be chosen that the integration of body
parts is easy.The chapter aims to create the locomotion of robot and such mechanism to
create base of complete autonomous robot therefore on follow the commands by
avoiding each obstacle to complete the desired tasks the study of motion of robot mechanism and
also the dynamics and mechanics should be done.

complete design of omni wheel robot for soccer playing.complete design guide with design files


Mechanical Parts

Robot consists of such mechanical parts that they cannot be considered as simple. The dimension
of the parts with complete weight of the robot is required to join each with structure of the robot.
The Robot consists of following mechanical parts.

1- Acrylic Sheet
2- Omni wheels
3- Dribbler
4- Kicker
5- Motors

Designing of robot base

Acrylic Sheet (base)

We have designed the base of robot from acrylic sheet which is cut by using laser cutting
machine. The shape of base is circle having the diameter of 250mm and the upper portion is
about 230mm.The upper two wheels are at the angle of 35dergree from centre and the lower two wheels are at the angle of 45 degree this designed is inspired from one of the team who participated in Robocup. This design gives the drag to the robot when moving forward and also a movement in
the respective angle. The thickness of acrylic sheet is about 5mm we choose acrylic because it is
light weight and its cutting is less expensive then the metal.

Acrylic design of omni wheel robot.Complete guide on making robot chassis with sketch files

You can also check out this post about Aluminium base of Robot instead of acrylic sheet.click on the image of aluminium base for more information about designing.

how to make robot chassis.Complete design guide with sketch files.Robot for soccer playing .Robot for robocup
how-to-design-robot-chassis


Omni Wheels design 

In the robot we have used the omni-directional wheels because these wheels give us the
advantage of the movement in any direction it can also slide the robot and reduces the friction.
The diameter of each wheel is 60 mm. Omni-wheels are advised on the abstraction of an
accustomed caster that has the adeptness to cycle or 'slip' sideways.




This is the sketch diagram of coupler. These coupler couple the shaft of the
motors. This links the wheels and motors to be connected.

motor coupler sketch.coupler for omni wheel fitting


Dribbler

The dribbler is used to have the ball in the possession of the robot it is located on the front of
robot a rod which is attached to the helical gear and the other helical gear is located at the
90degree which is rotated due to the motor and revolve the dribbler rod. The dimension of the
dribbler is given.

Design of dribbler of soccer robot.soccer robot guide for robocup

Kicker

The kicker material is of aluminum at the front end which will be kicking the ball.The rod
which is passing inside from solenoid coil is the mixture of aluminum and MS rod. The
mechanism of how the kicker will be acting force towards the ball.The front dimension off the kicker is given in this figure.
kicker mechanism design for soccer robot.robot guide for robocup



See the Detailed post about Kicker mechanism and solenoid.The solenoid is also discussed in electronics section.

Selection of motor

The motors which we have used in this robot are a DC gear motors having high rpm and high
torque they are PMDC typed.The advantages of these motors are constant magnetic field which
is uncontrolled by external source.We have used four motors of same rpm assembled with Omni
wheels. The locomotion of the robot is controlled with the logics designed using H-bridge with
each motor to control the direction of the motor.

The specification of motor (Model Number:JGY37-545) is
  1.  12 to 24 V
  2.  1.2A
  3.  stall Current = 1.4A
  4.  speed = 1120 rpm (on no load)
  5.  Torque = 1.5 kg.cm
The Dimension of motor are
  1.  Motor Size: 51mm(L) x 36mm(D)
  2.  Shaft Diameter: 6mm

ELECTRONIC DESIGN 

Electronic Parts

  1.  Battery
  2.  Power distribution circuit
  3.  H-bridge
  4.  Arduino
  5.  NRF-module
  6.  Boost Converter
  7.  Ball detector circuit
  8.  Solenoid

Battery

The battery is providing source to each component and it is selected as per requirement of
the current. We have selected the lipo battery for our robot because it’s a light weight and
provide us our required current. Our Battery consist of 5 lipo cells each cell having
3.7volts total of 18.5volts battery having 5000mAh current.
  • Output voltage 18.5V
  • Initial Current 5A Max
  • Discharge (c) 25
  • Max Charge Rate (C) 2
  • Weight (g) 640
  • Length(mm) 146
  • Height(mm) 51
  • Width(mm) 42

Power Distribution circuit

In the robot we needed 3 different voltages to operate our devices first our battery contain
18.5 volts which are needed to operate motors secondly we needed 12 volts to operate our
motor driver IC IR2104, dribbler motor and for booster circuit because input of our booster is
12 volts. In last we needed 5 volt to operate our controller Arduino and for ball detector
circuit.

For this purpose we design two regulators for step down voltages by using LM7812 and
LM7805 the circuit diagram are as follow.
12 volt regulator circuit consists of
  1.  LM7812
  2.  diode
power distribution circuit for robot.complete circuit details.guide of power circuits

5volt regulator circuit consists of
  1. LM7805
  2. diode
  3. capacitor

Arduino Development Board

I am not going to discuss about the basics of arduino here.you can read about arduino in these following posts.

Wireless Communication using nRF24L01

The wireless communication is done between various nodes. Since we are at the node of between
receiving data from GUI, therefore wireless module is used. The controlling of robot is being
done by using joystick. The module which we used for wireless communication is nRF24L01.

I already discussed complete details about nrf and arduino interfacing.Read the detailed post of nrf24Lo1+. Arduino codes for nrf are also available in that post.

Solenoid


A solenoid consists on coil of insulated wire. We have to design solenoid to provide strong inner
magnetic field in order to fulfill our purpose of kicking mechanism. For this purpose Teflon
material is used on which copper is wounded, when current flowsthrough the coil then strong
magnetic field is produced within the core due to which kicking mechanism of the robot will
work.
One more post is available for kicker mechanism and solenoid.You can get the design files from there.

specification of the solenoid:

  1. Wire gauge 30 AWG
  2. Input voltage 230 V
  3. Number of turns of Cu wire 1800
  4. Resistance/meter of Cu wire 0.339
  5. Diameter of Teflon 8mm

Ball Detector Circuit

To start the dribbler we have designed the ball detector circuit which is mounted on the sides of
dribbler by using IR sensor. When there is no object the receiver receive the signal from
transmitter and when the ball comes to our robot the signal will be disconnected the receiver will
not generate the output signal and then this logic is inverted through using NOT gate and it will
generate a signal to operate the motor driver for the dribbler. The circuit is shown in the figure
Read Detailed post of Ball detector circuit with circuit diagram.
Ball detector circuit diagram.circuit diagram for soccer robot.guide of making robot for robocup

Booster

For the kick we have to energize our coil and to energize the coil we needed high voltages for
this purpose we have designed the boost converter which convert the 12 volt into 220 volts.

See the Detailed post about Booster 

Motor Driver

To control the direction and speed of motor we have to use motor drivers.
I have done this part using L298 ic and also with L298 module.
See the related post to this part.


PROGRAMMING AND ALGORITHMS

First step was to control robot manually by using remote and wireless communication this step
was done by using arduino and nrf we first manually control the robot and check its parts are
properly working and seeing its direction by controlling motors.
Here is the Code for arduino boards:

Code

1. TX

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#define CE_PIN 9
#define CSN_PIN 10
#define JOYSTICK_X A0
#define JOYSTICK_Y A1
#define JOYSTICK_A A2
#define JOYSTICK_B A3
const uint64_t pipe = 0xF2E4F3F6E9LL;
RF24 radio(CE_PIN, CSN_PIN);
int joystick[4];
void setup()
{
Serial.begin(9600);
radio.begin();
radio.openWritingPipe(pipe);
}
void loop()
{
joystick[0] = analogRead(JOYSTICK_X);
joystick[1] = analogRead(JOYSTICK_Y);
joystick[2] = analogRead(JOYSTICK_A);
joystick[3] = analogRead(JOYSTICK_B);
radio.write( joystick, sizeof(joystick) );
}

2. RX

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#define CE_PIN 9
#define CSN_PIN 10
const uint64_t pipe = 0xF2E4F3F6E9LL;
RF24 radio(CE_PIN, CSN_PIN);
int joystick[4];
int x,y,a,b;
// Motor A
int dir1PinA = 36;
int dir2PinA = 37;
int speedPinA = 5;
// Motor B
int dir1PinB = 34;
int dir2PinB = 35;
int speedPinB = 4;
// Motor C
int dir1PinC = 24;
int dir2PinC = 25;
int speedPinC = 2;
// Motor D
int dir1PinD = 26;
int dir2PinD = 27;
int speedPinD = 3;
void setup()
{
Serial.begin(9600);
pinMode(dir1PinA,OUTPUT);
pinMode(dir2PinA,OUTPUT);
pinMode(speedPinA,OUTPUT);
pinMode(dir1PinB,OUTPUT);
pinMode(dir2PinB,OUTPUT);
pinMode(speedPinB,OUTPUT);
pinMode(dir1PinC,OUTPUT);
pinMode(dir2PinC,OUTPUT);
pinMode(speedPinC,OUTPUT);
pinMode(dir1PinD,OUTPUT);
pinMode(dir2PinD,OUTPUT);
pinMode(speedPinD,OUTPUT);
delay(1000);
Serial.println("Nrf24L01 Receiver Starting");
radio.begin();
radio.openReadingPipe(1,pipe);
radio.startListening();;
}
void loop()
{
if ( radio.available() )
{
bool done = false;
while (!done)
{
done = radio.read( joystick, sizeof(joystick) );
//Serial.print("X = ");
Serial.print(joystick[0]);
//x=joystick[0];
//Serial.print(" Y = ");
Serial.println(joystick[1]);
//y=joystick[1];
//Serial.print(" A = ");
Serial.print(joystick[2]);
//a=joystick[2];
//Serial.print(" B = ");
Serial.print(joystick[3]);
//b=joystick[3];
if(joystick[0]<2){ // Forward
analogWrite(speedPinA, 180);
analogWrite(speedPinB, 180);
analogWrite(speedPinC, 150);
analogWrite(speedPinD, 150);
digitalWrite(dir1PinA, LOW);
digitalWrite(dir2PinA, HIGH);
digitalWrite(dir1PinB, HIGH);
digitalWrite(dir2PinB, LOW);
digitalWrite(dir1PinC, LOW);
digitalWrite(dir2PinC, HIGH);
digitalWrite(dir1PinD, HIGH);
digitalWrite(dir2PinD, LOW);}
downward
else if(joystick[0]>1022){
analogWrite(speedPinA, 180);
analogWrite(speedPinB, 190);
analogWrite(speedPinC, 150);
analogWrite(speedPinD, 150);
digitalWrite(dir1PinA, HIGH);
digitalWrite(dir2PinA, LOW);
digitalWrite(dir1PinB, LOW);
digitalWrite(dir2PinB, HIGH);
digitalWrite(dir1PinC, HIGH);
digitalWrite(dir2PinC, LOW);
digitalWrite(dir1PinD, LOW);
digitalWrite(dir2PinD, HIGH);}
//ccw
else if(joystick[3]>1021){
analogWrite(speedPinA, 120);
analogWrite(speedPinB, 135);
analogWrite(speedPinC, 60);
analogWrite(speedPinD, 60);
digitalWrite(dir1PinA, HIGH);
digitalWrite(dir2PinA, LOW);
digitalWrite(dir1PinB, HIGH);
digitalWrite(dir2PinB, LOW);
digitalWrite(dir1PinC, HIGH);
digitalWrite(dir2PinC, LOW);
digitalWrite(dir1PinD, HIGH);
digitalWrite(dir2PinD, LOW);}
//cw
else if(joystick[3]<2){
analogWrite(speedPinA, 120);
analogWrite(speedPinB, 120);
analogWrite(speedPinC, 60);
analogWrite(speedPinD, 60);
digitalWrite(dir1PinA, LOW);
digitalWrite(dir2PinA, HIGH);
digitalWrite(dir1PinB, LOW);
digitalWrite(dir2PinB, HIGH);
digitalWrite(dir1PinC, LOW);
digitalWrite(dir2PinC, HIGH);
digitalWrite(dir1PinD, LOW);
digitalWrite(dir2PinD, HIGH);}

else {// Stop (Freespin)
analogWrite(speedPinA, 0);
analogWrite(speedPinB, 0);
analogWrite(speedPinC, 0);
analogWrite(speedPinD, 0);
digitalWrite(dir1PinA, LOW);
digitalWrite(dir2PinA, LOW);
digitalWrite(dir1PinB, LOW);
digitalWrite(dir2PinB, LOW);
digitalWrite(dir1PinC, LOW);
digitalWrite(dir2PinC, LOW);
digitalWrite(dir1PinD, LOW);
digitalWrite(dir2PinD, LOW);}
//kick
if(joystick[2]<2){
digitalWrite(40,HIGH);}
else{
digitalWrite(40,LOW);}
}
}
else
{
analogWrite(speedPinA, 0);
analogWrite(speedPinB, 0);
analogWrite(speedPinC, 0);
analogWrite(speedPinD, 0);
digitalWrite(dir1PinA, LOW);
digitalWrite(dir2PinA, LOW);
digitalWrite(dir1PinB, LOW);
digitalWrite(dir2PinB, LOW);
digitalWrite(dir1PinC, LOW);
digitalWrite(dir2PinC, LOW);
digitalWrite(dir1PinD, LOW);
digitalWrite(dir2PinD, LOW);
Serial.println("No radio available");
}
}

Concluding Statement:

After these step we proceed to the Artificial intelligence, after controlling manually robot. First we
serially communicate it with GUI through NRF module. One end of NRF is interfaced with
Arduino UNO R3 and on another end we used Arduino MEGE 2560.
in SSL vision the camera captures the image of the robots playing and ball by using color pattern
embed on them. This information is broadcasted though WIFI modem. This than is received by
our PCs and this information extracted through the file provided by management of the event
named as ‘protobuf.’ This information is further utilized to calculate and make the strategy for
our robots on the field and predict the movement of opponent and ball using Line equations and
orientation. This smart intelligence is used to make strategy. This strategy is used to calculate the
directions and PWMs of all the motors mounted on each robot. Than transmitted to our robot
through NRF modules. For this AI server, we are using multi threading in C# to process for 2
robots at the same time.
I hope you understand the method and sequence of steps.Half of the things i have covered in separate posts so that's why i didn't discussed everything here.
In coming post we will see how to setup the field for autonomous robot.Installation of SSL software and testing with example code.
Follow for upcoming updates as still there is much more left about autonomous robot.so we will cover up everything in coming posts.
I hope you enjoyed it...keep making robots...!!!
Share This Post :
Tags : , ,
Related Posts

1 comment:

  1. remove this blog. it is affecting my career. it is totally plagiarize with my thesis report. submitted to university on April 2016.

    ReplyDelete

Social Media

Popular Posts