RC Control Spring 2016
Posted by: Luis Valdivia(Project Manager)
Written by: Kevin Nguyen(Electronics and Controls)
Table of Contents:
– Introduction
– Transmitter and Receiver
– Setting up the MultiWii
– MultiWii GUI
– Arming and Disarming
Introduction:
Being able to use the RC controller early on in this project will be very beneficial since it will make testing safer and more efficient. Since EDF’s spin at very high rpms, it is not a good idea to keep your hands on the quadcopter while testing. The RC controller will allow you to test the quadcopter at a safe distance. An added benefit to using the RC controller is that it doesn’t add that much weight to your system. All that is needed for the quad to communicate with the controller is the receiver. This blog will guide you through setting up RC control.
Transmitter and Receiver:
The RC controller that we used is the HK-T4A V2. This comes with a transmitter and a receiver. Most likely, you will be using the same controller as us so they would already be binded, but if not, follow this video to bind your devices. The transmitter will be from the remote controller. It will send a 2.4Ghz signal to the receiver on the MultiWii. The RC signal is much more reliable than bluetooth and is capable of transmitting at much further distances.
The transmitter controls the throttle, yaw, pitch, and roll of the quadcopter. The left joystick controls the throttle and the yaw; Vertical direction controls the throttle, horizontal direction controls the yaw. The right joystick controls the pitch and the roll; Vertical direction controls the pitch, horizontal direction controls the roll.
Fig 1.1 RC Controller
The receiver is connected to the MultiWii. Each channel on the receiver corresponds to a command on the controller. The transmitter sends out signals in the form of radio waves and the receiver converts those signals to electrical signals for the MultiWii to read. The connections on the receiver must be connected to the appropriate pins on the MultiWii in order to control it properly. Refer to this blogpost for MultiWii connections.
Fig 1.2 HK-T4A Receiver
Setting up the MultiWii:
To set up the MultiWii to be compatible with your quad, you need to download the MultiWii source code here. After getting the source code, go into the config.h file and select the appropriate configurations based on your project. To select an option, simply remove the comments(//).
For our project, we used:
#define QUADX
#define MINTHROTTLE 1150
#define MAXTHROTTLE 2000
#define I2C_SPEED 400000L
#define INTERNAL_I2C_PULLUPS
#define FREEIMUv035_BMP
Copy and paste this anywhere into the config.h file:
#define MAG_ORIENTATION(X, Y, Z) {magADC[ROLL] = -Y; magADC[PITCH] = X; magADC[YAW] = Z;}
Some things to mention are that the minthrottle should be kept as is. The quadcopter needs to be under a certain throttle to arm and if the minthrottle is set too high it won’t reach that arming point. Another thing is that for the board options, the MultiWii isn’t listed there, using FREEIMUv035_BMP would work as well.
MultiWii GUI:
The zip download for the source code included a GUI as well. The gui can be used to change the PID settings and calibrate the sensors. The GUI only monitors the sensors, you can’t control the device through it.
Arming and Disarming:
The most important commands for controlling the quadcopter is arming and disarming. Arming connects transmitter and receiver so that you can begin communication. Disarming disconnects the communication. If it flies out of control during testing, you can disarm to stop the motors from spinning. Typically, to arm you pull the throttle down and yaw to the right. To disarm you pull the throttle down and yaw to the left. This is convenient since you can arm and disarm with one joystick. The arming and disarming commands can be changed in the config.h file.
Works Cited:
https://www.youtube.com/watch?v=JyAyM1f_O3Q
https://www.arxterra.com/multiwii-esc-and-receiver-connections/
http://dl.btc.pl/kamami_wa/hk_27033_2.pdf