For the past few weeks, I’ve been working on getting a drone ready for takeoff and, ultimately, for formation in a light show. Since the last blog post on unboxing, I soldered the battery module onto the drone’s PDB (Power Distribution Board) with some success.
I access the flight controller using software called QGroundControl, which has all the necessary tools for setting up and pre-planning flight routes with the Drone’s GPS. I utilized a mixed connection of USB and Wi-Fi, the Wi-Fi setup was relatively easy. I only had to change one of the drone’s parameters to instruct it how to handle the Wi-Fi connection to Ground Control properly.
After initial setup, I was able to calibrate all of the sensors related to positioning and orientation. (Useful documentation for specific details) Next was to attach props and arm motors for takeoff. Once prepped and the battery connected, we started a slow takeoff to see the responsiveness (or, in this case, lack of responsiveness)
Unfortunately for me, the takeoff did not exactly go “up” but rather sideways. When pushing the throttle stick, the drone would start to lean backward and or start rotating when meant to fly straight up. After a lot of trial and error, I ended up installing the latest firmware for the board we’re using. But instead of the ArduPilot firmware platform I tried the Pixhawk firmware. This shouldn’t make a ton of difference, but it had a lot more options for setup and specific configurations related to the frame we’re using instead of the generic frame I selected before.
With flashing new firmware, it requires me to setup all of the compass and calibrations done before. One of the hurdles of calibrations was an error being thrown when we had the drone in the forward position. It would throw a generic “Test Failed” That was fixed with a simple parameter edit (parameters, in this case, are the manual settings for each part of the drone) that would change the primary sensor for all movement to the HolyBro RTK, instead of the flight controller. Which has a basic compass and accelerometer sensors.
Another small stumbling block was referencing a guide I had used before, which SkyBrush provides in their docs. Specifically for basic parameter setup, you need to make sure the Drone is using the RTK onboard for primary 3D sensing (basic tilt, pan, etc.) When referencing that guide, it had specific settings to change. I later figured out that PixHawk and Ardupilot each have their own parameters, and they do not carry across names. Skybrush provides firmware that is based on ArduPilot. Some are similar, but ArduPilot had a lot more advanced options; it was a stumbling block but not a huge deal as I was able to find the substitutes for PixHawk.
After reviewing a couple of examples and online forums, I realized that my motor setup was all wrong. I had both the motors spinning in the wrong directions and the motor frame setup.
For example, this is what I believe I initially incorrectly set it up as and how it’s supposed to be laid out:
The incorrect layout had three motors that were going CCW, which I found out when rearranging the motors as the wires were flipped. (This inverts the spin direction of the motor.) Thus, there were essentially three CCW spinning props. This caused the drone to start spinning or try to flip on takeoff. Ardupilot tried to compensate for orientation, and it ended up being a mess.
After realizing this issue and fixing it, a quick takeoff showed that it was, in fact, the issue.
The day after, I reflashed Skybrush firmware and configured all of the recommended settings, and it took off as expected, showing that the motor orientation was, in fact, the main problem. The next step is to autotune and figure out what behavior changes are made in different flight modes.
This post includes the logos of Ardupilot and QGroundControl, which are the trademarks and property of their respective owners. I do not own any rights to these logos, and their use in this post is solely for informational and illustrative purposes. The inclusion of these logos does not imply any affiliation, sponsorship, endorsement, or approval by the respective companies. All trademarks and copyrights remain the property of their respective owners.
Awesome success in the way you describe the challenges and how you corrected them 🙂
Opa