I've designed and built a small IMU add-on for the mbed. It adds a triple axis gryo (ITG3200), triple axis accel (ST LIS331DLH), a microSD card slot, triple axis magnetometer, a li-po power jack on the back side (probably requires a minimum of 2 cell battery), and pin headers that let it snap right onto an mBed.
So far I've gotten raw counts out of the gyro (thanks to Aaron's library here: http://mbed.org/cookbook/ITG-3200-Gyroscope ), and raw counts from the Accel. I'll publish my accel lib shortly. All it can do is just the accels, and I'd like to add some additional commands to better setup the chip. (But if anyone wants it as it is now, let me know and I'll publish it now)
11/16/10 - Got IMUfilter up and running. Linked the mbed/imu to matlab over the serial port and got three orthogonal rods to sort of track the mbed's position.
1/11/11 - - Got SDCard interface working. Many thanks to Klaus Bu's SDHC MicroSD card library. It worked great on my 16GB card. You can get it here: http://mbed.org/users/xxll/programs/SDHCFileSystem/5zdtq - Populated the magnetometer, and it also works correctly. I recorded two data sets from RC helicopters. They are available for download /media/uploads/atommota/mikeb_-_flight_1.txt and /media/uploads/atommota/johans_-_flight_1.txt here if anyone would like to play with some 9axis inertial sensor data. The data is formatted as follows: Time (sec), Accel (raw counts - divide by 4096 to get Gs) X, Y, Z, Gyro (rad/sec) X, Y, Z, Mag (raw counts) X, Y, Z
Here is a Matlab script to import, convert accels to G's and plot. /media/uploads/atommota/postprocessimu.m
- DONE (1/11/11): Get SDcard interface working. Only have a 16gb card to test with now, and its proving difficult.
- DONE (1/11/11): Order and populate the magnetometer. UPDATE: Ordered. Will be here and populated by Thursday.
- Swap out the current IMUFilter http://mbed.org/users/aberk/libraries/IMUfilter/lebv20 and build up a Kalman filter implementation
- Here are PDFs of the designs:
ZIP of Eagle PCB/SCH Files: /media/uploads/atommota/mbed_imu_daughterboard_files.zip
Additionally, I'll probably be putting in another order for the pcb's so if anyone wants to build their own copy, let me know and I can get some extras for whoever is interested.
Quick Start Guide and Basic Documentation
Since a few people have built their own or purchased completed copies of this board it was time to put together a brief documentation and reference area for it.
p9 = Accel, Gyro, Magnetometer - i2c Data Line
p10 = Accel, Gyro, Magnetometer - i2c Clock Line
p28 = Accel INT Line
p29 = Accel INT Line
p30 = Gyro INT Line
All of the INT lines (digital I/O, i2c, serial, and CAN) may be used for other purposes by default. They need to be explicitly enabled inside the sensors via i2c commands if you would like to make use of the sensor's interrupt functionality.
p5 = microSD Card - SPI MOSI
p6 = microSD Card - SPI MISO
p7 = microSD Card - SPI Clock
p8 = microSD Card - Card Select
GND and VIN are connected to the two pads on the backside for soldering a lipo battery socket on. I've never actually used these, choosing to just solder a 9V battery clip to the outside row of holes for power
I2C 7-Bit Device Addresses
LIS331(DLH/HH) - 0x19 (DLH is the standard option, HH is the high g version for rockets)
ITG3200 - 0x68
HMC5843 - 0x1E
Acceptance Test Program
This will demo the basic functionality
Many thanks to Scott O. for catching some of my errors and general feedback on my board. Check out his project over here: http://mbed.org/users/scotto/notebook/scottrov1/
7 comments on IMU Daughterboard:
Please log in to post comments.