10 DOF sensor board

Post Reply
bill516
Posts: 334
Joined: Sun Aug 07, 2011 12:27 pm

10 DOF sensor board

Post by bill516 »

Trying to get the board to work and I'm going round in circles
10DOF imu.jpg
. On board are L3G4200D Gyro, ADXL345 Accelerometer, HMC3885 Mag and BMP 085 Baro.

I wrote down what sensor was doing what when it was moved in the Roll Pitch and Yaw, pic is looking down Z with Y up the page and X across. According to the FAQ the readings should all be rising except mag z and acc z which should be falling in Roll. In Pitch they should do the same and Yaw they should rise. In Pitch there is very little movement of the Gyro, goes from about -1 to +1 thats why I wrote the up down arrow. Using the multiwiiwingui the response from gyros acc and baro seem to be right with the AH dipping to brown when I tip the board forward and blue when I tip up, Roll is correct with Horizon tipping to the left in Right roll, and vise versa.

The Mag in Roll is going down when it should be up and according the the GUI and Multiwiiwingui it is 180 deg out after calibration (numerous times). What do I need to do to get this Mag to sense properly.

Baro is responding to being raised above my head and being put on the floor, how it will behave outdoors might be a different matter.

bill516
Posts: 334
Joined: Sun Aug 07, 2011 12:27 pm

Re: 10 DOF sensor board

Post by bill516 »

Sorted there is now code for 10dof imuto go into the config.h and def.h on rc.groups.com.

Katch
Posts: 280
Joined: Thu Aug 04, 2011 1:44 pm

Re: 10 DOF sensor board

Post by Katch »

I'd be really interested to see how you get on with that board - I'm tuning a very similar IMU as yours with the same sensors.

It's very unstable at default PIDs so be prepared when you start flight testing.

bill516
Posts: 334
Joined: Sun Aug 07, 2011 12:27 pm

Re: 10 DOF sensor board

Post by bill516 »

Thanks for that and for the code you put up at rc groups, the same bill516 BTW. I have got it sorted of tuned in the GUI but I have yet to get it outside to get the final trimming done. In the GUI the trace isnt flat but the motor rpms are stable which is an improvement on what it used to be with wmp and nunchuck. I took the plunge and upgraded to the v2.0 code and its working fine on my XP lappy, on my Vista PC both v2.0 and 1.9 crash on me with this imu fitted, 1.9 is OK on the Vista with wmp nunchuck but the pc doesnt like the V2.0 code.

marbalon
Posts: 107
Joined: Thu Aug 18, 2011 10:59 am

Re: 10 DOF sensor board

Post by marbalon »

Please try to patch driver for L3G4200 provided here. You should see a difference.
viewtopic.php?f=8&t=1598&start=10#p13467

Regards,
Marcin.

bill516
Posts: 334
Joined: Sun Aug 07, 2011 12:27 pm

Re: 10 DOF sensor board

Post by bill516 »

Tried that patch, cant say it is that much different as I hadn't really got used to the Katch version.

I did need to alter the code slightly as I was getting i2c errors, although everything seemed to be working correctly albeit a little slow.
I changed the code i2c_writeReg(0XD2+0 ,0x20 ,0b01001111 )
to i2c_writeReg(0XD0+0 ,0x20 ,0b01001111 )

which was in the ciskje code I had from the seller, for all instances of i2c_writeReg(0XD2),

also needed to alter, void GET_gyro ADC
i2c_getSixRawADC(0XD2,0x80|0x28). After upload no more IC2 errors.

Basically where you see D2 changed to D0.

This is still on default settings with expo to 30 and rc rate to 65.

Post Reply