Select Git revision
copter_control.tex
copter_control.tex 3.23 KiB
% Copter Control - Author: Lars Jonsson
To get the copter flying up and down through the shaft without crashing into the walls, we must take away as much human interaction as possible.
Therefore we will only use high level commands to fly this copter.
Only a couple of commands for controlling the robot like "go up", "go down" or "manual control" will be available.
When you send the commands up/down the copter will start to navigate its own way up or down through the shaft using Infrared, Sonar and LIDAR.
If you set the copter to manual mode, you will be controlling the Copter using a radio transmitter/receiver, and no sensors will be there to guide you.
\subsection{Flight Controller}
Because the lack of time in this project we will use an commercially available flight controller to keep the copter flying steady instead of building our own.
The flight controller that we will use is called Flip32 and uses a STM32F3 series processor.
The software that we will use on it is the open source software Cleanflight.
Cleanflight has a well documented source code, gets regularly firmware updates and has a broad hardware support and is therefore a good choice to start with.
To be able to interact with the flight controller and gain access to it we will setup a UART communication from our MCU.
Through this communication we will send high level commands from the MCU
.
Hopefully also be able to retrieve some feedback from the flight controller how it handled these commands.
% lägg in en bild på communicationen här emellan.
% bild på switch mellan olika kontroll metoder
We don´t yet know if we will be able to have this communication working, because as we said before the flight controller is already programmed and we want to do as little changes to the code as possible.
If this does not work as excepted we have a backup plan.
If the UART communication won´t work we will use the sBUS protocol to control the flight controller from the MCU instead.
SBUS is just an inverted RS232 with one way communication, and it's this protocol that the transmitter/receiver uses.
Instead of sending high level commands we will control the Copter using the radio transmitter as mentioned earlier.
Earlier the transmitter was connected directly to the flight controller, now it will go through a signal inverter and be connected to the Rx pin of the MCU instead.
The MCU will then calculate and check all the sensors to see if the Copter can go in the direction it got from the receiver.
If its ok, it will just pass the sBUS signal to the flight controller. If not, it will not send anything, or it will send a sBUS signal in another direction to make the copter move away from any close object.
If we go with the sBUS solution we will no longer get any feedback from the flight controller and we can no longer fly the Copter manually if we loose connection with the MCU.
Hopefully we will get the UART communication working as this will give the best control options.
\subsection{Collision avoidance}
\subsection{Controller}
\subsubsection{Simulation}