Humanoid Robots Electromechanical Systems Computer Science Essay

Published: Last Edited:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

Humanoid robots are the complicated electromechanical systems. These robots not only appear like human beings but they also posses the human characteristics regarding motion and intelligence. This paper presents the Bioloid style twin arm mini robot, in which the complexity of the humanoid robot has been reduced and the research has been carried out mainly on the robot arm. The usefulness of the prototyping has also been discussed.

The concept of the robot can be defined as a robot making itself useful to carry out a wide variety of tasks to assist humans in domestic and home environment, possessing social skills to interact with humans[16]. The main aspects of the robot depend on the application, material used for the construction of the robot and the technology integrated on to the robot [10]. The flexibility of the robot depends on the program and the capability of reprogramming for the applications that have not been designed at the time the equipment was developed. From the past few decades the development in the programming and the design for the humanoid robots had been growing to fulfil the future needs.

The physical appearance of the robot plays a vital role as the required task of operation depends on its structure. The design of the humanoid robot has been depending on the particular task or to replicate a particular human skill [13]. Humanoid robot imitates human motions as the robot had to perform its operation more precisely and intelligently [3].Development of humanoid robot had got a great deal of attention as it had many things to do with it [9].Humanoid robots are created to imitate some of the physical tasks carried out by humans. The block diagram below in (Figure 1.1) shows how the simple robot works, the interface between a human and a machine.

Figure: 1.1 System Block Diagram.

In the system block diagram (Figure 1.1) the user or the operator of the robot has been giving the input command to the robot from the computer, the microcontroller unit performs the required operation depending on the user command and the robot moves according to the user input.

Project Outline

The diagram below (Figure 1.1.1) shows the working of bioloid style twin arm mini robot . The user controls the robot using computer and the robot should have a serial interface with computer. The microcontroller unit controls all the man oeuvres performed by the user and the status of the robot has to be displayed in the LEDs as well as giving the feedback signal to the operators computer.

C:\Users\ABHI\AppData\Local\Microsoft\Windows\Temporary Internet Files\Low\Content.IE5\2SJUC8PQ\j0310890[2].wmf

Serial Link Robot


Figure: 1.2 Simplified view of the system.

Humanoid robot, a mechanical device which resembles a human being. It performs complex tasks with the commands which are pre-programmed in it. It carries out variety of tasks in industrial and domestic home environment, behaves socially, possessing social skills in order to interact with humans . Humanoid robot can be controlled by planned motions or may be taught by humans. These robots operate automatically or guided with the help of computer.

Robot arms plays vital role, emphasizing the interaction and relationship with the surroundings .The designing aspect of the arms plays major role as it is the main part of the robot body. Depending on the application and the limitations the arms of the robot are designed, such as the two axis arm can reach any point in a plane; three axis arms can reach any point in space, the degrees of freedom depend on the number of axes.


The aim of the project was to design the low cost twin arms upper body of a Bioloid style robot using low cost model servomotors. The aim is to design the holders and to design the serial interface between the robot and computer.

Designing the twin arms of the robot by considering development cost as low as possible. The body of the robot should be light weight with flexible joints and high rigidity. Identifying and implementing the operation of the twin arms using servomotors, programming the software to control and operate the robot in real-time environment and creating the user interface as simple as possible.


Designing and making the appropriate plastic holders for connecting adjacent servomotors.

Implementing and designing Universal Serial Bus (USB) interface between the computer and the robot.

Creating control system to control the dual arms co-operatively using PIC Micro controller.

Designing the program for the microcontroller unit to perform the required movement operations.

2. Requirement analysis

The main objective of the project was to design a bioloid style robot communicating using a serial link. The following technical and structural constraints are necessary to accomplish the project.

2.1 Structural requirements

The robot arm has to be designed with two links, shoulder and the arm. The link in the shoulder has to be connected to the servo which helps the arm to move up and down, the elbow has to be connected to the servo which intern helps it to twist. The combination of the shoulder and the elbow of the robot should make the arm move up, down and twist. The link between actuator and its load has to be made as stiff as possible to carry more load on the arm. Any form of elasticity can lead to oscillations hence the stiffness in the link has to be maintained to prevent the arm to oscillate. The diagram below (Figure 2.1.1) shows the structural requirements of the robot and its arm.





Figure: 2.1 Structural requirement of the robot.

In the figure 2.1.1 the structural requirements for the robot have been shown. The basic robot arm features a shoulder, elbow and wrist connected to a hand. To design the structure similar to the above figure a auto-cad design with all the dimensions have to be needed.

2.2 Technical Requirements

The user controls the robot using the computer and the connectivity between the computer and the robot had to be implemented using the serial communication. As the user have to control the robot using the serial connectivity the microcontroller having the capability of serial communication has to be selected. The movement of the robot have to be done using a low power consuming DC motor's as they are reliable and easy to control .

To design the robot it requires a robot controller circuit which includes a microcontroller, serial interfacing device, power supply, status output device and PCB to implement design. The hardware requires a software to perform the tasks, user enters the control command from the computer, user interface, control of motors, status output for the user and status output for the observer.

3.Possible Solution

When designing the robot the factors such as weight, cost and complexity have to be considered. By considering all these features the structural and technical aspects of the robot have the following possible solutions.

3.1 Structural solution

Plastic was a type of polymer having high molecular mass and it contains substances to improve the physical structure. The word plastic is derived from Greek (plastikos) which mean fit for moulding. The structure of the robot can be designed using two techniques, one is by using plastic logos and the other is solid prototyping.

3.1.1 Using Lego

Using Lego bricks the robot can be assembled and constructed in many different ways. Anything which has been constructed can be taken apart easily for redesigning and modification. The image below (Figure 3.1) shows the model of Lego bricks which can be used to construct any type of designs.


Figure: 3.1 Lego bricks

Using Lego it makes the design simple and it is also easy to remodel the new design by altering the old model. The time consumption for building the structure using Lego's was relatively less when compared to prototyping.

3.1.2 Using Solid Prototyping

Rapid prototyping technique was used for the construction of physical objects using additive manufacturing process. This manufacturing technology needs a virtual design with all the dimensions from the computer aided design such as Auto-CAD. The prototyping machine transforms the CAD design into vertical and horizontal cross-section layers until the model is completed. After the completion of the prototyping process, both the virtual and the real physical model are almost identical.

Layers of plastic

C:\Users\ABHI\Desktop\Dissertation\Used pics\100_0106.JPG

Figure: 3.2 Sample model made using prototyping

The Physical model shown in the figure 3.2 has been produced using the prototyping method. The rapid prototyping machine produced the above model in few hours with almost identical physical design when compared with the CAD design. The cost of the model produced using this method is relatively cheap and the time consumed is also very less.

Using this method the author can have following advantages.

It is simple to design and implement. Therefore development time decreases.

As the production of the physical model was done using plastic, it is cheap to produce.

If there are any errors in the produced physical model it can be remodelled easily by eliminating the mistakes in the previous design.

Exact engineers model can be designed according to the requirement.

3.1.3 Designing the robot arms

The author can design the arms by using any of the above design methods (Chapter: 3.1.1,3.1.2). There are two possibilities to design the arms, one is to design two individual arms and the other possibility is to design only one arm which is capable to fit in both the shoulder joints of the robot.

3.2 Technical Solution

To accomplish the robot successfully, many of the technical aspects have to be considered. The technical requirements such as serial communication, user interface, motors for the movement, circuit design and the software are discussed in the chapters below (Chapter 3.2.1-3.5).

3.2.1 Communication

The serial communication has to be implemented to control the robot. There are two possible ways of communicating using serial interface, RS232 communication and USB communication. RS232 Interfacing

RS232 interface was a simple serial communication method used to transmit the data serially. Using this interface both synchronous and asynchronous transmission of data can be implemented. This interfacing has a software support from most of the standard operating systems. RS232 has been designed to make it easy for the device drivers to communicate with the hardware. Most of the personal computers have the RS232 connectivity support. The figure 3.3 shows a connector of the RS232 interface.

C:\Users\ABHI\Desktop\Dissertation\Used pics\100_0117.JPG

Figure:3.3 RS232 Connector USB Interfacing

Universal Serial Bus has become a standard connection method for most of the peripheral devices. USB was designed to make it fundamentally easier to connect external devices to personal computers by replacing the old type of connectors (Figure:3.3). All the latest computers and notebooks have the USB connectivity. The image in the (Figure 3.4) shows a typical USB connector.C:\Users\ABHI\Desktop\Dissertation\Used pics\100_0128.JPG

Figure: 3.4 USB Connectors.

3.3 Mechanical Solution

Mechanical part of the robot contributes the major role. The mechanical requirements for the robot are proper joints to prevent oscillation, motors to move the arm and proper connectors to fix all the structural components together. The joints of the arm should be of high rigidity and have to be fixed such a way that there should be no oscillation when there is no power in the motor.

3.3.1 DC Motor

A DC motor uses direct current to produce mechanical energy. The amount of power applied is proportional to the distance it travel. If the shaft of the motor needs to run at high speed then more power have to be applied. When the motor gets the input current the motor starts rotating till the power is turned off. Hence to drive a DC motor using the microcontroller it requires a driver IC. The figure 3.5 shows the connectivity between the DC motor and the microcontroller.

C:\Users\ABHI\Desktop\Dissertation\Used pics\100_0136.JPG

DC motor

Driver IC


Figure: 3.5 DC Motor working

3.3.2 Servo Motor

A servo motor had a combination of three units (Figure: 4.5); a normal DC motor (Chapter 3.3.1), a gear unit and a control circuit. The function of a servo motor was to receive a control signal (Figure : 4.6) which represents the position of the shaft. The shaft of the typical servomotor does not rotate completely like a DC motor, it rotates about 180 degrees clockwise and anticlockwise. The figure 3.6 shows a model of servomotor.

C:\Users\ABHI\Desktop\Dissertation\Used pics\100_0147.JPG

Figure: 3.6 Servo motor




3.4 Possible Software Solution

The software can be written in any of the C - Compiler. There are two main software compilers, one CCS compiler and the other MCC18.


4. Problem Implementation

4.1 Structural Implementation

The structure of the robot had been designed using the prototyping technique. This method was implemented as the cost of the design was very low and also had good availability of resources. The author designed the physical model in the word processor and Microsoft Visio. The designed models have been submitted to the Auto CAD engineer to develop the design for the prototyping machine. The diagram shown below (Figure 4.2) had been designed to implement bioloid robot arm.

All the parts which have been designed to assemble a robot arm are made using plastic. plastic is environment unfriendly element, it has organic amorphous substances and it is not a bio degradable material. Hence to reduce the environmental pollution and to reduce the cost of design, only one arm had been made, which can fit in both the sides of the robot. When designing the robot all factors such as weight, cost and complexity are taken into consideration hence the demonstration robot has been designed with single arm. The robot consists of two links, shoulder and arm. The link in the shoulder is connected to the servo which helps the arm to move up and down. The elbow is connected to the servo which twists the arm clockwise and vice versa. The combination of the shoulder and the elbow makes the robot arm, which can move up, down and twist. The link between actuator and its load have to be made as stiff as possible to carry more load. Any form of elasticity can lead to oscillations hence the stiffness in the link prevents the arm to oscillate as well as make the control good. The prototyping model cannot provide high rigidity, the physical model has less thickness hence they are not strong enough to carry more load. The arms of the robot has been designed with a delicate plastic which cannot withstand more load on it. Hence the connector bits are used from Bioloid educational Robot Kit.(Figure: 4.1 ).

C:\Users\ABHI\Desktop\Dissertation\Used pics\100_0168.JPGC:\Users\ABHI\Desktop\Dissertation\Used pics\100_0167.JPGC:\Users\ABHI\Desktop\Dissertation\Used pics\100_0166.JPGC:\Users\ABHI\Desktop\Dissertation\Used pics\100_0169.JPG

Figure: 4.1 Connector to connect the shoulder

The figure below(Figure: 4.2) shows one of the physical bit structural dimensions designed for the robot arm. All the dimensions in this design are used to redesigned in Auto CAD by the technicians to make a real physical model.

Figure: 4.2 Dimensions of a bit used in the robot arm.

The robot arm has three prototyping physical and one other connector bit. The dimensions of one bit is shown above (Figure 4.2) and the dimensions, structure of remaining two bits are shown below(Figure …)

Put the hand and its holder drawings

4.2 Mechanical Implementation

The movement in the arm have to be user controlled and the change in the motor speed should not affect the position and balance of the arm. The movement of the robot arm had been controlled with the servo motor as it provides position control. The servo has three wire connection; power, ground and control. The power source must be constantly applied to it, so that the shaft stays in its position. The figure 3.7 shows the internal architecture of the servo motor.

C:\Users\ABHI\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Word\100_0140.jpg

C:\Users\ABHI\Desktop\Dissertation\Used pics\100_0152.JPGC:\Users\ABHI\Desktop\Dissertation\Used pics\100_0151.JPG

Gears Servo Motor

Control CircuitC:\Users\ABHI\Desktop\Dissertation\Used pics\100_0160.JPG

Servo motor Enclosure

Figure : 4.5 Internal Parts of servo motor

A normal servo is used to control an angular motion between 0 to 180 degrees. This type of servos(Figure: 4.5) are not capable to rotate more than 180 degrees due to a mechanical stop built inside the servo motor .

4.2.1 Working of Servo Motor

The control wire of the servo motor receives the control signal and moves the shaft of the motor according to the position assigned by the control signal. The angle of the shaft is determined by the duration of the pulse that is applied to the control wire (Pulse coded modulation) the working of the servo motor had been explained below (Figure :4.6).

C:\Users\ABHI\Desktop\Dissertation\Used pics\100_0140.JPG

1mS 1mS



C:\Users\ABHI\Desktop\Dissertation\Used pics\100_0140.JPG

1.5mS 1.5mS



C:\Users\ABHI\Desktop\Dissertation\Used pics\100_0140.JPG

2mS 2mS



Figure : 4.6 Working of Servo Motor.

The above figure 4.6 explains how the servomotor works with the input command given to it. If the input commands are other than the above PWM signals then the control circuit of the servo ignores the unwanted signal.

4.3 Technical Implementation

4.3.1 Serial communication

To implement the serial communication between the Computer and the Robot MM232R module[18] had been used. MM232R is a miniature development module which uses FTDI's FT232RQ chip to control the module. This module has its own inbuilt USB drivers which allows the user to communicate serially. The data can be sent to this device and they will be sent to the interface serially by the device itself. Using this device the user can power up the peripherals connected to it, as the device takes the power from the PC. The image below(Figure: 4.7 ) show the typical MM232 connector.

C:\Users\ABHI\Desktop\Dissertation\Used pics\100_0181.JPGC:\Users\ABHI\Desktop\Dissertation\Used pics\100_0184.JPGC:\Users\ABHI\Desktop\Dissertation\Used pics\100_0180.JPG

Figure: 4.7 MM232R Connector.

4.3.2 Circuit Design

The circuit design of the robot is shown in the image below (Figure 4.8). The ISIS circuit design shown below shows all the features which the circuit have.

Connectors for servo motors

Power on Led Microcontroller

DC i/p Status LED's

MM232R USB Module RJ12 for ISP

Figure: 4.8 Circuit diagram

4.3.3 Circuit Features

The printed circuit board designed for the Bioloid style robot is single sided with the following features on it.

In System programmability(Chapter

USB Serial communication Capability(Chapter 4.3.1).

Self powered, it takes the power from the USB(Figure: 4.8 ).

Provision for the battery power, in future for autonomous robot(Figure: 4.8 ).

I/O pin connectors for eight input and output connections (Figure:4.8 ). In System Programming

It is the ability of the microcontroller to be programmed when installed in the system, rather than programming the chip before installation. This feature helps the user to test and reprogram the device in real time.

The circuit designed had ISP facility, providing the user to develop the kit at any time by changing the code. In real time if the user encounters any error then the user can change the software of the device without removing the microcontroller. The ISP feature not only enable the user to reprogram but it will also support debugging feature when using with MPLAB ICD2 Development Kit (Figure: 4.8).

C:\Users\ABHI\Desktop\Dissertation\Used pics\100_0185.JPG

Figure: 4.8 MPLAB ICD2 Development Kit.

The ICD2 kit not only enables the user to program the devices but it also support the debugging feature. Programs can be downloaded, executed and examined in real-time.

C:\Users\ABHI\AppData\Local\Microsoft\Windows\Temporary Internet Files\Low\Content.IE5\2SJUC8PQ\j0310890[2].wmf

C:\Users\ABHI\Desktop\Dissertation\Used pics\100_0185.JPG

Figure: 4.9 MPLAB Connectivity

Mp lab can be powered up using the USB cable, supports low voltage up to 2.0Volts, it can connect to the user PC using USB or RS232 cable.

4.3.4 PCB Design

The PCB design for the above circuit (Figure: 4.8) had been implemented (Figure: 4.10). The dimensions of the PCB are designed to fit inside the enclosure of robot body. The PCB had been designed on single layer and the design had been submitted to technicians to make the Physical PCB board.

Figure: 4.10 PCB Layout

4.4 Software Implementation

The software to implement the robot arm has been designed using Embedded-C. The program contained the code to model the robot, undertake the driving and the control operation, user menu display, status display for observer. The front end user has a menu option to choose the control command for the movement of the arm and the status of the arm will be received from the robot in the same HyperTerminal.

4.4.1 Code To The Servo Motor

The servo motor works with the input PWM command sent by the user. For the robot only two movements for the motor have been selected, Complete clockwise and complete anticlockwise. As the code has been implemented using interrupts (Chapter 4.2.3) when the user enters any key while the execution of the motor then the input PWM will be interrupted resulting the motor to stop in its position. The code shown below helps the arm to move up and down.

void UP (void)C:\Users\ABHI\Desktop\Dissertation\Used pics\100_0140.JPG


ledB=1; // Display status led


DelayMs(1); // Delay routin





Figure:4.11Servo anti clockwise

In the above function the PWM wave with 20mS duration had been is generated, in which the voltage high was for 1mS. With this waveform the motor rotates anti clockwise (Waveform: 4.1).

1mS 1mS


Waveform: 4.1 PWM with 1mS delay

Similarly to rotate the motor clockwise the PWM with 20mS duration had been generated and the voltage high was for 2ms, hence the motor rotated clockwise.

void DOWN (void)







putrsUSART( "\r \n " );

PIR1bits.RCIF = 0;


As the voltage high generated by this function was 2mS the motor rotates clockwise.

2mS 2mS



Waveform: 4.2 PWM with 2mS delay

C:\Users\ABHI\Desktop\Dissertation\Used pics\100_0140.JPG

Figure: 4.12 Servo rotating clockwise.

As the delay was 2mS the servo motor rotates in clockwise direction as shown in the above image (Figure : 4.12).

4.4.2 User Menu

The user menu had to be displayed in the HyperTerminal when the user connects the robot to the PC. The program shown below sends the user menu characters to the HyperTerminal.

void MENU (void)


while (BusyUSART());

putrsUSART("\r\n[1]Enter q, e to move Head);

putrsUSART("\r\n[1]Enter w, s to move Arm);

putrsUSART("\r\n[1]Enter a, d to move Elbow);

putrsUSART("\r\n[1]Enter r, f to move Hand);


The above code transmits the data to the HyperTerminal when the robot is connected. The putrsUSART function is the inbuilt function in microchip c18 Compiler. This function enables the user to transmit the characters serially.

4.2.3 Interrupt Function

The interrupt function plays a major role in the programming, as it generates an interrupt and terminates the ongoing process. When the user press a command to move the motor then the motor starts working, simultaneously if another command is pressed at that moment then the program should stop executing ongoing task and it should perform the command which has been interrupted. The code shown below performs the interrupt service routine.

#pragma code rx_interrupt = 0x8

void rx_int (void)


_asm goto rx_handler _endasm


#pragma code

The above code performs the interrupt service routine, when there is an interrupt then the function rx_ handler will be called. In the function rx_handler the input command will been stored in a variable and then the stored variable will be compared with all the possible stored values and after comparison appropriate function will be called. The code show below compares the input command and executes the required task.

#pragma interrupt rx_handler

void rx_handler (void)


unsigned char in;


in = getcUSART();

if(in =='w'|| in =='W' )




if(in =='s'|| in =='S' )





If the user press the button 'w' in the PC then the command 'w' is stored in a variable 'in' and it will be compared with all the possible values. Suppose if the user press the button 's' then the function DOWN(); will be executed. If the user press any button other than the stored input commands then the interrupt service will be executed but no output will be displayed and executed.


The designed circuit had been implemented and the PCB board had been produced, soldered and tested. The printed circuit board is shown below( Figure: 5.1)

C:\Users\ABHI\Desktop\Dissertation\Used pics\151_0028.JPG

Figure: 5.1 PCB Soldering side.

All the components on the PCB have been soldered as well as tested, the PCB had been working as required.

C:\Users\ABHI\Desktop\Dissertation\Used pics\151_0022.JPG

Connectors for servo motor

DC i/p


RJ12 (ISP)



USB Power i/o pins

Figure: 5.2 PCB Component side

The physical structural bits of the robot have been produces and connected together to make a robot arm. The prototyping bits which have been produces are fragile. As the prototyping bits are delicate the joint(Figure:5.3) in the shoulder has been used from the bioloid style educational robot kit.


Figure: 5.3 Shoulder joint

C:\Users\ABHI\Desktop\project pics\10042010187.jpg

Physically modified servo motor

Figure: 5.4 Shoulder bit

The shoulder bit had been designed as required, but the thickness of the physical bit made the servo not to fit inside the plastic holder. The servo motor fitted inside the shoulder has been physically modified. The thickness of the servomotor is reduced by 2.5mm and it had been fitted successfully inside the enclosure.

To move the shoulder upwards and downwards a servomotor is fitted inside the body of the robot so that it can lift the arm easily without disturbing the other components. The image (Figure: 5.5) shows the servo fitted inside the body of the robot.

Servo fitted insideC:\Users\ABHI\Desktop\Dissertation\Used pics\10042010190.jpg

Figure: 5.5 Servo fitted inside the body

Finally all the bits produced by solid prototyping are used and assembled together to make a robot arm. The arm is fitted(Figure 5.6) such a way that it provides enough stability to prevent the oscillations.


Figure: 5.6 Robot arm

The printed circuit board is also fitted inside the body of the robot arm, providing the RJ12 and USB leads outside for the connections. The insulated platform(Figure: 5.7) had been created to place the PCB board on top of it.C:\Users\ABHI\Desktop\Dissertation\Used pics\151_0019.JPG

Rubber mountings

Figure: 5.7 Platform for PCB

The PCB is fitted inside the robot enclosure with all the connections it needed. The status output had been displayed on the led's connected to the i/o pins of the PCB. All the connections made to the PCB are detachable and cam be modified easily. The figure below shows the connections made to the PCB and the PCB inside the body 0f the robot(Figure: 5.8).

C:\Users\ABHI\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Word\100_0187.jpgC:\Users\ABHI\Desktop\Dissertation\151KM530\151_0045.JPG


Figure :5.8 Bioloid style robot arm