Developer

Final version of ArduIMU (Include Video)

After a few more tests, I now have the final version of the ArduIMU. The main problem was the calibration of the gyros: converting the raw data to degrees/s. I had to change the source code, compile it, upload, and repeat it over and over again. Totally waste of time.So i configured Arduino to externally adjust the gyros and the accelerometer jitter filter, using the nunchuck potentiometers (joystick axis). Now it’s working pretty well. =)Please, in the source code, ignore all the lines marked with "//(kalman)", this lines are related to the kalman filter code, those marked by "//(nunchuck) are related to nunchuck accelerometer and axis control, and all marked by "//(gyro)" are code related to the control of the gyroscope.Another tip, all the data is processed in radians, then is converted to degrees (radian*180/PI = radians*57.295779= degrees). If somebody needs any help, please feel free of asking me.Video:-Yellow color = Just Accelerometer read-Red color= Accelerometer+Gyro+KalmanFIiter
Arduino Source Code: http://sites.google.com/site/jordiuavs/Home/kalman_filter_by_Jordi.txt Labview (ground station) source code: http://sites.google.com/site/jordiuavs/Home/kalman_filter_by_Jordi.txt

To do: -Integrate another Gyro (to make it dual axis) . -Program the SPI altimeter.-And put all the hardware together and make it work (GPS, Altimeter, IMU, Modem).

Done: -Servo control -Gps Waypoint navigation (I’ll post later about it).

The next article I'm going to post all the links to get started with Arduino environment. All you would need to learn: tutorials, examples, references, tips and tricks. If you already know C++ it’s going to be 99% easier. If not, you are going to discover why C/C++ is the most compressive and famous language ever ;-) Then jumping to any AVR, ARM, PIC microcontroller C/C++ language environment, is going to be a lot easier, because they’re all based on the same principles.

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • Jordi, Please tel me which is the procedure to use the Labview (Ground Station) source code. I would like to reproduce your image with the arrows indicating the change of the direction connected withe the orientation of the board. A bientôt, Georges
  • Hi,

    Thank you very much for your code, but I still have something don't understand.

    I have a board that has both accelerometer(ADXL330) and gyro(ENC-03) in it. Is the function analogRead(inputPin); used to get the gyro value from ADC? Is the function print() used to get the value from accelerometer?

    What is that unit of the value read from analogRead()? Is it MV?



    Regards,
    ZhangZQ
  • Developer
    I already sent it to you email...
  • I am making the saming thing, I used ENC-03 for gryo and ADXL330 for accelermeter. And I got the output value from ENC-03 when I shake it and got the following value(unit:mv)
    1324
    1374
    2261
    1930
    1444
    1086
    0427
    0087
    1107
    2997
    0102
    2997
    0093
    2997
    1250
    0084
    2997
    0752
    0090
    2997
    0099
    2997
    0099
    2997
    0096
    2997
    0087
    0357
    2997
    0093
    0480
    1359
    2405
    1403
    1054

    how Can I use that Kalman() get the angle value?
    I can not access http://jordii07.googlepages.com/ArduIMUFinal.txt, maybe it is blocked by ISP here, can you email me that article? thank you very much!

    my email: zhangzq71@hotmail.com
  • hi.very good job. I think i need you. I'm doing a INS/GPS integrated positioning system with Kalman filtrer in C code for a little ship. Do you have somethingh for help me?
    thank you very very much from Italy.
  • Will the bluetooth arduino be fast enough to get the data from sparkfun 6dof bluetooth and process through a kalman filter on 3 axis?
  • Thank you for your great work. I am going to use this as a base to make a Arduino IMU based on a Sparkfun 5DOF.
  • I just set up a blog for the project:
    Maybe you can take advantage of what I found out and did so far ... (of course with credits to all the people i use code of.)
    I am going the "library" and function approach.

    And the Heli i got is cheap and reliable for this :-)
  • Hi Jordy,
    Thank you so much ... I try to figure this out now.

    Currently my only plan is to provide nick/roll stabilization (my 4 year old son wants to fly my heli :-))
    and the gear is stabilized by a AVCS (Angular Velocity Control System) gyro anyway. And therefore i just want to use the Kalman filter for nick and roll "denoising".
  • Developer
    Sorry my function is diferent you need to give the pitch or roll angle obtained just with the accelerometer:

    angle_m= arcTan(axisX,AxisZ);

    X= is for the pitch
    Y=For the roll
    Depends in the way you positioned your accel..
This reply was deleted.