Table of contents
3.Introduction
4.Specification requirements
5.Solutions suggestions
6.The magnetic fields sensors
7.The inclination measurement system
8.The gyroscope
9.The data acquisition system
10.Communication system
11.The power supply
12.Realisation of the PCB
13.The embedded system
14.Static Library Util.a
15.ViewPort
16.Xcompass
17.Sensors controller commands
18.Test
19.Future improvements
20.Conclusion
21.References
We have seen from the Table 3 that the calculation of the azimuth
is hardly dependent to the tilt value. The purpose of this part is to implement
a system to measure the inclination of the robot to counteract this effect.
The accelerometer is the simplest way to obtain the tilt value.
When the accelerometer is stationary (no
lateral or vertical acceleration are present) the only force acting on the
sensor is the earth gravity. The inclination is then the angle between the
gravitational force and the sensitive axis. Since this axis lies on a
horizontal plane, the inclination can be measured from any initial
accelerometer orientation. Therefore, we have the choice to design our
accelerometer initial position either on a vertical or horizontal PCB:
Figure 16: Twoaxis inclination from horizontal
Figure 17: One axis inclination from vertical
While the first configuration (Figure 16) is limited to an angle of 60° on to two axis,
the second configuration (Figure 17) get a better resolution through 360° arc but on only one axis.
Consequently, this last solution requires two accelerometers to detect the tilt
according two axis. This solution increases the cost and the space on the PCB.
In our application, the inclination angle should never exceed ± 30° from the
horizontal.
Regarding this consideration, the first
configuration has been chosen to design the inclination measurement system.
The Equation 6 gives the measure of the
inclination:
a = sin^{1}(A / g)
a: Inclination angle [radian]
A: Accelerometer outputs [N.m1]
G: The earth gravity [N.m1]
Equation 6
After calculation, the accelerometer will
then be able to measure the inclination with a precision below 0,1°. However,
an acceleration of the robot will introduce a noise. A post treatment needs to
be applied:

A low pass filter is a first hint. Indeed, acceleration
leads to an important variation during a short time contrary to the tilt that
must be a progressive variation during a long time.

Indirectly, the gyro will also make the
difference.

The value of the acceleration could also be
directly sent from the odometry.

To use of a third axis that will vary only if
the acceleration detected on the horizontal plan is due to an inclination.
To detect the tilt we have chosen to use
a 2axis accelerometer. Consequently, the oneaxis sensors have been eliminated
of our selection. We first looked the characteristics of the accelerometer
proposed by Analog Devices (already implemented on the UAV):
Name

ADXL250

ADXL203

AccelICP1X3001FP

Range [g]

±50

±1,7

±50

Sensitivity[mV/g]

38

1000

100

Noise density [mg/vHz]

1

0,15

1

Size (length*Width*height) [mm]

5*5*2

5*5*2


Product

Analog Devices

Analog Devices

SuperLogics

Price [$]

11,33

12

80

Table 4: Accelerometers from Analog Devices
To compare the competitiveness of these last
ones, we have looked for different other components available on the market:
Name

MXA2500ML

MXA6999MP

KX120

Range [g]

±1

±1

±2

Sensitivity[mv/g]

500

1000

1000

Noise density [mg/vHz]

0,2

0,4

0,2

Resolution [mV]

±0,5

±1


Size (length*Width*height) [mm]

5*5*2

5*5*2


Product

Memsic

Memsic

Kionix

Price [$]

9,30

9,75


Table 5: Accelerometers from Memsic and Kionix
The accelerometers from Kionix and Analog
Devices have similar results in test (low noise and high sensitivity) and
better characteristics than the products of Memsic. Nevertheless, these last
ones offer additional an output such as a temperature and a voltage reference
(only for the MXA2500ML). In consequence, for a conception facility we have
decided to implement this accelerometer.
At 0g, the signal in the output of the
signal equals to 1,25V and it vary around this value, whereas the signal in the
input of the ADC should be centred in 2,048V. In addition, low pass filter has
to be applied on these signals. An amplification and a filter will be used as
shown on the Figure 7: Amplification schematic 1 with a INA2126 amplifier.
Figure 18: The tilt's circuit
7.3.1.
The filter
The datasheet of the MXA2500ML recommend
filtering each signal at 200 Hz to eliminate the noise floors:
f = 1 / (2pRC) and R = 40kW Ž C = 1,98.10^{8}
Note: The value of R corresponds to the
value of the INA2126’s inner resistor.
The normalised value 22nF for the
capacitor has been chosen and therefore we have obtained a low pass filter at
180Hz.
7.3.2.
The amplification
The gain G of the previous circuit is
adjusted by the value of the resistance R_{gain} according to the
following equation: G = R / R_{gain}.
This gain should not be superior to a
maximum gain to avoid that the variation of the acceleration below 2,048V.
The typical sensitivity of this device is
500mV/g at 25°C. However, this characteristic changes over temperature according
the following equation:
Si * Ti = Sf * Tf
S_{i}
and S_{f} are the initial and current sensitivity
T_{i
and }T_{f} initial and current temperature
Equation 7
Consequently, we consider the maximum
variation of temperature possible 50°. Then the maximum value for the
sensitivity could be:
S_{f} = (S_{i}
* T_{I}) / T_{f} Ž S_{f }» 600mV/g
As the measurement range is ±1g, we can
deduce that the maximum variation will be ±600mV. Then the maximum
gain authorised is:
G_{max} = 2048 / 600 Ž G_{max}
< 3,4
Then R_{gainmin} = R
/ G_{max} Ž R_{gainmin} » 11,05kW
Therefore we have chosen the normalised
value 13kW for the resistance R_{gain} and we have then a gain equals
to 3,08.
We can consider that the maximum noise
density will be equal to 0,4mg/ÖHz on the bandwidth of the frequency response (20Hz). So we can calculate
the rms noise from this information:
Noise [mg rms] = Noise density [mg/ÖHz] * Ö(Bandwidth [Hz]
* 1,6)
Ž Noise_{max}
»
2,26 mg rms
Ž Noise » 1,13 mV
The maximum value of the noise amplified
in the response frequency is about 3,4mV.
7.3.3.
The voltage and the temperature reference
One of the reasons why we chose this
component is that it offers a voltage and a temperature reference. The value of
this last one is send to the microcontroller (on the card 1 and on the MAX186
on the card 2) and will allow us to compensate the derive of the acceleration’s
output due to the variation of the temperature and to calibrate correctly this
device from this value.
The voltage reference is used to
calculate the acceleration on each axis. The 0g output is equals to 1,25V,
which corresponds to this reference divided by two. It follows that we will
refer to this voltage to amplify the output variation.
