Sie sind auf Seite 1von 15

London Southbank University Jonathan Davis

Mechatronics

Design and control a sensor based Mini Sumo Robot for the Sumo competition

Name: Jonathan Davis

Student Number: 3420574

Date 12/01/2017

1.0 Abstract
A mini sumo robot was built capable of tracking an opponent robot as well as detecting the edge of
the arena in which it is situated.

The robot could successfully track the opponent and detect the edge of the arena however there are
improvements to be made in terms of the physical design and electrical layout.

Page 1 of 15
London Southbank University Jonathan Davis

2.0 Contents

1.0 Abstract ........................................................................................................................................... 1


2.0 Contents .......................................................................................................................................... 2
3.0 Introduction ..................................................................................................................................... 2
4.0 The Initial Design ........................................................................................................................... 3
5.0 The CAD model ............................................................................................................................. 7
6.0 Printing the Body ........................................................................................................................... 8
7.0 The internal design ...................................................................................................................... 10
7.1 The electronics................................................................................................ 10
7.2 The robot logic ................................................................................................ 11
7.2.1 Printing the Body .............................................................................................................. 11
7.2.2 The code ............................................................................................................................ 12
7.2.3 The functions..................................................................................................................... 13
8.0 Conclusion .................................................................................................................................... 14

3.0 Introduction
The brief assigned was to construct a mini sumo robot that was capable of autonomous control. The
robot had to be able to track the opponent and push it out of an 800mm wide circular arena. On top of
this the robot had to be able to detect the white line that is at the edge of the arena so that is can
remain in the arena.

The other rules for the mini sumo robot were as follow:

Maximum width: 100mm


Maximum length: 100mm
Maximum height: unlimited
Maximum weight: 500g
No weapons, the robot must push the robot out of the arena.

Page 2 of 15
London Southbank University Jonathan Davis

4.0 The Initial Design

Initial research was conducted by studying previous sumo bot competitions, this was essential in
understanding the dynamic of the match and to aid in the design of a winning Mini sumo robot.

Sumo robots can be made of any material, they can use any type or size of electric motor or electric-
powered locomotion and they can contain any kind of processor, electronics, sensors, or batteries
desired.

We designed our robot from scratch, from sketches to CAD model to a final 3D printed body.

Few configurations were considered for the Mini Sumo robot, those were all measuring 10
centimetres or less in width and 10 centimetres or less in depth, due to the competitions rules.

Figure 1: design concept one

We have sketches some ideas about a light model that uses a plate to push the opponents outside
the arena, however we realized that we probably need to increase the number of the wheels to
increase the friction of the robot and make it more resistant to the opponents attacks.

Figure 2: design concept two

Page 3 of 15
London Southbank University Jonathan Davis

Because many Sumo robots used for competitions share many similarities, another configuration was
thought, we wanted our robot to jump on the opponent, but this idea was discarded because another
rule states that Sumo Robots must not fly or generate lift to isolate themselves from the ring surface.

Figure 3: design concept three

We then wanted to increase the weight of the robot to the maximum allowed (500g) because this is a
pushing contest and it is to the robots advantage to be as heavy as possible.

Figure 4: design concept four

Page 4 of 15
London Southbank University Jonathan Davis

We soon found out that a scoop or arm would be effective against opponents, so anything that could
shifts the opponents weight of off its wheels has been considered.

Figure 5: design concept five

A scoop can both reduce the grip of the opponents wheels (by tilting weight off) and increase the grip
on the scoopers wheels (by tilting the opponents weight on top).

We also decided to expand our robot in height as there are no restrictions regarding the height a robot
can have and considering that as soon as movement is allowed in a round the robot can twist, fall, or
expand without size limits, we thought about build a mechanic must that would trick the opponent
sensors.

Figure 6: design concept six

Page 5 of 15
London Southbank University Jonathan Davis

We have combined all the elements that we found more suitable for us designing a well-balanced
robot, it has only two tyres but those are wide and clean and covered with rubber for extra friction, this
is because the better the tires grip the ring surface, the more the robot can shove and the less the
robot can be shoved.

Figure 7: final design

This final design is an adaptation from the first 3d printed shell. This design was chosen because it
maximises the space within the robot to allow room for all the components. The battery attached to
the flat surface on the top of the battery using Velcro, this allowed for it too be easily connected an
disconnected from the robot via the battery connector mounted on the top of the robot. This design
also had space in the top to fit the infrared receiver in order to maximise the strength of the received
signal and thus increase the reliability of the On/Off function.

Page 6 of 15
London Southbank University Jonathan Davis

5.0 The CAD model

The initial design for the robot started as sketches, these sketches
were changed and adapted to fit the components of the robot. The
initial design for the robot was taller than the final design. This is due
to the limit for the length and width of the robot that was in place for
the project. However, there wasnt a limit for the height so this meant
that the internals of the robot could be stacked to save space. This
was the main influence for the design being taller as the battery pack
could be stored vertically. With an access the battery can be
removed from the robot and changed if it was to run out of battery.
Also, the Arduino board can be reached so the programme can be
updated during testing without the need to disassemble it.

Figure 8: (left) initial CAD model

During the 3D CAD modelling stage, the robot was


designed based on the first initial sketches that had be
drawn up. During the 3D CAD stage, there was a
couple of issues that may have happened if the design
was 3D printed. The main problem was that the robot
was to top heavy with the battery pack standing up
right. The main concern was once another robot
pushed of bumped into our robot, that it would fall
backwards, then leaving the robot unable to stand its
self-back up. This idea got put aside due to the fear of
the robot falling over. However, the robot did keep the
scoop from the initial sketches and design. Due to the
robot being too tall a new idea was needed that wasn't
top heavy but still was in the projects regulations of the
100 by 100 base. The new idea was drawn up, instead
of the robot having the battery pack vertically, it new
position was laying down on top of the robot. This
allowed for a lower centre of gravity to increase the
stability of the robot and prevent it from being toppled
over. The robot took the same base as the other
design as it helped the get a layout for where the
electric components was going to be placed. The new
design was also more suitable as it could house all the
Figure 9: Redesigned CAD model
components as well as the battery.
with lower centre of gravity

This design was created which included arms connected to a scoop which would be lowered at the
start to get underneath the opponent and lift it so it would have less traction. For the final design, we
changed the position of the arms forward as there was space for the servos and therefore changed
the length of the arms. Also, the final design was simplified to ensure that the 3D printer could print
the body quickly and to give the body extra strength.

Page 7 of 15
London Southbank University Jonathan Davis

6.0 Printing the Body

When receiving the CAD model for the robot, I checked for its suitability for a 3D FDM extrusion
printer. The chosen material for the print was PLA. This was due to the lower temperature and
recyclability of the material as well as the aesthetics and strength being a strong point as well. For any
impact from competitors robots, the PLA should withstand the impact without shatter.

The parts which were printed on the 3D printer was the base,
shell, wheels, arms and scoop. A test print was done and the
model was inspected. On inspection, the base of the robot did
not print right. On the first print, the walls and columns which
hold the components in place were weak. We needed to add
supports to the parts to increase its strength.

Figure 10: Initial print of


After adding the supports the second the robot base
print also had problems. This was
due to the engine (Cura) chosen on
the 3D printing software. As the
engine changed the size as well as
the aesthetics of the base, we ended
up changing the engine in the
software to Simplify3D engine. This
however also increased printing
time.
Figure 11:Showing the difference between the
Simplify3D Engine (left) and the Cura engine (right)
As well as this the Cura engine
also created a undetachable raft (a
base which increases adhesion to
the printer bed). This was another
reason why we changed to
simplify3D engine as the raft was
detachable providing closer
replicants to the model.

Figure 12: undetachable raft from Cura engine (left),


detachable raft from Simplify3D (right)

Page 8 of 15
London Southbank University Jonathan Davis

The wheels, scoop and arms printed accurately however there were some adjustments needed which
we resolved by sanding with a rotary tool sander.

Figure 13: Components printing Figure 14: Printed parts with component fitted in
printing

The shell of the robot was next to print. Due to the chamfers and fillets added to the shell, many
supports were needed to hold it in place. This created excess material as well as printing time. To
overcome this, I adjusted the CAD model to reduce the large chamfers reducing needed supports but
still tried to retain the aesthetic of the robot. The new shell design was printed as used in the robot.

Figure 15: Supports unable to Figure 16: Updated CAD model


detach from old model

Once the base and the shell was printed, the


components were put in place. However, due to the
excessive heat change while printing, the prints came
smaller in scale to the model. Due to this, a reprint
was commissioned with the model being printed at a
1.1x scale. This was successful in fitting the
components. Though, a further complication came
into this.

Figure 17: New shell design at 1.1x


(left)
and 1x on (right)

Page 9 of 15
London Southbank University Jonathan Davis

Due to the enlargement of the model, as well as the


shrinkage due to temperature change not being
constant, the model exceeded the 100mm x 100mm
size. To overcome this, we resorted back to the
original model, and sanded as well as trimmed down
parts of the model to fit the components in. Once this
was done, the shell was glued to the base and the
robot was completed.

Figure 18: Finished Product


7.0 The internal design
7.1 The electronics
The component list for the robot was as follows;

1 x Ultra sonic distance sensor


1 x Arduino Nano with breakout board
2 x 600rpm 6-12v dc motors
1 x L293D h-bridge
1 x Infrared reflectance sensor
1 x Infrared receiver with remote
2 x 9g Servo
1 x 7.4v 2s 800mah Lipo Battery
2 x 5v regulators

Figure 19:(above) top view of robot Figure 20:(above) bottom view of robot

For the movement of the robot, two 600rpm dc motors were used that were connected to an L293D h-
bridge which allows each motor to be controlled as per the table below:

Page 10 of 15
London Southbank University Jonathan Davis

Enabler pin Control pin 1 Control pin 2 Result


Low Low Low Motor stops
Low Low High Motor stops
Low High Low Motor stops
Low High High Motor stops
High Low Low Motor stops
High Low High Motor spins clockwise
High High Low Motor spins
anti-clockwise
High High High Motor stops

The scoop on the front of the robot was operated by two 9g servos connected to the arms on either
side. When the servos were first connected in testing they would not turn and the Arduino stopped
responding. Upon further testing it was revealed that the servos were drawing too much current for
the Arduino to handle and so, to solve this problem, each servo was connected to a 5v regulator and
connected directly to the battery.

7.2 The robot logic


7.2.1 Printing the Body
At the beginning of the project it was decided that it was necessary to form a flowchart of pseudo
code that would help determine the required logic for the robot.

Figure 21: (right) pseudo code flow


chart

Page 11 of 15
London Southbank University Jonathan Davis

7.2.2 The code


As per the flowchart above the code is separated into a
hierarchy of different functions based on the importance to
the robot.

The first and foremost function is the ability to remotely turn


the robot on and off. To do this the infrared receiver is first
activated in the setup. The robot uses two buttons two
control it, one for on and one for off. If the robot receives
the code for the on button, the robot state is set to on and
likewise for the off button.

The robot then does a check to see whether the robot state
is set to on. If the state is set to on then it runs the next
function if the state is set to off then it turns off the motors
and awaits the next infrared signal.

One of the problems during testing was that the robot could
be turned on however it could not be turned off. Upon
further inspection it was found that the robot was getting
stuck in certain loops of the code. This was due to the use of
while loops instead of if loops, this meant that, if for example it
detected an object less than 200mm away then, while the while
loop was present then it would get stuck in this loop meaning that
it would never listen for another infrared signal. This problem was
solved by changing the while loops to if loops.

During testing the conclusion was made that the robot first
needed to head to the centre of the arena before it starts
detecting the edge. Based on this conclusion another function
was made that sends the robot into the centre and lowers the
front upon start up. This function gets reset when the robot state
is set to off.

The next function in the hierarchy is the edge detection, for this
we used an infrared reflectance sensor that can detect the
change in reflectance between the black floor of the arena and
the white at the edge of the arena. The reflectance sensor returns
a lower value when there is a higher reflectance on the surface
and so the edge detection function is a read from the reflectance
sensor. If the sensor gives a reading greater than 500 then it is in
the arena and it can continue. If the returned value is less than
500 then the robot has reached the edge of the arena and the
robot needs to move backwards.

Figure 22: (right and on following


page) the loop code of the robot

Page 12 of 15
London Southbank University Jonathan Davis

After this the robot then checks the ultrasonic sensor at the front
to check for the opponent robot. During testing, it was decided
that 200mm was an optimal distance for opponent protection. The
reason for this is

that, when the distance was set higher the robot started picking up
on objects outside of the arena and when the distance was set
lower it was not sensitive enough and could not pick up on objects
in the arena.

If the robot returns true on the opponent detection (front distance


< 200) then it starts to move forward, if however, an opponent is
not detected (front distance > 200) then the robot starts to turn on
the spot until the front distance is less than 200mm and an
opponent is detected.

7.2.3 The functions


The following functions were create to enable simpler coding of the robot by making the code easier
to follow. For example the code required to make the robot go forward is not obvious that it is the
code to make the robot go forwards, however since a forward function has been made then the only
code needed to be written is forwards().

Page 13 of 15
London Southbank University Jonathan Davis

Figure 23: declared functions in the code of the


robot

8.0 Conclusion

From this project, as an individual, I have been able to develop my knowledge of the Arduino code,
which is a derivative of the C language. Upon starting this project my knowledge of the Arduino
language was very limited and I often required having a reference to help me write the code. Now
however, I understand how the functions and operators work which enables me to get the appropriate
data from sensors and respond accordingly.

The robot was a success as it detected the opponent whilst remaining inside the arena. It was clear
that the hierarchy of functions was working as the robot always pushed the opponent until it reached
the edge in which case it reversed back into the arena. Also, there were no troubles turning it on and
off meaning that it was always listening for an infrared signal. However, there are improvements that
could be made to the design such as the use of a PCB instead of wiring. Also, the front of the physical
design needs to be changed to better house the ultrasonic distance sensor.

Page 14 of 15
London Southbank University Jonathan Davis

9.0 References
Ref 1 Federico Angiolini Student ID: 3416252 FA Designs

Ref 2 Ryan Swainson Student ID:34214051

Ref 3 Daniel Wrigley Student ID: 3418351

Ref 4 Danish Javed Student ID: 3405403 - Threedim

Page 15 of 15

Das könnte Ihnen auch gefallen