Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
This section will explain how to configure the PX4 software running on the RDDRONE-FMUK66.
Ground control software is used for configuration and monitoring of your drone. We will use QGroundControl to configure the PX4 flight stack that you should have been programmed on your FMU. With QGroundControl you can configure the propeller configuration, radio controller, sensor calibration and much more. It also provides different ways of controlling the drone, such as an autonomous mission planner. Download links for QGroundControl are available on the downloads page.
The next sections will guide you through the process of using QGroundControl to set up your FMU. All the steps correspond to one setup screen inside of QGroundControl. In the QGroundControl documentation you can find more information about each of these steps.
At the top of the next few sections there will be a link to the corresponding page of the QGroundControl User Guide. Each section will also have additional information specific to RDDRONE-FMUK66 and HoverGames. This distribution was chosen to make sure that we are not mirroring the official QGroundControl documentation too much.
In order to configure your FMU through QGroundControl, you need to connect it to a computer that has QGroundControl installed on it. This can be done directly with a micro-USB to regular USB cable, or with the telemetry radio transceiver set that you bought together with the HoverGames drone kit. On the FMU side, the telemetry radio transceiver can be connected to the TELEM connector, while the computer side has a USB-A connector which can be plugged in directly. Both these links should be automatically detected by QGroundControl. The differences can be found in the table below:
(*) While the USB connection cannot be used to connect the FMU to a laptop mid-flight, it can be used as a way to connect a companion computer for performing complex computations on the drone. This requires advanced parameter configuration (one step required is disabling the USB link check circuit breaker).
How to upload firmware onto the RDDRONE-FMUK66 using QGroundControl.
When a compatible bootloader is present on the target device, QGroundControl can update the firmware on it. You can use this feature to update the PX4 firmware on the RDDRONE-FMUK66, but also to update firmware on telemetry radio modules.
The QGroundControl user guide provides a clear description of the firmware uploading process. Please have a look at their documentation:
It is recommended to use PX4 on the RDDRONE-FMUK66. It's an opensource flight stack containing all the software necessary to get your drone into the air. PX4 is constantly being updated with stability improvements and new features. It is recommended to always run the latest (stable) firmware on your FMU, as constant updates will make your drone fly more stable, add exciting new features and open up more possibilities for using different sensor types. In the Firmware screen you can upload a new version of PX4.
You probably already programmed the PX4 firmware after you programmed the bootloader! In that case you do not have to program firmware again. However, you can use this feature to upgrade to newer firmware versions when they become available.
QGroundControl will ask you to plug in your FMU using a USB cable. It might also ask you to first unplug it again, because it needs to enter the bootloader before it can upload firmware. A popup will appear that asks you which flight stack you want to use. We will use the PX4 flight stack. You can choose between the standard (stable) version and test/development versions, or a custom firmware binary. It is recommended to use the stable version, for now.
It is also possible to build the firmware yourself (or download binary files from the PX4 Continuous Integration server), and upload it through the custom firmware option. Instructions for building your own firmware binaries from source are available in the developer guide:
It is recommended to also update the firmware on your telemetry radios. Simply go to the Firmware tab in QGroundControl and plug in your radio using a USB cable. Make sure you only have the radio plugged in to your laptop, no FMU. QGC should automatically detect the radio and start the firmware upgrade process. If you get any errors during this process, starting over usually works.
You have to do this for both radios! If you don't, you might not be able to establish a connection. Make sure the radio on the drone is not connected to the FMU (take out the JST-GH connector) and connect it with a USB cable to your computer, just like the other radio.
How to perform sensor calibration.
The sensors screen lists most of the sensors that are available to the FMU (internal or external). It allows you to start the calibration process for the listed sensors. The QGroundControl user guide has all information you need about calibrating the sensors. This step is very important for stable flights, it is required to do the calibration at least once and it should be redone whenever the drone starts flying less stable!
You can check whether the sensors are properly calibrated using the Analyze widget, which can be found under Widgets at the top of the screen. This is a tool in QGroundControl that allows you to plot sensor values of sensors inside of the RDDRONE-FMUK66 in real-time.
You can check the calibration of the sensors inside of the FMU by putting the drone on a flat, horizontal surface, and looking at the ATTITUDE.roll and ATTITUDE.pitch variables. If they are larger than 0.02 (both positive and negative), you should consider recalibrating the Accelerometer, Gyroscope and Level Horizon.
Note that the scaling of the graphs in the analyzer changes automatically! In some cases, very small changes might appear as if they are very large. Look at the current scale before drawing any conclusions!
Important safety and failsafe options.
A very important step is the setup of the safety features and fail-safe options. Make sure to have a look at the QGroundControl documentation for this tab.
For safety, we again recommend you to set up a kill switch on your controller, as has already been mentioned in the section.
It is also highly recommended to set up fail-safe features in case the connection to the RC transmitter is lost. If you followed the suggested , you already have a fail-safe implemented that the receiver module will trigger. It was explained as a last resort that should turn of the drone to prevent a fly-away situation. However, PX4 should also be able to detect RC connection loss (and not listen to the kill command coming from the receiver module). You can configure different fail-safe actions, that don't necessarily damage the drone.
There is not a single best setting for fail-safe options: it depends on the situation in which the drone is deployed. For example, when flying autonomously close to people, it might some times be better to just stop the motors in uncontrollable situations: when you are flying close to people, the drone might fly into them when control is lost.
But in other situations it might be better to have the drone try to fly to a safe location before landing: when the drone is flying very high, almost above people, where a gust of wind could blow it towards and on top of someone. You should always evaluate what is best in your specific situation.
We recommend to use the land mode action for both the low battery level fail-safe and the RC communication loss fail-safe. The drone will try to land in its current location when the fail-safe is triggered.
Note that a fail-safe action triggered when RC connection is lost, will be canceled when a connection is re-established. That means it is not safe to hold the drone while the fail-safe is active: the motors might start spinning again! You should always first disarm the drone before picking it up (check the arming-status using either QGroundControl or the LEDs on the drone).
More information on how to set up fail-safe features can be found in the PX4 user guide:
How to set up the connection with your RC transmitter and configure different flight modes.
In the Radio tab, you only need to perform the calibration. Press the calibrate button and follow all instructions. The graph on the right side of the screen shows which stick you need to move! After the calibration is done, make sure that you see all the channels on the right of the screen move according to the movement of your sticks, switches and dials.
More information is available in the QGroundControl User Guide:
After the radio calibration is done, you can continue with setting up Flight Modes, which has its own tab. Have a quick look at the QGroundControl documentation to know what flight modes are available:
We recommend to use channel 6 (switch B) to switch between flight modes. Switch B is a three way switch, which correspond to flight modes 1, 4 and 6. We suggest to setup the manual, altitude and position modes to get started.
Channel 5 (switch A) is a nice switch for the loiter (hold) mode. When you flip this switch, the drone will stay in the same position until you switch it back.
That leaves switch C (channel 7), which is a three-way switch. You can leave it unassigned, or have a look at the other available flight modes. The choice is up to you. We have assigned the offboard mode, which allows the drone to be controlled by software running on a companion computer. If you are not sure what mode to assign, just leave it unassigned.
To recap, with this mapping switch A will put the drone in "hold mode". Switch B can be used to change between different flight modes. Switch C either remains unused, or is used to toggle offboard mode or another mode that you assigned to it. Switch D is the kill switch. Remember this, in case something goes wrong you need to be able to quickly change between flight modes or shut down the drone!
For setting up flight modes, you are free to assign the different switches to different functions. We provide a default way of setting up the switches, which should cover most of the use cases and safety features. It includes manual and assisted flight modes, as well as offboard mode for autonomous flight and a kill switch. The mapping is based on the RC channel mapping given in the section. Below you can find a screenshot displaying the default configuration we recommend.
You should also assign a kill switch channel. You should use channel 8 (switch D), because you easily reach it when something goes wrong. Our was also set with a kill switch on channel 8 in mind.
If you are making changes to this setup, you should make sure to always include a kill switch for safety! Also adapt the according to your assigned functions, the provided configuration is based on the kill switch being assigned to switch D.
Property
USB cable
Telemetry radio
Connection type
Wired
Wireless
Link speed
Very fast
Slow
Can upgrade firmware
Yes
No
Can perform ESC calibration
Yes
No
Can be used mid-flight
No*
Yes
Options for battery management and voltage and current measurements.
All relevant information is available in the QGroundControl documentation. Below we provide some more information about the different settings found on the Power page.
For correct display of battery percentage, you should always specify the correct number of cells in the battery (indicated by 3S, 4S, etc. on the battery). You should also calculate the value for the voltage divider to calibrate the voltage readings coming from the power module. This can be done by measuring the voltage of the connected battery using a volt- or multi-meter, and inserting the measured voltage into the Calculate Voltage Divider
prompt. Together, these settings will provide you with an accurate battery percentage while the drone is idle on the ground, so you can determine whether it is still safe to take off. PX4 also has a fail-safe that prevents arming when the battery percentage is too low.
If you don't have a multimeter, keep in mind that a fully charged 4S battery should have a voltage close to 16.8 V, and a 3S battery should be 12.6 V. When you have a fully charged battery connected, you could use those approximations because they would be very close to the actual value. This should give decent results in the end.
For a better indication of the battery percentage when the drone is flying, you should also calculate the Amps per volt value: this will allow the software to calculate the battery voltage based on current draw, correctly taking high-load voltage drop into account. The calculation can be performed by measuring the current through the drone when it is idle, and inserting the value into the Calculate Amps per Volt
prompt. After calculating the correct Amps per Volt value, the battery percentage will also be correct during flight. This will allow you to determine how much flight-time you have remaining during flight. It also allows you to make use of more advanced PX4 fail-safes based on battery percentage, such as automatically returning home and landing when the battery percentage gets too low.
It might not be easy to measure the current flow if you don't have the right tools. We have found that the whole system draws about 0.15 to 0.20A when disarmed (no motors spinning). You can use this to make an educated guess, which will give decent results if you are not able to perform the measurements.
If you still have issues with incorrect battery percentages, it is possible to manually specify the voltage drop under Advanced power settings. This voltage drop can be determined based on flight logs by looking at the difference in voltage when the drone takes off.
To ensure that all motors correctly respond to commands coming from the FMU, you should perform an ESC "calibration". It makes sure that the ESCs are aware of the minimum and maximum PWM values that the FMU will provide. This can be done by pressing the ESC calibration button and following the on-screen prompts. The calibration process requires a USB connection, since it involves steps where you have to disconnect and reconnect the battery.
You should always perform the ESC calibration. Uncalibrated ESCs can make your drone unable to fly.
You should NOT have propellers installed when performing the ESC calibration!
Setting up the airframe configuration.
The HoverGames drone kit includes the LJI X4 500 drone frame. We previously used an S500 drone frame, for which a S500 airframe preset was available. Currently, we still use this with the LJI X4 500 frame.
In the airframe screen, under the Quadrotor X configurations, select the S500 airframe preset. The QGroundControl user guide provides more information on how you can select this airframe.