HobbyKing.com New Products Flash Sale
Reply
Thread Tools
This thread is privately moderated by Jack Crossfire, who may elect to delete unwanted replies.
Old Feb 13, 2013, 02:01 AM
Registered User
Jack Crossfire's Avatar
Calif*
Joined Sep 2006
2,042 Posts
Discussion
I2C & MPU9150 notes

So there was another bug somewhere in the software I2C library of the past several years, causing lots of problems with the MPU9150. It was also dreadfully slow at reading modern chips, which increasingly use I2C for high speed broadband.

With the ARM at 168Mhz, consuming 60mA, doing nothing else, it only got 348 readings/sec out of the MPU9150 & managed to bit bang I2C at only 169khz. That's equivalent to what the Ladybird's piss poor Xmega16D4 did for just the gyros, so the Ladybird probably needed 1000 readings/sec to be stable.

Fortunately, a hardware I2C port happened to be available on the ARM without enlarging the board. The hardware only managed 200khz on the I2C bus, but thanks to not having any bugs, it could burst transfer out 736 readings/sec with much less CPU time. The MPU9150 bypass register worked.

Just reading the gyros, it can do 1400 readings/sec. There are ways to throttle bandwidth to the gyros to get a 1300hz gyro reading, 50hz accel reading, & 50hz mag reading, but too bad I2C can't go above 200khz.

Software I2C is still needed for the slower sensors, to minimize board space. That library has had endless bugs, but it always worked well enough & it came from a goog search.

Even with all this CPU power, the trend is to continue doing AHRS on the ground instead of the air. There are so many autopilots & each new implementation of AHRS on a microcontroller is still a major operation. It still needs a lot of either fancy fixed point or floating point compiler magic.
Jack Crossfire is online now Find More Posts by Jack Crossfire
RCG Plus Member
Last edited by Jack Crossfire; Feb 13, 2013 at 02:12 AM.
Reply With Quote
Sign up now
to remove ads between posts
Reply

Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Help! MikroKopter BL Cntrl vs I2c with simon k Nikhilrobologix Multirotor Electronics 3 Jan 22, 2014 05:28 AM
Sold Mikrokoper/ MK clone + I2c Converter kanchana Aircraft - Electric - Multirotor (FS/W) 0 Jan 24, 2013 11:47 PM
For Sale 6 18 amp I2C ESCs jihlein Aircraft - Electric - Multirotor (FS/W) 0 Jan 22, 2013 12:59 PM