This example features the inertial measurement unit that is assembled on the ZSOM-Mini PCB. Accelerometer, gyroscope and magnetometer measurements are combined via a sensor fusion algorithm.
Project: ZSOM-Mini_IMU.lvproj. In LabVIEW, open Help → Find Examples and search for “ZSOM”. Hardware: ZSOM-Mini V1.1 or newer.
| Indicator | Function |
|---|---|
| euler angles | Orientation as heading, pitch and roll (the label on the panel reads “pich”) |
| XY Graph 2 | A cube with the dimensions of the ZSOM-Mini, rotated according to the measured orientation |
The axes and the zero position of the angles: TBD
FPGA_main.vi): The same FPGA application as in Example: Mini AllIO: it runs the power-up sequence of the peripherals and provides the digital and analog lines, the GPIOs and the TWI bus of the IMU to the RT. The RT exchanges the data with the bus through FIFOs.RT_main.vi): Loads and starts the FPGA. The IMU is first switched to the configuration mode, in which the registers are writable. There the units are set (m/s², deg/s, rad, °C). Then the IMU is switched to the fusion mode with 9 degrees of freedom (NDOF), where the absolute orientation is calculated from all three sensors. In a loop (wait time 200 ms) the VI reads the orientation, subtracts the initial calibration and displays the euler angles. The cube is created, rotated around Z, X and Y and projected on a plane with the SubVIs in the folder RT/SubVIs (cubus.make.vi, coordiantes.rotate.vi, coordinates.flatten.vi).