tinyIMU v2 inertial measurement unit

tinyIMU V2 is a sensor unit useful for building quadrocopters or other platforms where you need to know the orientation of the given platform. It uses the MMA7455 3-axis accelerometer from Freescale with 10 bit output and the ITG3200 3-axis gyroscope from Invensense with 16 bit output. The PCB was designed to be as small as possible to save weight and space (both important parameters when flying). There is only a 4 pin header present on the PCB for power and I2C lines. The schematics and PCB was designed in Eagle and I’m releasing it under CC BY-NC-SA 3.0 (download link bellow).

This sensor unit has already been used successfully with AeroQuad software and its just a matter of having the right drivers for the sensors to use it with other platforms as well.

here is a video with tinyIMU connected to AeroQuad:
You need to a flashplayer enabled browser to view this YouTube video

tinyIMU V2 schematics + PCB

ATAVRSBIN1 and Bus Pirate

So in my last post I was telling you how I managed to mess up the ATAVRSBIN1 I got from Atmel during a crash with the quad. After the crash I noticed it didn’t respond any more so I hooked it to my Bus-Pirate and the result of a search on the bus was not pretty, no device found:

Searching I2C address space. Found devices at:
Warning: *Short or no pull-up

But I figured maybe one or two of the chips (ITG3200, AK8975 and BMA150)survived and the other one who got damaged is keeping the bus low, or shorted or whatever. So I decided to de-solder the chips one by one to find if any still works. I started with the ITG3200 gyro, removed it and the same error, no device found, next I continued with the BMA150 accelerometer and success!:

Searching I2C address space. Found devices at:
0x18(0x0C W) 0x19(0x0C R)

When there was only the AK8975 magnetometer left it replied. I also tried soldering back the ITG3200 but it didn’t work. So I was only left with the AK8975 but that’s useful for comparing with the other magnetometer that I’m working with the LSM303DLHC from STmicro. I guess you could call this whole incident a stress test and I’ve determined that out of the 3 chips only the AK8975 survived in conditions above its maximum ratings :).

Now for reading something out of the sensors I tried reading the WIA register which holds a fixed value(0x48 as mentioned in the datasheet) set during manufacturing. The WIA register is at 0x00 address so start by writing the address of the register then perform 1 read:

I2C>[0x18 0x00]

next perform 1 read:

I2C>[0x19 r]
READ: 0x48

And the returned value 0x48 matches the one from the datasheet. I’ve gotta say the BP helped allot during this debug session and it would’ve been much harder without it.

AVR ISP MKII Entering programming mode failed

If you ever get the message “Entering programming mode.. FAILED!” while trying to program your AVR device don’t start messing with your MKII or upgrade its firmware 10 times or messing with the windows drivers like I did, cause that’s probably not the cause and you risk damaging you’re perfectly working MKII. As it turns out its just a faulty connection between the programmer and the target board. This is not likely to happen if you only use the programmer occasionally but I used it for like 50+ times a day and that meant inserting and removing the little 6pin connector a bunch of times. I removed the old 6pin connector, crimped a new one and its working again, so long live the MKII because it is a great tool.

You might be wondering why would I need to use that many times, well its because I’m working on this new project, a quadrocopter based on an atmega64. The microcontroller was chosen because I had a bunch around and ATMEL was kind enough to send me a ATAVRSBIN1 for my project.


The Inertial One System Board delivers a full 9 degree of freedom sensor platform comprising a 3 Axis Magnetometer from AKM (AK8975); 3 Axis Accelerometer from Bosch (BMA150) and a 3 Axis Gyroscope from InvenSense (ITG-3200) connected through an I2C interface.

At $54 its probably the most accessible 9DOF breakout out there and it comes with great sensors. Unfortunately I only managed to test and fly with the ITG-3200 gyro before I had a crash(you crash allot when developing from scratch a new firmware for a quad). Because of the crash a short-circuit happened somewhere on my board and it messed up the ATAVRSBIN1 sensors.

The ITG-3200 is a very good gyro with low noise so to replace the damaged ATAVRSBIN1 and to continue flying I got a wii motion plus which has the ITG3205 inside(its supposed to be just an OEM version of ITG3200). I haven’t done allot of testing with this new ITG3205 but I did notice some problems on the I2C bus, like sometimes the sensor does not respond , which is strange.(maybe the 400KHz freq is too high for the ITG3205 ?).

Anyway enough for now, I’ll post some updates on the project soon.

© 2007-2011 YourITronics | Any logo, trademark and project represented here are property of their respective owners | Wordpress | Privacy Policy    RSS