You are on page 1of 49

TECHNICAL MANUAL

ELEC/COEN 490: TEAM 9

Submitted by: Supervised by:


Venkata Lakshmi Manta 9060203 Dr.Wei-Ping Zhu
Omer Khan 6168876 Mr.Sujan Kumar Roy
Yazen Alkouri 9231196
Mital Prajapati 9776796
I|Page
Table of Contents

Chapter 1: Gump at a Glance………………………………………………………………………………………………………………….1


Section 1.1 Gump Overview ………………………………………………………………………………………….……1
Section 1.2 Features……………………………………….……………………………………………………………….…1
Section 1.3 Specifications……………………………….…………………………………………………………….……2
Chapter 2: Designing the PCB……………………………….…………………………………………………………………………..……4
Section 2.1 Robot PCB Outline……………………………….………………………………………..…………………4
Section 2.2 Robot PCB Assembly……………………………….……………………………………………….………6
Section 2.3 User PCB Outline……………………………….…………………………………………………….………7
Section 2.4 User PCB Assembly……………………………….…………………………………………………………8
Section 2.5 Overview of Robot Components……………………………….…………………….………………9
Section 2.6 User Side PCB Components……………………………….……………………………………………17
Chapter 3: Mechanical Manufacturing and Assembly……………………………….………………………………..…………19
Section 3.1 List of Components……………………………….……………………………………………..…………19
Section 3.2 Manufacturing the Parts ……………………………….…………………………………..……………20
Section 3.3 Assembly of the Bipedal Legs……………………………….…………………………………………22
Chapter 4: Voice Recognition Software Setup……………………………….………………………………………………………34
Section 4.1 Tools Required……………………………….………………………………………………………………34
Section 4.2 Installing the Software……………………………….……………………………………………………34
Chapter 5: Control System Software Setup……………………………….……………………………………………………..……39
Section 5.1 Programming the ATtiny44……………………………….……………………………………………39
Section 5.2 Programming Gump……………………………….………………………………………………………42
Bibliography……………………………….…………………………………………………………………………………………………………44

II | P a g e
List of Tables
Table 1: Gump Commands……………………………………………………………………………………………………………………...1
Table 2: Gump Specifications…………………………………………………………………………………………………………………..2
Table 3: Gump Features table………………………………………………………………………………………………………………….3
Table 4: Robot Electrical Components……………………………………………………………………………………………………..4
Table 5: User PCB Electrical Components…………………………………………………………………………………………………7
Table 6 : Mechanical Parts …………………………………………………………………………………………………………………….18
Table 7: Mechanical Tools…………………………………………………………………………………………………………………….19

List of Figures
Figure 1: Gump Dimensions…………………………………………………………………………………………………………………….3
Figure 2: Gump Features …………………………………………………………………………………………………………………………3
Figure 3: Robot PCB…………………………………………………………………………………………………………………………………5
Figure 4: Assembled Robot PCB……………………………………………………………………………………………………………….6
Figure 5: User-Side PCB……………………………………………………………………………………………………………………………7
Figure 6: Assembled User-Side PCB………………………………………………………………………………………………………..8
Figure 7: Six Volts Regulator…………………………………………………………………………………………………………………….9
Figure 8: Five Volts Regulator………………………………………………………………………………………………………………..10
Figure 9: Power Setup…………………………………………………………………………………………………………………………..11
Figure 10: Three Volts Regulator……………………………………………………………………………………………….…………..11
Figure 11: Eight-Bit Serial Bus………………………………………………………………………………………………….…………….12
Figure 12: Wireless Module…………………………………………………………………………………………………………………..12
Figure 13: IR Sensors………………………………………………………………………………………………………………….………….13
Figure 14: Ultrasonic Sensors………………………………………………………………………………………………………………...13
Figure 15: Servomotors …………………………………………………………………………………………………………….…………..15
Figure 16: STM32F3 Discovery……………………………………………………………………………………………………………….16
Figure 17: USB Connection…………………………………………………………………………………………………………………….17
Figure 18: Wireless Module ………………………………………………………………………………………………………............18
Figure 19 : ATtiny 44………………………………………………………………………………………………………………….............18
Figure 20: A flattened version of the C Brackets on AutoCad…………………………………………………………………20
Figure 21: Parts being Laser Cut Simultaneously …………………………………………………………………………………..20
Figure 22: C Brackets being thermally heated……………………………………………………………………………………....21
Figure 23: C Bracket being bent on a block of wood………………………………………………………………………………21
Figure 24: Foot Assembly……………………………………………………………………………………………………………………….22
Figure 25: Foot Assembled…………………………………………………………………………………………………………………….22
Figure 26: L and C Assembly………………………………………………………………………………………………………………....23
Figure 27: L and C Assembled………………………………………………………………………………………………………………..23
Figure 28: Servo Bracket to L and C assembly……………………………………………………………………………………..…24
Figure 29: Servo Bracket to L and C assembled………………………………………………………………………..…………..24
Figure 30: L and C to Foot Assembly ………………………………………………………………………………….…………………25
Figure 31: Mechanical Close up………………………………………………………………………………………………..……………25
Figure 32: Right Left Foot Assembled…………………………………………………………………………………………………….25
Figure 33: Two C Assembly …………………………………………………………………………………………………………………...26
Figure 34 : Two C Assembled ………………………………………………………………………………………………………………..26
Figure 35: Servo Bracket to Two Assembly…………………………………………………………………………………………..27

III | P a g e
Figure 36: Left and Right Foot Assembled……………………………………………………………………………………………27
Figure 37: Torso Platform to PCB Box Assembly……………………………………………………………………………………28
Figure 38: Torso Platform to PCB Box Assembled…………………………………………………………………………………28
Figure 39: L to Wheel Assembly…………………………………………………………………………………………………………….29
Figure 40: Assembly Close-up………………………………………………………………………………………………………………..29
Figure 41: Torso Assembled…………………………………………………………………………………………………………………..29
Figure 42: Servo to Two C Assembly………………………………………………………………………………………………………30
Figure 43: Right and Left Leg Assembled……………………………………………………………………………………………….30
Figure 44: Leg to Torso Assembly…………………………………………………………………………………………………………..31
Figure 45: Completed Assembly…………………………………………………………………………………………………………….32
Figure 46: Completed Gump Assembly……………………………………………………………………………………………….…33
Figure 47: Zip file for VOICEBOX…………………………………………………………………………………………………………….34
Figure 48: Open the zip file…………………………………………………………………………………………………………………...34
Figure 49: Extracting VOICEBOX………………………………………………………………………………………………………….…35
Figure 50: Renaming a Folder………………………………………………………………………………………………………………..35
Figure 51: Set Path…………………………………………………………………………………………………………………………….....35
Figure 52: Warning Sign………………………………………………………………………………………………………………………..36
Figure 53: Deleting Cells………………………………………………………………………………………………………………………..37
Figure 54: Neural Network Training Window………………………………………………………………………………………..37
Figure 55: ATtiny 44……………………………………………………………………………………………………………………………...39
Figure 56: Programming ATtiny 44……………………………………………………………………………………………………..…39
Figure 57: Uploading the Bootloader………………………………………………………………………………………………….…40

IV | P a g e
Chapter 1: Gump at a Glance
Section 1.1 Gump Overview
Gump is a voice-commanded bipedal legs robot that can be controlled wirelessly by the user
from their PC. It has object detection features and the legs allow for 8 degrees of freedom.
Furthermore, the use of Artificial Neural Network in the speech recognition software allows
Gump to accept user-independent voice commands.

This chapter will give an overview of Gump. Chapter 2 will cover the electronics and power
features, PCB design and assembly. Chapter 3 will go over the mechanical manufacturing and
assembly of the robotic chassis. Chapter 4 will explain how to install the software recognition
software on MATLAB and to initialize it to be ready to accept commands. Finally, chapter 5 will
cover the control system software, how to program the microcontrollers and upload the code
for the robotic leg movements.

All software codes, algorithms, mechanical drawings, PCB drawings and part lists can be found
in the Appendices. Furthermore, the following four chapters will also reference all needed
tools, code and drawings found in the Appendices.

Section 1.2 Features


Gump can recognize eight different commands. The voice commands from the speech
recognition software will control the robot’s directional movement, speed, start and stop state.

Command Number Command

1 Ready
2 Turn Right
3 Left
4 Speed Up
5 Slow
6 Forward
7 Back
8 End
Table 1: Gump Commands

The speech recognition software for Gump will be installed on the user’s PC. After that, the user
must initiate the speech recognition software and begin commanding the robot. The speech
recognition software will match the voice command to its respected signal, then send the signal
to the User Controller Box.

1|Page Proudly Sponsored by:


The User Controller Box is a small box that is connected by USB to the User PC. It’ll receive the
signal from the speech recognition software and then send it wirelessly to the robot.

The robot, Gump, will receive the signal wirelessly from the User Controller Box, which will then
enable its servomotors to function in the pre-programmed movements already defined in the
microcontroller code.

For instance, commanding the computer by saying, “Turn Right” will send a wireless signal to
Gump and the robot will move according to the voice command issued.

Gump has additional features such as object detection, which is controlled by an Ultrasonic
Sensor located on its upper body and two IR sensors located on the robot ankles.

Section 1.3 Specifications

Figure 1: Gump Dimensions

Length 179.62 mm
Height 299.77 mm
Width 336.46 mm
Weight 1,375 grams
Operation Time 1.5 hours
Degrees of Freedom 8
Operation Temperature -10o to 40o C
Wireless Range 100 m
Table 2: Gump Specifications

2|Page Proudly Sponsored by:


Part Number Part Name
1 HS-5485HB
Servomotor
2 Torso Platform
3 C Bracket
4 Sharp
GP2Y0A21YK
Infrared
Sensor
5 Venom 5C 2S
2400mAh 7.4
Receiver/Tran
smitter Flat
Pack LiPO
Battery
6 Foot Base
7 Foot
8 Multi-Purpose
Servo Bracket
9 Parallax PING
Ultrasonic
Sensor
10 PCB Box
11 Robot PCB
12 Switch
13 L Bracket
Table 3: Gump Features Table Figure 2: Gump Features

The above diagram specifies each part of the Gump features which will be covered in Chapter 2
& 3 of the manual.

3|Page Proudly Sponsored by:


Chapter 2: Designing the PCB

Section 2.1 Robot PCB Outline


In this section, we will cover the required components needed for the PCB design, milling, and
assembly. The Robot PCB has several different components, including the microcontroller
(STM32F3Discovery) used to program the robot. Before we proceed to the PCB design, we must
ensure we have the list of following components.

Reference Number Part Description


C1 CAP CER 15UF 25V 20% RADIAL
C2 CAP CER 0.27UF 50V 10% RADIAL
C3 CAP TANT 470UF 6.3V 20% 2917
C4,C7,C10,C11,C12 CAP CER 0.1UF 25V 10% RADIAL
C5 CAP ALUM 100UF 35V 20% RADIAL
C6 CAP ALUM 330UF 25V 20% RADIAL
C8 CAP CER 10UF 25V 10% RADIAL
C9 CAP CER 1500PF 50V 10% RADIAL
D1 DIODE SCHOTTKY 30V 3A DO201AD
D2 DIODE SWITCHING 75V 0.2A SOT23-3
D3 DIODE SCHOTTKY 40V 1A DO41
D4 LED 3MM GREEN DIFFUSED
F1 FUSE 5A 125V FAST 5X20 GLASS
J1,J2 CONN HEADER FMAL 50PS .1" DL TIN
J3 CONN HEADER FMALE 8PS .1" DL TIN
K1,K2,K3,K4,K5,K6,K7,K8 CONN HEADER XH SIDE 3POS 2.5MM
K10,K11 CONN HEADER PH SIDE 3POS 2MM
K9,K12 CONN HEADER EH SIDE 3POS 2.5MM
L1 INDUCT PWR 7.8UH TH
L2 INDUCTOR LOW POWER 330UH T/H
P1,P2 CONN TERM BLOCK 2POS 5.0MM
R1 RES 3K OHM 1/2W 5% CARBON FILM
R2 RES 300 OHM 1/8W 5% CF AXIAL
R4 RES 7.5K OHM 1/8W 5% CF AXIAL
R5 RES 5.1K OHM 1/8W 5% CF AXIAL
R6 RES 51K OHM 1/8W 5% CF AXIAL
R7 RES 24K OHM 1/8W 5% CF AXIAL
R8 RES 1M OHM 1/8W 5% CF AXIAL
SW1 CONN TERM BLOCK RT/A 3POS
3.5MM
U1 IC REG BUCK ADJ 4.5A TO220-7
U2 IC REG BUCK 5V 1A TO220-5
U3 IC REG LDO 3.3V 0.8A TO220AB
U4 IC 8-BIT TRNSTR 15KV ESD 20TSSOP
U5 IC BUS TRANSCVR 2BIT N-INV SM8

Table 4: Robot Electronic Components

4|Page Proudly Sponsored by:


For a list of Part Numbers for each of the components listed in Table 4, please refer to Appendix
D of the report.

The Robot PCB that was designed is two layers. Furthermore, since we are mounting the
STM32F3Discovery microcontroller to it, which also has two layers, and considering the
STM32F3Discovery itself to be a layer on its own, the Robot PCB will end up consisting of five
layers in the final deliverable.

The main PCB to be designed is shown in the following figure. For a larger image and its
corresponding schematic, please refer to Appendix C.2.

Figure 3: Robot PCB

The robot PCB was designed to fit within the dimensions of the PCB Box of Gump[1].

5|Page Proudly Sponsored by:


Section 2.2 Robot PCB Assembly
In this section, we shall proceed with soldering and surface mounting the components outlined
in Table 4. The schematic on Appendix C.2 is needed for referencing.

Now that we finished the PCB assembly, we shall proceed with mounting the
STM32F3DISCOVERY, the nRF24L01+ and its antenna, the two SHARP GP2Y0A21YK Infrared
Sensors, the Parallax PING Ultrasonic Sensor, and the wires of the eight HS-5485HB Servo
Motors and the switch to the PCB.

Note: If you haven’t assembled the chassis outlined in Chapter 3, it’s recommended to wait on
connecting the wires of servomotors, the sensors, and the switch until the steps outlined in
Chapter 3 are complete.

Note 2: If you wish to upload the program to the STM32F3DISCOVERY before mounting it on
the PCB, please refer to Section 5.2.

Figure 4: Assembled Robot PCB

6|Page Proudly Sponsored by:


Section 2.3 User PCB Outline
The User PCB contains the ATtiny44 microcontroller and another nRF24L01+. The main
functionality of the User PCB is being a bridge between the speech recognition software on the
user PC and the wireless connection on which we will be communicating with Gump.

Before we proceed with designing, milling, and soldering the User PCB, we must ensure we
have the list of following components. For a list of part numbers of the parts we used, please
refer to Appendix D.

Reference Number Part Description


C1 CAP ALUM 4.7UF 10V 20% SMD
C2,C6, CAP CER 0.1UF 25V 10% RADIAL
C4,C5 CAP CER 18PF 50V 5% RADIAL
C7 CAP CER 10UF 25V 10% RADIAL
D1,D3 LED 3MM GREEN DIFFUSED
D2 LED 3MM HI-EFF RED TRANSPARENT
IC1 IC MCU 8BIT 4KB FLASH 14DIP
J1 CONN USB RECEPT R/A TYPE B 4POS
R1,R3 RES 68 OHM 1/4W 5% CARBON FILM
R2 RES 1.5K OHM 1/4W 5% CARBON FILM
R4,R7 RES 300 OHM 1/8W 5% CF AXIAL
R5 RES 150 OHM 1/8W 5% CF AXIAL
R6 RES 10K OHM 1/4W 5% CARBON FILM
U1 IC REG LDO 3.3V 0.8A TO220AB
U3 CONN HEADER FMALE 8PS .1" DL TIN

X1 CRYSTAL 12MHZ 18PF THRU


Table 5: User PCB Electronic Components

The following figure is the User PCB. For a larger image, please refer to Appendix C.1.

Figure 5: User-Side PCB

7|Page Proudly Sponsored by:


Section 2.4 User PCB Assembly
In this section, we shall proceed with soldering and surface mounting the components outlined
in Table 4. The schematic on C.1 is needed for referencing.

Now that we finished the PCB assembly, we shall proceed with mounting the ATtiny44 and the
nRF24L01+ and its antenna.

Note: It is recommended to upload the USB Bootloader to the ATtiny44 before using it. It is also
recommended to upload the program for the ATtiny44 for communicating with the nRF24L01+
before mounting. Those steps are outlined in Section 5.1.

Figure 6: Assembled User-Side PCB

8|Page Proudly Sponsored by:


Section 2.5 Overview of Robot Components
2.5.1 Six Volts Regulator
In this section, we will examine every component that makes up the Robot schematic as shown
in Appendix C.2.

We first will look at the battery connection to the 6 Voltage Regulator as shown in the figure
below. The 6V provided from the LT1374 will be fed directly to the six HS-5485HB servo motors
located at the ankles, knee, and hip pan of the chassis.

Figure 7: Six Volts Regulator

Regulator Version: The regulator we are using to achieve the 6V at the output is the LT1374.
For the LT1374, we are using the T7 Packaging version which can be soldered through-hole.

FB Pin: For the Feedback Pin, the R4 and R5 value were found on Table 1 of Page 8 of the
LT1374 Datasheet in order to achieve a 6V output.

Inductor: We wish to get an output of 3.64 A at 6 V. In order to do that, we selected the 8uH
toroid inductor from Table 2 of Page 11 of the datasheet of the LT1374, which gives us an
output of 3.5 A.

Output Capacitor: C3 is based on its high farad value and low ESR rating. We selected the AVX
TPS 500uF capacitor at ESR < 0.2 Ohms as shown in Table 3 of Page 12 of the datasheet of the
LT1374.

Catch Diode: The catch diode (D1) used was suggested in Page 13 of the datasheet of the
LT1374, under the Catch Diode section. It is 1N5821 Schottky diode.

9|Page Proudly Sponsored by:


Input Resistors: The R6 and R7 are found from the formula given on Page 15 of the datasheet
of the LT1374. The recommended value of the R7 was 25k ohms. For the value of R6, we used
the formula provided in the datasheet.

Input Bypass Capacitor: C1 is used to ensure proper operation of the regulator and minimize
the ripple current fed back into the input supply[2].The recommended microfarad value has to
be greater than 5 as shown on Page 19 of the datasheet of the LT1374. We selected 15
microfarads.

Compensation Network: A common practice in switching regulator design is to add a “zero” to


the error amplifier compensation to increase loop phase margin[2]. So, for R1 and C9 of the
switching regulator, we selected R1 to be 3k Ohm. This is recommended on Page 21 of the
datasheet of the LT1374. For C9, we selected the recommended 1.5 nF from Page 23 of the
datasheet of the LT1374.

Boost Pin: C2 and D2 values for the Boost pin were recommended on Page 13 of the datasheet
of the LT1374.

2.5.2 Five Volts Regulator

We will now look at the 5V Regulator. The configuration as found on Appendix C.2 is shown in
the figure below.

Figure 8: Five Volts Regulator

10 | P a g e Proudly Sponsored by:


The voltage regulator we used is the LM2575. It’s used to provide power to the
STM32F3Discovery microcontroller and the three sensors. The entire configuration of the
above figure was taken from the recommended set up found on Page 2 of the datasheet of the
LM2575.

2.5.3 Power Setup

The power set up on the schematic is shown in the figure below.

Figure 9: Power Setup

It will place the connectors (P1 & P2) of the two Venom 5C 2S 2400mAh 7.4
Receiver/Transmitter Flat Pack LiPO Battery in parallel to provide us with double the current yet
still maintaining the same voltage.

This is followed by the SW1 switch for the entire Robot system and a F1 fuse for circuit
protection.

2.5.4 Three Volts Regulator

The 3.3 Voltage Regulator setup is shown in the figure below. It is used to provide a power
source to the nRF24L01+ chip for wireless communication between the robot and user.

11 | P a g e Proudly Sponsored by:


Figure 10: Three Volts Regulator

The voltage regulator used is the LD1117V33 voltage regulator that gives us an output of 3.3 V.
The values of the C7 and C8 capacitors were the recommended values as found in the
datasheet of the LD1117V33.

The R2 value used for the D4 Green LED was found from the LED’s datasheet. This setup will
help ensure that there is a 3.3 V output if the LED is on.

The 8 pin bus translator converts the PWM signal from the STM32F3Discovery from 3.3V to 5V
before feeding it into the servomotors. The setup is shown in the figure below.

2.5.5 Eight-Bit Serial Bus

Figure 11: Eight-Bit Serial Bus

The serial bus we used is the TXB0108. The value of the R8 was the recommended value from
the datasheet of the TXB0108.

12 | P a g e Proudly Sponsored by:


2.5.6 Wireless Module
The nRF24L01+ wireless chip needs a connector to for it to be mounted on. This setup is shown
in the following figure.

Figure 12: Wireless Module

The connector we used is the PPTC042LFBN-RC. We selected the value of C10 to help reduce
rippling from the 3.3 V source.

2.5.7 Sensors
In regards to the two Sharp IR sensors, we need to set up a serial bus to convert the 5V signal
output to a 3.3 V before connecting to the STM32F3Discovery.

The setup is shown in the figure below.

Figure 13: IR Sensors

The Sharp IR Sensors are mounted on K11 and K10 connectors. The capacitor between voltage
and ground will help reduce the source ripple. They are then connected directly to the
SN74LVC2T45 bus converter.

13 | P a g e Proudly Sponsored by:


The Ultrasonic Sensors are mounted on connectors K12 and K9. Capacitors C11 and C12
capacitor values help with the minimizing voltage ripple from the source. The configuration
setup is shown in the following figure.

Figure 14: Ultrasonic Sensors

14 | P a g e Proudly Sponsored by:


2.5.8 Servomotors
The eight servomotors used in the robot PCB need their wires mounted on the connectors that
will connect them to the power source, signal, and ground. In the following figure, we show the
connectors (K1-K8) and the connector part number (S3B-XH-A(LF)(SN)) for the servomotors.

Figure 15: Servomotors

15 | P a g e Proudly Sponsored by:


2.5.9 Microcontroller

The STM32F3Discovery is a microcontroller module that controls the servomotor movements


and object detection of the robot. To integrate it with the rest of the PCB we need to use two
PPTC252LFBN-RC connectors to be able to mount it on the PCB. The following figure shows the
set up. The C15 capacitor is there to reduce voltage ripple from the power source.

Figure 16: STM32F3Discovery

16 | P a g e Proudly Sponsored by:


Section 2.6 User Side PCB Components

2.6.1 USB Connection

The first important aspect of the User Side PCB is the USB Configuration. The User PCB
communicates with both the PC and the nRF24L01+. To receive a signal from the PC, the USB
interface is shown in the figure below. Resistors R5 and R3 are taken from the standards of USB
implementations. R2 at 1.5k ohms to 3.3 V helps with maintaining the USB speed at a lower
setting. A 4.7 uF capacitor also is specified in the USB Standards.

Figure 17: USB Connection

2.6.2 Three Volts Regulator

The 3.3 Voltage Regulator setup is the same as the one in section 2.5.4 shown previously.

2.6.3 Wireless Module

The nRF24L01+ is mounted on U1 as shown in the figure below. It connects to a 3.3 V source
and the remaining pins connect to the ATtiny44.

Figure 18: Wireless Module

17 | P a g e Proudly Sponsored by:


2.6.4 Microcontroller

The ATtiny44 is mounted on a connector to integrate with the rest of the user circuit. The C1
value is used as outlined from the ATtiny44 datasheet. The pull up resistor at the Reset pin has
its value taken into account from the ATtinny44 datasheet’s internal pull up resistor values. We
place two resistors and two LEDs on their own pins with the values of the resistors taken into
account from the datasheet of the LED.

Figure 19: ATtiny44

18 | P a g e Proudly Sponsored by:


Chapter 3: Mechanical Manufacturing and Assembly
Section 3.1 List of Components
Assembly of the robot requires mechanical parts that need to be manufactured as shown in
Table 6. The mechanical drawings of each part is shown in the Appendix A.2.
Item Quantity Material
L Bracket 4 Acrylic Plastic
C Bracket 6 Acrylic Plastic
Multi-Purpose Servo 8 Aluminum 6061-T6
Bracket
Feet 2 Aluminum 6061-T6
Feet Base 2 Acrylic Plastic
Torso Platform 1 Acrylic Plastic
PCB Box 1 Polycarbonate
Table 6: Mechanical Parts

In our design, we chose to purchase the Multi-Purpose Servo Bracket and Feet from
Lynxmotion. The PCB Box is made out of polycarbonate. It can be made from acrylic as seen in
the mechanical drawing on Appendix A.2. We chose to buy the box from Bud Industries. In this
case, we only use the body part of the box, discarding the cover. The following table will list the
required mechanical parts required in our assembly.
Item Quantity

Bearing, Flanged 3 mm ID 8 mm OD 4 mm THK 8

M3 X 8 mm LG PHILLIPS Pan Head Steel Screw 8

3 mm Lock Washer 8

3 x .50 Hex Nut 28

2-56 X .25 LG PHILLIPS Pan Head Screw 18

2-56 Nuts 18

2 x 0.25 Tap Screw 16

M4 x 8 mm LG PHILLIPS Pan Head Steel Screw 4

M3 X 0.5’’ LG PHILLIPS Pan Head Steel Screw 20

Table 7: Mechanical Tools

19 | P a g e Proudly Sponsored by:


Section 3.2 Manufacturing the Parts
In this section, we will manufacture the L Bracket, C Bracket, Torso Platform, and Foot Base.
The mechanical drawing of each part is found in Appendix C.2.
To manufacture the parts, we first need an acrylic sheet that is 3 mm thick and can be easily
placed inside a Laser Engraver. We manufactured our parts with the Universal Laser Systems M-
300 Laser Engraver/Printer, but any Laser Engraver will suffice.
Before we cut our parts, we must use the mechanical drawings of each part to create a
flattened version of the part. The reason for this is because laser cutters only cut in one
direction since they are not 3D Printers. After we cut the parts, we can then bend them via
thermal heating. We used AutoCad to create the flattened version of each part. We then placed
all the parts next to each other in one template to cut all parts simultaneously on the laser
engraver.

Figure 20: A flattened version of the C Bracket on AutoCad.

After our laser template of desired acrylic parts is finalized, we proceed to laser cutting the
parts.

Figure 21: Parts being Laser Cut Simultaneously

20 | P a g e Proudly Sponsored by:


After we have the required amount of parts laser cut, we then proceed to thermal heating each
part and bending them to achieve the desired part dimensions we desire as shown in the
mechanical drawings. Before we thermal heat the desired parts, we chose to have a block of
wood cut at a woodshop to the exact dimensions as the acrylic parts we wish to bend. This will
help us ensure that we can get a desired 90o with minimum deviation.
After heating, we then proceed to bending the parts and achieving 90 degree separation
between each bend by using the wooden block.

Figure 22: C Bracket being thermally heated

Thermal heating takes about two minutes with acrylic before the part is flexible enough to be
bent. Note: Beware not to heat the parts longer than two minutes or bubbles might start
forming and deforming the part.

Figure 23: C Bracket being bent on a block of wood

The bending of each part must be done quickly after the part is heated and flexible, otherwise
the part will cool down and harden before we can bend it.

21 | P a g e Proudly Sponsored by:


Section 3.3 Assembly of the Bipedal Legs

In this section, we shall cover all parts of the chassis assembly of Gump. The following
illustrations were designed on Solidworks as part of the overall assembly. Ensure that you have
all the parts outlined in Tables 6 and 7.

Step 1
Attach the Foot Base, the Foot, and the Multi-Purpose Servo Bracket as shown below, using
three 2-56 x 0.250’’ and 2-56 nuts.

Figure 24: Foot Assembly

Shown below is the completed step. Do so for both feet.

Figure 25: Foot Assembled

22 | P a g e Proudly Sponsored by:


Step 2
Attach the L bracket to the C bracket using two 2-56 x 0.250’’ screws and 2-56 nuts. Do the
same step for the other foot.

Figure 26: L and C Assembly

Shown below is the completed step.

Figure 27: L and C Assembled

23 | P a g e Proudly Sponsored by:


Step 3
Attach the multi-purpose bracket to the L bracket as shown, using two 2-56 x .250" screws and
2-56 nuts each. For the left foot, turn the multi-purpose servo bracket 180 degrees on the L
bracket it’s mounted on.

Figure 28: Servo Bracket to L and C assembly

Shown below is the completed step for the right foot.

Figure 29: Servo Bracket to L and C assembled

24 | P a g e Proudly Sponsored by:


Step 4
Now, attach the assembled parts in Step 3 to the right foot, using an M3 x 8mm screw, 3mm
Ball Bearing, a 3mm Lock Washer, and an M3 nut as shown below.

Figure 30: L and C to Foot Assembly

Figure 31: Mechanical Close Up[3]

Shown below is the completed step for the right and foot.

Figure 32: Right and Left Foot Assembled

25 | P a g e Proudly Sponsored by:


Step 5
Attach two C Brackets with two 2-56 x 0.250’’ screws and 2-56 nuts as shown below. Do so for
both feet.

Figure 33: Two C Assembly

Shown below is the completed step.

Figure 34: Two C Assembled

26 | P a g e Proudly Sponsored by:


Step 6

Attach the assembled parts in Step 5 to the multi-purpose servo bracket of Step 4 using M3 x
8mm screw, 3mm Ball Bearing, a 3mm Lock Washer, and an M3 nut as shown below.

Figure 35: Servo Bracket to Two C Assembly

Shown below is the completed step of the assembly for the left and right foot.

.
Figure 36: Left and Right Foot Assembled

27 | P a g e Proudly Sponsored by:


Step 7
Mount the Torso Platform to the PCB Box using 4 M4 screws as shown below.

Figure 37: Torso Platform to PCB Box Assembly

Mount the servomotors as shown below to their holder place. Use the rubber dampers and M3
screws and nuts to mount them. They are included in each servomotor package. For our design,
we used the HS-5485HB servomotors.

Figure 38: Torso Platform to PCB Box Assembled

28 | P a g e Proudly Sponsored by:


Step 8
Screw two 2 x 0.250’’ screws between an L bracket and the servomotor wheel mounted in Step
7 as shown below. Do so for both servomotors.

Figure 39: L to Wheel Assembly

Figure 40: Assembly Close-up

Shown below is the completed step of the assembly.

Figure 41: Torso Assembled

29 | P a g e Proudly Sponsored by:


Step 9
Mount a multi-purpose servo bracket to the assembly completed in Step 6. Use M3 x 8mm
screw, 3mm Ball Bearing, a 3mm Lock Washer, and an M3 nut as shown below (for right leg).
Do so for both legs.

Figure 42: Servo to Two C Assembly

Shown below is the completed assembly for the right and left leg.

Figure 43: Right and Left Leg Assembled

30 | P a g e Proudly Sponsored by:


Step 10
Attach the L bracket of the Torso Platform of Step 8 to the assembled legs of Step 9 using two
2-56 x 0.250’’ screws and 2-56 nuts as shown below.

Figure 44: Leg to Torso Assembly

31 | P a g e Proudly Sponsored by:


Step 11

After that, we mount the remaining 6 servomotors in their multi-purpose servo bracket using
the tools provided in each servomotor package. The servomotors we used were HS-5485HB and
we mounted them with the included rubber dampers and two M3 x 0.5’’ screws and M3 Nuts.
Place each battery on the outermost side of each foot base.
For each servo wheel, attach two 2 x 0.250’’ screws between the servo wheel and the C
Bracket. Final Assembly is shown below.

Figure 45: Completed Assembly

32 | P a g e Proudly Sponsored by:


Step 12
All is left now is connecting the switch in its appropriate place on the Torso Platform, as well as
mounting the sensors on PCB Box, which can be done by drilling holes in the PCB Box.
Furthermore, we need to drill holes in the PCB Box to connect the servo motors. After drilling
all the holes, disassemble the PCB Box’s four M4 screws from the platform. Next, mount the
PCB inside the box by M3 screws. Next, connect the wires to their appropriate connectors for
the batteries, sensors, and servomotors. Mount the wireless module in its appropriate
connector. Mount the switch in its appropriate place on the platform. Connect the wires of the
switch to the PCB. Mount the PCB Box back to the platform. Slide out the antenna of the
wireless module through the rectangular hole on the torso. Final assembly is shown in the
following figure.

Figure 46: Completed Gump Assembly

33 | P a g e Proudly Sponsored by:


Chapter 4: Voice Recognition Software Setup
Section 4.1 Tools Required

 MATLAB Version R2012b or above


 Windows 7 or above
 Gump CD
 Neural Network Toolbox Version 8 or above
 VOICEBOX Version 8 or above

Section 4.2 Installing the Software

STEP 1
Install MATLAB and Neural Network Toolbox

More information can be found here: http://www.mathworks.com/products/neural-network/

STEP 2
Install the VOICEBOX toolbox

More information can be found here:


http://www.ee.ic.ac.uk/hp/staff/dmb/voicebox/voicebox.html

 Click on the “zip archive”

Figure 47: Zip file for VOICEBOX

34 | P a g e Proudly Sponsored by:


Figure 48: Open the zip file

 The zip file will be named voicebox.zip


 Extract this zip folder in the MATLAB folder and rename the folder as “VOICEBOX” as
shown in Figure 49.

Figure 19: Extracting VOICEBOX

35 | P a g e Proudly Sponsored by:


Figure 50: Renaming a Folder

STEP 3
Setting path to the ANN_MFCC folder

 Click on set path as shown in Figure 51


 Add folder and select the saved “VOICEBOX” folder
 Save

Figure 51: Set Path

Start up:
 Type in “Main” in Command window

36 | P a g e Proudly Sponsored by:


Figure 52: Warning Sign

 When running the program if a WARNING is shown as in figure 8 above, it indicates that
there are some cells that are empty. These cells need to be deleted as shown in figure
53.

Figure 53: Deleting Cells

37 | P a g e Proudly Sponsored by:


 Once the empty cells are deleted the instances should be renumbered accordingly.
 Next run the program again by typing in the command window “Main”
 Program will output the Neural Network Training window as shown in Figure 11.

Figure 54: Neural Network Training Window

 After the validation checks are complete the training of the neural network is finished
and the program will prompt you to input a command.

38 | P a g e Proudly Sponsored by:


Chapter 5: Control System Software Setup
Section 5.1 Programming the ATtiny44
Before programming the ATtiny44, we must upload the USB Bootloader to it. This will enable
the ATtiny44 to easily communicate with the USB that is connected to the PC.

Before uploading the USB Bootloader program, we shall first configure an Arduino Uno as an
ISP for programming our ATtiny44. For more information about USB Bootloader
reprogramming, refer to the link here[5].

In this step, the tools needed are:


 10 F Capacitor
 Arduino Uno
 ATtiny44
 Jumper Wires
 Breadboard
 USB Cable for Arduino Uno

The following connections need to be established between the Arduino Uno and the ATtiny44:
 VCC from Arduino Uno to VCC of ATtiny44
 GND from Arduino Uno to GND of ATtiny44
 MISO from Arduino Uno to MISO of ATtiny44
 MOSI from Arduino Uno to MOSI of ATtiny44
 SCK from Arduino Uno to SCK of ATtiny44
 RESET from Arduino Uno to RESET of ATtiny44

An outline of the ATtiny44 Pin Layout is shown below.

Figure 55: ATtiny44

39 | P a g e Proudly Sponsored by:


A display of the entire setup is shown below.

Figure 56: Programming ATtiny44

Now that the setup is complete, we proceed to configuring the programmer. The following
steps outline this process:

 We need to download the latest version of the Arduino IDE (Version 1.0.4 or above).
 We proceed with the installation instructions for the operating system of our choice.
 Download the Attiny master.zip file[4]
 Locate the Arduino sketchbook folder and create a new subfolder called “hardware” if it
doesn’t exist already.
 Copy the “attiny” folder (not the attiny-master folder) from the unzipped Attiny
master.zip to the “hardware” folder.
 We now restart the Arduino IDE. We should see the Attiny entries in the Tools > Board
menu as shown in the picture below.

40 | P a g e Proudly Sponsored by:


Figure 57: Uploading the Bootloader

Now, before we upload the bootloader, we need to ensure the ISP is working, so we will run a
test. The following steps highlight a simple program being uploaded to test the ATtiny44.

 Open the Blink sketch from the examples menu.


 Change the pin numbers from 13 to 0.
 Select the “ATtiny44” from the Tools > Board menu (leave the serial port set to that of
your Arduino board).
 Select “Arduino as ISP” from the Tools > Programmer menu.
 Upload the sketch.

You should now see “done uploading” appear in the Arduino software with no error messages
indicated. Try connecting an LED between pin 0 and ground and check if it is blinking on and off.

Note: You may have to disconnect the LED after uploading a new program.

41 | P a g e Proudly Sponsored by:


Section 5.2 Programming Gump
STEP 1
Download IDE

Go to Keil MDK-ARMs website 6 and download the latest version of the MDR-ARM IDE [6].

STEP 2
Setup Keil IDE to work with STM32F3Discovery

Refer to the pdf from F.Adlam and G.Philips the Nelson Mandela Metropolitan University to
learn how to setup the Keil IDE for the SM32F3discovery and to learn how to debug your
program [7].

STEP 3
Access Gump’s control code

After you have set up and configured the Keil IDE insert the Gump CD provided. Copy the folder
in it in your Keil’s workspace. Open the MDK-ARM folder and run the file named
“Demo.uvproj”.

You can build your and upload it to the STM32F3Discovery by connecting it to the pc using the
st-link programmer usb connector on the board as shown on page 2 of the Nelson Mandela
Metropolitan University pdf and then follow step 8 and 9. If you want to debug your code the
follow the pdf from step 10 onwards.

Section 5.2.1 Changeable Settings

There are some variables in the main.cpp file that you can change to influence robot
movement.

 Robot stride: You change the “stride” variable to increase the stride of the robot while
walking forward or back. The allowed value range for this variable is between 40 and 80
and the value must be a multiple of 10. WARNING do not exceed these limits and be
very careful to conform to the outlined parameters when you set this variable, failing to
conform may result in damage to the servo motors or the robot chassis.

 Robot sway: You can change the sway of the robot in terms of allowable freedom to tilt
its top to manage the center of gravity by changing the “PitchRoll” variable. This variable
can only be between 30.0f to 20.0f. A value greater than 30.0f will make the robot very

42 | P a g e Proudly Sponsored by:


unstable while moving and a value less than 20.0f will produce no movement or
unexpected and wrong movement.

 Adding new commands:


You can add new movement commands to the control code by first adding voice
samples and training the speech recognition program for it (refer to the speech
recognition section of this technical manual for details). Then choose a distinct single
ASCII character that will be transmitted to the microcontroller to trigger the execution
of the movement routine for this new command. Now add another “case” (C++
function) for this new input character in the “int main” function and call the movement
function you want to execute for that command. In order to program the movement
function you can use the existing functions available to you in the main.cpp code (refer
to the main.cpp code file comments to understand what each function does to know
how you can use them) and also the default libraries you have downloaded when
setting up Keil IDE. It is recommended that you understand how the stm32f3discovery
libraries work especially in terms of peripheral initializations before you start
programming.

43 | P a g e Proudly Sponsored by:


Bibliography

[1] B. Industries, "Blue NEMA Box," [Online]. Available:


http://www.budind.com/view/NEMA+Boxes/Blue+Transparent+NEMA+4X.

[2] Linear, "LT1374," [Online]. Available: http://www.linear.com/product/LT1374.

[3] Lynxmotion, "BRAT Biped Assembly," [Online].

[4] Github, "Damellis," [Online]. Available: https://github.com/damellis/attiny/.

[5] H. L. Tech, "Programming ATtiny with Arduino," [Online]. Available:


http://highlowtech.org/?p=1695.

[6] "Keil MDK-ARMs," [Online]. Available: http://www.keil.com/.

[7] K. ARM-MDK, "How to configure Keil ARM-MDK and STMicroelectronics firmware examples to work
with the STM32F3Discovery board," [Online]. Available: http://controlsoft.nmmu.ac.za/STM32F3-
Discovery-Board/Example-programs.

You might also like