Wednesday, August 3, 2016

Choosing a Frame, Transmitter/Receiver, and Power Distribution Board

My last post detailed the most necessary components for building your own drone. However, a drone will not function without a frame, some type of control method, and a way to safely manage power from the battery. Lets start with the frame. When I built my first quad, I thought to myself, "how hard can it be to build my own frame." It only took me two days to design, get the parts, and build a frame for my quadcopter. At the end of it, I ran into two major problems. One was a secure way of mounting the motors, and the other was how to prevent the electronic components from touching the frame which was made out of sheet metal. The insulator problem was an easy fix; I just put a foam piece under the flight control board. The motor mount problem was harder to solve. I was able to drill holes in the aluminum bars that my frame consisted of, but I'm not a very good driller. Some screws didn't line up with holes on the motors, causing some motors to get loose during flight. Of course, I could have spent more time designing the frame better to withstand more impact, but in end, I had two pieces of sheet metal sandwiching four hollow aluminum bar all held together with globs of JB Weld. This was not a great design, because JB Weld can hold a lot of weight, but upon impact JB Weld, actually most glue/epoxy, will crack or shatter. That's exactly what happened when my drone crashed. After the crash, I decided to buy a frame from Hobbyking. The frame I bought was decently strong, and this time, it had the correct mounting holes, and it was made out of hard plastic. This frame was mostly successful, but when I crashed again, this frame cracked just like my first one. The Hobbyking purchased frame was very compact, measuring 250 x 250 mm, which is almost 10" x 10". I currently use the SK450 frame in my build. The benefits of this frame are that it is larger, meaning a lot more space to install parts, it uses a combination of fiberglass and plastic, so it isn't conductive, and it's modular. All the components making up the frame are completely removable and replaceable. This is the standout feature for me. If you crash and snap something, you can unscrew it and order the replacement part. Also, 3D printing websites have lots of support for this frame, meaning that you can 3D print accessories and add-ons that will fit this frame. The decision for building or buying your frame is up to you, depending on how experienced you are with D.I.Y projects. My recommendation for beginners would be to buy a frame, because they are affordable, and with the SK450 and many others, well designed. In my mind, the easiest part of putting together a drone is picking the transmitter and receiver. While there are many fancy transmitters with screens and other unnecessary functions, the one transmitter you should get is the Turnigy 5X 5CH. The reason being that this transmitter comes with a receiver bundled in, and suits the basic needs for flying a quad at a low price. When you go to buy this transmitter/receiver, you will notice that it comes in two variants: mode 1 and mode 2. These variants are two of the four types of RC transmitter layouts. To understand an RC transmitter, you have to know the basic controls. Throttle is the level of power given to the motors, the aileron is the banked turns left and right, the elevator is the forward and backwards movement, and the rudder controls to yaw of an aircraft (circular turning motion, spinning on an axis). Mode 1 has the throttle and aileron assigned to the right stick, and the elevator and rudder assigned to the right stick. Mode 2 is not the opposite, instead, switching the places of the elevator and the throttle. There are many tutorials on how to fly your drone, but I will write a separate post detailing it. The last and most forgotten part of a drone is the power distribution system. I actually didn't know you need this on my first quad. Most people would think that the battery just has ports to plug the ESCs into and flight controller into, but it's not as simple as you would think. Basically, you need something to evenly split the power from your battery to all of your ESCs, and don't worry about your flight control board, it gets its juice from the ESC plugged into the set of the first motor pins (that's how it works with the KK2.1 board). My first quad, after realizing I forgot about it, had a wire splitter that plugged into the ESCs from the battery. This was a decent solution, but the cables were a mess. I would recommend picking up one of the Hobbyking manufactured power distribution boards (not cable splitter). The reason for this is to make connecting all the cables much easier. One thing you have to keep in mind are the connectors for the battery and the ESCs. There are many battery connectors, but the most common is the XT60. This connector is usually yellow, and has two holes at the top. It tapers slightly when you get to the top, and you can't plug it in wrong. When you choose a battery, look on the product page and find what type of discharge plug it is. Make sure that this discharge plug matches the input plug for your power distribution board. There are some ESCs that require you to solder connectors on, but most ESCs use bullet connectors. This type of connector comes in many sizes, measured in millimeters. The ESC input on your power distribution board should match the power output connector on your ESCs. Another important and usually overlooked detail is the connectors on the motors. They are usually bullet connectors, like ESCs, but just make sure that your motor and ESC bullet connectors match in terms of size. All of the information regarding connectors can usually be found directly on the product page. If the wiring seems a little complicated at this point, don't worry, I will recap what I just said. From the motors, three wires come out. One is for positive power, one for negative power, and the other is for signal, or data carried to the flight controller board. These wires will plug into your ESC. From each ESC, there with be three wires coming out. One will be positive power, the other will be negative power, and the third will be one wire made up of positive power for the flight controller board, negative power for the flight control board, and signal for the flight control board. The positive and negative power bullet connector cables coming from each ESC will then plug into the aforementioned power distribution board. MAKE SURE YOU PLUG IN THE NEGATIVE WIRE INTO THE NEGATIVE SLOT, AND THE POSITIVE WIRE IN THE POSITIVE SLOT. If you don't, something will end up short circuiting, leading to a possible fire. Just for your info, male bullet connectors look like small bullets, and female bullet connectors are the holes in which the male connectors sit in. The third wire coming out of the ESC will not be a bullet connector, instead a flat cable consisting of three thin wires. Coming from the power distribution board will be a single XT60 or other connector that your will plug into your battery. Also, any positive power wire will be represented by a reddish color, any negative power wire will be brown or black, and any signal wire will usually be yellow, or any other color besides black/brown or red. Just remember that the previous process happens four times in the case of a quadcopter, one time for each motor. Because of this, there will be many wires. I suggest buying some cable or zip ties and/or adjustable Velcro straps. One very important tip is that even if your frame isn't conductive, it could include metal screws or brackets. Make sure components like your flight controller and power distribution board do not touch any sort of conductive material. I learned this the hard way when my power distribution board shorted out and destroyed one of my ESCs, my flight control board, and my battery. If you're wondering how to mount all your components, I will have a separate post where I show you how to actually build a drone. If you're reading this, you probably came from my YouTube channel. If not, subscribe to my channel, which focuses on tech reviews. I will also be posting camera footage from flights with my quadcopter, and possibly video tutorials on D.I.Y drones to furthermore make drones as easy as making microwave mac n' cheese.

Monday, August 1, 2016

Choosing a Battery, ESCs, Motors, and Flight Controller


Today marks the second day of this blog, where I will be making D.I.Y drones seem like cooking microwave mac n' cheese. The first post was more of a background story and end goal of this blog, but today, I will dive right into the fine details of how I successfully built my own drone. If you've read the first post, I mentioned that the first drone I tried to build was a massive failure. The reason being was that I had motors with too high of a kv or kilo voltage. The kv of a motor is an essential part of building anything with a motor. In simple terms, KV show how fast a motor spins. A motor that has a higher kv will spin fast, but it will require more power than a motor with a low kv. You might be wondering how a motor with a low kv generates lift. The solution is larger propellers. These larger propellers have a larger surface area than smaller ones and thus generate more downward force or lift. The average quadcopter, such as the DJI Phantom, has motors that are 920kv. These motors are the sweet spot in the ratio of power draw to speed. Motors in the 800kv-1200kv range are mainly used for drones that want stable and efficient flight, ideal for shooting cinematic video. My first drone had 2300kv motors. These motors spun very fast, but had tiny props. High kv motors are primarily used for drone racing. The reason is that they don't necessarily have to last very long, but racing drones have to be able to make quick, sharp, and agile movements, things that your first quad shouldn't do. I thought that you would be able to hook the motors up to the flight control board directly. But sadly no, it's not that simple. Linking the motors to the battery and the flight control board are the electronic speed controllers, commonly referred to as ESCs. You can think of the ESC as firmware on a computer. Software is soft, hardware is hard, and firmware is right in the middle, allowing the two to talk to each other. ESCs actually do run the quadcopter's firmware. Speed controllers give commands to the motors, telling them when to spin, how fast to spin (distributing power), and then sending the output signal of the motors back to the flight control board. Now, you can't just grab any ESC, hook it up to your motor and expect it to work. You have to choose and ESC that has the correct amperage that corresponds to your motor. Just in case you didn't know, motors with a higher amperage will draws more power, or amps. So, for example, if you choose a 20A (Amp) motor and a 15A ESC, the ESC won't have the capability to drive the motor. On the flip side, if you choose and ESC that has a higher amperage than your motor, then the ESC might send too much power to your motor, resulting in fried motors. This was my mistake with my first drone. The heart of a drone, the battery, is a very important component. You want the battery to be light, so the aircraft doesn't have to work as hard, but you also want to fly for as long as possible. This is similar to the problem with having a higher powered engine in a car but getting really bad gas mileage, or having a Smart Car engine that is very weak, but gets good gas mileage. I looked on Hobbyking at the weights of the battery packs and I just chose the pack from the most trustworthy manufacturer that was the lightest. The reason I did this was because I didn't really know the measurement for the capacity of the batteries and how to value the capacity of a battery. Lets start with the unit for battery capacity, the milliamp per hour or mAH. You might have seen this unit used to show the capacity of a smartphone or laptop battery. The iPhone 6s has a battery around 2,000mAH, just for reference. My first drone had a 1,400mAh battery. In my mind, I reasoned that if an iPhone can barely last a day on a single charge, my drone should last about 20 minutes if I don't go too high. This is the worst way to calculate what type of battery you need. You need to factor in the of the kv of your motors and also the weight of your drone. As I said earlier, racing quads don't last too long. This is because they need a light battery for agility, but have high kv motors. I got around 5-6 minutes with my first quad, a little bit short even for a racing quad. Another thing to keep in mind when deciding on a battery is the discharge rate. Discharge rate can be symbolized by the letter c. So for example, a person might say that they have a 25-35C 2,200mAH battery. This means that their battery discharges 25-35 times its total capacity. In this case, the 2,200mAH battery could discharge between 55 and 77 amps. The reasoning behind this calculation is quite simple. 1000mAh = 1 Amp. This means that 2,200mAh = 2.2 Amps. Since the "c" rating means whatever the c rating is multiplied by a battery's capacity, it's 25*2.2, which equals 55 amps, and 35*2.2, which equals 77 amps. Keep in mind that 55 or a maximum of 77 amps is distributed across four or however many motors you have in your drone. If you divide 77 by 4, you get 19.25 amps and below per motor in the case of a quadcopter. So if you think that you can just say, "let me round the 19.25 to 20 amps, you're wrong. You don't want a battery to work full time all the time to drive your motors at the lowest required amperage. If you had a battery with these exact specifications (which I do), I would recommend getting 15 amp ESCs (which I have). If you thought that this whole calculus lecture was difficult, most parts on Hobbyking actually provide a recommended parts list. You shouldn't start with deciding on the motors first, because as you've seen, the motors are dependent on the ESCs, which are dependent on the battery. Start with the battery, calculate the amperage of the ESCs or look at the recommended list of components, then choose your ESCs based on this information, and then finally choose your motors based on what ESC you have chosen (the motor and the ESC should have the same amperage). The last necessary component for an electronic flying machine is some sort of controller, or the brain behind the whole operation. Flight controllers are one of the easiest parts to pick in a drone build. The reason why is because manufacturers have really perfected their flight controllers and separated them into three categories. At the bottom, you have the least advanced controllers, but they get the job done and are well suited for beginners. The next level up, you have the flight controllers for the consumers who have a sizeable budget and are usually not beginner pilots. The flight controllers in this level cater to people who want to add many accessories. At the very top, you have the Rolls-Royce style of flight controllers that include all the features and functions that anyone could want. One of the new features of these top-tier controllers is autonomous flight. Companies like DJI and 3DR, who are both non D.I.Y drone manufacturers, have actually developed flight controllers that are widely available to anyone wanting to spend a pretty penny. One of the best regarded flight controllers for beginners and for all is the Hobbyking manufactured KK2.1 board. There are many setup and tutorials online for this flight controller, and it is not only affordable, under $20, but is very reliable and easy to use. There are other entry level options, such as the Naze board, but the KK2.1 board is by far the flight controller I recommend. I actually have this controller in my quad right now, and it was the one thing I got right in my first quad. The KK2.1 is powered by 5 volts supplied from one of the ESCs that plug into the board (I will have another post dedicated to actually building the quad). It has an auto level feature that is very helpful for first time flyers or anybody who wants a stable drone. The board isn't like an iPhone either. It's completely customizable through the on-screen interface. The flight controller, ESCs, motors, and battery are all part of the necessary components to keep your drone from sitting in your room as a side project for a year. My next post will discuss the frame and transmitter + receiver you should use for your drone if you are a beginner. I understand that there might be more advanced topics that I haven't talked about, but like I said in my first blog post, I am committed to making D.I.Y drones easy to build and understand. All the info that comes off my keyboard is specifically intended for beginners, and beginners only.