1 \documentclass[a4paper,
10pt, twocolumn
]{article
}
4 \title{Connecting an electronic compass to the Eyebot
}
6 \author{Petter Reinholdtsen $<$pere@td.org.uit.no$>$
\and
7 Mark Gaynor $<$mark@scouts.org.au$>$
\and
8 Klaus Schmitt $<$kschmitt@informatik.uni-kl.de$>$
}
15 \section{Introduction
}
17 During the fall of
1999, the CIIPS Glory robot soccer team started to
18 look into how to connect a compass to the Eyebot controller.
19 Initially, we used dead reckoning to keep track of the heading. This
20 method obviously do not work when the robot is pushed a little of
21 track, and is also accumulating error when the wheels slip. To
22 compensate for these problems and improve our results, we decided to
23 have a look at electronic compasses.
25 We first learned about one digital compass, the ``Vector
2X'' from
26 Precision Navigation, Inc. The ``Vector
2x'' is circa $
3.8 \times 3.3
27 \times 1$ cm. This
document gives a summary on how this driver works,
28 and how to connect and set up such compass with the Eyebot.
30 We later learned about the ``Analog sensor no.
1655'' from Dinsmore
31 Instrument Company, a analog compass delivering two output indicating
32 the heading of the compass. The ``Analog sensor no.
1655'' is circa
33 1.3 cm in diameter and circa
1.6 cm tall. This
document describe how
34 to connect and read out the heading from this compass.
36 \section{Digial compass
}
38 The digital compass is supposed to have accuracy of $
2^
\circ$. We
39 have not tested or verified this at the moment. We are running the
40 compass with maximum resolution and in master mode to get the heading
41 of the compass. With maximum resolution it gives an updated heading
44 \subsection{Wiring and connections
}
46 This compass could be used with or without an inverter. Without
47 inverters, the compass must be reset in soft software.
49 With inverters, DOUT
1 and
2 should be inverted, and RESET should be
54 \includegraphics[width=
3cm
]{vector2x
}
55 \caption{Vector
2x board layout
}
60 The digital compass get power (VCC) and ground (GND) from the Eyebot
61 PSD connector. It needs $
5 \pm 0.25$ Volt. The control signals to
62 the compass are connected to the Eyebot digital output connector
63 (DOUT). The control signals from the compass is connected to the servo
64 connector S12 (TPU
13) and the PSD connector. The compass connector
65 names and layout is shown in fig
\ref{fig:vector2x
}.
67 The wires should then connect as given in this table, with the
68 different connectors and connetor pin number given for the Eyebot
71 To make it possible to mount the compass upside down, the X and Y flip
72 pins should be connected to ground using a strap, to make it
73 configurable which way the compass should work.
77 \begin{tabular
}{|l|l|
}
79 {\bf Vector2x
} &
{\bf Eyebot
}\\
83 P1 (SCLK) & SERVO
1 (TPU) \\
87 P16 (GND) & PSD
1 (GND) \\
88 P15 (VCC) & PSD
3 (VCC) \\
89 P2 (SDO) & PSD
4 (DIN) \\
93 P5 (P/C) & DOUT
1 (DO5) \\
94 P6 (CAL) & DOUT
2 (DO6) \\
95 P17 (RESET) & DOUT
3 (DO7) \\
99 P10 (Y FLIP) & GND or N/C \\
100 P11 (X FLIP) & GND or N/C \\
117 \subsection{The driver
}
119 The compass driver is included in a modified version of RoBIOS
3.1.
120 The compass is set up using a hardware description table (HDT) entry
124 compass_type compass =
126 13, /* TPU channel - SCLK */
127 (void*)OutBase,
5, /* P/C */
128 (void*)OutBase,
6, /* CAL */
129 (void*)InBase,
5}; /* SDO */
131 HDT_entry_type HDT
[] =
134 {COMPASS,COMPASS,"COMPAS",(void *)&compass
},
140 The RoBIOS driver uses one Time Processor Unit (TPU) channel to
141 generate an interrupt on the rising edge of the SCLK signal. The
142 interrupt handler then reads out the current value of the SDO signal
143 on the digial input line given in the hardware description table.
145 When the compass is connected without an inverter, the RoBIOS kernel
146 must be compiled with
{\tt USE
\_COMPASS\_NO\_INVERTER} defined to use
149 \section{Analog compass
}
153 \includegraphics[width=
3cm
]{dinsmore-
1655}
154 \caption{Analog compass pins looking down through the sensor
}
159 \subsection{Wiring and connections
}
161 - Temperature control when soldering (documentation warning)
164 \begin{tabular
}{|l|l|
}
172 Curve
1 & AIN
3 (CH2) \\
180 Curve
2 & AIN
4 (CH3) \\
187 \section{Using the compass
}
189 - XXX describe generic API
191 int COMPASSInit (DeviceSemantics semantics);
193 int COMPASSCalibrate (int mode);
195 int COMPASSStart (BOOL cycle);
197 int COMPASSCheck (void);
199 int COMPASSGet (void);
201 int COMPASSStop (void);
203 int COMPASSRelease (void);
206 \section*
{References
}
208 http://dinsmoregroup.com/dico/
210 http://www.precisionnav.com/