Skip to content
Snippets Groups Projects
Commit 363c101e authored by Daniel Björk's avatar Daniel Björk
Browse files

Changed MSP to USART com protocols to include xbus. Wrote xbus and msp

parent 603a9846
No related branches found
No related tags found
No related merge requests found
\subsection{IMU - Inertial Measurement Unit} \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. 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. 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.
\subsection{IMU} \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. 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. 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.
......
\subsection{MSP protocol}
\ No newline at end of file
\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
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
\section{Implementation} \section{Implementation}
\input{./implementation/workflow.tex} \input{./implementation/workflow.tex}
\input{./implementation/imu.tex} \input{./implementation/imu.tex}
\input{./implementation/msp.tex} \input{./implementation/usartComPro.tex}
\input{./implementation/spi-uwb.tex} \input{./implementation/spi-uwb.tex}
\input{./implementation/sonar.tex} \input{./implementation/sonar.tex}
\input{./implementation/ppm.tex} \input{./implementation/ppm.tex}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment