|Feb 13, 2013, 03:01 AM|
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.
|Thread||Thread Starter||Forum||Replies||Last Post|
|Help! MikroKopter BL Cntrl vs I2c with simon k||Nikhilrobologix||Multirotor Electronics||2||Feb 09, 2013 03:57 PM|
|Sold Mikrokoper/ MK clone + I2c Converter||kanchana||Aircraft - Electric - Multirotor (FS/W)||0||Jan 25, 2013 12:47 AM|
|For Sale 6 18 amp I2C ESCs||jihlein||Aircraft - Electric - Multirotor (FS/W)||0||Jan 22, 2013 01:59 PM|