new approach for robotics education - robosapien...

7
> REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) < 1 AbstractThe robotics education integrates several knowledge’s acquired during the undergraduate course, namely mechanical and electronics concepts. Moreover, the practical experience of these concepts is very important as part of engineering education, but it is resource intensive. It is presented a nouvelle approach for the robotics education based in the RoboSapien hacking. It has proven to be a valuable teaching tool for this purpose, allowing the reinforcement of several key concepts concerning the integration of topics related to kinematics, dynamics, control systems, embedded systems, data acquisition and microprocessors programming. Furthermore, this approach for the robotics education proved to be very motivating and stimulating for the students. Index Terms—Robotics, Education, RoboSapien, Concepts. I. INTRODUCTION obotics is being increasing used a vehicle for motivating students to learn embedded systems, artificial intelligence, computer science, and even general science and engineering [1]. Typically, the robotics courses involve in the laboratorial classes the construction and programming of simple robots, usually are comprised by a microcontroller, end course switches and infrared emissor-receiver for control, DC or step motors, mounted in all type of the bodies. This is one of the main objectives of the Automation and Robotics classes of the Electromechanical Engineering Department of University of Beira Interior, Portugal. The Automation and Robotics classes are included in the last year of the under- graduate of Electromechanical Engineering course. These classes intend to integrate the most part of the knowledge acquired during the course, both in mechanical and electronics concepts, based on the development of projects that contain both the hardware and software development for some Manuscript received October 9, 2001. This work was supported in part by Texas Instruments and University of Beira Interior. Pedro Dinis Gaspar is with the Electromechanical Engineering Department of University of Beira Interior, Calçada Fonte do Lameiro, 6201-001 Covilhã, Portugal (phone: 351-275329; fax: 303-555-5555; e-mail: [email protected] ). António Espírito Santo is with the Electromechanical Engineering Department of University of Beira Interior, Calçada Fonte do Lameiro, 6201- 001 Covilhã, Portugal (e-mail: [email protected] ). Humberto Santos is with the Electromechanical Engineering Department of University of Beira Interior, Calçada Fonte do Lameiro, 6201-001 Covilhã, Portugal (e-mail: [email protected] ). Bruno Riberiro is with the Electromechanical Engineering Department of University of Beira Interior, Calçada Fonte do Lameiro, 6201-001 Covilhã, Portugal (phone: 351-275329; fax: 303-555-5555; e-mail: [email protected] ). specific application, and at the same time present to the students the fundamental topics of robotics. Since these classes only extend during a semester, is quite difficult to accomplish those objectives. Last academic year (2005-2006), these classes were reformulated to increase the knowledge transmitted to the students and let them develop more integrating projects. This nouvelle approach had followed several indications provided by [1-11] which were devoted to improve pedagogically the robotics education profile, In the Electromechanical Engineering course, the student start very early to possess knowledge’s concerning embedded systems based on the microcontroller MSP430 produced by Texas Instruments. At the laboratorial classes of Instrumentation and Measurements, they start to use this microcontroller to apply the theorical knowledge’s in conditioning systems and data acquisition. The use of this microcontroller is mostly related to its low cost, to the available number of hardware starter kits and software integrated development environment (IDE) either free or with a reduced cost, the amount of peripherals integrated in the μC, the low power features, the high pin out counting, the C and C++ easy programming, and the very important to education, the rapid learning curve that allows the students to start very initial stage to create their own applications. Nevertheless, this required the presentation of an introduction to μC MSP430, where are described various embedded systems, the architecture characteristics, the memory hierarchy, internal modules, I/O ports, peripherals and the programming language of the μC (although it can be programmed either in Assembly or C, each one with several advantages and disadvantages, the programming lectures tend to by in C language since it is easier for the student to rapidly learn it. When the students arrive to the last year, and particularly to the Automation and Robotics lectures, they already have the basis of control systems, sensors/instrumentation, data acquisition and microprocessor programming, nevertheless the projects developments are normally difficult by hardware concerns, since the hardware project, construction and assembly takes a lot of time. During the Advanced Technical Conference - ATC 2005, promoted by Texas Instruments (TI), along the discussions about teaching Robotics, born a collaboration between DEM- UBI and TI, which consisted in the substitution of RoboSapien (RS) control and regulation electronics by the TI MSP430 to replicate the RS operation, evidencing the capabilities of this microcontroller and as a way to motivate the students and to develop a technology demo vehicle. Using the RS in the Automation and Robotics laboratorial lectures, New Approach for Robotics Education - RoboSapien Hacking Pedro Dinis Gaspar, António Espírito Santo, Humberto Santos, and Bruno Ribeiro R

Upload: others

Post on 30-Sep-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: New Approach for Robotics Education - RoboSapien Hackingwebx.ubi.pt/~felippe/paper/paper2008_ieee_bruno.pdf · 2011. 2. 24. · RoboSapien hacking. It has proven to be a valuable

> REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) <

1

Abstract— The robotics education integrates several

knowledge’s acquired during the undergraduate course, namely mechanical and electronics concepts. Moreover, the practical experience of these concepts is very important as part of engineering education, but it is resource intensive. It is presented a nouvelle approach for the robotics education based in the RoboSapien hacking. It has proven to be a valuable teaching tool for this purpose, allowing the reinforcement of several key concepts concerning the integration of topics related to kinematics, dynamics, control systems, embedded systems, data acquisition and microprocessors programming. Furthermore, this approach for the robotics education proved to be very motivating and stimulating for the students.

Index Terms—Robotics, Education, RoboSapien, Concepts.

I. INTRODUCTION obotics is being increasing used a vehicle for motivating students to learn embedded systems, artificial intelligence, computer science, and even general science

and engineering [1]. Typically, the robotics courses involve in the laboratorial classes the construction and programming of simple robots, usually are comprised by a microcontroller, end course switches and infrared emissor-receiver for control, DC or step motors, mounted in all type of the bodies. This is one of the main objectives of the Automation and Robotics classes of the Electromechanical Engineering Department of University of Beira Interior, Portugal. The Automation and Robotics classes are included in the last year of the under-graduate of Electromechanical Engineering course. These classes intend to integrate the most part of the knowledge acquired during the course, both in mechanical and electronics concepts, based on the development of projects that contain both the hardware and software development for some

Manuscript received October 9, 2001. This work was supported in part by

Texas Instruments and University of Beira Interior. Pedro Dinis Gaspar is with the Electromechanical Engineering Department

of University of Beira Interior, Calçada Fonte do Lameiro, 6201-001 Covilhã, Portugal (phone: 351-275329; fax: 303-555-5555; e-mail: [email protected]).

António Espírito Santo is with the Electromechanical Engineering Department of University of Beira Interior, Calçada Fonte do Lameiro, 6201-001 Covilhã, Portugal (e-mail: [email protected]).

Humberto Santos is with the Electromechanical Engineering Department of University of Beira Interior, Calçada Fonte do Lameiro, 6201-001 Covilhã, Portugal (e-mail: [email protected]).

Bruno Riberiro is with the Electromechanical Engineering Department of University of Beira Interior, Calçada Fonte do Lameiro, 6201-001 Covilhã, Portugal (phone: 351-275329; fax: 303-555-5555; e-mail: [email protected]).

specific application, and at the same time present to the students the fundamental topics of robotics. Since these classes only extend during a semester, is quite difficult to accomplish those objectives. Last academic year (2005-2006), these classes were reformulated to increase the knowledge transmitted to the students and let them develop more integrating projects. This nouvelle approach had followed several indications provided by [1-11] which were devoted to improve pedagogically the robotics education profile, In the Electromechanical Engineering course, the student start very early to possess knowledge’s concerning embedded systems based on the microcontroller MSP430 produced by Texas Instruments. At the laboratorial classes of Instrumentation and Measurements, they start to use this microcontroller to apply the theorical knowledge’s in conditioning systems and data acquisition. The use of this microcontroller is mostly related to its low cost, to the available number of hardware starter kits and software integrated development environment (IDE) either free or with a reduced cost, the amount of peripherals integrated in the μC, the low power features, the high pin out counting, the C and C++ easy programming, and the very important to education, the rapid learning curve that allows the students to start very initial stage to create their own applications. Nevertheless, this required the presentation of an introduction to μC MSP430, where are described various embedded systems, the architecture characteristics, the memory hierarchy, internal modules, I/O ports, peripherals and the programming language of the μC (although it can be programmed either in Assembly or C, each one with several advantages and disadvantages, the programming lectures tend to by in C language since it is easier for the student to rapidly learn it. When the students arrive to the last year, and particularly to the Automation and Robotics lectures, they already have the basis of control systems, sensors/instrumentation, data acquisition and microprocessor programming, nevertheless the projects developments are normally difficult by hardware concerns, since the hardware project, construction and assembly takes a lot of time. During the Advanced Technical Conference - ATC 2005, promoted by Texas Instruments (TI), along the discussions about teaching Robotics, born a collaboration between DEM-UBI and TI, which consisted in the substitution of RoboSapien (RS) control and regulation electronics by the TI MSP430 to replicate the RS operation, evidencing the capabilities of this microcontroller and as a way to motivate the students and to develop a technology demo vehicle. Using the RS in the Automation and Robotics laboratorial lectures,

New Approach for Robotics Education - RoboSapien Hacking

Pedro Dinis Gaspar, António Espírito Santo, Humberto Santos, and Bruno Ribeiro

R

Page 2: New Approach for Robotics Education - RoboSapien Hackingwebx.ubi.pt/~felippe/paper/paper2008_ieee_bruno.pdf · 2011. 2. 24. · RoboSapien hacking. It has proven to be a valuable

> REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) <

2

all the precedent objectives defined for this lecture could be accomplished as well it turn to be a incredible approach to kept the students attention for the knowledge of robotics. Another benefit of the approach was the development of the teamwork between the students in multidisciplinary topics in order to successfully integrate different areas of knowledge, in contrast to traditional technical education strategies that’s tended to promote individualism and competence among students. This helped also the engineering students to develop the needed communication and working skills for teamwork. Additionally, the robotics field is still emerging, providing the development and use of new technology, theories and concepts. Due to its flexibility, robotics education provides an ideal setting for testing new educational approaches.

II. PROCEDURES

A. Overview The course goals based on this new approach were

differentiated by working teams, each involved in separated tasks to pursuit the same objective based in a reverse engineering procedures:

B. RoboSapien characteristics

Investigate the RS characteristics. In parallel with the theorical lectures, were was exposed the robotics fundamentals concerning robots as general application in manufacturing, coordinates systems, actuators, robot nomenclature devices as manipulators and end effects, robot uses, programming and classifications, tactile/vision sensing, among other issues. Concerning this task, first of all the students had to research about RS characteristics and identify the most important ones.

The RoboSapien (Fig. 1) is a humanoid robot designed by Mark W. Tilden [23], marketed byWowWee for the toy market. It measures approximately 34 cm in height and its weight is about 2,1 kg, including four mono (D) type batteries located in its feet.

This biomorphic robot was designed to be easily modified or hacked, being the electronics inside the RS easily accessed and clearly labelled. So, a growing community of hackers has devoted themselves to modify and add new functionalities to the robot.

The RS is pre-programmed with moves controlled by an infrared remote control, being capable of walking motion, grasp objects with either of its hands and throw them with mild force. It also has a small loudspeaker unit, which can broadcast several different vocalizations. The RS’s remote control unit has 21 different buttons. With the help of two shift buttons, 67 different robot-executable commands are accessible. Being equipped with a basic level of programmability, the users can string together movement commands to form macros or mini-programs (instructions sets), broadcasting them to the RS by infrared.

Researching into internet, it can be easily found several sites devoted to the explanation of RS modifications, like a live wireless video camera, a led belt that displays text, headlights, speech synthesis, a “flamethrower" (a small torch), volume control, radio frequency control, among others. The majority of these added functions can be founded in the internet by a simple search. However, none of the active modes integrated in the original RS concerned the substitution of the original microcontroller. All of them concerned the integration of hardware new functionalities as hand-beams, hand-led’s, heartbeat, voice off, tunnel-beam and blue eyes [12], wireless camera, wireless radio, frequency audio and pc control [13-14], color and motion tracking CMUCam [15], including an additional microcontroller (PicMicro controllers and Palm Pilot controllers) [16], and replacement of the head by a PDA to allow the perception of its environment using a camera [17]. This last example of RS modification had the objective of develop two teams of three RSs to play the 1st soccer match of humanoid robots worldwide at the Robocup German Open 2005 tournament.

C. Analysis of the robot kinematics and dynamics Analysis of the robot kinematics and dynamics (evaluation

of the robot movements and it’s characteristics). The evaluation of the RS dynamics proved that due to its low centre of mass, the RS is very stable. It is driven by seven DC motors, possessing one motor per leg that moves two joints in the hip and the knee keeping the foot orthogonal to the trunk. A trunk motor tilts the upper body laterally. These three motors locomotion the RS since it swings its upper body laterally to achieve a periodic displacement of the centre of mass projection from one foot to the other. The RS can walks backwards in a similar way, as well, turn on the spot. It also possesses one motor in each shoulder to raise and lower the arm and one motor in each elbow to twist the lower arm and open its grippers. This gripper hand has three fingers. The motors locations are presented in Fig. 2.

The dynamic walking pattern of RS follows the next sequence as exposed by [17] and it is shown in Fig. 3. Fig. 1. RoboSapien.

Page 3: New Approach for Robotics Education - RoboSapien Hackingwebx.ubi.pt/~felippe/paper/paper2008_ieee_bruno.pdf · 2011. 2. 24. · RoboSapien hacking. It has proven to be a valuable

> REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) <

3

(1) The trunk motor tilts the upper body to the right. The center of mass shifts over the right foot. The left foot lifts from the ground.

(2) The leg motors move into opposite directions, resulting in a forward motion of the robot. As the upper body swings back, the left foot regains contact with the ground.

(3,4) Symmetrical to (1,2).

D. Analysis of actuators, sensors and signal conditioning

The next task started in a dismantle procedure to allow the detailed analysis of the actuators (motors) and regulation electronics, sensors and respective signal conditioning, and of the PCB boards included in the original robot.

As exposed, the PCB boards (Controller U2 and Motor Driver U3) of the RS is easily accessed and clearly labelled, indicating the motors (M), input or output port (P), raw battery voltage that fluctuates wildly (VDD), the regulated voltage (Vcc = 3.6V) and the universal ground (Gnd). The first task was to identify all the connections of the PCB board exposed in Fig. 4. The original controller, certainly an ASIC (application-specific integrated circuit) is an integrated circuit customised for this particular purpose, which was covered with glue disabling the possibility of evaluating the control systems philosophy developed for the RS.

Furthermore, the students had to list all the components and devices included in the PCB board and investigate its functions. In parallel other working groups were devoted to complete the list of actuators, sensors and output devices. Were determined the mechanical and/or electrical characteristics of the power switch, motor driver, the four foot touch sensors, two finger touch sensors, shoulders and elbow end course position switches, the sound sensor and of the seven leds (fingers and eyes).

After dismantling the robot, was done the analysis of the digital signals acquired from the electronic board ports to evaluate the original microcontroller control output ports when the robot do a specific command function. The

procedure consisted in the acquisition of the ports digital signals, initially for a single motor, and then to command functions that combined several movements at the same time, listing the times that each motor was active and inactive. To accomplish this task, was used Tektronix™ TDS220 oscilloscope to acquire the single movements signals and a PM3580 Logic Analyzer for the robot combined movements signals. In Fig. 5 is presented a photograph of the use of the former instrument.

Fig. 2. The motors locations in RoboSapien [17].

Fig. 3. Walking gait of the RoboSapien [17].

Fig. 5. Use of the PM3580 Logic Analyzer to acquire the digital signals of the motors.

a) Front view.

b) Rear view. Fig. 4. Original PCB board of the RoboSapien.

Page 4: New Approach for Robotics Education - RoboSapien Hackingwebx.ubi.pt/~felippe/paper/paper2008_ieee_bruno.pdf · 2011. 2. 24. · RoboSapien hacking. It has proven to be a valuable

> REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) <

4

The analysis of each single motor signal was done by the comparison of the output signal from the original microcontroller and the signal that the motor receives. In Fig. 6 are exposed the graphs obtained with the digital oscilloscope to single movements.

The analysis of the combined actions signals required the connection of wires to the original microcontroller ports to measure the combined movement’s digital signals with a logic analyzer. The acquisition of the graphical digital signals from the microcontroller motor ports was done for all the combined functions defined in the remote control. The graphical functions were only obtained for one side (left one) of the robot movements since other side (right one) does the same movements but the motors operate in opposite direction. In Fig. 7 is presented an example of the output port signals acquisition of a combined movement: “Oops”. In this function, signal “M1+” (Left Elbow Out) is “high”, for 531 msec and the rest of the time (2125 msec) is “low” and signal “M3+” (Right Elbow Out) presents the same signal, since both elbows execute the movement at the same time.

One of the next activities concerned the analysis of the RS eye patterns, since depending on the command that is executed, the pattern will be different. The RS original microcontroller has 3 outputs for each eye. Since his eyes give distinct patterns for all conditions, this output condition can be used as an effective digital-level feedback source.

The next task involved the analysis of the infrared commands. For the input commands is used the direct serial input to the IR-OUT pin (active low signals, 1200 bps). The timing is based on 1/1200 second clock (~ 0,833 msec), where the signal is normally high (idle, no IR). It was determined that the data bits (8 bits), the space encoded signal depends on bit value, sending the most significant data bit first, being the Carrier at 39,2 kHz. The first bit (MSB) is always 1 and the valid codes are range from 0x80 to 0xFF. Every IR command has a preamble in which the signal goes low for 8/1200 sec. If the data bit is equal 0, the signal goes high for 1/1200 sec, and if it is 1, the signal goes high for 4/1200 sec. In Fig. 8 is presented an example of a specific IR command: “Wake Up”: 0xB1.

During this period, other working group was collecting all the information obtained to draw in detail the electrical schematics and simultaneously evaluating of the most appropriate microprocessor of the MSP430 family to complete replicate the original ASIC. They were involved in the analysis of the schematics of the initial robot and development of the new ones based in TI control/microprocessor devices. Was chosen the microcontroller MSP430F149 making use of the following on-chip resources to control the RS: ports (output) P6.0 – P6.7 and P2.0 – P2.5 for the motors; ports (output) P4.0 – P4.7 for the leds; port (input) 1.1 for the IR signal and ports (input) P1.2 and P1.3 for the switches. In Fig. 9 is presented a schema of the new PCB board.

a) output signal vs. motor input signal

b) Left elbow movement from the inside to outside and vice-versa Fig. 6. Example of digital signals of single movements.

Fig. 7. Output port signals acquisition of a combined movement: Function “Oops”

1 10 10 0Preamble 0Empty

Empty1

0b10110001=0xB1=Wakeup command

Fig. 8. Example of a IR command: Function: “Wake Up”: 0xB1.

Page 5: New Approach for Robotics Education - RoboSapien Hackingwebx.ubi.pt/~felippe/paper/paper2008_ieee_bruno.pdf · 2011. 2. 24. · RoboSapien hacking. It has proven to be a valuable

> REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) <

5

This task was concluded with the drawing of the new PCB boards, fabrication and assembly of the components and devices in this board. In Fig. 10 is exposed a detailed photograph of the original PCB board without the ASIC. In Fig. 11 is present the photographs of the new PCB boards and the connections to the original one assembled in the RS.

E. C code programming

The following task concerned the development of the C programming code of the MSP430 microcontroller chosen to

substitute the original one. The C code was specified to commit the robot dynamics.

The control system program consisted in redirect new labels for the ports (P2 and P6) using the same ports addresses (using C/C++ structures and unions). Then, was developed a program routine for each movement function, with all time values for every motor status. An interruption connected to the countdown of the time values for each motor status (BasicTimer Clock at 1msec). The algorithm details consisted in the definition of (1) pointers to save the each time movement for each motor on a free address of the microcontroller memory, that allow access to time movements; (2) new labels using C/C++ syntaxes union and struct. The method was simple since it obtains the control of microcontroller ports using the structures names. For each motor was defined a variable with one bit for each port P6OUT; (3) structures for the time movements, that kept the time for each active/inactive condition of the motors. The variables had 13 bits because some motor status times were large (maximum time of 8192 msec), since the interval time interrupt was 1 msec (BasicTimer Clock); and (4) movement routines with arrays that contain the time values for every change that motor ports should have. In Fig. 12 is presented

C410uF

TCK

TMS

TDI

TDO

/TD

I

RST/

NM

I

XT2

INX

T2O

UT

DVcc11

P6.3/A32

P6.4/A43

P6.5/A54

P6.6/A65

P6.7/A76

VREF+7

XIN8

XOUT9

VeREF+10

VREF-/VeREF-11

P1.0/TACLK12

P1.1/TA013

P1.2/TA114

P1.3/TA215

P1.4/SMCLK16

P1.5

17

P1.6

18

P1.7

19

P2.0

/AC

LK20

P2.1

/TA

INC

LK21

P2.2

/CA

OU

T/TA

022

P2.3

/CA

0/TA

123

P2.4

/CA

1/TA

224

P2.5

/Ros

c25

P2.6

/AD

C12

CLK

26

P2.7

/TA

027

P3.0

/STE

028

P3.1

/SIM

O0

29

P3.2

/SO

MI0

30

P3.3

31

P3.4

32

P3.5 33P3.6 34P3.7 35P4.0/TB0 36P4.1/TB1 37P4.2/TB2 38P4.3/TB3 39P4.4/TB4 40P4.5/TB5 41P4.6/TB6 42P4.7/TB7 43P5.0/STE1 44P5.1/SIMO1 45P5.2/SOMI1 46P5.3 47P5.4 48P5.5

49P5

.650

P5.7

51X

T2O

UT

52X

T2IN

53TD

O/T

DI

54TD

I/TC

LK55

TMS

56TC

K57

RST/

NM

I58

P6.0

/A0

59P6

.1/A

160

P6.2

/A2

61A

Vss

62D

Vss

63A

Vcc

64uP1

MSP430F149

100nC3

+3.3

330RR2

TDO/TDITDITMSTCK

RST/NMI

+3.31 23 45 67 89 1011 1213 14

P1

Header 7X2

12pF C1

12pF C2

23

14

Y185SMX

12

P2 +3.3

100nC5 C6

10uF

DS1LED3

1234

P5

Switch

P12P13P14

P31P32P33

12345678

P6

LED

P40P41P42P43P44P45P46P47

P40

P41

P42

P43

P44

P45

P46

P47

P20P21P22P23P24P25

P20P21P22P23P24P25

R147K

10nF

C15

+3.3

+3.3

P60

P61

P62

P63P64P65P66P67

P60P61P62P63P64P65P66P67

P30

123456

P3

Motores 2

12345678

P4

Motores1

P11/IR

P11/IR

P12P13P14

4K7

R3

4K7

R4

4K7

R5

4K7

R6

4K7

R7

4K7

R8

4K7

R9

4K7

R10

LED1

LED2

LED3

LED4

LED5

LED6

LED7

LED8

LED1LED2LED3LED4LED5LED6LED7LED8

Q1BC847

Q2BC847

Q3BC847

Q4BC847

Q5BC847

Q6BC847

Q7BC847

Q8BC847

Fig. 9. Schema of the PCB board developed.

a) Original PCB board without microcontroller.

b) Original ASIC. Fig. 10. Detailed photograph of the original PCB board without the ASIC.

a) Connections to the original PCB board.

b) New PCB board with the MSP430 microcontroller. Fig. 11. New PCB board to include the MSP430 microcontroller.

bruno
Highlight
Só "C"
bruno
Line
bruno
Line
Cuidado, isto não é verdade. A rotina é a mesma para todos os movimentos, os dados com que ela opera é que são diferenciados para cada movimento
bruno
Rectangle
Principio base : O software assenta em 4 pontos chaves: 1) Organização da informação sobre as acções do RS A informação está disposta como mostra a fig.(esta nova) Existe uma tabela de apontadores para garantir um rápido acesso à informação “access table”, nesta tabela estão registados todos os endereços das estruturas com a informação necessária às acções do RS. As acções são diferenciadas, mediante a informação contida nas estruturas “data movements ()”. A estrutura “data movements ” apresenta a informação relativa à temporização e sequencia (sequenciação) das funções para todos os motores, o estado inicial e ainda a informação de fim de actividade. É com base no estado inicial dos motores, estes vão alternando de estado (on/off), sempre que um temporizador atinja a contagem 0 (ver exemplo fig 12). Quando atingida a contagem zero, o temporizador seguinte é activado. O Motor termina de operar se atingida a contagem zero e o próximo temporizador apresenta a contagem 0. 2)Motores lógicos Os motores do RS apresentam 3 estados; Rodar no sentido dos ponteiros do relógio; rodar no sentido contrário ao dos ponteiros do relógio e parado. Para obter esta funcionalidade, cada motor foi desdobrado em dois motores, que são designados por motores Lógicos (ver figura 12) Exemplo: The physical motor M1 is represented by two logical motors M1+ and M1- depending on the rotation direction (Note: M1+ and M1- can’t possess the same high state because it would provoke a short circuit). If M1 = state 0, then M1+ = High and M1- = Low, consequently the physical motor M1 runs counter clockwise. 3) descodificação de comandos Os comandos chegam ao RS através de sinais IR, estes sinais são descodificados e o comando resultante irá desencadear uma acção de recarregamento da memória, com a nova informação para a função System stack. 4) função de activação dos motores (system task) Quando chega ao RS um novo comando, este, depois de descodificado, conduz ao carregamento em memória de informação para a nova acção do RS. É sobre essa informação, que está alojada em RAM, que esta função vai trabalhar, ela não conhece que tipo de acção está a decorrer, simplesmente executa as temporizações, altera o estado dos motores e LEDs e carrega as novas temporizações, até terminar a acção desencadeada. Este função está associada um temporizador do MSP430 e é executada com um período de 1ms. Com o intuito de simplificar o software esta função também monitoriza o estados dos interruptores de imergência. O resto pode ficar assim, não é necessário descrever as figuras, basta olhar, OK!!!
Page 6: New Approach for Robotics Education - RoboSapien Hackingwebx.ubi.pt/~felippe/paper/paper2008_ieee_bruno.pdf · 2011. 2. 24. · RoboSapien hacking. It has proven to be a valuable

> REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) <

6

the operation principle of the software considering an example: The physical motor M1 is represented by two logical motors M1+ and M1- depending on the rotation direction (Note: M1+ and M1- can’t possess the same high state because it would provoke a short circuit). If M1 = state 0, then M1+ = High and M1- = Low, consequently the physical motor M1 runs counter clockwise.

In Fig. 13 is presented a block diagram of the software architecture. The C code was composed by several routines each one devoted to several tasks. In Fig. 14 is presented the block diagrams of the Background, System and IR tasks.

F. Tests and development of new functionalities The final task consisted in performing tests to evaluate the

robot movements and tuning slight discrepancies. During this task, the students had to propose the development of new functionalities.

[0] [1] [2] [3] [4] [13] [14]

0004252643 00

01693319531525 00

00000 00

00000 00

00000 00

[0]

[1]

[2]

[13]

[12]

Timers

Mot

ors

0

1

0

0

0

1

1

0

0

0

Motor State

Motor Initial Value

Motor 1M1+

M1-

HI

HI

Low

Low

0

1

2

3

4

t [ms]525 531 319 1693

4252643

M1 +

M1 -

5

M1

MotorState

Clockwise

Cclockwise

Stoped

Fig. 12. Operation principle of the software.

Command ISR

System Task

WakeUp

Sleep

SingleMov1

.....

.....

.....

Buldozer

RingBuffer

1 ms

BackGroundTask

IRReceptor

Timer BISR

IR CMD State Data

IRRemote Command

Actions Table

MotorsDriver

Leds

Switch

Action Data

HARWARE

Command Buffer

Timeout

Fig. 13. Block diagram of the software architecture.

Start

Initialization

Any Command?

No

DecodeCommand

Yes

Load CommandAction

BackGround Task Flow Chart

a) Block diagrams of the Background task.

Motor (M1+)

Motor (n)Enable

Yes

Decrement Timer (n)

Timer (n) = 0?

Change Motor (n) Value

Get next Timer (n)

Yes

Timer (n) = 0?

Yes

Desable Motor (n)

No

No

Motor (...)

Motor (n)Enable

Yes

Decrement Timer (n)

Timer (n) = 0?

Change Motor (n) Value

Get next Timer (n)

Yes

Timer (n) = 0?

Yes

Desable Motor (n)

No

No

Start

Movement On ?

Refresh allMotors value

Movement ON ?

Put NextCommand No

Switch On?

Yes

Debounce

Switch On?

Yes

Put STOPCommand

Yes

END

System Task Flow Chart

No

No

Motor (M7-)

Motor (n)Enable

Yes

Decrease Timer (n)

Timer (n) = 0?

Change Motor (n) Value

Get next Timer (n)

Yes

Timer (n) = 0?

Yes

Desable Motor (n)

No

No

Yes

No

b) Block diagrams of the System task.

Comunication OFF

ValidatePreamble

Communication On

Inicialization

Command IR State Machine

1

2

3

4

5

1

2

3

4

Signal : High

Signal : High to Low

Preamble is valid

Timeout Condition

Preamble NOT valid

4

6

6 Valid Command

5

c) Block diagrams of the IR task.

Fig. 14. Block diagrams of the Background, System and IR tasks.

Page 7: New Approach for Robotics Education - RoboSapien Hackingwebx.ubi.pt/~felippe/paper/paper2008_ieee_bruno.pdf · 2011. 2. 24. · RoboSapien hacking. It has proven to be a valuable

> REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) <

7

The tests proved that the RS moved like in early days. It was concluded that the students successfully substituted the RoboSapien control and regulation electronics by TI MSP430 microcontroller. It turn to be an excellent demo vehicle of technology. Pedagogically, the combination of RoboSapien and MSP430 microcontroller in laboratorial classes, allow exemplifying robotics key concepts and embedded systems capabilities. The substitution of the microcontroller by MSP430, allow the RoboSapien to have an evolution capability, since in the following academics years the projects involve the development of new functionalities, as (1) wireless communications, (2) expand computation capabilities with a DSP to include voice commands, and (3) the development of a user friendly PC high level application to perform new actions/movements.

III. CONCLUSIONS

It was presented the teaching structure in the lectures that use microprocessors at the undergraduate course of Electromechanical Engineering at the University of Beira Interior, Portugal. It was specifically focused the last year lectures of Automation and Robotics, since it is devoted to integrate several knowledge’s are acquired during the course. The RoboSapien hacking has proven to be a valuable teaching tool for this purpose, allowing the reinforcement of several key concepts discussed in undergraduate lectures as Automation and Robotics. It was pointed out that the practical experience is a very important part of engineering education, but it is resource intensive. This approach for the robotics education proved to be very motivating and stimulating for the students allowing the laboratory to control time and money in projects proposed to the students. In last instance, reduce the experiment cost per student, and makes available to students the development of a large variety of upgrades to the RS based in new technologies. With this pedagogical alternative, the students gain much more experience then in traditional laboratory experience. Additionally, one of the challenges facing lecturers teaching advanced undergraduate courses in robotics, integrating topics of kinematics, dynamics, control systems, embedded systems, data acquisition and microprocessors programming is the difficult in providing the integration skills and transmit to the students how can them relate the theory to the physical world. The use of RoboSapien for this purpose was sufficiently complex to challenge the students, but not overwhelming, and it was way to motivate them to robotics topics.

ACKNOWLEDGMENT The authors thank the support given by Texas Instruments;

and particularly the help provided by Christian Speck (TI Europe Business Development) and Robert Owen (TI University Programme Manager).

REFERENCES [1] I. Horswill, “A laboratory course in behavior-based robotics,“ Intelligent

Systems and Their Applications, IEEE, vol. 15, issue 6, pp. 16 – 21, Nov.-Dec. 2000.

[2] M. Rosenblatt, and H. Choset, “Designing and implementing hands-on robotics labs,” Intelligent Systems and Their Applications, IEEE, vol. 15, issue 6, pp. 32 – 39, Nov.-Dec. 2000.

[3] J. A. Piepmeier, B. E. Bishop, and K. A. Knowles, “Modern robotics engineering instruction,” Robotics & Automation Magazine, IEEE, vol. 10, issue 2, pp. 33 – 37, June 2003.

[4] B. A. Maxwell, and L. A. Meeden, “Integrating robotics research with undergraduate education,” Intelligent Systems and Their Applications, IEEE, vol. 15, issue 6, pp. 22 – 27, Nov.-Dec. 2000.

[5] R. Kuc, E. W. Jackson, and A. Kuc, “Teaching introductory autonomous robotics with JavaScript simulations and actual robots,“ IEEE Trans. Education, vol. 47, issue 1, pp. 74 – 82, Feb. 2004.

[6] L. Enrique Sucar, J. Noguez, and G. Huesca, “Project oriented learning for basic robotics using virtual laboratories and intelligent tutors,” Frontiers in Education, 2005. FIE '05. in Proc. 35th Annual Conference, pp. S3H - 12-17, 19-22 Oct. 2005.

[7] M. Krugman, “Teaching behavior based robotics through advanced robocamps,” Frontiers in Education, 2004. FIE ‘04. in Proc. 34th Annual Conference.

[8] J. M. Conrad, “Stiquito for robotics and embedded systems education,” Computer, vol. 38, issue 6, pp. 77 – 81, May 2005.

[9] K. S. Rawat, and G. H. Massiha, “A hands-on laboratory based approach to undergraduate robotics education,” Robotics and Automation, 2004. in Proc. ICRA '04. 2004 IEEE International Conference, vol. 2, pp. 1370 - 1374, Apr 26-May 1, 2004.

[10] D. J. Ahlgren, “Meeting educational objectives and outcomes through robotics education,” World Automation Congress, 2002. in Proc. of the 5th Biannual, vol. 14, pp. 395 – 404, 9-13 June 2002.

[11] K. Nagai, “Learning while doing: practical robotics education,” Robotics & Automation Magazine, IEEE, vol 8, issue 2, pp. 39 – 43, June 2001.

[12] Microbi’s Robosapien mods. Available: http://www.angelfire.com/droid/rsv2/.

[13] Robosapien RF Sound Mod. Available: http://home.comcast.net/~robosapien/rfmod.htm.

[14] Robosapien Camera Mod. Available: http://home.comcast.net/~jsamans/robo/robocam.htm.

[15] RoboSapienPets RoboSapien page. Available: http://www.aibohack.com/robosap/.

[16] Mark C’s Robosapien Hacking Site. Available: http://homepages.strath.ac.uk/~lau01246/robot/myhackrs.shtml.

[17] S. Behnke, J. Muller, and M. Schreiber, “Playing Soccer with RoboSapien”, in Proc. of The 9th RoboCup International Symposium, Osaka, Japan, paper #97, July 2005.