Professional Documents
Culture Documents
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.
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.
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.
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
The above diagram specifies each part of the Gump features which will be covered in Chapter 2
& 3 of the manual.
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.
The robot PCB was designed to fit within the dimensions of the PCB Box of Gump[1].
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.
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.
The following figure is the User PCB. For a larger image, please refer to Appendix C.1.
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.
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.
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.
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.
Boost Pin: C2 and D2 values for the Boost pin were recommended on Page 13 of the datasheet
of the LT1374.
We will now look at the 5V Regulator. The configuration as found on Appendix C.2 is shown in
the figure below.
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.
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.
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.
The serial bus we used is the TXB0108. The value of the R8 was the recommended value from
the datasheet of the TXB0108.
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 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.
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.
The 3.3 Voltage Regulator setup is the same as the one in section 2.5.4 shown previously.
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.
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.
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
3 mm Lock Washer 8
2-56 Nuts 18
After our laser template of desired acrylic parts is finalized, we proceed to laser cutting the
parts.
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.
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.
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.
Shown below is the completed step for the right and foot.
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.
Shown below is the completed step of the assembly for the left and right foot.
.
Figure 36: Left and Right Foot Assembled
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.
Shown below is the completed assembly for the right and left leg.
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.
STEP 1
Install MATLAB and Neural Network Toolbox
STEP 2
Install the VOICEBOX toolbox
STEP 3
Setting path to the ANN_MFCC folder
Start up:
Type in “Main” in Command window
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.
After the validation checks are complete the training of the neural network is finished
and the program will prompt you to input a command.
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].
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
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.
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.
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.
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.
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
[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.