Autonomous Arduino Quadcopter Part 2: Prototype Overview and Parts List

Quadcopter

Quad Collage

The current state of my quadcopter prototype is shown in the image above. You’ll find the parts list with my comments below. Every quadcopter needs a chassis, motors, propellers, a power source, and control circuitry. In the homebrew hobbyist community, mechanical components for quadcopters are fairly standardized, but control systems are not. A Google search will reveal dozens of different combinations of components people have used to program and stabilize their homemade quadcopters. Some advanced hobbyists have built their own microcontroller boards and written their own proportional-integral-derivative (PID) control software. Others have used dedicated KK Multicopter boards that come with stabilization software pre-installed. One particularly interesting solution is the MultiWii multicopter that uses gyroscopes and accelerometers taken from a Nintendo Wii controller. Given that I plan to build an autonomous quadcopter that will guide itself, a pre-built KK Multicopter board is insufficient because it has no room for the addition of sensors or other equipment. The current prototype uses an Arduino/KK Multicopter hybrid control system. The Arduino Mega board receives sensor input and commands from a human user. It then sends guidance commands to the KK board which balances the quadcopter and executes the guidance commands. This system is somewhat redundant because both the Arduino Mega and the KK board have microcontrollers capable of handling all of the tasks I want to accomplish. A future prototype will eliminate the KK board and use only the Arduino Mega to guide and balance the quadcopter.

Aside: While researching this project, I was surprised to see that there isn’t a standard, easy-to-use, homemade, and user programmable quadcopter build. I’ve spent far too many hours troubleshooting the interactions between the different parts in this build. I’ve looked at the source code files from MultiWii and other programs; they are quite daunting to the average user and there doesn’t seem to be a standard set of parts for which these code files are known to just work. One of my side goals with this project is to create a standard set of parts and simple Arduino code that will empower normal people to make a programmable quadcopter with greater ease. 

Arduino Mega

Logic Board: Arduino Mega

I plan to write artificial intelligence algorithms for this robot in C and execute them with an on-board Arduino Mega. The Arduino Mega is an enhanced version of the Arduino Uno which I described in a previous post. The Mega can execute the same programs as the Uno, but it has several times more expansion pins as well as more RAM and EEPROM. To be safely autonomous, this quadcopter will require several sensors on each of the four arms to prevent dangerous collisions with the moving propellers. The Mega’s 65 expansion pins will make large sensor arrays possible.

KK Board

Balance Board: KK Multicopter

I don’t have the ambition to write my own self-balancing software. It makes more sense to use existing Proportional Integral Derivative (PID) control algorithms for multicopters that can be found in open source and commercially available code libraries. The Arduino Mega will accept sensor inputs, execute AI algorithms, and then send throttle, roll, yaw, and pitch movement commands to outsourced self-balancing software that will convert those commands into motor actuation signals. The first revision of this prototype uses the KK Multicopter board to store and execute the open source XXController self-balancing software. Current testing has revealed this combination to be very problematic. Our team has crashed the prototype many times in attempts to launch and stabilize it. Future revisions will be based on the DJI Naza controllers and software.

UPDATE: As you can see in more recent posts, the flight controller aboard my Arduino Quadcopter 2 is indeed the DJI NazaM Lite with GPS.

ESC

Motor Controller: 30 Amp Electronic Speed Controller (ESC)

ESCs send the voltages required to turn the brushless motors described below. They receive and execute motor actuation signals from the KK Multicopter board. They have three blue output wires that connect to each of the three input wires of the motors. The three blue wires can be safely connected to the three motor wires in any order; exchanging the wires in any two connections merely reverses the motor’s rotation direction. ESCs receive power from the large red (+) and black (-) wires that are connected to the quadcopter’s power distribution circuit. The red and black wires must be connected only to positive and negative leads respectively, else a destructive short circuit will occur. The small white wire carries the desired speed control signal from the Arduino board to the ESC. The ESC can use power from the distribution circuit to power 5V devices such as an Arduino board via the small red wire. The black wire is connected to any ground pin.

ESCs contain microcontrollers that determine the voltages sent to each of the three blue output wires. Some readers may find it redundant that this prototype uses four microcontroller-containing ESCs when the Arduino board itself already contains a capable microcontroller that could be used for guidance, balance, and direct motor actuation. Technically, those readers would be correct: the power distribution and speed control functions of the ESCs could be totally emulated by a combination of Arduino and MOSFETS arranged in four “cascade” power relay circuits. The Arduino could be programmed to time the current flow through each MOSFET such that the input wires of each motor are energized in the right sequence to actuate motor rotation. I argue that this approach increases the complexity of the prototype thus increasing the number of points of failure. Furthermore, the near universal implementation of ESCs as motor speed controllers in quadcopters allows the use of standard code libraries and stabilization boards that would not be usable if the Arduino board were to handle motor actuation on its own. ESCs increase the robustness and ease of construction significantly.

Outrunner Motor

Motors: Mystery Brushless 1000KV

The cheapest, satisfactory motors I cold find are 1000KV outrunner motors. “KV” is a motor constant that defines the motor speed as a function of input voltage. An unloaded, 1000 KV motor will reach 1000 RPM if powered by 1V. In an outrunner motor, the entire outer shell of the motor spins along with the motor’s axle. A motor with the opposite configuration is called an “inrunner” motor. Outrunner motors have permanent magnets attached to the inner walls of the outer spinning shell. At the center of the motor, the polarity of each of three variable polarity electromagnets is determined by the polarity of the voltage sent to each of the motor’s three wires. By changing the polarity of the inner electromagnets in a cascading sequence, the outer shell of the motor is caused to spin. An example cascading polarity sequence would be (+,—,—),(—,+,—),(—,—,+). Creating this changing polarity pattern requires control circuitry connected to the three motor input wires.

Transmitter

Transceiver: 2.4GHz nRF24L01

Future iterations of this prototype will be autonomous, but the testing and experimentation that will lead to autonomy will require wireless control by a human operator. Although the hobbyist community prefers more advanced wireless communicators such as XBee, I’ve had great success with the very simple and very cheap nRF24L01. Each of these tiny transceivers can send and receive data in the form of integer arrays thus making Arduino communications simple to implement. In the quadcopter prototype, I connected the nRF24L01 directly to serial peripheral interface (SPI) communications pins on the Arduino Mega. This transceiver uses SPI communications protocols to transfer data to and from the Arduino board, but open source code libraries and online explanations allow hobbyists to use the transceiver without fully understanding SPI. This github code repository contains the RF24 code library for Arduino that will handle SPI communications “behind the scenes.” This Wikispaces page provides relatively simple instructions for using commands in the RF 24 Library to send and receive data via the nRF24L01 part. Some have claimed that the nRF24L01 has power problems when connected to Arduino boards, but I have had no such problems. Connecting the transceiver directly to the 3.3V pin on the Arduino Uno and Arduino Mega has produced great results in my projects. In a future post I will provide my own code and wiring diagrams that will show how to use this part specifically for the quadcopter application.

Chassis

Chassis: X525

This prototype uses the X525 Chassis. After working with it, I don’t think this is a particularly good chassis, and my second quadcopter prototype will have the HJ450 frame. The X525 has metallic arms that are connected by PCB center platforms. The HJ450 has shorter polycarbonate arms that are connected by PCB center platforms. The X525 is heavier and wider than the HJ450, meaning that the X525 will require more power and will be less maneuverable than the HJ450. The X525, however, should produce more stable flights than the HJ450 because of its higher rotational inertia. I’ve noticed that most homemade quadcopters are made using the HJ450 or with a variant called the XJ MWC. The XJ MWC frame is useful because it has more room for electronics and other equipment on the center platforms.

The form of the chassis determines the mode of quadcopter flight. A + (plus) configuration quadcopter moves by turning one motor faster than the other three. An x configuration quadcopter moves by turning two motors faster than the other two. This page provides definitions of the different multicopter configurations and flight modes. The X525 and HJ540 frames are compatible with + and x configurations while the XJ MWC is compatible only with the x configuration because the XJ MWC is not symmetric about its motor arms. X configured quadcopters are more popular than + configured quadcopters in the hobbyist and commercial quadcopter communities. I’m still experimenting with + and x configurations.

Prop

Propellers: APC 10 x 4.7

I recommend 10 x 4.7 SF and 10 x 4.7 SFP propellers because they come quite well balanced from the factory. In order to balance the moments exerted by the motors on the quadcopter, two propellers must spin counterclowise and two propellers must spin clockwise. The “P” designation in “SFP” indicates a “pusher” propeller whose design is the reverse of a standard propeller. I use two SF and two SFP propellers. 

Distribution Board

Power Distribution Board

A power distribution board connects to the positive and negative battery leads. It allows 4 to 8 ESCs to be connected in parallel to the same battery, thus providing the same battery voltage to each battery.

Battery

Battery: 2200 mAh 3 cell Lithium Polymer Battery

Lithium polymer (LiPo) batteries have the best power/weight ratios on the market at present. They are the best batteries for drone/UAV applications. The disadvantage of LiPo batteries is that they are a fire hazard if charged or discharged improperly. Specialized battery chargers are required for LiPo batteries. I used this LiPo charger for this project. LiPo batteries are equipped with voltage leads for each individual cell so that the voltage of each cell can be monitored. Large differences in cell voltage lead to failure. Commercial LiPo batteries have various kinds of connectors attached to their leads. Before purchasing, make sure that the battery connectors are compatible with the other connectors in your project else you will have to remove the existing connector and solder your own connector. 

22 thoughts on “Autonomous Arduino Quadcopter Part 2: Prototype Overview and Parts List

  1. Hello , interesting Project i’m doing the same but i have a problém to manually control the kk borad with the arduino , i think that my problém is calibrating the esc with the kk through the arduino and unfortunatly don’t know how to proceed . Hope that
    i find some help =)

    1. Hi, thanks for your comment. You need to use the writeMicroseconds() command in the Arduino Servo library to send motor controls to a flight controller board like the KK board. I’m working on a big blog update that will answer your question more completely; I’ve been working on this update for weeks, but it will come soon! I’ve found that the KK board is very problematic, and I recommend the DJI Naza. Again, there is more to come. In the meantime, here’s a link to a video that demonstrates the current form of my Arduino quadcopter: https://www.youtube.com/watch?v=WuHXO8XvEYg

      1. Also, I forgot something: ESC calibration must be done without the KK board. Connect the Arduino directly to each individual ESC and calibrate it that way. You need to read the calibration instructions for your ESC to find the right sequence of throttle up and throttle down inputs for the ESCs to enter calibration mode. Good luck!

  2. Can you please give me some detailed explanation on how to assemble these components and the code for the microcontroller

  3. Hi, I am very new to hobby robotics, I am following your guideline. How did you connect the nRF24l01 transceiver to KK board using SPI interface?

  4. Thank you soo much. ive been building a quadcopter as a school project and this is a great guide, thank you.

  5. Did u finished it already? Km really interested con tour project..good stuff..do u have the code? How dos it work?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s