A Beginner’s Guide To Drones, UAVs, And ROVs

Transcription

BUILDING YOUROWN DRONESA Beginner’s Guide to Drones, UAVs, and ROVsJohn Baichtal800 East 96th Street,Indianapolis, Indiana 46240 USA

iiBuilding Your Own DronesBuilding Your Own Drones: A Beginners’ Guideto Drones, UAVs, and ROVsEditor-in-ChiefGreg WiegandExecutive EditorCopyright 2016 by Que PublishingRick KughenAll rights reserved. No part of this book shall be reproduced, stored ina retrieval system, or transmitted by any means, electronic, mechanical,photocopying, recording, or otherwise, without written permission fromthe publisher. No patent liability is assumed with respect to the use ofthe information contained herein. Although every precaution has beentaken in the preparation of this book, the publisher and author assumeno responsibility for errors or omissions. Nor is any liability assumed fordamages resulting from the use of the information contained herein.Development EditorISBN-13: 978-0-7897-5598-8ISBN-10: 0-7897-5598-XLibrary of Congress Control Number:Ginny Bess Munroe,Deadline DrivenPublishingManaging EditorKristy HartProject EditorElaine WileyCopy EditorBart ReedPrinted in the United States of AmericaFirst Printing: August 2015IndexerErika MillenTrademarksProofreaderAll terms mentioned in this book that are known to be trademarks orservice marks have been appropriately capitalized. Que Publishing cannotattest to the accuracy of this information. Use of a term in this book shouldnot be regarded as affecting the validity of any trademark or service mark.Jess DeGabrieleWarning and DisclaimerEvery effort has been made to make this book as complete and as accurateas possible, but no warranty or fitness is implied. The information providedis on an “as is” basis. The author and the publisher shall have neitherliability nor responsibility to any person or entity with respect to any loss ordamages arising from the information contained in this book.Technical EditorJames Floyd KellyPublishingCoordinatorKristen WattersonInterior DesignerMark ShirarBook DesignerMark ShirarBulk SalesQue Publishing offers excellent discounts on this book when ordered inquantity for bulk purchases or special sales. For more information, pleasecontactU.S. Corporate and Government or sales outside of the U.S., please contactInternational Salesinternational@pearsoned.comCompositorNonie Ratcliff

iiiContents at a GlanceIntroduction xiiiCHAPTER 1A History of DronesCHAPTER 2Showcase of Cool DIY DronesCHAPTER 3Overview of Commercial Drones and KitsCHAPTER 4Building a Quadcopter I: Choosing an AirframeCHAPTER 5Rocket Drone ProjectCHAPTER 6Building a Quadcopter II: Motors and PropsCHAPTER 7Blimp Drone ProjectCHAPTER 8Building a Quadcopter III: Flight ControlCHAPTER 9Drone Builder’s WorkbenchCHAPTER 10Building a Quadcopter IV: Power SystemsCHAPTER 11Waterborne Drone ProjectCHAPTER 12Building a Quadcopter V: AccessoriesCHAPTER 13Making a RoverCHAPTER 14Building a Quadcopter VI: SoftwareGlossary 231Index 237192151698110311712714717319122135

ivBuilding Your Own DronesTable of ContentsIntroductionxiiiWho This Book Is ForxiiiHow This Book Is OrganizedChapter 1A History of Dronesxiii1What Is a Drone? 2Three Terrrains3Anatomy of a Drone5Summary 7Chapter 2Showcase of Cool DIY DronesBicycle Rim Quadcopter993D-Printed Mini Quadcopter9Clothesline Racer 11Vessels11Radio-Controlled BlimpFPV QuadcopterOpen RC Trike1214Foldable QuadcopterMini-Quadcopter14153D-Printed RC BoatTricopter121617Mecanum Wheel Rover18Summary 19Chapter 3Overview of Commercial Drones and KitsParallax ELEV-8 QuadcopterDJI Phantom 2 Vision 2124OpenROV 26Actobotics Nomad29Brooklyn Aerodrome FlackSummary 343121

Table of ContentsvChapter 4Building a Quadcopter I: Choosing an AirframeWhich Airframe?3535Choosing Between Commercial Options 37Making Your Own Airframe 38Project #1: MakerBeam Airframe 41MakerBeamParts43Steps4441Summary 50Chapter 5Rocket Drone Project51Amateur Model Rocketry51Quick-and-Dirty Arduino Guide54Project #2: Data-Gathering Rocket 60Parts for Building the Data-Gathering Rocket 60Steps for Building the Data-Gathering Rocket 61Programming the Payload 65Summary 67Chapter 6Building a Quadcopter II: Motors and PropsChoose Your Motors70Outrunner Versus Inrunner 70Brushed Versus Brushless 71AC Versus DC 72Choose Your PropellersProp Adapters7374Project #3: Attach the Props and MotorsParts7576Steps for Attaching the Props and MotorsSummary 807769

viBuilding Your Own DronesChapter 7Blimp Drone ProjectRadio Control8181Transmitters 82Receivers83ESC (Electronic Speed Controller) 83Project #4: Blimp Drone 84Parts85Arduino PartsSteps8686Autonomous Control with an ArduinoCode99100Summary 102Chapter 8Building a Quadcopter III: Flight ControlKnow Your ESCs103Common ESCs105Programming ESCsReceiver106109Flight Controller110Flight Controller Examples111Installing the Flight ElectronicsParts114114Installing the ESCs114Installing the Flight ControllerInstalling the Receiver114116Summary 116Chapter 9Drone Builder’s WorkbenchDesign ItDrive It117118Measure ItCut It120Wire ItAttach ItCNC It120121123124Summary 126117103

Table of ContentsviiChapter 10 Building a Quadcopter IV: Power SystemsChoosing a Battery127128Battery Types 128Adding Bullet Connectors130Why Bullet Connectors?130Parts List130Steps for Adding Bullet ConnectorsAssembling the Wiring HarnessParts131137138Steps for Assembling the Wiring Harness 138Wiring the Flight Controller and Receiver 143Summary 145Chapter 11 Waterborne Drone Project147Realities of Waterborne Electronics 148Disadvantages of Waterborne Electronics 148Advantages of Waterborne Electronics 148Waterproofing Your ElectronicsSandwich ContainerPelican 1000-SeriesSealing a Tube150151152XBee Mesh Networking153Project: Soda Bottle BoatParts149154155Building the Drone156Building the Controller166Programming the Soda Bottle Boat170Summary 172Chapter 12 Building a Quadcopter V: AccessoriesAdd Accessories to Your QuadcopterCamera174First-Person Video (FPV)Landing Gear 176Parachute176175174173

viiiBuilding Your Own DronesProtective Plate or Dome 177Prop Guards178Project: Adding Accessories to the Quadcopter 179Install the Camera Mount 180Install the Landing Gear 184Install the Top Plate 186Summary 189Chapter 13 Making a Rover191Advantages and Disadvantages of Rovers 192Advantages of Rovers 192Disadvantages of RoversChassis Options3D PrintedTamiyamBot192193193194194Arduino RobotActobotics Bogie195196Navigating with Radio FrequencyIdentification Tags 197Project: RFID-Navigating RoverParts200Steps200199Programming the RFID-Navigating Rover 217Summary 220

Table of ContentsixChapter 14 Building a Quadcopter VI: SoftwareFlight Control Software221222OpenPilot 222MultiWii223APM Planner 2.0223eMotion 224AR.Freeflight 2243DR Solo App226Configuring the MultiWii226Examining the MultiWii Control SketchPre-Flight ChecklistSummary 230Glossary 231Index237229228

xBuilding Your Own DronesAbout the AuthorJohn Baichtal has written or edited over a dozen books, including the award-winning Cultof LEGO (No Starch Press, 2011), LEGO hacker bible Make: LEGO and Arduino Projects (MakerMedia, 2012) with Adam Wolf and Matthew Beckler, Robot Builder (Que, 2014), and BasicRobot Building with LEGO Mindstorms NXT 2.0 (Que, 2012). His most recent book is Maker Pro(Maker Media, 2014), a collection of essays and interviews describing life as a professionalmaker. John lives in Minneapolis with his wife and three children.

AcknowledgmentsxiDedicationThis book is dedicated to my Grandma Marion, who is a couple months shy of her 98th birthday as I writethis. She was in the hospital a few weeks ago with heart problems and the doctors told her to get her affairsin order, and sent her home in hospice. Grandma isn’t ready to leave the party, however, and she’s beenfeeling better, buoyed by the great care she’s received from my mom and aunt. Her love of life and passionfor writing give me strength every day.AcknowledgmentsWhen thinking of my family, I am confronted by two irrefutable facts:1) Arden, Rosemary, and Jack are the best kids anyone could ask for.2) None of this would mean anything without my dear Elise. I love you!Workwise, thanks for the inspiration and assistance to Windell H. Oskay, Johngineer,Matthew Beckler, Riley Harrison, David Lang, Trammell Hudson, AnnMarie Thomas,Pete Prodoehl, Bruce Shapiro, Alex Allmont, John Edgar Park, Dexter Industries, MiguelValenzuela, Pete McKenna, Steve Norris, Steven Anderson, MakerBeam, Jude Dornisch,SparkFun Engineering, Brooklyn Aerodrome, Adam Wolf, Michael Freiert, Sophi Kravitz,Christina Zhang, Lenore Edman, Rick Kughen, Sean Michael Ragan, John Wilson, SusanSolarz, Akiba, Mark Frauenfelder, Chris Berger, Michael Krumpus, Alex Dyba, Brian Jepson,Becca Steffen, Dave Bryan, Actobotics, Mike Hord, Makeblock, Pat Arneson, and ErinKennedy. Apologies to anyone I forgot!My mom, Barbara, compiled the Glossary, and I am forever indebted to her for helping out,in this and so many other things.

xiiBuilding Your Own DronesWe Want to Hear from You!As the reader of this book, you are our most important critic and commentator. We valueyour opinion and want to know what we’re doing right, what we could do better, whatareas you’d like to see us publish in, and any other words of wisdom you’re willing to passour way.We welcome your comments. You can email or write to let us know what you did or didn’tlike about this book—as well as what we can do to make our books better.Please note that we cannot help you with technical problems related to the topic of thisbook.When you write, please be sure to include this book’s title and author as well as your nameand email address. We will carefully review your comments and share them with the authorand editors who worked on the book.Email:Mail:feedback@quepublishing.comQue PublishingATTN: Reader Feedback800 East 96th StreetIndianapolis, IN 46240 USAReader ServicesVisit our website and register this book at quepublishing.com/register for convenient accessto any updates, downloads, or errata that might be available for this book.

IntroductionDrones are in the news all the time—and let’s face it, they’re likely to be an increasing part of ourlives. We can throw on a tinfoil hat and look for small helicopter-shaped shadows, or we can learnas much as we can about these interesting devices. I suggest the latter—there is a lot of cool technology out there, and the best way to control it is to understand it.Who This Book Is ForAspiring drone-builders of all stripes will appreciate this book, as it covers many different areas ofbuilding your own drone projects, including not only electronics, but motors, airframe-building techniques, and tools.How This Book Is OrganizedThis book consists of a main project, a quadcopter you’ll build over the various chapters. The alternating chapters describe a variety of projects such as a data-gathering rocket drone, a blimp, and aboat made out of soda bottles, giving you a perspective on drones beyond those quadcopters thathave everyone abuzz. Chapter 1, “A History of Drones,” consists of a history of drones and brings you up to speed oncurrent technological limits and terminology drone pilots use.Chapter 2, “Showcase of Cool DIY Drones,” describes a dozen cool drones, including UAVs(unmanned aerial vehicles), ROVs (remotely-operated underwater vehicles), and rovers built byhobbyists and amateurs alike.Chapter 3, “Overview of Commercial Drones and Kits,” introduces a number of commercialdrones that you might care to purchase. Everything from a quadcopter packing a video camerato an undersea explorer is on the table.Chapter 4, “Building a Quadcopter I: Choosing an Airframe,” begins the quadcopter project asyou learn about a variety of airframes and chassis products, and you begin building your quadcopter’s airframe out of a kit.Chapter 5, “Rocket Drone Project,” breaks from the quadcopter and has you build a rocketdrone, a model rocket with a basic Arduino payload.

Introductionxiv Chapter 6, “Building a Quadcopter II: Motors and Props,” discusses two key components of your quadcopter build. You are presented the various options for purchasingmotors and propellers, and you are shown how to mount them onto your quadcopter’sairframe.Chapter 7, “Blimp Drone Project,” shows you how to build a blimp drone, a smallwooden robot hoisted aloft by helium balloons.Chapter 8, “Building a Quadcopter III: Flight Control,” shows you how to control yourrobot while its in the air, with flight controllers and electronic speed controllers doingmost of the work.Chapter 9, “Drone Builder’s Workbench,” covers the various tools I used to build theprojects in the book.Chapter 10, “Building a Quadcopter IV: Power Systems,” introduces a very importanttopic: how to power your quadcopter. This includes instructions on building a powerdistribution system to deliver electricity to the motors.Chapter 11, “Waterborne Drone Project,” demonstrates how to make a simpleremotely-operated vehicle build out of soda bottles.Chapter 12, “Building a Quadcopter V: Accessories,” covers the variety of accessories,such as camera mounts, available for purchase or creation.Chapter 13, “Making a Rover,” shows you how to make a rolling robot that uses RFIDtags to navigate.Chapter 14, “Building a Quadcopter VI: Software,” profiles some flight control softwareand autopilot firmware and also explores the ins and outs of the control software of theautopilot we used in the copter project. With the conclusion of the book, you will complete the quadcopter build.Finally, the Glossary explains the various terms used throughout the chapters.If you have any questions, or want to learn more about the projects and my other books,the best way is to check out my Facebook page, www.facebook.com/baichtal. You can alsoemail me at nerdyjb@gmail.com or follow my Twitter feed @johnbaichtal. Good luck andhappy drone building!

4Building a Quadcopter I: Choosingan Airfram

as possible, but no warranty or fi tness is implied. The information provided is on an “as is” basis. The author and the publisher shall have neither liability nor responsibility to any person or entity with respect to any loss or damages arising from the information contained in this book. Bulk Sales