Using Arduino to Obtain Absolute Orientation from a 6-Axis Gyro

In summary, the conversation discusses the use of a gyro with 6 inertial axes and 3 magnetic axes to obtain the absolute orientation of a model rocket in real-time. The participants also mention using accelerometers and magnetometers to measure acceleration and local magnetic field orientation, respectively. Additionally, the conversation touches on the use of servos and thrust vectoring or fin angling for control, as well as the integration of body rates to determine orientation. The participants also mention the use of MATLAB code for sensor fusion and calculations, and the potential changes in dynamics during flight as fuel is consumed.
  • #1
Leo Liu
353
156
The gyro has 6 inertial axes and 3 magnetic axes. How do I make them work together to get the orientation of the rocket in the reference fixed to the ground? I found something from Matlab but I am not sure how it works: https://www.mathworks.com/help/fusi...sing-Inertial-Sensor-Fusion-and-MPU-9250.html. Also it doesn't suit my purpose since I would like to compute the absolute orientation in real time on the Arduino.

Could someone help me out please?

PS My end goal is to build a model rocket with attitude control, but for now I just want to record orientations and accelerations. I will be using Arduino for my project.

PS2 I realized the real question is how to obtain the absolute orientation from the gyro angular speeds.
 
Last edited:
Physics news on Phys.org
  • #2
There are three perpendicular accelerometers.
There are three perpendicular rotation rate-meters.
There are three perpendicular magnetometers.

Start with the rocket vertical, and with a reference to North.
Use the accelerometers to find the vertical axis. Measure g.
Use the magnetometers to find local magnetic field orientation.
Record the zero values for the three rotation-rate channels.

Launch the rocket.
Measure 3D acceleration, and 3D rotation.
Integrate those to map the changing orientation and path of the rocket.
Check the computed orientation against the local magnetic field orientation.
 
  • Like
Likes berkeman
  • #3
What method of control will you use?
Servos combined with thrust vectoring or fin angling?
 
  • #4
Baluncore said:
Integrate those to map the changing orientation and path of the rocket.
Does integrating the body rates give the true orientation? How do I convert body rates to angular speeds under an inertial frame?
 
  • #5
Lnewqban said:
What method of control will you use?
Servos combined with thrust vectoring or fin angling?
Haven’t decided yet. Most likely TVC without fins. But for now I just want to record data during a flight.
 
  • Like
Likes Lnewqban
  • #6
Leo Liu said:
Does integrating the body rates give the true orientation? How do I convert body rates to angular speeds under an inertial frame?
No, there is a lot more to it. You can use the MATLAB link that you included or make your own code.
The MATLAB code might even adjust for a rotating Earth and Coriolus force, but that is not needed in a short-range rocket. On the other hand, it might not keep track of rotations of the rocket around its long axis if it is assuming that the rocket is asymmetric in that axis and a rotation does not matter.
 
  • #7
FactChecker said:
No, there is a lot more to it. You can use the MATLAB link that you included or make your own code.
The MATLAB code might even adjust for a rotating Earth and Coriolus force, but that is not needed in a short-range rocket. On the other hand, it might not keep track of rotations of the rocket around its long axis if it is assuming that the rocket is asymmetric in that axis and a rotation does not matter.
My IMU module is actually able to do a sensor fuse though all the calculations are done in a black box. I have made this post to understand what's going on behind the scene, but I guess I will just use that for now. Thanks for the help.
 
  • #8
Leo Liu said:
My IMU module is actually able to do a sensor fuse though all the calculations are done in a black box. I have made this post to understand what's going on behind the scene, but I guess I will just use that for now. Thanks for the help.
The actual sensor fusion and inertial reference calculations of a purchased IMU are likely to be proprietary. That being said, if you are interested in calculations of that general nature, MATLAB usually does a pretty good job of documenting their algorithms.
 
  • Like
Likes Leo Liu
  • #9
The mass and the moment of inertia about different axes will change during flight, as fuel is consumed. That does not change the integration of the accelerations and rates, to get the position and orientation, but it will change the dynamics of the control response, needed to correct the flight path.
 
  • Like
Likes FactChecker

1. What is an Arduino?

An Arduino is an open-source microcontroller platform that is used for building electronic projects. It consists of a programmable circuit board, a software development environment, and a community of users and developers.

2. What is a 6-axis gyro?

A 6-axis gyro is a sensor that measures rotational movements in six different directions: three axes for rotation (roll, pitch, and yaw) and three axes for acceleration (x, y, and z).

3. How does an Arduino obtain absolute orientation from a 6-axis gyro?

An Arduino obtains absolute orientation from a 6-axis gyro by using a combination of sensor fusion algorithms and mathematical calculations. The gyro provides raw data on rotational movements, which is then processed and combined with data from other sensors, such as accelerometers and magnetometers, to determine the absolute orientation of the device.

4. What are some practical applications of using Arduino to obtain absolute orientation from a 6-axis gyro?

Some practical applications of using Arduino to obtain absolute orientation from a 6-axis gyro include robotics, virtual reality, motion tracking, and navigation systems. It can also be used in drones, gaming controllers, and other electronic devices that require accurate orientation data.

5. Do I need any prior programming or electronics experience to use an Arduino for obtaining absolute orientation from a 6-axis gyro?

While having some programming and electronics experience can be helpful, it is not necessary to use an Arduino for obtaining absolute orientation from a 6-axis gyro. There are many resources available online, such as tutorials and forums, that can help beginners get started with using an Arduino. Additionally, there are user-friendly software development environments, such as the Arduino IDE, that make it easy to program the microcontroller without extensive coding knowledge.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
1
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
Replies
2
Views
135
  • Programming and Computer Science
Replies
15
Views
3K
  • Science and Math Textbooks
Replies
4
Views
1K
Replies
2
Views
2K
Replies
1
Views
3K
  • Differential Equations
Replies
1
Views
770
Back
Top