1 Introduction
2 ------------
3
4 The ben-pololu-imu distribution provides some programs that run on the Ben
5 NanoNote and control the Pololu MinIMU-9 board which provides a 3-axis
6 gyroscope, a 3-axis accelerometer, and a 3-axis magnetometer. To connect the
7 module to the Ben, the 8:10 port which is typically employed to access microSD
8 cards is instead used to hold a suitable breakout board that exposes the 8:10
9 port's connectors to other circuits. These connectors are in turn connected to
10 specific connectors on the MinIMU-9 as follows:
11
12 Sniffer UBB MinIMU-9
13 ------- ---- --------
14 DAT2 DAT2
15 CD DAT3 SCL
16 CMD CMD SDA
17 VCC VDD VIN
18 CLK CLK (3V)
19 GND GND GND
20 DAT0 DAT0 (1V8)
21 DAT1 DAT1
22
23 The 3V and 1V8 pins play no role in the communication, but a six pin header
24 exposing these pins on the IMU can be used to connect the IMU with the
25 Sniffer/UBB without any complications.
26
27 Building the Software
28 ---------------------
29
30 Before building the software, it will probably be necessary to edit the
31 Makefile to specify the locations of the cross-compilation toolchain and of
32 libubb. Obtaining a toolchain and libubb is currently beyond the scope of this
33 document.
34
35 The programs are built as follows:
36
37 make
38
39 Running the Software
40 --------------------
41
42 On the Ben, the programs can be deployed together with libubb in a particular
43 directory and invoked as described below.
44
45 As an alternative to deploying libubb and the programs together, the library
46 search path can be configured properly and the programs installed in such a
47 way that merely typing the name of the program is enough to run them.
48
49 The calibrate program just prints out readings from a particular component on
50 the MinIMU-9 board. For the gyroscope, accelerometer and magnetometer, it can
51 be run with the respective commands as follows:
52
53 LD_LIBRARY_PATH=. ./calibrate -g
54 LD_LIBRARY_PATH=. ./calibrate -a
55 LD_LIBRARY_PATH=. ./calibrate -m
56
57 The itest program is a graphical program which should be run when the Ben is
58 showing a console (and not any graphical environment); it is run as follows:
59
60 LD_LIBRARY_PATH=. ./itest
61
62 (It supports an argument -f which enables the high-pass filter on the
63 accelerometer, but this is generally useless.)
64
65 The imu program can be run as a textual or graphical program as follows:
66
67 LD_LIBRARY_PATH=. ./imu
68
69 The imu program accepts the following options:
70
71 -g Run in graphical mode. This should be done when the Ben is showing a
72 console and when other graphical programs are not using the
73 framebuffer. If omitted, the program will run in text mode.
74
75 -c Calibrate before attempting to interpret readings from the gyroscope
76 and accelerometer. This is highly recommended because uncalibrated
77 measurements will produce an inaccurate impression of the device's
78 rotation and motion.
79
80 Hardware: Pololu MinIMU-9
81 -------------------------
82
83 This board provides the L3G4200D 3-axis gyroscope and LSM303DLM 3-axis
84 accelerometer/magnetometer components from STMicroelectronics and is described
85 at the following location:
86
87 http://www.pololu.com/catalog/product/1265
88
89 Note that a different version of the board used the LSM303DLH component and is
90 described here:
91
92 http://www.pololu.com/catalog/product/1264
93
94 There are subtle differences between the LSM303DLM and LSM303DLH components,
95 and it is important to know which one is being used. Both of these boards have
96 now been superseded by the following MinIMU-9 v2 board which uses other
97 components:
98
99 http://www.pololu.com/catalog/product/1268
100
101 No support for the MinIMU-9 v2 board or the LSM303DLH variant of the MinIMU-9
102 is present in the software, currently, but other projects do provide support
103 for these other boards and can be studied to see what the differences are
104 between the different components involved.
105
106 Hardware: 8:10 Port Breakout Board
107 ----------------------------------
108
109 To connect the Ben NanoNote to the IMU board, a suitable breakout board is
110 required to expose the connections inside the 8:10 slot. To achieve this, the
111 Sparkfun microSD Sniffer has been used:
112
113 https://www.sparkfun.com/products/9419
114
115 This board is apparently intended for eavesdropping on communications between
116 a "host" device with a microSD slot and a microSD-based device that can be
117 inserted into a slot mounted on the board (instead of being inserted directly
118 into the host device). However, the board-mounted slot can be ignored and the
119 exposed connections routed to the display board instead.
120
121 Another board that achieves the same purpose is the Universal Breakout Board
122 (UBB):
123
124 http://en.qi-hardware.com/wiki/UBB
125
126 The UBB is somewhat more difficult to work with as its connectors are very
127 small and, compared to the microSD Sniffer, awkward to attach things to. The
128 microSD Sniffer employs connectors situated around holes with 0.1 inch
129 spacing, meaning that commonly available connection headers can be soldered
130 onto the board.
131
132 Although the labelling of the connections is different between the microSD
133 Sniffer and UBB (see above), the layout appears to be identical.
134
135 Contact, Copyright and Licence Information
136 ------------------------------------------
137
138 The author can be contacted at the following e-mail address:
139
140 paul@boddie.org.uk
141
142 Copyright and licence information can be found in the docs directory - see
143 docs/COPYING.txt and docs/gpl-3.0.txt for more information.