You are on page 1of 102

Department of Applied Engineering

Master of Mechanical Engineering/Mechatronics

Virtual product development: tools and processes

Semester project

Final report

Participants: Yiyun Kang, 874170


Aleksa dra Koźlak,
Abhijith Kombanal Raveendran, 874112
Osama Abd El Gawad, 873668

Supervising professors: Prof. Dr.-Ing. Thomas Kilb


Prof. Dr.-Ing. Matthias R. Leiner

Day of issue: 08.08.2016


Day of duty: 15.08.2016

1
Table of contents
1 Introduction. ............................................................................................................ 5

2 Two wheel robot - requirements. ............................................................................ 5

2.1 Functional Requirements ................................................................................. 5

2.2 Additional Requirements.................................................................................. 6

3 Powertrain. .............................................................................................................. 6

3.1 Calculation of Output Torque required ............................................................ 7

3.1.1 Torque to overcome friction between wheel and the surface .................. 7

3.1.2 Torque required to balance the robot........................................................ 7

3.2 Motor Specifications......................................................................................... 8

3.3 Gear .................................................................................................................. 8

3.4 Gear ratio of the belt drive, GB calculation ...................................................... 9

3.5 Belt and Pulley selection................................................................................... 9

3.5.1 Case 1 ........................................................................................................ 13

3.5.2 Case 2 ........................................................................................................ 14

4 Suspension system. ................................................................................................ 15

4.1 Simulink Simulation ........................................................................................ 20

5 Electronic components. ......................................................................................... 22

5.1 Analysis of Electronic Components ................................................................ 22

5.2 Place of Electronic Components ..................................................................... 26

6 Project data management. .................................................................................... 28

6.1 Team folders. .................................................................................................. 28

6.2 CAD Design. .................................................................................................... 29

6.3 Collaboration tools. ........................................................................................ 29

7 CAD Design. ............................................................................................................ 29

7.1 Package Concept............................................................................................. 29


2
7.1.1 Implementation of skeleton geometry. ................................................... 30

7.1.2 Conceptual Design. ................................................................................... 30

7.2 Detailed Design ............................................................................................... 33

7.3 Bill of material................................................................................................. 38

8 Optimization of design. .......................................................................................... 39

8.1 Deformation Analysis and Topology Optimization......................................... 39

8.2 Geometry Optimization. ................................................................................. 49

9 Multibody System Simulation. ............................................................................... 52

9.1 Drop test. ........................................................................................................ 52

9.1.1 Model Definition ....................................................................................... 53

9.1.2 Results of Drop test .................................................................................. 55

9.1.3 Drop test using sequential simulation ...................................................... 56

9.2 Balancing simulation....................................................................................... 59

9.2.1 Model definition. ...................................................................................... 59

9.2.2 Scripted simulation. .................................................................................. 62

9.2.3 Results....................................................................................................... 63

10 Purchasing list. ....................................................................................................... 68

11 3D - Printing. .......................................................................................................... 69

12 Assembling robot. .................................................................................................. 70

12.1 Assembling Electronic Components ........................................................... 70

12.2 Assembling 3D Parts ................................................................................... 72

12.3 Assembling Powertrain and Shock Absorber .............................................. 73

12.4 Problem Solving .......................................................................................... 73

13 Functional testing - Simulink.................................................................................. 75

13.1 IMU to Arduino communication ................................................................. 75

13.2 Arduino to motor communication .............................................................. 75


3
13.3 State chart ................................................................................................... 75

13.4 State Controller ........................................................................................... 75

13.5 Changes implemented for the project. ....................................................... 76

13.5.1 Triggering Frequency for DC motors ...................................................... 76

13.5.2 Encoder Function .................................................................................... 77

13.5.3 State Controller Gains............................................................................. 78

13.5.4 Angle Adjustment Algorithm .................................................................. 80

14 Conclusion. ............................................................................................................. 81

15 References. ............................................................................................................ 82

16 Appendix. ............................................................................................................... 83

16.1 Concept generation. ................................................................................... 83

16.2 Suspension calculations. ............................................................................. 87

16.3 Base board drawing. ................................................................................... 94

16.4 Base board drawing - holes......................................................................... 95

16.5 Battery package drawing. ........................................................................... 96

16.6 Shaft drawing. ............................................................................................. 97

17 List of figures. ......................................................................................................... 98

18 List of tables. ........................................................................................................ 102

4
1 Introduction.

Two wheel robot can be compared to inverted pendulum. This is the pendulum that
has its centre of mass above its pivot point. Whereas a normal pendulum is stable when
hanging downwards, an inverted pendulum is inherently unstable, and must be actively
balanced in order to remain upright. This can be done either by applying a torque at the
pivot point, by moving the pivot point horizontally as part of a feedback system etc. The
inverted pendulum is a classic problem in dynamics and control theory and is used as
a benchmark for testing control strategies.

Figure 1 Inverted pendulum.

The two-wheel robot is normally controlled by embedded processors that execute


a controller algorithm and it operates autonomously when the switch is on.

2 Two wheel robot - requirements.

2.1 Functional Requirements

In the first phase, housing's concept and the powertrain were the parts on which
there was the biggest focus. Without deep knowledge about the system, first target weight
was set as 1.5 kg. After concerning about the capability of the robot to balance itself easier
and after gaining more and more knowledge and requirements the target weight for the

5
robot was changed to 0.9 kg. In this case there could be a possibility for the robot to carry
some more weight.

The vertical position of the centre of gravity should be as down as possible, at least it
is supposed to be lower than half of the height of robot for the reason that it can be more
stable when it is going to balance. Another important thing is that the centre of gravity is in
the middle of robot in case of falling down (more possible) to one side which is more heavier
when it is balancing.

To make sure the velocity can gain enough speed to overcome the situation when the
robot is about to fall down, the maximum speed, which was assumed is around
0.25-0.35 m/s. Minimum gear ratio depends on the maximum velocity required, the desired
maximum velocity of the robot wheel is 0.35 m/s. So the minimum gear ratio is supposed to
be 0.96. In consideration of the maximum torque required and the input torque, the
maximum gear ratio is calculated as 1.5. To satisfy the protection to the whole robot while
dropping from 20cm, the deflection should be at least 15mm.

After internet research concerning websites with wanted parts, the cost of some
components that are about to be used, aimed in approximately 150-190 Euros.

2.2 Additional Requirements

Besides the requirements above which must be followed, additionally some more
requirements are considered to be reached:

1. Ability to have loads of varying weight and size placed on the top platform.
2. Capability of handling disturbances including bumps from humans or running
into stationary objects.
3. High manoeuvrability and ability to travel at a moderate speed.

3 Powertrain.

The power train of two wheel robot consists of belt-drives on each wheel powered by
a Maxon DC motor (134324). Power train calculations were made based on the initial design
of robot and by assuming some unknown values. The primary objective of the power train

6
calculation was to derive adequate gear ratio of the drive system and to select proper
pulleys and belt.

3.1 Calculation of Output Torque required

Mass of the Robot = 0.9 kg

Acceleration due to gravity = g m/s2 = 9.8 m/s2

Diameter of the Robot wheel = Dw m ;(Radius RW)

3.1.1 Torque to overcome friction between wheel and the surface

Coefficient of friction between Robot wheel (rubber) and ground surface (concrete)
= μW

Torque required to move one wheel = �W Nm

= Frictional force * radius of the wheel

= μW *(M/2)* g*RW

Assu e μW = 0.8, M = 0.9 kg, RW = 30 mm

�W = 0.8*0.9*9.8*0.03/2 = 0.106 Nm

3.1.2 Torque required to balance the robot

Figure 2 Forces acting on two wheel robot.

7
�B = m*g*l*sinθ

Mass oscillates about wheel axle, m = 0.85 Kg

Vertical distance of center of mass from wheel axis, l= .07m(from 3D model).

Assume maximum value of recovery angle, θ = 10°

�B = 0.85*9.8*.07*sin10° = 0.1014 Nm

Since we have one motor on each wheel, the maximum torque required,

�2 = �W +(�B/2) = 0.106+(0.1014/2) = 0.157 Nm

To compensate the loses while transmission, Assume efficiency = 80%

�2 = 0.157/0.8 = 0.196 Nm

3.2 Motor Specifications

Outer diameter = 16 mm

Type power = 1.2 W

Nominal Voltage = 9 V

No-load speed = 8970 rpm

Nominal torque(Maximum continuous torque) = 2.11 mNm

3.3 Gear

Output diameter = 16 mm

Reduction(Gear Ratio) = 84:1

Maximum continuous torque = 0.2 Nm

Input Torque: �1 = Nominal torque of the motor * Gear ratio of the reduction gear
* Efficiency of the reduction gear

Assume efficiency = 80%

�1 = 0.00211*84*0.8 = 0.142 Nm

Speed of the shaft = Motor speed/Gear ratio of the reduction gear

8
= 8970/84 = 106.8 rpm

Input angular velocity, ω1 = 11.18 rad/s

3.4 Gear ratio of the belt drive, GB calculation

Maximum gear ratio, GB = �2/ �1 = .196/.1418 = 1.383

Angular velocity at output, ω2 = ω1/1.383 = 11.18/1.383 = 8.08 rad/s = 77.2 rpm

Velocity of the wheel at maximum torque = vW = RW * ω2 = .03*8.08 = 0.24 m/s

Minimum gear ratio depends on the maximum velocity required.

Desired maximum velocity of the robot wheel, vWmax = 0.35 m/s

ω2 corresponding to this velocity = 0.35/0.03 = 11.67 rad/s = 111.4 rpm

Minimum Gear ratio of the belt drive, GB = ω1/ ω2 = 106.8/111.4 = 0.96

3.5 Belt and Pulley selection

We used timing belt and pulleys for our belt drive since it allows accurate control of
movement by avoiding the chances of slip.

Diameter of input side pulley = D1 mm, Diameter of output side pulley = D2 mm

Gear ratio of the belt drive, GB = D2/ D1

Select D1 and D2 based on Gear ratio. Now we need to select corresponding belt for
the pulleys.

Figure 3 Belt drive.

9
Imagine that both pulley wheels are completely free to turn and that the belt is
initially tensioned by stretching the centre distance between the wheels. The tension in the
belt will be the same along its whole length and equal to F. When transmitting power, the
driven wheel will be reluctant to turn and the driving wheel has to pull it and exert a torque
on it. Consequently the tension in the side pulling will increase to F 1 but the tension in the
other side will decrease to F2. The increase in tension on the tight side of the belt is equal to
the decrease in tension on the slack side so that the sum of the tensions remains constant.

It follows that F1+ F2 = constant

When stationary, both were equal to F. So F1+ F2 = F + F = 2F

So when the wheel is transmitting power, F1+ F2= 2F

Mechanical power is the product of force and velocity. So P = Fv (Watts). In this case
we have one force pulling in opposition to the other so the net power transmitted is

P = v(F1– F2)

Since v = πND, P = πND(F1- F2)

Velocity of the belt, v = R1 * ω1

But power = Torque * angular velocity = �1 * ω1

�1 * ω1= R1 * ω1 * (F1 – F2)

�1 = R1 * (F1 – F2)

Now consider the case of a rope wrapped around a post so that it takes the strain out
of the rope. It will be shown that the formula relating the large force being held (F 1) to the
small force being exerted (F2) is given by

F1/ F2 = eμθ

This formula is also important for the ropes passing around drums and pulleys and
governs the power that can be transmitted by a pulley drive before the belt slips.

To select belt width we need to know the maximum tensile force (F1) on the belt. This
value should be less than the allowable maximum value of tensile force of the belt.

10
We know the value of �1 and R1. Find the value of coefficient of friction between belt
a d pulley fro a ufa turer s data.

θ is the angle of contact of the belt = π ± 2 * (R2 – R1)/C

C is the centre distance between pulleys

Calculation of C:

Belt pitch length, L = 2C + 1.57(D1+D2) + (D2-D1)2/4C

C = A+√(A2-B)

A = (L/4) - (π*(D1+D2)/8)

B = (D2-D1)2/8

Choose available belt length, L for the corresponding values of D1 and D2.

Find the value of C from above equations.

Use this value of C to find θ.

Figure 4 Belt drive with angles.

By solving the following equations find maximum tension on the belt, F1:

�1 = R1 * (F1 – F2)

F1/ F2 = eμθ

11
Select belt based on the above value of F1 (keep in mind to consider the factor of
safety).

Following are the technical details of the belt and pulleys used:

Figure 5 Timing belt profiles.

Figure 6 Detailed characteristics of profile T 2.5 - length & number of teeth.

Figure 7 Detailed characteristics of profile T 2.5 - speed.


12
The belt and pulleys were selected based on the iteration process described below :

3.5.1 Case 1

Profile of teeth: T2.5

Material of the pulley: Plastic (Acetal resin)

Belt width: 6 mm

Maximum allowable tensile force of the belt = width factor*allowable tensile force of
10 mm belt width

= 0.44*120 = 52.8 N

So F1 for the selected belt-pulley system should be less than 52.8/Factor of safety.

D1 = 9.56 mm (From table)

D2 = 14.32 mm (From table)

Choose length of the belt = 120 mm (From table)

Gear ratio = 14.32 /9.56 = 1.5

C = A+√(A2-B)

A = (120/4) - (π*(9.56+14.32)/8) = 20.62 mm

B = (14.32 -9.56)2/8 = 2.83 mm

C = 41.17 mm

θ = π – ((14.32 – 9.56)/ 41.17) = 3.026 rad

assume μ = 0.3

eμθ =e0.3*3.026 = 2.48= F1/ F2

�1 = R1 * (F1 – F2)

F2 = �1/ R1 * (eμθ-1) = .142/(0.00478*1.48) = 20.07 N

F1 = 2.48 * 20.07 = 49.77 N

Since the value of F1 is close to allowable tensile force of the belt, it is safer to choose
another belt-pulley system.

13
3.5.2 Case 2

Profile of teeth: T2.5

Material of the pulley: Aluminium 6082-T6

Belt width: 10 mm

Maximum allowable tensile force of the belt = width factor*allowable tensile force of
10mm belt width

= 1.0*120 = 120 N

So F1 for the selected belt-pulley system should be less than 120/Factor of safety

D1 = 9.56 mm (From table)

D2 = 14.32 mm (From table)

Choose length of the belt = 120 mm (From table)

Gear ratio = 14.32 /9.56 = 1.5

C = A+√(A2-B)

A = (120/4) - (π*(9.56+14.32)/8) = 20.62 mm

B = (14.32 -9.56)2/8 = 2.83 mm

C = 41.17 mm

θ = π – ((14.32 – 9.56)/ 41.17) = 3.026 rad

Figure 8 Static coefficient of friction of Polyurethanes.


14
Figure 9 Shore hardness scales.

assume μ = 0.5

eμθ =e0.5*3.026 = 4.54 = F1/ F2

�1 = R1 * (F1 – F2)

F2 = �1/ R1 * (eμθ-1) = .142/(0.00478*3.54) = 8.39 N

F1 = 4.54 * 8.39 = 38.10 N

Since F1 is less than allowable tensile force of the belt, our belt drive design is safe.

Results of Power train calculation


 Output torque required on the wheel: 0.196Nm
 Wheel pulley: 14.32mm Diameter, 18 teeth (Aluminium)
 Motor pulley: 9.56mm Diameter, 12 teeth(Aluminium)
 Belt: 10mm width
 Max gear ratio: 1.5 based on selected pulleys(1.38 based on calculation)
 Desired maximum speed: 0.35m/s
 Minimum gear ratio based on maximum speed: 0.96

4 Suspension system.

The suspension for the robot was required for some specific situations. This
specific situation was given as the requirement for designing the suspension system. The
requirement was to sustain a vertical drop of 20 centimetres. Hence the force and impact
forces due to this drop are the basis of the calculations and design procedure.

Impact Force:

�ℎ
Fim =

15
where,

m = Robot weight = 0.9 kg

g = Gravitational acceleration = 9.81 m/s2

h = Drop height = 20 cm

x = Spring deflection = 0.015 m (assumed)

after calculating the maximum impact force will be

Fim = 117.72 N

now we also get the spring length at the equilibrium position

mg = K(lo - xo)

where,

K = is the total spring stiffness

lo = initial spring length

xo = spring length after adding the mass

The specification of each spring as the following :

Spring model : 1:10 Reely 1:10 Aluminium-Öldruckstoßdämpfer Titanium mit


Federn Schwarz 100 mm

The total length (l0): 100 mm

The spring thickness: 1.1 mm

The spring diameter: 14 mm

Number of active coils: 12

From these specification it was possible to find the stiffness of spring using an excel
sheet to calculate the equations.

16
Figure 10 Calculations for round wire helical springs.

The stiffness of one spring = 1650 N/m

In this case 2 shock absorbers in parallel were used and calculated:

KT = K1 + K2

Figure 11 Simplified model.

17
KT = 3300 N/m

After getting the spring stiffness it was possible to go back to the equilibrium
equation to find out the initial length at equilibrium:

mg = K(lo - xo)

after substituting,

xo= 0.0988 m

Another constant that should have been calculated for the spring is the Damping
Coefficient C:

wn = √

wn = natural frequency

K =spring stiffness = 3300 N/m

m= mass over the spring = 0.373 kg

wn = 14.97 Hz

Ccr = 2√�. �

Ccr = 70.168 N.s/m

ζ = damping ratio

Figure 12 Damping ratio plot.


18
The below graph shows the different vibration graphs for different values of damping
ratio.
 Damping ratio below 1 is termed as under-damped condition.
 Damping ratio equal to 1 is termed as critically damped condition.
 Damping ratio higher than 1 is over-damped condition

A damping ratio of 0.2 was chosen.

so that,

C = 14 N.s/m

Figure 13 Simplified model for quotations.

�� + � � + � � = C + Fim

where,

m = the mass over the springs = 0.373 kg

C= damping coefficient = 14 N.s/m

K = Spring stiffness = 3300 N/m

Fim = impact force = 117 N

Unfortunately the differential equation is hard to solve by hand, so a Simulink


Simulation was used to calculate this equation.

19
4.1 Simulink Simulation

After reaching this point, the theoretical part was finished and Simulink simulation
was started. It was done to get more accurate values. The following system was built:

Figure 14 Simulink model for suspension system.

Tool boxes:

1- Transitional spring : inside this toolbox it is possible to specify the stiffness of the
spring (3300 N/m)

2 - Transitional damper: connected to the spring and has a damping coefficient of


14 N.s/m.

3- Mass : This is the mass over the spring 0.373 kg.

4- Mechanical reference: it's a frame ,connected from both ends of the spring.

5- Motion Sensor: To sense the deflection and the velocity of the spring.

6- Force: in this case it's an impact force, which is only a hit for less than one second.
The graph below shows the impact force.

20
Figure 15 Impact force.

Using signal builder gave an opportunity of putting calculated force as an impact on


the system.

Results:

We needed to check and be sure from our results that or spring will not reach the
locking conditions. The maximum deflection of our shock absorber is 30 mm.

As we see in the graph below the x-axis is the time and the y-axis is the spring
deflection which didn't reach the locking length (30 mm) .

Figure 16 Spring damper deflection.

This results gave confidence that calculated and chosen spring will function properly.
Despite that it was also confirmed in balancing simulation performed in MotionView. That is
much more accurate way to check the system and this part is discussed in chapter 9.2.

21
Suspension system results
Impact force: 117 N
Stiffness of the two springs: 3300 N/m
Damping coefficient: 14 N.s/m
Maximum deflection of springs: 20mm

5 Electronic components.

5.1 Analysis of Electronic Components

The Arduino Due is a microcontroller board based on the Atmel SAM3X8E ARM
Cortex-M3 CPU. It is the first Arduino board based on a 32-bit ARM core microcontroller. It
has 54 digital input/output pins (of which 12 can be used as PWM outputs), 12 analog
inputs, 4 UARTs (hardware serial ports), a 84 MHz clock, an USB OTG capable connection, 2
DAC (digital to analog), 2 TWI, a power jack, an SPI header, a JTAG header, a reset button
and an erase button. The board contains everything needed to support the microcontroller;
simply connect it to a computer with a micro-USB cable or power it with a AC-to-DC adapter
or battery to get started. The Due is compatible with all Arduino shields that work at 3.3V
and are compliant with the 1.0 Arduino pinout. Unlike most Arduino boards, the Arduino
Due board runs at 3.3V. The maximum voltage that the I/O pins can tolerate is 3.3V.
Applying voltages higher than 3.3V to any I/O pin could damage the board.

Figure 17 Arduino Due.

22
The IMU we use in this system is MPU 6050.IMU sensors usually consists of two or
more parts. Listing them by priority, they are : accelerometer, gyroscope, magnetometer
and altimeter. The MPU 6050 is a 6 DOF (Degrees of Freedom) or a six axis IMU sensor,
which means that it gives six values as output. Three values from the accelerometer and
three from the gyroscope. The MPU 6050 is a sensor based on MEMS (Micro Electro
Mechanical Systems) technology. Both the accelerometer and the gyroscope is embedded
inside a single chip. This chip uses I2C (Inter Integrated Circuit) protocol for communication.

An accelerometer works on the principle of piezoelectric effect. Here, imagine a


cuboidal box, having a small ball inside it, like in the picture below. The walls of this box are
made with piezoelectric crystals. Whenever you tilt the box, the ball is forced to move in the
direction of the inclination, due to gravity. The wall with which the ball collides, creates tiny
piezoelectric currents. There are totally, three pairs of opposite walls in a cuboid. Each pair
corresponds to an axis in 3D space: X, Y and Z axes. Depending on the current produced from
the piezoelectric walls, we can determine the direction of inclination and its magnitude. For
more information check this.

Figure 18 Piezoelectric Accelerometer.

Gyroscopes work on the principle of Coriolis acceleration. Imagine that there is a fork
like structure, that is in constant back and forth motion. It is held in place using piezoelectric
crystals. Whenever, you try to tilt this arrangement, the crystals experience a force in the
direction of inclination. This is caused as a result of the inertia of the moving fork. The
crystals thus produce a current in consensus with the piezoelectric effect, and this current is
amplified. The values are then refined by the host micro-controller.
23
Figure 19 Piezoelectric Gyroscope.

Figure 20 MPU 6050.

DRV8833 dual motor driver can deliver 1.2 A per channel continuously (2 A peak) to a
pair of DC motors. With an operating voltage range from 2.7 V to 10.8 V and built-in
protection against reverse-voltage, under-voltage, over-current, and over-temperature, this
driver is a great solution for powering small, low-voltage motors.

Figure 21 DRV8833 Dual Motor Driver Carrier.

The sensor encoder which is connected directly to the motor is used to get the
relative position signal suitable for positioning tasks. For further processing in the controller,
the encoders deliver square-wave signals whose pulses can be counted for exact positioning

24
or speed measurement. Channels A and B pick up phase shifted signals, which are compared
with one another to determine the rotation direction. All maxon positioning systems
evaluate the rising and falling signal edges. With regard to encoder number of pulses, this
results in a four times higher positioning precision. This is what is referred to as quad-counts.

Figure 22 Sensor Encoder and its signals.

The level shifter features four bi-directional channels, allowing for safe and easy
communication between devices operating at different logic levels. It can convert signals as
low as 1.5 V to as high as 18 V and vice versa, and its four channels are enough to support
most common bidirectional and unidirectional digital interfaces, including I²C, SPI, and
asynchronous TTL serial.

As digital devices get smaller and faster, once ubiquitous 5 V logic has given way to
ever lower-voltage standards like 3.3 V, 2.5 V, and even 1.8 V, leading to an ecosystem of
components that need a little help talking to each other. For example, a 5 V part might fail to
read a 3.3 V signal as high, and a 3.3 V part might be damaged by a 5 V signal. This level
shifter solves these problems by offering bidirectional voltage translation of up to four
independent signals, converting between logic levels as low as 1.5 V on the lower-voltage
side and as high as 18 V on the higher-voltage side, and its compact size and breadboard-
compatible pin spacing make it easy to integrate into projects.

Figure 23 Level Shifter.

25
5.2 Place of Electronic Components

As we can see from the picture below which shows the connection between each
components.

Figure 24 Electronic circuit.

The Arduino Due is the control unit of the whole electronic circuit, it connects to the
level shifters directly, MPU6050 and motor driver carrier. So it should be put on the first
board which is the easiest place for connecting other electronic components and has the
biggest space for cables.

For the place to mount the IMU (MPU 6050). Because of its specialty that it is used to
control the balance of the robot, it must be somewhere horizontal to the vertical supporting
poles. But to have the best result, the most appropriate position for it is the middle of the
robot. So we decided to put it on the middle of the second (middle) board.

For other electronic components, to ensure that the centre of gravity is in the middle
line of the robot. They should be mounted on the middle position or in the symmetrical
place to balance its weight. The picture below shows the position where the electronic
components are installed.

26
In the first phase, we didn t know that the level shifters are connected directly on the
Arduino. So the place where they are supposed to be was set on another board. Also
because of the spring dampers going through the second board, the space for motor driver
carrier is not enough while the IMU has to be at the middle of the board. The level shifter
finally mounted on the reverse side of the first board. The Figure 25 shows the first version
of the position of all the electronic components. The Figure 26 follows showing the final
layout for all the electronic components.

Arduino

Motor Driver
Carrier

MPU6050

Level
Shifter

Figure 25 First Layout of Electronic components.

27
Level Shifter

Arduino
Motor Driver
Carrier

MPU6050

Figure 26 Final Layout of the Electronic Components.

6 Project data management.

6.1 Team folders.

For better organization of project files, special folders were created and used for
storing the whole work of the team. Main folders were dedicated to divide work for each
phase. They consists of other folders, which stores all tasks separately. It helped to keep
order in files and favor the work on project.

Figure 27 Folder organization.

28
6.2 CAD Design.

Working with Catia V soft are as started fro esta lishi g file s a e syste , so
that every part could be easily found by searching particular name using following notation:
VPD_xxx_3DPart_TEMPLATE_xx_A1A, where singular sectors were filled by author of the
part:

number kind name (TEMPLATE) author revison


00x 3DPart f.e. MAIN_ASSEMBLY f.e. AK A1A
10x ASSY A1B…
Tab. 1 Exemplary names for name notation.

6.3 Collaboration tools.

One of possibilities to manage team work was to use collaboration tools. In Catia V6
it was realized by Enovia - common team folder, where all the CAD parts and assemblies
were saved. In HyperWorks there is option to use collaboration tools as well. Using Personal
Repository and created Libraries, collaboration tools were examined, but later on were not
implemented to team work. Due to some errors with Checking-out option, it was decided to
cooperate by using folders mentioned in 6.1 chapter, dropbox and what-up application. It
resulted in fast and good work without risk of over saving files.

7 CAD Design.

7.1 Package Concept

Soon after establishing concept of power train system, the geometry creation of the
robot was started. The first step of creating geometry of the robot was to find as many as
good ideas as possible. For that brain storming, gallery method and internet research were
used. The main aim was to create simple and practical, but elegant design. That means
exoteric parts were supposed to be used and shape was about to be determined by smooth,
non-sharp curves and patches. Big benefit was given by 3D printing, so that the shape of
designed components could be adjusted in desired manner.

29
7.1.1 Implementation of skeleton geometry.

The next step was to create master file, which would be the source of the most
important references to all the parts. Among them elements like: main axis system, axis of
the wheels and motors, position of mounting elements etc. could have been found.
Moreover master file played the role of main skeleton in assembly. That prevented from
mistakes and errors like clash, improper dimensions and incorrect positions in cooperating
parts etc. It also prevented from problems and unnecessary work with updating many parts
after only one small modification. Furthermore all of the parts were built based on template
file, so that all of them had the same working principle and followed the same scheme.

7.1.2 Conceptual Design.

Concept of the vehicle body consisted of three boards: one base board, one middle
and one upper board. Main task of base board was to accommodate power train system and
battery. It had to be strong enough to take shock and stresses, so its thickness was two times
bigger than the thickness of two other boards. Middle and upper boards are responsible to
carry electronic components. Springs were placed between base and middle board (see
Figure 28).

Figure 28 Package concept design.


30
What is more, the whole robot was assumed to be covered by housing which
consisted of five parts: two sides, one cap, back and front covers. Beside the protection, it
also played the role of joining element. That means boards were mounted and adjusted to
housing sides. Additionally there were slots to prevent robot from undesired behaviour, like
tilting (see Figure 29).

Figure 29 Package concept design - housing.

Easy and fast assembling and disassembling were also important factors taken into
consideration while constructing the robot. It led to development of the concept of special
mounting mechanism (see Figure 30). It consisted of tube, pin and spring. Both, tube and pin
were able to be printed on 3D printer and spring could be easily found in any mechanical
shop. The main working principle of this mechanism is to press the pin inside the tube, so
that spring would be compressed, then turn the pin and lock it in specially shaped tube. To
disassemble these two parts, follow the above described process in other direction (turn ->
spring decompress -> take the pin out of tube).

31
Figure 30 Mounting mechanism - concept.

Main advantage of this mechanism is that it provides fast and friendly method for the
user to assemble and disassemble the housing without the use of any tool. On the other
hand, in later stages of detailed design, it turned out to be impossible to realize this
mechanism as it had many limitations. Main disadvantage was the big size determined by
possibility of catching the pin with two fingers without the risk of slipping and its weight.

All the other parts, except the motors, were supposed to be mounted by M3 screws
for which tight connection was applied. Electronic components were placed with the idea of
obtaining the best location of centre of gravity. This was the main reason for achieving as
symmetrical robot construction as possible. The only asymmetrical part was the base board
with power train system, which was caused by the use of belt drive. It had to be mounted
horizontally. Vertical mounting would not give enough stability and would additionally
increase the overall height of the robot. The scheme of the powertrain system mounted on
base board is shown below (bottom view).

Figure 31 Scheme - bottom view of base board.

32
Conceptual design gave good result with respect to the location of centre of gravity.
Unfortunately the mass was much higher than assumed and desired, which was the biggest
challenge and caused major changes in detailed design.

Figure 32 Centre of gravity and mass - conceptual design.

7.2 Detailed Design

The requirement of maximum weight demanded considerable changes in the robot


design. Again, brain storming turned out to be very useful. Heaviest parts were precisely
examined, so that new solutions appeared and the most reasonable ones were chosen. Main
principle did not change, but some concepts were developed to attain obligatory aim. Major
modifications are shown in the table.

Main modifications
Concept design Problems Detailed design Improvement

2 springs with different z dimension


4 springs mounted
too big weight characterization, mounted (height) decreased,
to middle board
to upper board weight decreased

2 rods connected to base


board with guide in middle
Slots in housing
board(after initial testing of tilt prevented
and guides in base risk of tilting
robot, the rods were
board
extended up to upper
board)

33
Housing sides as
need of strong housing connection between boards gained stability,
joining element for
- too big weight realized by rods weight decreased
boards
Vehicle body too big weight, housing reduced to single
covered entirely by inhibited access to cover with minimal weight decreased
housing components thickness
Tab. 2 Main modifications in design.

The need of reaching the maximum weight of 0.9 kg had effect also on calculation of
suspension and powertrain system. For the new requirements, calculations were made
again, which allowed major changes in both systems. This time to get minimum deflection
of 15mm, two spring dampers with specific spring stiffness and damping coefficient were
enough. Then the idea of connecting spring dampers to upper board was realized, which not
only reduced the weight and overall height of the robot, but also made the housing smaller
through the addition of extra holes in middle board (see Figure 33).

Figure 33 Robot's main modifications.

At the same time housing was rigidly rebuilt with special connecting shape for easy
and accurate mounting. Because it did not play the role of joining element any more, which
required strong - thick construction, it became thinner and lost its weight. Additional beam
34
holes (see Figure 34) allowed the air to go through what prevented electrical components
from getting hot. For the sake of 3D printing, housing cap was divided into two parts and
extra ribs were added (to make the housing stiff enough).

Figure 34 Housing.

These changes forced the displacement of electronic components. Various locations


and orientations were taken into consideration, but finally it was decided to put Arduino on
upper board, motor drivers on the same board but from the bottom side and IMU on middle
board, perfectly in its center.

Fundamental part of robot is the base board. It accommodates whole powertrain


system and battery. It also takes the biggest load while dropping and gives a place to mount
spring dampers. Its dimensions were determined by dimensions of motors, gears and
required distance between center of pulleys in belt drive. Battery got its own mounting
package (see Figure 35).

Figure 35 Battery package


35
Transformation of torque is realized by using belt drive with two pulleys with gear
ratio equal to 1.5. They were placed in proper positions by using special shapes in base
board, ball bearings, bushings, graded shafts, couplings and circlips. Clear explanation is
shown on the figures below.

Figure 36 Location of powertrain system elements (bottom view).

Figure 37 Crossection (front view).

36
All the modifications and optimization (see chapter 8) significantly affected the
weight of the robot. From mass of 1.993kg through 1.132kg after applying all new ideas, up
to 0.807kg after optimization. Automatically calculated characteristics in Catia V6 software
can be seen on figure below.

Figure 38 Model's characteristics

Figure 39 Model with Main Axis System.

37
The need of making the base board and the mounting for springs strong, contributed
to adding extra ribs. Their location and use will be explained in next chapters. Ready CAD
model of the two wheel robot can be seen on the figure below.

Figure 40 Detailed CAD design.

7.3 Bill of material.

Bill of material
Component Material Note

Vehicle body: boards, housing, battery package ABS -

Guiding rods Aluminium Alloy Change to steel


caused of lack of
Connectors Aluminium Alloy availability

Shafts Steel -
Tab. 3 Bill of material.

38
CAD Design results

Mass 0.807 kg
Centre of Gravity Gx = -0.005 mm, Gy = 0.143 mm, Gz = 64.241 mm
(Note: axis: x - width, y - length, z - height)
Inertia around wheel axis 0.008 kg*m^2

8 Optimization of design.

The preliminary CAD design of the two wheel robot was heavy (close to 2Kg)
corresponding to its motor-drive capability. So it was necessary to optimize the design
through Deformation analysis and Topology optimization. CAD model in CATIA V6 has been
updated based on the results of deformation analysis and topology optimization.

8.1 Deformation Analysis and Topology Optimization.

Deformation analysis and topology optimization of the two wheel robot was done
using the software called SolidThinkingInspire. The following steps were followed in the
deformation analysis and topology optimization process:

i. Identification of parts to be optimized.


ii. Data exchange to SolidThinking Inspire.
iii. Defeaturing.
iv. Pre-processing.
v. Solution phase.
vi. Topology optimization.
vii. Post processing.
i. Identification of parts to be optimized.

In our two wheel robot design, the most crucial part, which is going to take impact
load, is the base board. All other parts will be getting less impact while drop test, since those
are secured by the spring damper suspension system. So the optimization process was
carried out only on the base board. The initial part was 8mm thick. The main objective of the

39
analysis was to optimize the thickness and to remove the material from unnecessary areas of
the base board.

ii. Data exchange to SolidThinking Inspire.

The STEP file of the base board part has been exported from CATIA V6 and it has
been imported to SolidThinking Inspire.

iii. Defeaturing.

A good quality mesh of the CAD model is very important to get fast and accurate
results in SolidThinking Inspire. A good quality mesh can be achieved by simplification of CAD
model by eliminating small curved surfaces and small holes.

Following is the base board model before defeaturing process:

Figure 41 Base board before defeaturing.

In SolidThinking Inspire we have the option to identify different features like fillets,
holes etc. and to delete them if not required. Filtering of the features based on the size of
the features is also possible.

40
Figure 42 Identification of features.

Since there is some complex surfaces in our base board model, it was necessary to
delete the unwanted faces by selecting one by one.

iv. Pre-Processing phase.

The pre-processing phase includes the determination of load, supports, boundary


conditions and meshing of the model. The load applied on the base board is calculated from
the impact force during the drop test of robot from 20cm height.

The spring damper should deform at least 15mm during the drop test. So according
to the principle of conservation of Energy,

Energy, E = mgh = (1/2)mv2 = 1.962 J

Impact distance, S = 0.015 m

Impact Force, F = E/S = 1.962/0.015 = 130.8 N

I pa t for e o ea h heel = . / = . N≈ N

where m is the mass of the robot(= 1Kg), g is acceleration due to gravity(= 9.8m/s),
h is drop height(= 0.2m) and v is the free fall velocity at the time of impact.

Half the impact force value is applied on each wheel shaft of the two wheel robot.
Additionally, the effect of gravity is also considered.

41
The base board is supported at the spring damper fixing screws for the deformation
analysis.

Figure 43 Application of loads and supports.

The faces of the Shaft and the corresponding holes on the base plate were defined as
o ta ti g surfa es.

The next step was meshing. The mesh size used is 0.00162m.

Figure 44 Meshing details.


42
v. Solution phase.

In the solution phase, the base board model was analysed by the solver of the
software based on the load conditions given in pre-processing phase.

vi. Topology optimization

The results from the initial analysis were analysed in this phase. The initial model
used was so strong. Then we used topology optimization to identify the areas of base board,
from where material can be removed.

The main thickness of the base board was defined as the design space for the
topology optimization.

Figure 45 Definition of design space.

Mass reduction was the main objective of topology optimization. Since the plastic
parts are made using 3D printing process, we kept little higher factor of safety (= 3) and
minimum thickness (= 6mm). Load case for the topology optimization was similar to the
deformation analysis.

43
Figure 46 Optimization run details.

Topology optimization and Deformation analysis are interlinked. Modifications were


made on the model based on topology optimization and then again it was analysed to
optimize the design. Multiple iterations of analysis were carried out to arrive at the final
design of the base board.

vii. Post processing

Topology optimization and Deformation analysis are interlinked. Modifications were


made on the model based on topology optimization and then again it was analysed to
optimize the design. Multiple iterations of analysis were carried out to arrive at the final
design of the base board.

44
Results of topology optimization.

The deformation plot obtained from topology optimization is as below:

Figure 47 Deformation plot- Topology optimization.

The maximum value of deformation of the base board obtained from the analysis is
0.34mm.

The stress plot is as follows:

Figure 48 Stress plot- Topology optimization.

45
The maximum stress on the part under the given loading conditions is 9.72MPa.

The factor of safety plot is as follows:

Figure 49 Factor of safety- Topology optimization.

The minimum factor of safety of the model was 4.6.

Figure 50 Topology optimization of base board.

The critical area obtained is at the centre of the part between the spring-damper
connection and shaft mounting.

46
Through topology optimization, the mass of the baseboard wasreduced by 58 grams
(Mass reduced from 202g to 144g).

Figure 51 Mass reduction in Topology optimization.

Results of Deformation Analysis.

The results of the deformation analysis on the final design was analysed to check the
deformation and stress on it.

The deformation plot obtained is as follows:

Figure 52 Deformation plot - Deformation Analysis.

The maximum value of deformation of the base board obtained from the analysis is
0.28mm. From this value, it is clear that the horizontal stiffness of the base board is very
high.

47
The stress plot is as follows:

Figure 53 Stress plot - Deformation Analysis.

The maximum stress on the part under the given loading conditions is 28.7MPa.

In addition, the factor of safety plot was also checked to ensure the design is safe:

Figure 54 Factor of safety - Deformation Analysis.

The final design of base board has a minimum factor of safety of 5.

48
8.2 Geometry Optimization.

Geometry optimization was carried out simultaneously to deformation analysis and


topology optimization. The CATIA model was updated after analysing the results of
optimization analyses. From the topology optimization, it was clear that the centre area of
the base board, directly below spring damper connection, is the critical area of
consideration. Other important finding from the topology analysis was the optimal position
of spring damper connection. Its position shifted to the exact centre position of the second
support for the shaft.

Figure 55 Optimization of base board - position of spring mounting.

New ribs were introduced between spring damper connections.

New ribs were introduced to strengthen the shaft supports also.

49
Figure 56 Optimization of base board - ribs.

Additionally material was removed from the middle board, upper board and housing
by reducing the thickness and introducing holes.

Figure 57 Optimization of upper board.

50
Figure 58 Optimization of middle board.

Figure 59 Optimization of housing.

51
Results of Optimization

Topology Optimization

 Maximum Displacement: 0.34mm


 Maximum von Mises stress: 9.72MPa
 Minimum factor of safety: 4.6
 The critical area obtained is at the centre of the part between the
spring-damper connection and shaft mounting.
 The mass of the baseboard was reduced by 58 grams (Mass reduced
from 202g to 144g).

Deformation Analysis

 Maximum Displacement: 0.28mm


 Maximum von Mises stress: 28.7MPa
 Minimum factor of safety: 5.0
 Since the displacement value is negligible (0.28mm) and maximum
von Mises stress (28.7MPa) is within Ultimate strength of the part
(40MPa), the part is horizontally stiff.

9 Multibody System Simulation.

9.1 Drop test.

One of the main requirement of the two wheel robot is to sustain the impact of
dropping from a height of 20cm. Suspension system consists of a spring damper is the key
part to fulfil this requirement. The spring damper should deflect at least 15mm to absorb the
dropping impact.

To simulate the behaviour of two wheel robot suspension system, we have used
Multibody simulation in Motion view – Motion solve of Altair HyperWorks software package.

52
The plan of action was to start from a model with primitive graphics in motion view
and then replace it with actual imported CAD geometry for drop test.

Figure 60 Geometry in drop test.

9.1.1 Model Definition

Following are the main components of two wheel robot model for drop test:

Figure 61 Drop test tree.

53
i. Bodies

The bodies used for drop test are ground body, two wheels, part of robot below
spring damper (Bottom) and part of robot above spring damper (Top).

ii. Points

Required points were defined to position the bodies and to define other features like
spring damper, joints etc.

iii. Graphics

Step file from CATIA V6 was imported to Motion view to get better understanding of
the behaviour of two wheel robot in drop test.

iv. Joints

Translational joints were assigned between top to bottom parts and between bottom
part to ground body to make sure the vertical alignment of the robot.

Wheels were fixed to the bottom part.

v. Contacts

Rigid to rigid body contacts were defined between the two wheels and the ground
body. Following are the properties of contact used:

Figure 62 Properties of contact.

Frictional force was disabled in the properties window.

vi. Spring Damper

In the actual model, there are two spring dampers. So for the drop test in Motion
view-Motion solve, we have used two spring dampers to represent them in software

54
environment. Following are the values of spring constant, K (N/mm) and damping
coefficient, C (Ns/mm) used for the drop test:

Figure 63 Properties of spring damper.

vii. Outputs

Outputs were created to measure the force and deflection on springs.

viii. Simulation settings

Following are the simulation settings used:

Figure 64 Simulation settings.

9.1.2 Results of Drop test

Maximum deflection of spring dampers obtained from the drop test is 17.5mm.

Figure 65 Maximum deflection of spring dampers.


55
So the minimum requirement of 15mm deflection is satisfied.

The contact force between wheels and the ground body is 2443N.

Figure 66 Simulation results - contact force.

The value of force on each spring damper is 45N

Figure 67 Force on spring damper.

9.1.3 Drop test using sequential simulation

We tried drop test with scripted simulation also. In scripted simulation, we simulated
the action of holding the robot on housing and then dropping it to the ground body. A fixed
joint constraint between housing and ground body was used to simulate this.

56
Figure 68 Scripted simulation properties.

The script used is :

--------------------------------------------------------------------------------------------------------

<Simulate
analysis_type = "Static"
/>
<Deactivate
element_type = "JOINT"
element_id = "{j_HoldingJoint.idstring}"
/>
<Simulate
analysis_type = "Transient"
end_time = "2."
print_interval = "0.001"
/>
--------------------------------------------------------------------------------------------------------

The results obtained from the sequential simulation were quite similar to the
simulation carried out without script.

57
Maximum deflection: 17.5mm

Figure 69 Deflection of spring dampers (scripted simulation).

Contact forces: 2436N

Figure 70 Contact forces (scripted simulation).

Force on each spring damper: 44.5N

Figure 71 Force on spring damper (scripted simulation).

58
9.2 Balancing simulation.

One of the tasks which robot is supposed to perform is to balance with the velocity
equal or close to zero. Main factors which have the crucial influence on the quality of
balancing task are torque, speed, weight and location of center of gravity. All of them have
an impact on each other, so it was very important to take care of all of them simultaneously.
Speed and torque are directly related to motor characterization and the gear ratio is the
factor which let control both of them. At the same time, location of center of gravity
determines behavior of robot, which would need more power if there is offset between
center of gravity and wheels' axis offset between center of gravity and wheels' axis.

9.2.1 Model definition.

Balancing simulation accomplished in HyperWorks software gave an idea of robot's


behavior and confirmed required torque and gear ratio in the belt drive. Before starting
work in MotionView all required inputs were established and the most important were put
in Data Set (see figure below).

Figure 72 Robot_parameters Data Set

At first it was done with simplified model, using 'step by step' method, where all the
model became more and more advanced after accomplishing every step. Besides data
parameters, bodies, graphic, systems and all other objects the most important features
were:

1. Contact - defined between robot's wheels and ground (detailed properties on


Figure 73).
2. Forces - moments applied on both wheels with user defined properties (value
calculated in python script).

59
Figure 73 Contact properties.

Finished model with all the objects can be seen on figures below.

Figure 74 Model for balancing simulation.

60
Figure 75 Balancing simulation tree.

Before running the simulation, Matla s ript as used to get gai alues for ro ot s
controller. To achieve proper values, all parameters had to be set carefully and precisely,
which can be seen on below.

61
The results were put in another Data Set called Control_parameters.

Figure 76 Control_parameters Data Set.

9.2.2 Scripted simulation.

Balancing simulation was run with prepared script, where both, static and dynamic
simulation could be performed. That was important to prevent robot from bounding which
was caused by definition of contact. In this case extra join was added, activated while
running static simulation and deactivated during transient simulation. Applied force - torque
was defined opposite way, so that it does not affect static simulation. The code can be seen
below.

<Deactivate
element_type = "jprim"
element_id = "{sys_Vehicle_body.j_Paraller_axis.idstring}"
/>
<Deactivate
element_type = "force"
element_id = "{sys_Powertrain_wheels.frc_moment_left.idstring}"
/>
<Deactivate
element_type = "force"
element_id = "{sys_Powertrain_wheels.frc_moment_right.idstring}"
/>
<Simulate
analysis_type = "Static"
/>
<Activate
element_type = "jprim"
element_id = "{sys_Vehicle_body.j_Paraller_axis.idstring}"
/>
62
<Activate
element_type = "force"
element_id = "{sys_Powertrain_wheels.frc_moment_right.idstring}"
/>
<Activate
element_type = "force"
element_id = "{sys_Powertrain_wheels.frc_moment_left.idstring}"
/>
<Deactivate
element_type = "joint"
element_id = "{sys_Vehicle_body.j_Static_joint.idstring}"
/>
<Simulate
analysis_type = "Transient"
end_time = "3."
print_interval = "0.01"
/>

9.2.3 Results.

To achieve more real conditions, initial angle of robot was applied. To control
position of points and orientation of coordinates systems mathematic functions were
introduced. As an example IMU marker (describing IMU position and orientation in robot)
was defined by point and axis system, which coordinates were dependent upon sinus and
cosinus functions (see figure below).

Figure 77 Marker axis definition.

63
Vehicle was supposed to come to vertical position and balance. In this case maximum
reached angle was 13.96°. Obtained torque and model with initial angle is shown on figure
below.

Figure 78 Model with initial angle.

Figure 79 Torque with initial angle 13.96°.

64
The maximum torque required to balance the robot with initial angle of 13.96° is
0.18Nm. This results were obtained for previously made calculations, were gear ratio was
equal to 1.5. To find the maximum and minimum required gear ratio, more runs were
implemented. Output plots made it clear which range of gear ratio was applicable.

Examination of maximum gear ratio (green – gear ratio equal to 1.9, blue – ratio
equal to 2.0):

For gear ratio equal to 2.0, robot is not able to balance.

Examination of minimum gear ratio (red – gear ratio equal to 1.0, blue – ratio 1.2):

65
The results show that even without gear robot would be able to balance.

Controller gains calculated by using Matlab script were applied to motion view.
Together with other references like markers or gear ratio, they were given as input to
python script to calculate the torque. To obtain the smooth plot, changes in penalty value
were made. Figures below show the effect of the penalty value on the torque (initial angle is
equal 10°).

Figure 80 Torque - penalty value: 5*e08.

Figure 81 Torque - penalty value: 5*e06.

66
Figure 82 Torque - penalty value: 5*e04.

Results achieved for gear ratio 1.5 were very close to manually made calculations.
This allowed to proceed with next step of projects which was to order all necessary parts and
assemble the robot.

Unfortunately in real life application, gains from simulation could not be used. Robot
was too slow, tended to fall and shake. It required detailed examination of Simulink
program, many attempts and experiments, where observation and understanding of robot's
behaviour were the main factors which decided about chosen values of gains.

Results of Multibody system simulation


Drop Test
i. Without sequential simulation
Maximum deflection of the spring damper: 17.5mm
The contact force between wheel and ground body: 2443N
Maximum force on each spring: 45N
ii. With sequential simulation
Maximum deflection of the spring damper: 17.5mm
The contact force between wheel and ground body: 2436N
Maximum force on each spring: 44.5N

67
Balancing simulation
Maximum initial angle: 13.96°
Maximum torque (for max. initial angle): 0.18 Nm
Required gear ratio: 1.5
Minimum and maximum gear ratio (for initial angle equal to 10°): 1.0 - 1.9

10 Purchasing list.

The table below shows the purchasing details.

Purchasing List

Company for
Components Quantity Size Cost
purchasing

Screw 16 M3
Screw 4 M4
Screw 8 M1.5
Workshop Nut 30 M3
Nut 8 M4

Shaft(Wheel) 2

Thread Pipe 4 5,8mm

Shock Absorber 4 19.99

Bearing 2 4mm 4.98


Glue 1 10.49

Hollow Shaft 1 4mm 5.49

Conrad Supporting Pole 2 3mm 1.9

Supporting Pole 2 4mm 1.9

Oil for Shock Absorber 1 5.49

Bush 2 3mm 3.38


68
Bush 2 3mm 1.86
Bush 2 6mm 1.24
Bearing 2 3mm 2.22
Coupling 2 3mm 43.53
Belt 2 T2.5 8.48
Maedler Pulley 2 9.56 11.24
Pulley 2 14.32 10.12
Pulley 2 19.15 10.78
Ring 2 2.7mm 0.1
Ring 2 3.7mm 0.1
Collar 2 4mm 4.38
Total 176.65
Tab. 4 Purchasing list.

As we can see from the table, the total price of all the components is 176.65 €,
including shipping fee and added-value tax.

11 3D - Printing.

3D Printing gave huge advantage of achieving almost every desired shape in robot's
construction. Unfortunately it has also its limitations. Due to possible problems with
acquiring high precision and short printing time, some parts had to be adapted. The major
modifications could be seen in base board. There, U-Shaped parts had to be printed as
separate parts without holes for bearings and bushings, so that later, they could be done by
milling process with good precision. In this case also the position of ball bearing had to be
changed. For easier mounting and hole making, special geometry was prepared to mark
centre of holes and position of U-Shaped parts (exemplary geometry marked with red circles
on figure below).

69
Figure 83 Geometry prepared for 3D Printing.

After making all necessary changes, stl files were prepared. For that STL Rapid
Prototyping module in Catia V6 was used. To create stl files, tools like Tessellation (with Sag
0.01mm and Step not bigger than 1mm) and STL Export were used.

All the parts were printed in black colour ABS with support material, easy to remove
by melting in liquid. Good enough precision of 3d printing parts led to assemble robot which
is described in following chapter.

12 Assembling robot.

After received all the components from the Maedler, working on the robot assembly
was begun.

12.1 Assembling Electronic Components

When started to assemble the robot, the connection of electronic components was
decided to be done first because of the full schedule in the workshop that our shafts and
some components needed manufacturing was still not available. According to the circuit and
the distance between electronic components in our design, the cables for connection were
made firstly. The cables should be neither too long , nor too short considering the inertia

70
moment and the non-interference to the springs on shock absorbers. Concerning of safety,
the red cables were made as current input and output. There is only one level shifter on our
Arduino, so only one level shifter possible for us to shift all the needed voltage. After
finishing connection, the power supply from computer was used to confirm the rotation of
motors (see Figure 84) was in the right direction with the movement of IMU.

Figure 84 Test of Circuit.

Then the right place for screw holes to mount the electronic components were
measured, and the holes were made on the boards. The electronic components were fixed
on the set position with screws and nuts and the circuit was rechecked later on (see Figure
85). There is no space designed for switch, so the switch was put to an easy control position
outside of the housing on the opposite side of the second board and exact holes were made
for mounting it.

Figure 85 Mounted electronic components.


71
12.2 Assembling 3D Parts

While waiting for the parts from workshop, the 3D parts were assembled at the
same time with electronic components. Because of the limited capacity of the 3D printing,
the air flowing holes on the housing parts should be made manually ourselves. Firstly the
continuous holes were drilled with the drill machine at the border of the holes. Then the
useless material was cut with knife (see figure below).

Figure 86 Housing before removing holes.

To light weight the robot more, some unnecessary material was removed from the
baseboard in the ribs (see Figure 87). After mounting all the possible parts, a problem was
found that the guiding poles from the baseboard to the second board were not matching
perfectly. The holes for the pipes are 3mm, but the pipes available for us to get are 2,7mm.
So the holes were enlarged to 4mm and pipes for another size we got as a backup for 4mm
were used. Although they added a little weight, but they fully solved the problem and made
the connection stronger.

Figure 87 Light weighted baseboard.


72
12.3 Assembling Powertrain and Shock Absorber

Finally shafts and the manufactured parts done from the workshop hopefully, the
powertrain was assembled at last. To make sure the holes for mounting motors won t hurt
the surface of motors and fix the motors tight enough meanwhile, the holes were polished
ourselves little by little to check the condition of mounting the motor. Then couplings were
used to connect the shafts with the output of motors. The belt was too tight and the friction
between shafts and bushes were non-ignorable at the beginning that the motor runs slower
as expected. Thanks to the adjustable couplings, after readjusting the couplings, the
powertrain works properly afterwards.

The last part was to mount the shock absorber and finish the assembly of the
whole robot with housing. But the stiffness of the shock absorbers is too high. The way to
reduce the stiffness are described in detail as follows.

12.4 Problem Solving

First problem faced was that the housing was not fixed, stabilized, it had a small
movement that had a high negative effect on the IMU reading. It was solved by
elongating the guiding rods till upper board. The figure below shows the guiding rod after
it was elongated. Now the guidance between the shock absorber and the housing is
smooth and efficient, also the noise on the IMU readings disappeared.

Figure 88 Robot with elongated guiding rods.


73
Second problem was that the shock absorber was very stiff, so the spring was
changed from 12 coils spring to 6 coils spring. The figure below shows 100 mm tall spring
and the new replacement with 60 mm spring.

Figure 89 Two springs.

Third problem was the damping ratio. By using the 400 oil the damping was too high
and there was no smooth movement. The 100 viscosity (index number) oil was examined,
but still the damping was a bit too high. Finally the 50 oil solved the problem and best
smooth damping was reached.

All mentioned steps resulted into creating two wheel robot.

Figure 90 Assembly of two wheel robot.

74
13 Functional testing - Simulink.

After assembling the robot, it was the time to start the control part to balance the
robot. Simulink is the software used for control. The software communicates between the
Arduino and IMU, also between the Arduino and Motor.

13.1 IMU to Arduino communication

The IMU reads the angle and the rate of change of the angle and then it sends
readings to the Arduino using I2C protocol. The second step is filtering the noise on the IMU
outputs. In this case complementary filter is used to eliminate the noise of the signal.

13.2 Arduino to motor communication

The speed of the DC motor is controlled using Duty cycle (PWM), where each motor
is connected to a PWM channel on the Arduino.

13.3 State chart

The state chart is responsible for the scheduling of the tasks when the software runs.

13.4 State Controller

The inverted pendulum or 2 wheel robot is an unstable system, where the poles of
the system are in the unstable region (right hand side). If the poles are in the left hand side
of the graph below, the system is stable.

Figure 91 Coordinates for poles.


75
Here comes the state controller where the states of the robot (position, speed, angle
and rate of change of angle) are multiplied by the gains to move the poles from the Right
hand side to the left hand side.

K = [Kphi Kx Kx_dot Kphi_dot]

13.5 Changes implemented for the project.

Particular project - two wheel robot with unique construction, mass and position of
centre of gravity requires its own prepared software. That is the reason why some of the
values and functions were modified in Simulink code. Main changes in the software were
connected with gain values, which were adjusted experimentally.

13.5.1 Triggering Frequency for DC motors

Unfortunately at the beginning the DC motors were not powerful enough to balance
the robot. In this case the best performance that DC motors could achieve, was
recommended. One of the factors that influences the performance of the motor is the
triggering frequency (PWM frequency). This Frequency can vary between 20 Hz to 20 KHz .
For these DC motors the range was between 500 Hz to 1 KHz. Within this range different
frequencies were implemented. Finally the chosen value for the triggering frequency was 1
KHz. At this frequency the motors achieved the highest torque and speed and it also affected
the response of the system. As shown in the figure below, at frequency 500 Hz the noise on
the PWM signal is too high due to losses through the wires and the Arduino efficiency. While
on the other hand at frequency 1 KHz the noise is reduced.

Figure 92 PWM signal - different frequencies.


76
13.5.2 Encoder Function

Fortunately the DC motor was supplied with digital encoders, which counts the
revolutions of the motor. The two wheel robot was designed in a way that the wheel and the
motor were not on the same axis. In this case there will always be a speed difference
between the two wheels. This was eliminated by adding a function in the program. This
function calculates the speed and position difference between the two motors according to
the encoder reading. Then this difference is added to the slower motor to eliminate the
rotation of the robot. The position and velocity of each wheel was calculated using the
equations below.

.π.r
Xleft = Encoderleft *
64∗� ������ ∗ �����

.π.r
Xright = Encoderright *
64∗� ������ ∗ �����

∆�� � ∆��� ℎ�
Vleft = , Vright=
∆ ∆

where:

Xleft = left wheel position

Xright = right wheel position

Vleft = left wheel velocity

Vright = right wheel velocity

Encoderleft = encoder reading for the left wheel

Encoderright= encoder reading for the right wheel

The two figures below show how it was implemented in Simulink:

77
Figure 93 Changes implemented in Simulink - velocity estimation.

Figure 94 Changes implemented in Simulink - speed calculation.

13.5.3 State Controller Gains

The state controller gains of the two wheel robot was initially calculated using a
Matlab function. The function takes the geometry and the weight of the robot as an input.
Then it places the inputs in the System matrix A.
78
Mc = 0.529 kg

Mw = 0.273 kg

Jw = 0.0000544 kg/m2

L = 0.093156 m

rw = 0.03 m


Md = Mw +
��

0 0 1 0
0 0 0 1
A=
( g / L) * (( Md  Mc) / Md ) 0 0 0
 g * ( Mc / Md ) 0 0 0

0
0
B=
1 / (L * rw * M d)
- 1 / (rw * M d)

where:

Mc = mass of chassis without drives, Mw = mass of 2 wheels and powertrain, Jw =


mass moment of inertia of 2 wheels, L = distance between center of axis and chassis CoG,
rw = wheel radius, A = System matrix, B = Input vector

After getting the unstable system matrix A and the input vector B, now the aim is to
replace the unstable poles (Eigen values) of matrix A with the new stable poles.

poles =  14  2i 14  2i  10  2

The resulting Gains was as the following,

K = [Kv Kphi Kphi_dot] = [-3040 7630 59.2]

Finally after checking the response of the robot during balancing , there was a slight
change in the gains.

K = [Kv Kphi Kphi_dot] = [-3500 7500 50]

79
13.5.4 Angle Adjustment Algorithm

As mentioned before in 13.5.1, motor was not powerful enough to balance the robot
without software adjustment. The trails showed that if the angle exceed 15 degrees the
motor was not strong and fast enough to balance the body. So the challenge was to always
keep the angle in the safe range -15 to 15 degrees. This was achieved using an extra PID
controller which adjust the angle according to the actual speed of the robot. A PID controller
continuously calculates an error value as the difference between a desired set point and a
measured process variable. The controller attempts to minimize the error over time by
adjustment of a control variable. Where Kp (=0.6), Ki (=0.5) and Kd (=0.2) all non-negative,
denote the coefficients for the proportional, integral, and derivative terms, respectively
(sometimes denoted P, I, and D). In this case the PID controller takes the robot actual
velocity as input and according to it, the angle of the robot is adjusted. The figure below
shows the Simulink implementation of this algorithm.

Figure 95 Simulink modifications - PID controller.

80
14 Conclusion.

The whole project consisted of three phases, which contained of many different
tasks. They were solved and challenged step by step. All of them together resulted in
obtaining good and functional design of the robot.

CAD Design was first step to get an idea about the most important features of the
robot. It was developed throughout all the tasks and finally was the base to create the
system in real life.

Optimization together with discussion and team member's ideas gave a huge
progress in gaining required mass. Moreover it assured for the proper geometry to obtain
enough strength.

Multibody simulations gave an idea about robot behaviour while dropping and
balancing.

Assembly of robot showed real life problems, which were difficult to be noticed in
earlier stages, but also taught how to solve it and avoid in future.

Overall it can be said, that the hard work resulted in creating working system which
fulfil all the requirements.

81
15 References.

1. Altair, HyperWorks: Introduction to MotionView & MotionSolve.


2. Altair, HyperWorks: MotionView/MotionSolve intro Training.
3. http://www.altairhyperworks.com
4. http://sdp-si.com/resources/beltdesignsuggestions.htm
5. http://www.robotpark.com/academy/robotic-mechanisms-pulleys-and-belts-
51045/
6. http://www.maedler.de/product/1643/zahnriemenraeder-zahnriemen-und-
zubehoer
7. "Suspension Basics 1 - Why We Need It". Initial Dave. Retrieved 2015-01-29.
8. "Suspension Basics 5 - Coil Springs". Initial Dave. Retrieved 2015-01-29.
9. http://www.tribology-abc.com/calculators/t14_1.htm

82
16 Appendix.

16.1 Concept generation.

83
84
85
86
16.2 Suspension calculations.

87
88
89
90
91
92
93
Drawings made for machining:

16.3 Base board drawing.

94
16.4 Base board drawing - holes.

95
16.5 Battery package drawing.

96
16.6 Shaft drawing.

97
17 List of figures.

Figure 1 Inverted pendulum. .......................................................................................... 5

Figure 2 Forces acting on two wheel robot. ................................................................... 7

Figure 3 Belt drive........................................................................................................... 9

Figure 4 Belt drive with angles. .................................................................................... 11

Figure 5 Timing belt profiles. ........................................................................................ 12

Figure 6 Detailed characteristics of profile T 2.5 - length & number of teeth. ............ 12

Figure 7 Detailed characteristics of profile T 2.5 - speed. ............................................ 12

Figure 8 Static coefficient of friction of Polyurethanes. ............................................... 14

Figure 9 Shore hardness scales. ................................................................................... 15

Figure 10 Calculations for round wire helical springs. ................................................. 17

Figure 11 Simplified model. .......................................................................................... 17

Figure 12 Damping ratio plot........................................................................................ 18

Figure 13 Simplified model for quotations................................................................... 19

Figure 14 Simulink model for suspension system. ....................................................... 20

Figure 15 Impact force.................................................................................................. 21

Figure 16 Spring damper deflection. ............................................................................ 21

Figure 17 Arduino Due.................................................................................................. 22

Figure 18 Piezoelectric Accelerometer......................................................................... 23

Figure 19 Piezoelectric Gyroscope. .............................................................................. 24

Figure 20 MPU 6050. .................................................................................................... 24

Figure 21 DRV8833 Dual Motor Driver Carrier............................................................. 24

Figure 22 Sensor Encoder and its signals. .................................................................... 25

Figure 23 Level Shifter. ................................................................................................. 25

98
Figure 24 Electronic circuit. .......................................................................................... 26

Figure 25 First Layout of Electronic components. ........................................................ 27

Figure 26 Final Layout of the Electronic Components. ................................................ 28

Figure 27 Folder organization....................................................................................... 28

Figure 28 Package concept design. .............................................................................. 30

Figure 29 Package concept design - housing................................................................ 31

Figure 30 Mounting mechanism - concept. ................................................................. 32

Figure 31 Scheme - bottom view of base board. ......................................................... 32

Figure 32 Centre of gravity and mass - conceptual design. ......................................... 33

Figure 33 Robot's main modifications. ......................................................................... 34

Figure 34 Housing. ........................................................................................................ 35

Figure 35 Battery package ............................................................................................ 35

Figure 36 Location of powertrain system elements (bottom view). ............................ 36

Figure 37 Crossection (front view). .............................................................................. 36

Figure 38 Model's characteristics ................................................................................. 37

Figure 39 Model with Main Axis System. ..................................................................... 37

Figure 40 Detailed CAD design. .................................................................................... 38

Figure 41 Base board before defeaturing. ................................................................... 40

Figure 42 Identification of features. ............................................................................. 41

Figure 43 Application of loads and supports. ............................................................... 42

Figure 44 Meshing details. ........................................................................................... 42

Figure 45 Definition of design space. ........................................................................... 43

Figure 46 Optimization run details. .............................................................................. 44

Figure 47 Deformation plot- Topology optimization. ................................................. 45

Figure 48 Stress plot- Topology optimization. ............................................................. 45


99
Figure 49 Factor of safety- Topology optimization. ..................................................... 46

Figure 50 Topology optimization of base board. ......................................................... 46

Figure 51 Mass reduction in Topology optimization. ................................................... 47

Figure 52 Deformation plot - Deformation Analysis. ................................................... 47

Figure 53 Stress plot - Deformation Analysis. .............................................................. 48

Figure 54 Factor of safety - Deformation Analysis. ...................................................... 48

Figure 55 Optimization of base board - position of spring mounting. ......................... 49

Figure 56 Optimization of base board - ribs. ................................................................ 50

Figure 57 Optimization of upper board. ....................................................................... 50

Figure 58 Optimization of middle board. ..................................................................... 51

Figure 59 Optimization of housing. .............................................................................. 51

Figure 60 Geometry in drop test. ................................................................................. 53

Figure 61 Drop test tree. .............................................................................................. 53

Figure 62 Properties of contact. ................................................................................... 54

Figure 63 Properties of spring damper......................................................................... 55

Figure 64 Simulation settings. ...................................................................................... 55

Figure 65 Maximum deflection of spring dampers. ..................................................... 55

Figure 66 Simulation results - contact force. ............................................................... 56

Figure 67 Force on spring damper. .............................................................................. 56

Figure 68 Scripted simulation properties. .................................................................... 57

Figure 69 Deflection of spring dampers (scripted simulation). .................................... 58

Figure 70 Contact forces (scripted simulation). ........................................................... 58

Figure 71 Force on spring damper (scripted simulation). ............................................ 58

Figure 72 Robot_parameters Data Set ......................................................................... 59

Figure 73 Contact properties. ....................................................................................... 60


100
Figure 74 Model for balancing simulation. .................................................................. 60

Figure 75 Balancing simulation tree. ............................................................................ 61

Figure 76 Control_parameters Data Set. ...................................................................... 62

Figure 77 Marker axis definition. ................................................................................. 63

Figure 78 Model with initial angle. ............................................................................... 64

Figure 79 Torque with initial angle 13.96°. .................................................................. 64

Figure 80 Torque - penalty value: 5*e08...................................................................... 66

Figure 81 Torque - penalty value: 5*e06...................................................................... 66

Figure 82 Torque - penalty value: 5*e04...................................................................... 67

Figure 83 Geometry prepared for 3D Printing. ............................................................ 70

Figure 84 Test of Circuit................................................................................................ 71

Figure 85 Mounted electronic components. ................................................................ 71

Figure 86 Housing before removing holes. .................................................................. 72

Figure 87 Light weighted baseboard. ........................................................................... 72

Figure 88 Robot with elongated guiding rods. ............................................................. 73

Figure 89 Two springs. .................................................................................................. 74

Figure 90 Assembly of two wheel robot. ..................................................................... 74

Figure 91 Coordinates for poles. .................................................................................. 75

Figure 92 PWM signal - different frequencies.............................................................. 76

Figure 93 Changes implemented in Simulink - velocity estimation. ............................ 78

Figure 94 Changes implemented in Simulink - speed calculation. ............................... 78

Figure 95 Simulink modifications - PID controller. ....................................................... 80

101
18 List of tables.

Tab. 1 Exemplary names for name notation. ............................................................... 29

Tab. 2 Main modifications in design............................................................................. 34

Tab. 3 Bill of material.................................................................................................... 38

Tab. 4 Purchasing list. ................................................................................................... 69

102

You might also like