K-Team S.A.

Lausanne, 16 March 1999

¢   ¡

Version 2.1

¨

£ ¡ ¤ ¥ ¦   ¡ §

Documentation author K-Team Ch. de Vuasset, CP111 1028 Préverenges Switzerland info@k-team.com http://www.k-team.com Trademark Acknowledgements IBM PC: International Business Machines Corp. Macintosh: Apple Corp. SUN Sparc-Station: SUN Microsystems Corp. LabVIEW: National Instruments Corp. Khepera: K-Team NOTICE: • The contents of this manual are subject to change without notice. • All efforts have been made to ensure the accuracy of the content of this manual. However, should any error be detected. please inform K-Team. • The above notwithstanding, K-Team can assume no responsibility for any error in this manual.

TABLE OF CONTENT
¥  ¤   

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 How to Use this Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Safety Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Unpacking and Inspection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 The general I/O turret. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 I/O connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Digital inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Digital outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Analog inputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Software support diskettes . . . . . . . . . . . . . . . . . . . . . . . . . 6 Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Assembling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Disassembling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Using LabVIEW® . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Hardware and software setup . . . . . . . . . . . . . . . . . . . . . . 8 Digital inputs reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Digital output control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Analog input reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Appendix A: Summary of all connections . . . . . . . . . . . . . . . . . 13 Appendix B: Schematics of the general I/O turret . . . . . . . . . . . 15 Appendix C: Communication protocol to control the I/O turret 19 
©  © 

1 


INTRODUCTION

The hardware of Khepera is based on a modular concept. The “general I/O” is a turret that can be plugged on the basic configuration making simple custom electronic extensions possible. Due to the configuration of this turret, if the geometry is respected others turrets can be plugged on the top of it. The general I/O turret is directly under control of the main processor. All functionnalities can be managed by the standard control protocol available on the basic configuration of Khepera. To use this module you need to have a BIOS and a control protocol of version 3.0 or grater. 
  ¨   & ' "

1.1 

How to Use this Manual

This manual is organised into six chapters and two appendix. To learn how to make the best use of your general I/O turret you are urged to read all of chapters 2 through 5. You need to read the chapter 6 if you use the software LabVIEW®. The appendix can be referred to as necessary. Chapter 1 gives you a general introduction. Chapter 2 describes some important warnings. Chapter 3 explains the contents of the package. Chapter 4 explains the functionality of the general I/O turret. Chapter 5 explains how to connect the general I/O turret to the robot and to the host computer. Chapter 6 is addressed to users of LabVIEW®. It shows simple virtual instruments (VI) to control the general I/O turret functionality. Appendix A gives an overview of all connections, of the bus layout and of the memory map. Appendix B contains the schematics of the module. Appendix C details the commands of the communication protocol.
# $  ! " ¨ ¨ ¨ $ ! & " %

2

SAFETY PRECAUTIONS

Don't plug or unplug any connector or turret when the system is switched ON. All connections and turret insertions must be made when the robot and the interface are switched OFF. Otherwise damages can occur. Switch OFF the robot if you will not use it for more than a day. Disconnect the power supply removing it from the wall socket. If you have any question or problem concerning this turret, please contact your Khepera dealer.

1

3
)

UNPACKING AND INSPECTION

Please check that you have a complete package. You should find: • Documentation. • The general I/O turret. • Disks with the software modules for LabVIEW® on SUN®, Macintosh® and PC.
#

4
4.1

THE GENERAL I/O TURRET
Overview

3

1 4
0

Figure 1: Overview of the turret layout.

Make an external inspection of the turret. Note the location of the following parts: 1. Serial line (S) connector. 2. I/O connections area. 3. Free connections area. 4. Analog input gain regulation.

4.2 

I/O connections

The I/O connections are situated in a specific area of the module as described in figure 1 (point 2) and detailed in the next sections. Three lines of text on the printed circuit help in finding the position of the different pins. We divide all connections in main groups: Digital inputs, low power digital outputs, power digital outputs and analog inputs. A last group of connections includes the power ones. Their location is described in figure 2. These connections can be used to power additional circuits.
3 3 3 2 &

(

4 T 7 V V U€y xw vp

E a P H F srQE qiQgB a p V h f t uT 8C@ 9 87 U4 5 A 5 5 9 8C6@ 9 87 64 D B A 5 5 P H F W e@ 8bd US@ 8b6`8B U8YW 8U8S 5R QIGE V T 7 c R T 7 a R R 9 B X V 4 T 7

2

(

1

¦

2

Figure 2: Position of the power connections.

The following sections describe in detail the possibilities of all connections. In Appendix A you can find a short summary of the position of all connections.

4.2.1
‚

Digital inputs

8 digital inputs are available and can be read from the main processor on the extension bus at the relative address 32. For every bit a connection is accessible on the turret. The exact position of every connection is indicated in Figure 3.

Interrupt request 6

8 digital inputs

Figure 3: Position of digital input connections.

On the turret is also available the input to generate an interrupt on the main processor. This possibility can be used for strict real-time events and need to be managed directly from the BIOS. There is no possibility to use this functionality from the control protocol. Refer to the BIOS manual for more informations.
" 3

4.2.2
2

Digital outputs

Writing at the same relative address on the extension bus as for the digital inputs (32 decimal), 8 bits are available as output. Four of them (bits 0 to 3) are directly accessible on the turret as low power digital outputs. Bits 4,5 and 6 are used to control a full H bridge (motor control), as described, in table 1: Bits 4 and 5 control the forward and reverse 

3

„ h † Sg„k‚k€{ ƒ i  i

‡ – ‰ x‡¨k¦k€  § — ¥ —

j i kub‡t“xqY‡vxo‡YnmIkSSggf … ‰ h † s r f ‰ h † p f f ’ ˆ ’ l j i „ h †

˜ — kuY‡t“SqY‡vxo‡YnmIkSx‡g• ˆ ‹ – ‰ œ › • ‹ – ‰ š • •  Š  ™ ˜ — ‡ – ‰

…

•



p

š



¤

de˜~}• – h €€vˆ ‡† x„ … ‘ ‰ … …

“”‘£¢  – €€vŠ ‡‰ x‡ ˆ Œ ‹ ˆ ˆ

ƒ

GND

+5V

{ |—zxvp i y w ’   ¡Ÿzxvš — ž   Š Ž  Œ ‹ ˆ ˆ b‡“€vŠ ‡‰ S‡ “ ”’— ‘  0 0 †  ¨

ˆ ” ’ ‘ ‰ … … b‡“€ˆ ‡† S„ d e™—• ˜ –

Bit nbr.

0
°

0 0 1 1 0 0 1 1

0 1 0 1 0 1 0 1

0
°

0
°

1 1 1 1

free forward free blocked

Table 1: H bridge control and result. The maximum current supported by the H bridge circuit is 1 A, but the power supply of the robot can provide 200mA.
3 

Finally, bit 7 is used to drive a power transistor, as described in figure 4. Also in this case the maximal current provided by the robot is 200mA. 


+5V

Digital Output (bit 7)
GND 
& 

Power output connection

Figure 4: Power output schema. Two other outputs, independent from the previous ones, are available: Two pulsed outputs (chip select read and write pulses). On these lines a pulse as described in Figure 5 is generated when a read/write operation is made at address 36. 


/CSTurret (output connection)
³

Read - /Write

Figure 5: Shape of a read and write pulse. Only /CSTurret is on the output connection. It has to be noted that the pulse output (read and write) are active at 0 Volts. This means that the signal is normally (non active) at 5 Volts, and is active when 0 Volts are on the line.
© 

1

´

about 250ns

±

0

¯

«

«

Forward (Bit 4)
« °

Reverse (Bit 5)

Enable (Bit 6)

®

­

¬

ª

²

"

direction, the bit 6 enables the power.
Motor status free free free reverse

about 200ns

4

Figure 6: Position of digital output connections

4.2.3 

Analog inputs

On the basic configuration of Khepera a 10 bits A/D converter is used to read analog signals. Three of the six channels of this converter (0 to 2) are used for the functionnalities present on the basic configuration (proximity sensors, light sensors and battery control). Three other channels (3 to 5) are available for the user and are interfaced on this I/O module. To facilitate the wiring work of the user, some amplifiers have been already installed on the board, in the following way: • A rail-to-rail I/O amplifier with adjustable gain has been wired at the input of channels 3 and 4, as showed in Figure 7. The variable resistance can be adjusted with a little screwdriver (point 4 of Figure 1). 
# 3 $

Connection on the board
1kΩ 10 kΩ
Ù  ‚

Figure 7: Input circuit for analog inputs 3 and 4. • The two inputs of an amplifier are available at the input of channel 5, as described in figure 8. 
"

1kΩ

Connections 1kΩ on the board
10 kΩ
Ù

10 kΩ

Figure 8: Wiring scheme of the differential connections available for channel 5.

5

¶ à ¸ x‡¨k¦k€Ì Ï Ä Î Ä

Å Ä kuY‡t“SqY‡vxogbnmIkSx‡g · º à ¸ É È Â º à ¸ Ç Â Â ¼ ¹ ¼ Æ Å Ä ¶ à ¸

A/D converter (channel 3 or 4)
&

A/D converter (channel 5)
&

Ñ

Ñ

¾

Ç

Í

Á”À£¢¾ ¿ à €€v¹ ‡¸ S¶ · » º · ·

×

Ì |—¡xvÇ Ä Ë Ê ¼

¹ ½ ¼ » º · · Y‡“€v¹ ‡¸ x¶ Á e™Ÿ¾ À ¿

Ù

Ó

Power output
Ó

4 digital Bit outputs nbr

Motor control

Read pulse

Ð

Õ

Ö

Ø

Ò

¤

Ô

¤ 

‚ 

µ

The exact position of every connection is indicated in figure 6.

Write pulse

Gain control of analog inputs
ÿ

Ch.3 Ch.4

Figure 9: Position of analog input connections

4.3 
 

Software support diskettes

Three 3,5˝ diskettes contain all the modules for the control of the general I/O turret from LabVIEW® on PC, Macintosh® and SUN® (see also “Using LabVIEW®” on page 8).

5
% Û Ü

CONNECTIONS

Assembling and disassembling additional turrets is a delicate operation. Try to avoid it as much as possible and perform it carefully. Please follow the following instructions to avoid damage to your modules. K-Team can assume no responsibility for any damage caused by improper manipulation.
Ü

5.1 

Assembling

Assembling is the easier operation, but it is also necessary to perform it carefully: • First of all choose the parameters of the module on to which you plan to plug the new turret (the running mode that you will use on the basic Khepera configuration, for instance) and set the jumpers if necessary. When the turrets are assembled, it is impossible to access to the modules that are inside the robot without disassembling it. • Assemble the turret with the basic configuration in two steps: First, place the module on the extension connector checking that all pins are seated correctly. Second, apply force to insert the turret into the extension connector.
3 ¨  $  & 

Ú

£

¤

¥

¡

Ý ë ß x‡„v¦kù÷ û ì ú ì

í ì kuY‡t“xqY‡ñxogbïmIkSx‡êé Þ á ë ß ó ò é á ë ß ð é é ã à ã î í ì Ý ë ß

¦

¦

ý

å

ð

ø

èeç£}å æ ë €€và ‡ß xÝ Þ â á Þ Þ

¢

Analog inputs
ÿ

Analog Reference ground voltage (GNA) (4.096 V)

 

ü

þ

÷ |Ÿzõvð ì ö ô ã

þ

à ä ã â á Þ Þ Y‡“€à gß xÝ è e’Ÿå ç æ

0 

The exact position of every connection is indicated in figure 9.
Differential analog input

_ +

_ +

6

• If you want to connect the robot to your workstation, use the serial connector of the topmost turret. • Operate as normal.

5.2 

Disassembling

This is the most difficult operation for people that are not accustomed working with this type of hardware. • First switch OFF the robot or disconnect the power supply. • Separate the turret from the rest of the robot. To perform this without damage to the connections, it must be removed carefully such that all pins are disconnected simultaneously. One way to do this is to insert a large plastic screwdriver between adjacent modules and gently ease the boards apart, being careful not to push on delicate components. First open one side a bit, then the other, alternating sides until the module is free.
# " ‚ 

7

0 

Figure 10: How to disassemble an additional turret.

§

6 
!

USING LABVIEW®

This chapter is to familiarise you with the LabVIEW modules used to control the general I/O turret. To this end, all steps to perform turret manipulations are presented.

6.1
¨ 
 

Hardware and software setup

Set your environment as explained in section 5.2 of the Khepera User Manual. The jumpers must be set as showed in figure 11, to obtain the running mode 2.

Top view 


Figure 11: Settings of the jumpers to use LabVIEW. Then assemble the general I/O turret as described in “Connections” on page 6 of this manual and finally connect the robot to the computer as described in section 5.2 of the Khepera user manual. To enable the exchange of information between your computer and the robot, you have to set up the serial link. Be sure that the connection cable is connected at both ends, that the robot is powered, then start LabVIEW and open the Set-up instrument present in your diskette. The following panel appears:
©

Figure 12: Set up panel for serial link initialisation. 

Now, select the serial port on which the robot is connected. This selection must be

8

made for every module that you will use. Then click once on the run arrow at the top left of the window. A stop icon appears for a few seconds, after what the front panel returns to its initial state. That's all! The serial link with Khepera is set to 19200 baud. It will remain so until you put your computer off.
©   $

6.2 
 

Digital inputs reading

Be sure that the serial link has been correctly installed, then open the Set_arm_pos instrument present on the diskette. Now your screen displays the following panel:

Now, select again the serial port on which the robot is connected. To test this module, wire a digital input connection (0 or 1 or 2 ... to 7) to 5V (see “Digital inputs” on page 3 and the introduction of “I/O connections” on page 2 for more details). To read the status of the digital inputs from the robot, just click once on the run arrow. Change the status (5V or GND) of the digital input connections on the board and click again. If you are getting bored with clicking on the arrow, try one click on the double arrow (in running mode). This way, you enter the recurrent running. Change the status of the connections and observe the result on the panel in real time. Click on the stop icon to halt the program. 

3 #   3

6.3

Digital output control

All the output connections (digital, power and motor control ones, as described in “Digital outputs” on page 3, but not the read and write pulse output) are controlled by writing a 8 bit value at one unique address. For this reason the Digital_Out control panel described in figure 14 controls all outputs at the same time. This means, in particular, that if you use this VI, all output connections will be modified when you run it, also if you do not wire all control link when, for instance, this VI is used as a sub-VI. Due to this particularity it is recommended to use only one Digital_Out sub-VI in your VI.
!
Û " $

9

0

Figure 13: The Digital_In panel allow to read the status of the 8 inputs. 



Figure 14: The Digital_Out panel allow to control all outputs on the turret. To test the Digital_Out VI it is necessary to observe the result on the output connections. For more details on the characteristics of the output connections, please refer to section “Digital outputs” on page 3. All digital outputs can be tested with a logic probe. The power output can be tested with a LED connected through a resistance. The motor control outputs can be easily tested connecting a DC motor. When the devices are connected to the output connections, click on the double arrow (in running mode) entering in the recurrent run mode. The digital outputs 0 to 3 and the power output can be controlled by five independent switch. The motor is controlled by a menu and a switch. The menu contains the four possible power modes that can be applied to the motor: • “Let free motor”: the motor is disconnected and free to turn. • “Go forward”: the motor turn in one direction. • “Go backward”: the motor turn in the opposite direction. • “Block motor”: the motor is connected and blocked.
# # 2   &  

"
‚ ‚ &

To enable the power mode selected with the menu, the motor power switch need to be switched ON. The read and write pulses (see “Digital outputs” on page 3 for more details) can be controlled with the Pulse_Out panel described in figure 15. The two pulses can be gener-

10

ated independently when the corresponding button is pressed.
# ‚

The pulses on the output connections can be observed with an oscilloscope.

6.4 

Analog input reading

The Analog_In panel offer an higher level interface than the Get_ana_value available in the basic package. The A/D channel selection is made by a menu and the analog value display is made in Volts.
#

Figure 16: The Analog_In panel display the voltage present on one input connection. To test this functionality apply a low voltage to an analog input and run the VI. Please consider and observe carefully the influence of the gain control described in section “Analog inputs” on page 5.
)  

11

0 

Figure 15: Two buttons allow to generate the read and write pulses.

7
$

REFERENCES

[Mondada93b] Mondada F., Franzi E. and Ienne P., "Mobile robot miniaturisation: a tool for investigation in control algorithms.", ISER3, Kyoto, Japan, 1993. [National98] National Instruments, LabVIEW manuals, 1998. [K-Team98] Khepera User Manual 5.0, K-Team manuals, Lausanne, 1998.

12

APPENDIX A

SUMMARY OF ALL
CONNECTIONS

_
U
207 101 120 121 111 119 114 115 116

Analog inputs

Diff-

TP numbers
' 9
112

Digital inputs

Digital outputs

Figure 17: Description of all connections (with TP numbers corresponding to the schematics of Appendix B).
©

13

9

113

F

E

1

B

(12

)0

&(

%&'

6

Power Output

5

4

3

&7

110

3

6

5

4

3

G

B

H

8

&

)0

&(

%&'

9%

)7

201

I P9

G

CD

200

T

9

8

206

T

Q

U

%

8

@

)

'

8

B'

7

17

1(

@A

8

'

S

R

R

€ p

‚

g

f

e

d

x

p

w

v

p

x

d

b

s

V Xi ys iW `a XWY VW Y bc `a XWY VW p pV g f e d ` Xi u ht ` Xi hs h b bY r q Xi h W q

Gain Ch.4

+ _ +

Diff+ Gain Ch.3

118 204 205 203 202 100 102 103 104 105 106 107 108 109 117

0

7 6 22 21 23 20 47 48 53 54 46 49 52 5 51 3 1 37 2 4 38 36

Pin Signal 1 2 3 4 5 6 7 18 19 20 21 22 23 36 37 38 39 40 /Reset VCC_Ext GND VCC GND VRef GNA D8 D9 D10 D11 D12 D13 CH3 CH4 CH5 PAI D14

Pin Signal

43 41 40 42 55 56 57 45 19 18

Figure 18: Decription of the number and name of the K-bus connections.

Adress 32 (hexa 20)

Read / Write Read
« ¬

Function
Read the 8 digital inputs (for more details see “Digital inputs” on page 3)

32 (hexa 20)

Write

Write the 8 digital outputs: • bits 0-3 have direct logic output. • bits 4 and 5 control the H-bridge (table 1 on page 4 for more details). • bit 6 enable the H-bridge. • bit 7 drives the power transistor.
«

(for more details see “Digital inputs” on page 3)

36 (hexa 24)

Write
«

Generate a write pulse (data are not considered).
(for more details see “Digital outputs” on page 3)

36 (hexa 24)

Read
« ¨

Generate a read pulse (data are not to be considered).
(for more details see “Digital outputs” on page 3)

Table 2: Adress map overview.

”

”

…

…

…

…

“

“

“

ƒ

39 50 44

‰



•

…

…

…

…

ˆ

Top view
ˆ … ƒ

”

”





41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57

‰

„ „ „ „

‰  ‘ ’ ‘ ‘

ƒ

„

…

†

‡

ƒ

ƒ

ƒ

„

…

ƒ

ˆ

ƒ

…

…

ƒ

ƒ

„

†

D15 A0 A1 A2 R/W /CSExt F7 /IRQ6 MISO MOSI SCK /CSCOM TxD RxD A3 A4 A5

…

…

…

„

„

„

„

ˆ „ … … „

0

14

APPENDIX B

SCHEMATICS OF THE GENERAL I/O TURRET

15

A

B

C

D

E

F

1

/Reset VCC_Ext

TP1 TP2

TP4

GND VCC GND VRef
£

TP5 VRef VRef TP6 TP7

GNA

D8 D9

D8 D9 D10 D11 D12 D13

TP18 TP19 TP20 TP21 TP22 TP23

D8 D9 D10 D11 D12 D13 4

4

D10 D11 D12 D13

CH3

TP36
¢

CH5

TP38 TP39

PAI D14 D15 A0 A1 A2 R/W F7 MISO MOSI SCK /CSCOM TxD RxD
  ¢   ¢  ¢ ¢  ¢  ¢ ¢

D14 D15

D14 D15

TP40 TP41 TP42 TP43
 

A2

A2 R/W 

TP44 TP45 TP46 TP47

R/W 

/CSExt

/CSExt

/CSExt Connected not used Connected not used Connected not used Connected not used Connected not used 7 /IRQ6

/IRQ6

/IRQ6

TP48 TP49 TP50 TP51

7
TxD RxD A3 A4 A5 A3 A4 A5

TP52 TP53 TP54 TP55 TP56 TP57
   

A3 A4 A5

+5V

+5V

D2 1N4148-SMD VCC_Ext

D1 1N4148-SMD 1

J1a 

VCC 

J1c

TP47, TP49..TP54 are reserved and should not be used for custom applications. 9
¨

9
¨

TxD

3

TxD
J1b

RxD

2

RxD
J1d
£

D4 1N4148-SMD

D3 1N4148-SMD

4

GND
J1e

Project: Khe.E.GenIO.00
Title:
GenIO
©

1 0
©

J1f
£

6

MicroM-6-FD

S-A B
¢ ¡  

C

D

E

F

£

£

5

GND

Name: Date:

Edoardo Franzi 30.05.1996 1/3

Revision:
1.0

GND

30.05.1996 26.8.1994

Page: 

K-Team

INF-Ecublens 1015 Lausanne
G

§

8
§

¦

6
¦

¢

CH5

CH5

Connected not used Connected not used 6

¥

5
¥

CH4

CH4

TP37

¢

CH3

CH3 CH4 5

¤

3
¤

£

2

£

+5V

TP3 

/Reset

/Reset VCC_Ext

£

¢ ¡    

 

G

1

2

3

8

1 0

A

B

C
IC1 74HC138-SMD 

D

E

F

1
A2 A3 R/W

A2 A3 R/W

1 2 3 

A B C 

Y0 Y1 Y2 Y3 Y4 

15 14 13 12 

/WR TP100 

/WR1

11 10 9 7

A5 A4 /CSExt 


A5 A4 /CSExt

6 4 5 


G G2 


/RD TP101 

G1

Y5 Y6 Y7

/RD1

2
IC2 74HC573-SMD /RD D8 D9 D8 D9 D10 D11 D12 D13 D14 D15 1 19 18 17 16 15 14 13 12
" ! 

+5V 

/OC 1Q 2Q 4Q 5Q 6Q 7Q 8Q
" ! 

C 1D 2D 3D 4D 5D 6D 7D 8D

11 2 3 4 5 6 7 8 9 2 3 4 5 6 7 8 9

TP102 TP103 TP104 TP105 TP106 TP107 TP108 TP109

IN0 IN1 IN2 IN3 IN4 IN5 IN6 IN7 3
¤

3
¤

D10 D11 D12 D13 D14 D15

3Q

4
1 

1

1

1

1

1

1

1

IC3 74HC273-SMD

+5V
TP111 TP112 


/Reset 

/Reset /WR D8 D9 D10 D11 D12 D13 D14 D15

1 11 3 4 7 8 13 14 17 18
" !  

CL CLK 1D 2D 4D 5D 6D 7D 8D
! ! 

VCC VCC 5
¥ 

5
D9 D10 D11 D12 D13 D14 TP114 TP115 TP116 1 F R E 2 1 TP118 C4 22µF-SMD-10V TP119
£ £    ¥

D8

1Q 2Q 3Q 4Q 5Q 6Q 7Q 6Q

2 5 6 9 12 15 16 19 T1 BF170-SMD

TP113

OUT0 OUT1 OUT2 OUT3

3D

D5 1N4148-SMD
¦

6
¦

TP117

D15

+5V

7

EI

VBAT

TP120 IC4 MPC1710-SMD

C1 10nF-SMD 1 2 


C2l C1h

TP121

3 15 C3 10nF-SMD

C1l VPP

H
9
¨

9
¨

F

6

Forw
%

R

7

Rew

10

Tout GND
9 


Date:
GND
12

30.05.1996 2/3

Revision:
1.0

30.05.1996

Page:

K-Team
D E F

INF-Ecublens 1015 Lausanne
£

A

B

C

G

©

1 0
©

E

8

Enable
'

+5V 

C2 10nF-SMD 

M2

11

OUT5b

Project: Khe.E.GenIO.00
Title:
GenIO Edoardo Franzi
&

Name:

§

8
§ 

16

C2h

M1

13

$

5

4

+ 7 

3 2

OUT4

GND GND

OUT5a 

/IRQ6

/IRQ6

TP110

/IRQ

£

(

¢ ¢  #  ¡ ¡    

   

G

1

2

4

6

8

1 0

A

B

C

D

E

F

1

TP200 VRef TP201

VRef VRef 2

2
1 TP202
¢

D6 BAT48-SMD

IC5a LMC6484-SMD

3

CH3

CH3

2 R2 1kΩ-SMD

1

2 1 3 2 P1 Pot-10kΩ-SMD R1 1kΩ-SMD R7 1MΩ-SMD

1

TP203

4
CH4 2 R4 1kΩ-SMD 7

6 1 2 P2 Pot-10kΩ-SMD R3 1kΩ-SMD R8 1MΩ-SMD 3

1

TP204 R10 1kΩ-SMD

CH5

2 R6 1kΩ-SMD

8

TP205 R11 1kΩ-SMD R5 10kΩ-SMD

TP206 TP207
£

IC5d LMC6484-SMD

12

14

13

+5V

C5 100nF-SMD

C6 100nF-SMD

C7 100nF-SMD

C8 100nF-SMD

Project: Khe.E.GenIO.00
Title: 1 0
©

GenIO
©

Name: Date: Page:

Edoardo Franzi 30.05.1996 3/3

Revision:
1.0

30.05.1996

K-Team
A B
¢ ¡  

INF-Ecublens 1015 Lausanne
£

C

D

E

F

G

¨

9
¨

§

8
§

£

7
)

GNA is connected to GND on the main board of Khepera

£

R9 10kΩ-SMD

¢

9

CH5-V2

GNA GNA

¦

6
¦

¢

D8 BAT48-SMD

IC5c LMC6484-SMD

10

CH5-V1

¥

5
¥

¢

D7 BAT48-SMD

IC5b LMC6484-SMD

5

CH4 4

¤

3
¤

£

¢ ¡

 

G

1

3

5

6

7

8

9

1 0

APPENDIX C

COMMUNICATION PROTOCOL TO CONTROL THE I/O
TURRET

The communication protocol allows complete control of the functionalities of the turret through a RS232 serial line. The connection configuration needed is presented in section 4.2 of the Khepera user manual. The setup of the serial line of your host computer must correspond to the one set on the robot with the jumpers (running modes 1 to 3). The protocol command for the I/O general turret are the same as for the basic configuration. In this appendix we will list only the commands that are related to the use of the I/O turret. As already described in Appendix A of the Khepera User Manual, the protocol is constituted by commands and responses, all in standard ASCII codes. A command goes from the host computer to the robot: it is constituted by a capital letter followed, if necessary, by numerical or literal parameters separated by a comma and terminated by a line feed. The response goes from the robot to the host computer: it is constituted by the same letter of the command but in lower case, followed, if necessary, by numerical or literal parameters separated by a comma and terminated by a line feed. To better understand this protocol we propose a very simple test as following: • Set the jumpers of the robot for running mode number 1 (See figure 4 of the Khepera User Manual). • Set the connection configuration presented in section 4.2 of the Khepera User Manual. • Start a terminal emulator on your host computer (for instance VT100) with the serial line set to 9600 Baud, 8 bit data, 1 start bit, 2 stop bits, no parity. • Connect the digital input number 0 to the ground (See also “Digital inputs” on page 3). • On your terminal type the string “R,32” followed by a carriage return or a line feed. “32” is the address of the digital inputs in the memory mapping of the extension bus. • The robot must respond with “r” followed by a 8 bits value corresponding to the 8 digital connections on the board. • Change the state of the digital inputs connections on the board and type again “R,32” followed by a carriage return or a line feed. Observe the result. • Try other commands:
¦ ¡ § ¨ § ¡ ©    ¢ £ ¤ ¥   ¡ ¡   ¡ ¡

19

List of Available Commands
(¶ replace a line feed, a carriage return or both)

I

Read A/D input
I, channel_number¶ i, Analog_value¶

Format of the command: Format of the response: Effect:
£     

Read the 10 bit value corresponding to the voltage present on the channel_number analog input. The value 1024 corresponds to an analog value of 4,096 Volts. Channels 0,1 and 2 are reserved for functionnalities of the basic configuration. The inputs available on the I/O turret correspond to the channels 3, 4 and 5 (See “Analog inputs” on page 5 for more details).
§ 

R

Read a byte on the extension bus
R, relative_address¶ r, data¶

Format of the command: Format of the response: Effect:
¡

Read the data byte available at the relative_address (0..63) of the extension bus. The 8 digital inputs on the I/O turret correspond to the 8 bits of the byte that can be read at relative address 32 (See “Digital inputs” on page 3 for more details). The read pulse is generated by reading a byte at relative address 36 (See “Digital inputs” on page 3 for more details).
¥

W

Write a byte on the extension bus
W, data, relative_address¶ w¶

Format of the command: Format of the response: Effect:
  ¡  ¤

Write the data byte at the relative_address (0..63) of the extension bus. The 8 digital outputs on the I/O turret correspond to the 8 bits of the byte that can be written at relative address 32 (See “Digital outputs” on page 3 for more details). The write pulse is generated by writing a byte (value is not important) at relative address 36 (See also “Digital inputs” on page 3 for more details). 

20