This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
ronco
Posts: 317 Joined: Thu Aug 18, 2011 2:58 pm
Post
by ronco » Wed Feb 06, 2013 11:50 am
Hi,
i did some tests with the MMA8451Q (
http://cache.freescale.com/files/sensor ... A8451Q.pdf ) it seems to be a good one
i did a I2C support code that works .. i dont know if its good .. it may be improved with LPF settings and such stuff..
Code: Select all
// ************************************************************************************************************ // I2C Accelerometer MMA8451Q // ************************************************************************************************************ #if defined(MMA8451Q) #define MMA8451Q_ADDRESS 0x1C (standard) //#define MMA8451Q_ADDRESS 0x1D void ACC_init () { delay(10); i2c_writeReg(MMA8451Q_ADDRESS,0x2A,0x05); // wake up & low nois delay(10); i2c_writeReg(MMA8451Q_ADDRESS,0x0E,0x02); // full scale range acc_1G = 512; // should be 1023 but 512 is knowen in MWC } void ACC_getADC () { TWBR = ((F_CPU / 400000L) - 16) / 2; i2c_getSixRawADC(MMA8451Q_ADDRESS,0x00); ACC_ORIENTATION( ((rawADC[1]<<8) | rawADC[0])/32 , ((rawADC[3]<<8) | rawADC[2])/32 , ((rawADC[5]<<8) | rawADC[4])/32); ACC_Common(); } #endif
//as im on a new PC with win 8 .. i still dont get My SVN clinet to work //so would someone here be so kind to add this support ? Edit:
it workes now .. and i added the support
Thanks
regards
Felix
Last edited by
ronco on Wed Feb 06, 2013 12:57 pm, edited 1 time in total.
timecop
Posts: 1880 Joined: Fri Sep 02, 2011 4:48 pm
Post
by timecop » Wed Feb 06, 2013 12:01 pm
wow, that's pretty awesome! Where'd you find such amazing accel?
ronco
Posts: 317 Joined: Thu Aug 18, 2011 2:58 pm
Post
by ronco » Wed Feb 06, 2013 12:06 pm
hi,
from freecale
.. it will be on a new flyduino FC.. we testing the prototypes ATM
regrads Felix
timecop
Posts: 1880 Joined: Fri Sep 02, 2011 4:48 pm
Post
by timecop » Wed Feb 06, 2013 12:12 pm
Nice to see Flyduino doing all this innovation!
ronco
Posts: 317 Joined: Thu Aug 18, 2011 2:58 pm
Post
by ronco » Wed Feb 06, 2013 12:59 pm
.. somehow i cant belive that you mean what you say
but if so .. thanks .. ill try to do my best.
i added the MMA8451Q support now .. and also the defines for the new Flydu Ultra FC
regards
Felix
jy0933
Posts: 180 Joined: Wed Jun 27, 2012 4:24 pm
Post
by jy0933 » Thu Feb 07, 2013 1:49 am
if you guys dont mind me ask what is the advantage of this over adxl345 or mpu60xx?
timecop
Posts: 1880 Joined: Fri Sep 02, 2011 4:48 pm
Post
by timecop » Thu Feb 07, 2013 2:21 am
The advantage is flyduino has a lot of these in stock, so they gotta use them for something, hahaha.
ronco
Posts: 317 Joined: Thu Aug 18, 2011 2:58 pm
Post
by ronco » Thu Feb 07, 2013 10:47 am
jy0933 wrote: if you guys dont mind me ask what is the advantage of this over adxl345 or mpu60xx?
hi,
basicly it is just like many other ACC's with a high resolution but it has some extra features that may be helpful .. the problem with MPU6050 only setups is that you can just setup one LPF fore both gyro and ACC ..
so a seperate acc inst that bad if you have space for it
regards
felix
jy0933
Posts: 180 Joined: Wed Jun 27, 2012 4:24 pm
Post
by jy0933 » Thu Feb 07, 2013 11:01 am
i think current mwc code only has gyro_lpf for setup for now.... the acc still under the LPF_factor thing..not a stand alone(user adjustable ) lpf but yeah.. will be pretty interesting to see how a separate lpf works out.... (personally i think the separate acc lpf might help with alt maintain on Z axis readings)