Overview

The MiniAutoDrone will be a quadcopter with a GPS, barometer, 3 IMUs, and 2 magnetometers capable of performing a wide variety of autonomous missions in constrained environments. Boasting around 300 grams of payload capacity, a 2 mile manual control range, a 6 minute maximum flight time, and a 60mph limited maximum speed this little robot packs a punch in a small form factor.

This projects dives deep into the world of radio control (RC), tuning, sensor fusion, radio frequencies (RF), and autonomous flight. In order to achieve we will be using a flight controller (FC) made by RadioLink that runs a firmware called Ardupilot. Ardupilot is an open source platform for developing autonomous robots and can control almost any actuator and accept almost any sensor. Combined with the ability to interface with off-board control from other computers, this makes it ideal for almost any autonomous vehicle.

Parts and Materials

The main structural components are 3D-printed while the electronics are all purchased and assemble. Other than electronics, propellers, M3 screws, and some M3 standoffs, there is not much to this drone. For normal use, a radio transmitter (TX) is needed but TXs can hold hundreds of models and scripts on them so they are often a one-time purchase.

The frame for the MiniAutoDrone really takes advantage of additive manufacturing but is slightly difficult to print due to its small holes. The frame provide mounts for all of the motors, mounts for the electronics stack, holes for the battery strap, an in-built plug for ergonomics, and holes to protect the 2.4GHz receiver (RX) antennae. The frame alone has >10 functions and is only one part that prints in 2.5hrs. To print the cover with the infill on the inside surfaces takes around the same time. The last part that is 3D-printed is the FC plate which caps the electronics stack and rigidly mount the controller and IMUs to the frame. 

The electronics are not that complicated but the scale definitely makes neatness and soldering a lot more difficult. Space under the cover is of high value and keeping component densities high enough for 3in props was a bit of a design challenge. The electronics that need to fit are: the buzzer and safety switch, the GPS, the FC, the RX, the motors, and the 4in1 ESC. The battery plugs in to an XT60 connector which is wired to the power-in terminals of the power module (Fig. 2, Slides 2). With the battery leads connected to the power-module, begin to solder the ESC connections and the motor connections (Fig. 1 & 3, Slides 2). Then the ESC can then be soldered to one of the motor outputs of the power module (Fig. 5, Slides 2). This almost completes the stack, last step is to put it all on the frame and solder the motors to the ESC (Fig. 7, Slides 2). Bolting the stack onto the frame with M3 standoff and screws completes the current work for the ESCs, power module, and motors. 

The next step is to start incorporating the FC and the other peripheral electronics. The FC plate is bolted down and the FC is double-sided sticky taped on top. Now all that remains is plugging in the remaining connections. They are all labeled and different sizes so it pretty-much plug and play from there on. The trick here is finding good places to put the wires and making sure there are no possibilities for shorts.

The motors will pull 20A each in an aggressive throttle-punch. This information will later be determined from the black-box logs and the power module data. There is an on-board SD card for log recording and mission and code storage. The FC combines most of the inertial and altitude measurement which is then validated and corrected by the GPS position.

Mechanical and Electronic Fabrication

Programming

Most of the programming will be performed through a GUI called MissionPlanner (MP). MPis a pretty complicated software so the documentation will be very useful at ALL times in this process. 

Installing MissionPlanner will be the first step. This is just so that we can talk to the flight controller over a COM port (just like Arduino). After installing MP and plugging the FC into the computer with micro-USB, all of the information and parameters of the FC will be available through the MP interface. To start from a clean slate, the first step will be to install firmware on the controller. To do this, navigate to the ‘Setup’ tab in MP and then to the ‘Install Firmware’ section to install the firmware for your device.

With a fresh firmware install, all of the sensors will be uncalibrated and need to be recalibrated. Following the first few sections of the ‘Setup’ > ‘Mandatory Hardware’ in MP and working down the list is the easiest. Select the X type quadcopter frame for the ‘Frame Type’. Follow the prompts for ‘Accel Calibration’. ‘Compass’ is a little tricky to get some times but I have found the best results can be found by wobbling the thrust vector of the craft around the axes in the accelerometer and level calibration. Setting up the radio is a skill that is specific to the RX/TX system used. Here, I used an FrSky XM+ full-range diversity RX with the FrSky XLite controller. The process for setting up the model in this radio predominantly occurs in defining the user inputs (inputs) and defining how they are mixed (mixer). Once the RX and TX are bound to each other and all of the inputs have been defined, then the ‘Radio Calibration’ can be performed. If a user input is added, this step needs to be done again. Typically, nothing needs to be adjusted in ‘Servo Output’. I do recommend doing an ‘ESC Calibration’ which just makes sure that all four motors agree on what 0 and 100% effort looks like. For autonomy, ‘Flight Modes’ needs to be adjusted. The mode channel will always be channel 5 (CH5) or ArduPilot unless otherwise set.

Unfortunately ‘Mandatory Hardware’ is not the only thing that needs to be done before we can try flying. In ‘Optional Hardware’, please do a ‘Motor Test’ and reference the letter/numbering sheet provided by ArduPilot to make sure all of the motors are in the right positions and are all spinning the proper directions. If you drone flips on takeoff, you might have skipped this step and have a propeller on wrong or a motor in the wrong place or spinning backward. To reverse the direction of any motor, swap any two of their three wires. For motors that are in the wrong place, just change the channels of the signal wires that are in the wrong position to the correct one using the diagram.

Now we can move on to adjusting the arming parameters, which is the last thing needed before flight (usually). Navigate in MP to ‘Config’ > ‘Full Parameter List’ to see all of the current firmware parameters. Here we will change a few things. 

First search “arm” in the search bar. Now alter:

• ARMING_RUDDER → 0

• ARMING_CHECK → Barometer, Compass, Board Voltage, Hardware Safety Switch, Battery Level, GPS Configuration

Then find out what switch you want your arm/disarm switch on. This is the most important input on the controller. If I want my arm/disarm switch on CH8, then I would search ‘RC8_OPTION’ and change its value to 41 which should correspond to the ‘Arm/Disarm’ function.

That should be all you need to get off the ground but if you can’t find what you need here in this limited description, once again be sure to check out the much more complete documentation provided by ArduPilot.

Demonstration Video

Full-Size Image Gallery