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