Design and Implementation of Compact Robot Soccers

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

The 8th SCIENCE and TECHNOLOGY SYMPOSIUM FOR OISP STUDENTS

Ho Chi Minh City University of Technology (HCMUT), VNU-HCM

Design and implementation of compact robot soccers /Phân tích và thiết kế robot đá banh
Lam Hung Minh1,2,3, Cao Tri Thuc1,2,3, Pham Cong Bang3*
1
Faculty of Mechanical Engineering, Ho Chi Minh City University of Technology (HCMUT), 268 Ly Thuong Kiet Street,
District 10, Ho Chi Minh City, Vietnam
2
Office for International Study Programs, Ho Chi Minh City University of Technology (HCMUT), 268 Ly Thuong Kiet Street,
District 10, Ho Chi Minh City, Vietnam
3
Vietnam National University Ho Chi Minh City, Linh Trung Ward, Thu Duc District, Ho Chi Minh City, Vietnam
*Corresponding author: cbpham@hcmut.edu.vn
Abstract
Mobile robots have been applied a lot in different fields such as household vacuum cleaner robots, auto-setup chairs
in offices, factory forklifts and even in sports. In the world, there are many competitions about robots combined with
sports, especially football such as RoBoCup. This study aims to design and build compact robots that are 100mm x
100mm in size, can be assembled easily and capable of playing football by controlling the robot involving ball
position, team member position and opponent position for the selection of a team tactic and the player roles. The
soccer field is based on RoboCup Very Small Size League (VSS)’s rules. The result shows as successfully in designing
two complex prototypes of soccer robots and implementing the control system for robots involving ball position.
Robot di động đã được ứng dụng rất nhiều trong các lĩnh vực khác nhau như robot hút bụi gia dụng, ghế tự động sắp
xếp trong văn phòng, xe nâng trong nhà máy và thậm chí trong thể thao. Trên thế giới, có rất nhiều cuộc thi về robot
kết hợp với thể thao, đặc biệt là bóng đá như RoBoCup. Nghiên cứu này nhằm mục đích thiết kế và chế tạo các robot
nhỏ gọn có kích thước 100mm x 100mm, có thể được lắp ráp dễ dàng và có khả năng chơi bóng đá bằng cách điều
khiển robot liên quan đến vị trí bóng, vị trí thành viên trong nhóm và vị trí đối thủ để lựa chọn chiến thuật đồng đội
và vai trò của robot. Sân bóng đá được lựa chọn dựa trên các quy tắc của RoboCup Very Small Size League (VSS).
Kết quả cho thấy thành công trong việc thiết kế hai nguyên mẫu của robot bóng đá và áp dụng hệ thống điều khiển
cho robot liên quan đến vị trí bóng.
Keywords: Mobile robot, RoboCup, Soccer Robot

1. Introduction current market, simple to control with the motor driver, and
Autonomous robots have become an important branch of some models are integrated with rotary encoder.
mechatronic research. Self-propelled robots were developed to Table 1.2: Motor’s requirement
replace humans working in dangerous environments where Parameter Variable Value
they cannot be reached by humans; it poses a challenge for the
robot's design and self-control algorithms. Autonomous robots Mass of the car M 1 𝑘𝑔
are also used in civil sectors such as household maintenance
(such as cleaning), supply of goods and services, moreover, Mass of the wheel m 0.012 𝑘𝑔
they even can participate in sports, especially football. There
are several Robot Competition tournaments in Vietnam for all
Wheel radius 𝑟𝑤 0.0325 𝑚
level of education from primary school to university:
Robothon (separate into intermediate and elementary prizes),
Robotacon which take the idea and prepare the participant for
Maximum velocity v 1 𝑚/𝑠
the Robotacon – IYRC (International Youth Robot
Competition) of Korea, and the most popular is ABU Acceleration a 1 𝑚/𝑠 2
Robocon. The Ho Chi Minh City University of Technology
The choice of the motors depends on the available space and
used to be the champion of ABU Robocon in 2002, 2004, 2006
required propulsion force. From these requirements in table
(Figure 1.9), because of the high cost for redesigning a new
1.2 and parameter of the robot, GA25 V1 motor had been
robot each time they participated in the competition, the
chosen with these properties and dimension given in the
university didn’t join in anymore. Therefore, creating an
datasheet.
academic playing field for Mechatronic students is one of the
advantages of this study. Table 1.3: Chosen motor’s parameter
This study aims to design and build a prototype and
Speed
implementation cooperation control system in a soccer robot. Voltage Speed
without Weight
2. Hardware Supply with load
load
The robot is required to fit into a 100 mm by 100 mm space,
also driven by two wheels and the robot’s structural design 12V 250 rpm 104g 190rpm
must be modular.
Shaft
2.1 Driving motor Moment Power
Brushed DC motor is a good option to use in the robot, since Diameter
DC Brushed DC motor is cheap, easily available on the
The 8th SCIENCE and TECHNOLOGY SYMPOSIUM FOR OISP STUDENTS
Ho Chi Minh City University of Technology (HCMUT), VNU-HCM

0,188 by 100 mm area as shown before. The diameter of the custom


13,2 W 4 mm
Nm wheel is 65 mm, the width of the wheel has been reduced to 5
mm, and a custom wheel hub has been designed to
2.2 Equipment design and placement set up analysis. accommodate the 5 mm diameter wheel shaft (Figure 2.4).
Due to the position of the motor, which made it can connect 2.3 Final design model
straight to the wheel shaft, the transmission unit has been
chosen between spur gear and belt with pulley. Due to the
disadvantage of the belt and pulley that they are less reliable
because they can skid, the belt cannot be custom made and
took more space due to specially designed pulley, the belt can
be loose overtime under working condition, so the belt must
include the belt tensioner, which took even more space; the
belt was remove from option list and spur gear was chosen.
The gear size of the transmission must be considered to avoid
the gear clashing into the motor, in this case, the gear ratio is
2:3 (the driven gear has 40 teeth, driving gear has 60 teeth)
shown as figure 2.3. The sole reason the number of teeth is
chosen is the availability on the market and the avoid the large
gear ratio. The motor’s parameter after going through the gear
train:
Table 1.4: Motor’s parameter after the transmission
Speed without Speed with
Moment
load load
375 rpm 285 rpm 0.12533 Nm
Figure 2.2: Motor placement.

Figure 2.5.: Final design.


In the final design (Figure 2.5), the robot now uses a gear train
and a custom-made wheel. The battery component is placed
just above the motor so that the center of gravity is as low as
possible. The custom-made wheel needs to glue a thin strip of
Figure 2.3: Gear transmission placement.
rubber around the outer diameter to increase the grip of the
robot, avoid slipping when doing a sharp turn.

3. Design Electrical System


Electrical components play a crucial role, allow the robot to be
controlled and perform the required goal. Electrical
component selection will be considered, from choosing
suitable MCU, Motor driver, power supply to designing and
fabricate the circuit board of the robot.
3.1 Electrical Structure
Since the soccer robot is designed to be restricted inside a
100mm-by-100mm area. Control circuit structures need to be
easily designed, fast respond, and compact. The structure will
be used for the robot is the Centralized control structure (fig
Figure 2.4: Custom made wheel dimension. 3.1) . This structure style comes with some advantages: Simple
For the design requirement of the soccer robot, the wheels have circuit design, response time signal processing fast, no need to
been custom made, so that the robot can fit inside the 100 mm use data transmission standards. Still, the disadvantage of this
The 8th SCIENCE and TECHNOLOGY SYMPOSIUM FOR OISP STUDENTS
Ho Chi Minh City University of Technology (HCMUT), VNU-HCM

structure is that only one microcontroller does many tasks,


which might lead to overload. 3.3 Motor Driver
The most common method of controlling a DC motor is to use
a device called an H-Bridge. This type of controller allows you
to control both the speed and direction of a DC motor. When
choosing a driver for the DC motor, the driver's voltage and
current must be greater than the maximum voltage and current
of the mounted DC motor. From the chosen motor from the
mechanical design before with the Technical specifications
(table 3.1):
Table 3.1: Technical specification of the motor
Nominal Voltage 12 VDC
No-load current ≤ 0.06 A
Stall Current 2.29 A
Rated Current ≤ 0.45 A
No-load torque 1.88 kgf.cm
Figure 3.1: Diagram of electrical system
− Micro controller: Receive, process and send the data down Stall Torque 7.96 kgf.cm
to the motor driver.
− Motor drive: Supplying the necessary pulses for the DC From the requirement and data given in table 3.1, IC
motors to operate. TB6612FNG (fig 3.3) is selected to be the driver for the DC
− Rotary Encoder: read motor’s speed and send the motors. TB6612FNG includes 16 pins with integrated 2 H-
information back to the Microcontroller. bridge circuits capable of controlling 2 motors.
3.2 MCU Selection
As mentioned in the Overview, the robot will be controlled by
an off-field computer via Wi-Fi, so the chosen MCU must be
Wi-Fi Microcontrollers. The ESP32 microcontroller is chosen
because following reason:
− Easily available on the market.
− Relatively small size.
− Built-in Flash: 32Mbit large enough memory to process the
data.
− Wi-Fi protocol: IEEE 802.11 b/g/n.
− Bluetooth: Bluetooth 4.2.
− Frequency range: 2.4G ~ 2.5G (2400M ~ 2483.5M).
− 32 GPIO pins, including 16 ADC pins. Figure 3.3: TB6612FNG motor drive
The NodeMCU-32 V1.2 development board (fig 3.2) will be The TB6612FNG driver has the following specification (table
used in this project: 3.2)
Motor supply voltage 2.5V~13.5V/15
V(Max)
Logic supply voltage 2.5𝑉~13.5𝑉

Output current 1.2A(average) / 3.2A


(peak)
Dimension 20 x 20 mm

The function of each pins of the TB6612FNG driver is covered


in the table below:
Pin Label Function Note
Provide power
VM Motor Voltage for the motors
(2.2V to 13.5V)
Figure 3.2: NodeMCU-32 V1.2 development board by Ai
Thinker
The 8th SCIENCE and TECHNOLOGY SYMPOSIUM FOR OISP STUDENTS
Ho Chi Minh City University of Technology (HCMUT), VNU-HCM

This is the
voltage to
VCC Logic Voltage power the
driver (2.7V to
5.5V)
Common
Ground for
GND Ground both motor
voltage and
logic voltage
Allows the H-
bridges to
STBY Standby
work when
high
One of the two
Input 1 for inputs that
AIN1/BIN1
channels A/B determines the Fig 3.4: PCB circuit designed on Proteus.
direction. 3.5 Result
One of the two The self-made PCB uses 1.6mm thick copper plate, since the
Input 2 for inputs that circuit design is 2 layers, and the other side of the circuit is still
AIN2/BIN2
channels A/B determines the needing the soldered wire.
direction.
PWM input
PWM input for
PWMA/PWMB that controls
channels A/B
the speed
One of the two
Output 1 for outputs to
A01/B01
channels A/B connect the
motor
3.4 Fabrication of the circuit system
The design of the sensor board is to ensure the placement each
of the components on the board, electrical components can be
mounted onto the circuit board without using any special
equipment and can be easily replaced when damaged.
Therefore, Printed Circuit board is an option, since it’s more
compact, saving more time when soldering the component, has
tight connections and avoid short circuits than using wire. the Fig 3.5: Self-printed PCB circuit
PCB circuit designed on Proteus has the following form (fig
3.4):

Figure 3.6: Manufacturer PCB circuit


Since the self-printed PCB, the result doesn’t look great, the
wire soldered into the PCB can come off quite easily if not
soldered carefully, causing problems during the robot
operation. However, the PCB can be ordered online to the PCB
The 8th SCIENCE and TECHNOLOGY SYMPOSIUM FOR OISP STUDENTS
Ho Chi Minh City University of Technology (HCMUT), VNU-HCM

manufacturer to get a better result. The PCB self-printed and


manufacturer are shown in figure 3.5 and figure 3.6.
4. Fabrication of the robot
For the body of the robot, a 5mm thick Acrylic sheet is used,
the wheels are 3d printed with PLA material. The final shape
and structure of the robot is shown in the figure 4.1 and 4.2.

Figure 5.1: Differential Drive kinematics (from Dudek and


Jenkin, Computational Principles of Mobile Robotics.)
The trajectories that the robot takes can be varied. by changing
the velocity of each wheel Because the rate of rotation ω about
the ICC must be the same for both wheels, the velocity of two
wheels are given by the follow equation:
𝑙
𝜔 × (𝑅 + ) = 𝑉𝑟
2
𝑙
𝜔 × (𝑅 − ) = 𝑉𝐿
Figure 4.1: robot overall design 2
where:
- l is the distance between the centers of the two wheels.
- Vr, Vl are the right and left wheel velocities along the ground.
- R is the signed distance from the ICC to the midpoint
between the wheels.
At any instance in time, we can solve for R and ω:
1 𝑉𝑙 + 𝑉𝑟
𝑅= ×
2 𝑉𝑟 − 𝑉𝑙
𝑉𝑟 − 𝑉𝑙
𝜔=
𝑙
There are three unique cases when using the differential drive
mechanism by varying each wheel velocity.
1. If Vl = Vr, then we have forward linear motion in a straight
line and ω is zero.
2. If Vl = − Vr, then R = 0, and the robot
rotates in place.
3. If Vl = 0, then we have rotation about the left wheel. In this
𝑙
case R = . Same is true if Vr = 0.
2

Figure 4.2: Assembly the control circuit on the robot The position of a robot capable of moving in a particular
direction Θ(t) at a given velocity V (t) can describe as:
5. Control theory 𝑡
5.1 Differential drive kinematics 𝑥(𝑡) = ∫ 𝑉(𝑡)𝑐𝑜𝑠[𝜃(𝑡)]𝑑𝑡
One of the common drive mechanisms used by robots is 0
𝑡
differential drive. It consists of 2 drive wheels mounted on a
𝑦(𝑡) = ∫ 𝑉(𝑡)𝑠𝑖𝑛[𝜃(𝑡)]𝑑𝑡
common axis, and each wheel can be independently driven 0
either forward or backward. The velocity of each wheel can be 𝑡
varied, for the robot to perform rolling motion, the robot must 𝛩(𝑡) = ∫ 𝜔(𝑡)𝑑𝑡
0
rotate about a point that lies along their common left and right
wheel axis. The point that the robot rotates about is known as For the special case of a differential drive robot, the equations
the ICC - Instantaneous Center of Curvature (see figure 5.1). become:
1 𝑡
𝑥(𝑡) = ∫ [𝑣𝑟(𝑡) + 𝑣𝑙(𝑡)]𝑐𝑜𝑠[𝜃(𝑡)]𝑑𝑡
2 𝑜
1 𝑡
𝑦(𝑡) = ∫ [𝑣𝑟(𝑡) + 𝑣𝑙(𝑡)]𝑠𝑖𝑛[𝜃(𝑡)]𝑑𝑡
2 𝑜
The 8th SCIENCE and TECHNOLOGY SYMPOSIUM FOR OISP STUDENTS
Ho Chi Minh City University of Technology (HCMUT), VNU-HCM

1 𝑡 6. Conclusions
𝛩(𝑡) = ∫ [𝑣𝑟(𝑡) − 𝑣𝑙(𝑡)]𝑑𝑡
𝑙 0 Path planning and control of a differential drive robot is
5.2 Point to point Motion studied and implemented in the soccer robot project. The
The first task the robot needs to perform is go from point-to- design of the controller was also carried out and was later
point (P2P). As it has been discussed earlier, there are two implemented on the actual robot and tweaked for better results.
factors which are required for motion of the robot are direction The atan2 function plays an important role in this thesis. The
and driving velocity. In addition, the distance between the required orientation of the robot, anywhere in the plane, can
robot and the destination point is required as shown in figure be calculated by using the atan2 function which gives the
3.1.1, where (x1, y1) is the starting point, (x2, y2) is the direction/orientation towards the destination with the precise
destination point and θ is the inclination of the destination quadrant assignment. By controlling the velocity of each
point with respect to starting point wheel and orientation of the robot, any position in the
workspace can be reached. The atan2 function was used for
driving the robot from point to point, drawing shapes and
Following another moving object. Different controllers such
as PID were experimented, but a simple proportional
controller provided as good results as more complicated
controllers. Tasks like point-to-point motion and shape
forming were used to measure the controller's robustness, and
the results of the experiment were used to improve the
controller's accuracy. However, when making sharp turns,
such as making the robot follow a path shape as a square, the
To perform a P2P task, the robot needs a constant velocity and
robot’s result displays some error. Advanced controllers would
the desired direction (θ) pointing towards the destination point.
need to be built and applied in the future to achieve a better
The direction is calculated as:
outcome.
𝜃 = 𝑎𝑡𝑎𝑛2((𝑦2 − 𝑦1), (𝑥2 − 𝑥1));
Acknowledgement: This research is funded by Office for
By using this function, the orientation to any point in the four
International Study Programs (OISP), Ho Chi Minh City
quadrants of the plane can be determined. The distance
University of Technology (HCMUT), VNU-HCM under grant
between the starting point and destination point can be
number 2021. We acknowledge the support of time and
calculated by using the following formula.
facilities from HCMUT, VNU-HCM for this study.
𝑑 = √(𝑥2 − 𝑥1)^2 + (𝑦2 − 𝑦1)^2
Control algorithm of moving distance
7. References
[1] Mishra, D., et al. (2020). "Kinematic modelling and
emulation of robot for traversing over the pipeline in the
refinery." 26(3): 1011-1020.
[2] Kothandaraman, K. (2016). "Motion Planning and
Control of Differential Drive Robot."
[3] Muzio, A. F. V., et al. "ITAndroids Very Small Size
League Team Description Paper."
[4] Okuyama, I. F., et al. "TRAJECTORY
OPTIMIZATION FOR A DIFFERENTIAL DRIVE
SOCCER ROBOT."

Figure 5.1: Control algorithm flowchart

You might also like