Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Sparkfun 9DOF sensing roll pitch and yaw, displaying figure in labview.

Solved!
Go to solution

Hi! I'm currently doing my final year project. One of my project task is to programme the Sparkfun 9dof IMU. I can get the accelerometer and gyroscope data except for the magnetometer. The data for magnetometer does not seems correct. Thus, I need some solution idea for this. 

 

Thank you. 

Sky.

0 Kudos
Message 11 of 23
(9,755 Views)

Sky,

 

Before anyone can help, you must explain more about the problem you have 🙂

 

Usually Magnetometers need proper calibration and you must not place the IMU near any electric motor, steel structure or other magnetic materials.

 

Br,

 

/Roger

 

0 Kudos
Message 12 of 23
(9,743 Views)

Sorry, I forgot to explain further 🙂

 

I came out with a programme of the IMU. It seems to work fine except it cannot get the magnetometer right. I attached a file of the programme. When I tilt my IMU down, the Down and Move Down LED will light up. But when I tilt to the right, left and up, it will not light up at all. So I don't know what is the problem actually. Whether it got to do with the calibration or the programme.

 

:))

0 Kudos
Message 13 of 23
(9,734 Views)

theres quite a number of missing sub VI =( 

0 Kudos
Message 14 of 23
(9,727 Views)

Before anyone can properly help it's of good practise to present somehow "clean" labview code in the forums.

There are numerous examples on various internet websites on how to program labview for readable code. As a side benefit, you would have an easier time debugging yourself.

 

However, a first step to make your code more readable would be to replace the arrays with IMU data by averaging and scalars in the wires.

Also to use sub-vi's for all the duplications going on in the VI.

 

Br,

 

/Roger

 

0 Kudos
Message 15 of 23
(9,718 Views)

Me thinks not. 😉

 

All VI's are included in the zip.

 

Maybe there is someting missing in your LV installation?

 

Br,

 

/Roger

 

0 Kudos
Message 16 of 23
(9,715 Views)

oh sorry ! my mistake. im able to run it, but is it normal when the figure at the outer ring move very fast ? 

sorry for asking stupid question cause i've never study about all these at all, im just trying to get what my lecturer wants me to do. so sorry. sorry to trouble you. 

0 Kudos
Message 17 of 23
(9,710 Views)

Sze, questions about the Sparkfun products is best placed in their forums. 😉

 

However, it sounds like your IMU need some calibration. So you probably should download the Arduino development environment and the source code for whatever is running on your Razor IMU.

 

Check out this tutorial and videos:

 

https://forum.sparkfun.com/viewtopic.php?f=14&t=30736

 

Br,

 

/Roger

 

0 Kudos
Message 18 of 23
(9,708 Views)

25.PNG

 

i've uploaded the lastest code found in the sparkfun forum. 

however when i debug my VI , the waveform and the reference out is not moving at all =(

what is happening ? stress =(

0 Kudos
Message 19 of 23
(9,693 Views)

Try this:

 

YPR.JPG

 

See if it works?

 

Br,

 

/Roger

0 Kudos
Message 20 of 23
(9,689 Views)