1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN"
2 "http://www.w3.org/TR/REC-html40/loose.dtd">
4 <META NAME=
"GENERATOR" CONTENT=
"TtH 2.67">
8 <title> Connecting an electronic compass to the Eyebot
</title>
10 <H1 align=
"center">Connecting an electronic compass to the Eyebot
</H1>
14 <H3 align=center
>Petter Reinholdtsen
< pere@td.org.uit.no
> ,
15 Mark Gaynor
< mark@scouts.org.au
> ,
16 Klaus Schmitt
< kschmitt@informatik.uni-kl.de
> </H3>
20 <H3 align=center
>2000-
03-
22 </H3>
23 <H2><A NAME=
"tth_sEc1">
24 1</A> Introduction
</H2>
27 During the fall of
1999, the CIIPS Glory robot soccer team started to
28 look into how to connect a compass to the Eyebot controller.
29 Initially, we used dead reckoning to keep track of the heading. This
30 method obviously do not work when the robot is pushed a little of
31 track, and is also accumulating error when the wheels slip. To
32 compensate for these problems and improve our results, we decided to
33 have a look at electronic compasses.
36 We first learned about one digital compass, the ``Vector
2X'' from
37 Precision Navigation, Inc. The ``Vector
2x'' is circa
3.8 ×3.3×1 cm. This document gives a summary on how this driver works,
38 and how to connect and set up such compass with the Eyebot.
41 We later learned about the ``Analog sensor no.
1655'' from Dinsmore
42 Instrument Company, a analog compass delivering two output indicating
43 the heading of the compass. The ``Analog sensor no.
1655'' is circa
44 1.3 cm in diameter and circa
1.6 cm tall. This document describe how
45 to connect and read out the heading from this compass.
48 <H2><A NAME=
"tth_sEc2">
49 2</A> Digial compass
</H2>
52 The digital compass is supposed to have accuracy of
2<sup><font face=symbol
>°
</font
54 have not tested or verified this at the moment. We are running the
55 compass with maximum resolution and in master mode to get the heading
56 of the compass. With maximum resolution it gives an updated heading
60 <H3><A NAME=
"tth_sEc2.1">
61 2.1</A> Wiring and connections
</H3>
64 This compass could be used with or without an inverter. Without
65 inverters, the compass must be reset in soft software.
68 With inverters, DOUT
1 and
2 should be inverted, and RESET should be
73 <p><A NAME=
"tth_fIg1">
75 <center><img src=
"vector2x.png" alt=
"vector2x.png"><br> <center>Figure
1: Vector
2x board layout
</center>
76 <A NAME=
"fig:vector2x">
81 The digital compass get power (VCC) and ground (GND) from the Eyebot
82 PSD connector. It needs
5 <font face=symbol
>±
</font
83 >0.25 Volt. The control signals to
84 the compass are connected to the Eyebot digital output connector
85 (DOUT). The control signals from the compass is connected to the servo
86 connector S12 (TPU
13) and the PSD connector. The compass connector
87 names and layout is shown in fig
<A href=
"#fig:vector2x">1</A>.
90 The wires should then connect as given in this table, with the
91 different connectors and connetor pin number given for the Eyebot
95 To make it possible to mount the compass upside down, the X and Y flip
96 pins should be connected to ground using a strap, to make it
97 configurable which way the compass should work.
103 <tr><td><b>Vector2x
</b> </td><td><b>Eyebot
</b></td></tr>
104 <tr><td>P1 (SCLK)
</td><td>SERVO
1 (TPU)
</td></tr>
105 <tr><td>P16 (GND)
</td><td>PSD
1 (GND)
</td></tr>
106 <tr><td>P15 (VCC)
</td><td>PSD
3 (VCC)
</td></tr>
107 <tr><td>P2 (SDO)
</td><td>PSD
4 (DIN)
</td></tr>
108 <tr><td>P5 (P/C)
</td><td>DOUT
1 (DO5)
</td></tr>
109 <tr><td>P6 (CAL)
</td><td>DOUT
2 (DO6)
</td></tr>
110 <tr><td>P17 (RESET)
</td><td>DOUT
3 (DO7)
</td></tr>
111 <tr><td>P10 (Y FLIP)
</td><td>GND or N/C
</td></tr>
112 <tr><td>P11 (X FLIP)
</td><td>GND or N/C
</td></tr>
113 <tr><td>P3 (SDI)
</td><td>N/C
</td></tr>
114 <tr><td>P4 (SS)
</td><td>N/C
</td></tr>
115 <tr><td>P7 (RES)
</td><td>N/C
</td></tr>
116 <tr><td>P8 (M/S)
</td><td>(GND)
</td></tr>
117 <tr><td>P9 (BCD)
</td><td>N/C
</td></tr>
118 <tr><td>P12 (CI)
</td><td>N/C
</td></tr>
119 <tr><td>P13 (EOC)
</td><td>N/C
</td></tr>
120 <tr><td>P14 (RAW)
</td><td>N/C
</td></tr></TaBle>
125 <H3><A NAME=
"tth_sEc2.2">
126 2.2</A> The driver
</H3>
129 The compass driver is included in a modified version of RoBIOS
3.1.
130 The compass is set up using a hardware description table (HDT) entry
136 compass_type compass =
138 13, /* TPU channel - SCLK */
139 (void*)OutBase,
5, /* P/C */
140 (void*)OutBase,
6, /* CAL */
141 (void*)InBase,
5}; /* SDO */
143 HDT_entry_type HDT[] =
146 {COMPASS,COMPASS,"COMPAS",(void *)
&compass},
153 The RoBIOS driver uses one Time Processor Unit (TPU) channel to
154 generate an interrupt on the rising edge of the SCLK signal. The
155 interrupt handler then reads out the current value of the SDO signal
156 on the digial input line given in the hardware description table.
159 When the compass is connected without an inverter, the RoBIOS kernel
160 must be compiled with
<tt>USE_COMPASS_NO_INVERTER
</tt> defined to use
164 <H2><A NAME=
"tth_sEc3">
165 3</A> Analog compass
</H2>
169 <p><A NAME=
"tth_fIg2">
171 <center><img src=
"dinsmore-1655.png" alt=
"dinsmore-1655.png"><br> <center>Figure
2: Analog compass pins looking down through the sensor
</center>
172 <A NAME=
"fig:dinsmore">
177 <H3><A NAME=
"tth_sEc3.1">
178 3.1</A> Wiring and connections
</H3>
181 - Temperature control when soldering (documentation warning)
187 <tr><td>VCC
</td><td>AIN
1 </td></tr>
188 <tr><td>GND
</td><td>AIN
9 </td></tr>
189 <tr><td>Curve
1 </td><td>AIN
3 (CH2)
</td></tr>
190 <tr><td>VCC
</td><td>AIN
2 </td></tr>
191 <tr><td>GND
</td><td>AIN
10 </td></tr>
192 <tr><td>Curve
2 </td><td>AIN
4 (CH3)
</td></tr></TaBle>
197 <H2><A NAME=
"tth_sEc4">
198 4</A> Using the compass
</H2>
201 - XXX describe generic API
204 int COMPASSInit (DeviceSemantics semantics);
207 int COMPASSCalibrate (int mode);
210 int COMPASSStart (BOOL cycle);
213 int COMPASSCheck (void);
216 int COMPASSGet (void);
219 int COMPASSStop (void);
222 int COMPASSRelease (void);
229 http://dinsmoregroup.com/dico/
232 http://www.precisionnav.com/
236 <p><hr><small>File translated from
237 T
<sub><font size=
"-1">E
</font></sub>X
238 by
<a href=
"http://hutchinson.belmont.ma.us/tth/">
239 T
<sub><font size=
"-1">T
</font></sub>H
</a>,
240 version
2.67.
<br>On
26 Apr
2000,
15:
24.
</small>