From 363c101e916a33b625d0b181609b7234874b65c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Bj=C3=B6rk?= <ddbjork@gmail.com> Date: Wed, 21 Dec 2016 18:24:48 +0100 Subject: [PATCH] Changed MSP to USART com protocols to include xbus. Wrote xbus and msp --- components/imu.tex | 1 + implementation/imu.tex | 1 + implementation/msp.tex | 1 - implementation/usartComPro.tex | 16 ++++++++++++++++ main.tex | 2 +- 5 files changed, 19 insertions(+), 2 deletions(-) delete mode 100644 implementation/msp.tex create mode 100644 implementation/usartComPro.tex diff --git a/components/imu.tex b/components/imu.tex index 75f4955..27c1be4 100644 --- a/components/imu.tex +++ b/components/imu.tex @@ -1,4 +1,5 @@ \subsection{IMU - Inertial Measurement Unit} + \sectionauthor{Author: Daniel Björk} To track the movement of the copter in flight, a stable IMU with minimal swing effect has to be used. There are several low cost IMU's available on the market, similar to the one in the flight controller. While these are great for tracking instantaneous movement, they are not good at tracking movement over time. Due to noise and swinging of the gyro while accelerating in any direction, the tracking will be skewed while moving up and down the cave. This mostly results in incorrect or unreliable scanning data. Xsens Technologies are well known in the industry for producing stable and accurate IMU's. Their product series \href{https://www.xsens.com/products/mti-1-series/}{MTi 1} features all the specifications needed for the copter and was chosen as the primary IMU for the project. diff --git a/implementation/imu.tex b/implementation/imu.tex index 4424e1a..188f41b 100644 --- a/implementation/imu.tex +++ b/implementation/imu.tex @@ -1,4 +1,5 @@ \subsection{IMU} + \sectionauthor{Author: Daniel Björk} Upon initialization of the \texttt{IMU} code, a request to go to configuration mode is sent to the MTi. The MTi is now prepared to be configured. \texttt{IMU} then transmit the configuration data, which enables the output of Euler Angles and Free Acceleration data at 100Hz. See Figure~\ref{fig:imuflowchart} for a visual representation of the communication flow. \texttt{IMU} first transmits a request of configuration mode, waits for a confirmation response, and then continues to transmit configuration data. When the configuration is complete, a request of measurement mode is sent to the MTi. The MTi will now continuously transmit data at the configured rate. diff --git a/implementation/msp.tex b/implementation/msp.tex deleted file mode 100644 index eb05835..0000000 --- a/implementation/msp.tex +++ /dev/null @@ -1 +0,0 @@ -\subsection{MSP protocol} \ No newline at end of file diff --git a/implementation/usartComPro.tex b/implementation/usartComPro.tex new file mode 100644 index 0000000..8ea0e25 --- /dev/null +++ b/implementation/usartComPro.tex @@ -0,0 +1,16 @@ +\subsection{USART Communication Protocols} + \sectionauthor{Author: Daniel Björk} + \subsubsection{xBus} + Communication with the IMU is preformed with an xBus message. First byte is always the preamble, followed by the destination address(which can be ignored when using USART), an operation code and the length of the message. To verify the message, a checksum is appended to the message. + + The message itself contains multiple data points, identified by a 2byte data identifier and an 1byte length. + + \begin{figure}[H] + \centering + \includegraphics[width=0.8\textwidth]{Pictures/xBus} + \caption{MTi xBus data point message example} + \label{fig:imuflowchart} + \end{figure} + + \subsubsection{MSP} + To communicate with the flight controller on board, an implementation of the MSP communication protocol is used. It shares much similarities with the xBus, but can be regarded as a simpler version. A preamble is used to trigger the start of a message, followed by the operation code and the length of the message. At the end, a checksum is appended to verify the message. \ No newline at end of file diff --git a/main.tex b/main.tex index c44c9ee..b1f27dc 100644 --- a/main.tex +++ b/main.tex @@ -101,7 +101,7 @@ \section{Implementation} \input{./implementation/workflow.tex} \input{./implementation/imu.tex} - \input{./implementation/msp.tex} + \input{./implementation/usartComPro.tex} \input{./implementation/spi-uwb.tex} \input{./implementation/sonar.tex} \input{./implementation/ppm.tex} -- GitLab