The LEGO MINDSTORMS EV3 Discovery Book: a beginners guide to building and programming robots
Laurens Valk
Published by No Starch Press
about the author
Laurens Valk is a robotics engineer based in the Netherlands, where he earned a bachelors degree in Mechanical Engineering from Delft University of Technology. He is a member of the MINDSTORMS Community Partners (MCP), a select group of MINDSTORMS enthusiasts who help test and develop new MINDSTORMS products. He started building robots with the EV3 system a year before its 2013 release, and one of his designs appears on the EV3 packaging as an official bonus robot.
Laurens enjoys designing robots and creating tutorials to build and program them, so that robot fans around the world can re-create the designs and learn more about robotics. He has worked on several LEGO robotics books, including the best-selling first edition of this book, The LEGO MINDSTORMS NXT 2.0 Discovery Book (No Starch Press, 2010). He blogs about robots at http://robotsquare.com/ .
about the technical reviewer
Claude Baumann has taught advanced LEGO MINDSTORMS robotics in after-school classes for 15 years. He created ULTIMATE ROBOLAB, a cross-compiler environment that allowed graphical programming of LEGO RCX firmware, and with it conceived the worlds only self-replicating program for the LEGO RCX (some call it a virus). More recently, he participated as a MINDSTORMS Community Partner (MCP) during the development of the new EV3 Intelligent Brick. He has been the assessor of various high school robotics projects and is the author of Eureka! Problem Solving with LEGO Robotics (NTS Press, 2013), several articles, and conference presentations. His special interest is robotic sound localization. The head of a network of high-school boarding institutions in Luxembourg (EU), Claude is married with three children and three marvelous grandchildren.
acknowledgments
First and foremost, Id like to thank the readers of the first edition. Your countless emails and comments from all over the world have been a true inspiration for writing this book, and many new topics were inspired by your feedback.
The philosophy and structure of this book is the same as that of the first edition, but because of the transition from LEGO MINDSTORMS NXT to EV3, it was essentially rewritten from scratch. This was only possible thanks to the help of many talented people.
Many thanks go to Claude Baumann for reviewing the book for technical accuracy and for suggesting improvements. Thanks also to Marc-Andr Bazergui, Martijn Boogaarts, Kenneth Madsen, and Xander Soldaat for testing prototypes of the robots featured in the book as early as 2012.
Further thanks to the people at No Starch Press for making the first edition a success and for working with me on this new edition. Thanks to my publisher William Pollock, to my editor Seph Kramer, to Serena Yang for keeping the project on schedule, to Riley Hoffman and Alison Law for laying out the raw text on colorful pages, and to Leigh Poehler for dealing with all my business-related questions over the past years.
Thanks to the LEGO Group for developing such an inspirational and educational robotics kit, and for involving the community early in the design process. Thanks to the LEGO MINDSTORMS EV3 team, including Camilla, David, Flemming, Henrik, Lars Joe, Lasse, Lee, Linda, Marie, Steven, and Willem.
Thanks to the LDraw community for developing the tools required to create the building instructions in this book. In particular, thanks to Philippe Hurbain for creating 3D LDraw models of the EV3 components, to Michael Lachmann for creating MLCad, to Travis Cobbs for creating LDView, and to Kevin Clague for developing LPub 4 and LSynth. Also, thanks to John Hansen for creating the EV3 screen capture tool.
Finally, thanks to my friends and family for your support throughout the lengthy process of writing this book. Most of all, thanks to Fabinne for your endless encouragement to finish this project. Thank youyoure the best.
introduction
Are you ready to discover the captivating world of robotics? As youre reading this book, I assume that youve selected the LEGO MINDSTORMS EV3 robotics set as your learning tool, and I think thats a great choice.
I first became involved with MINDSTORMS in 2005 when I was 13 years old, using the Robotics Invention System, the version available at the time. It started out as a hobby, but I found robots so fascinating that I decided to pursue an engineering degree. LEGO MINDSTORMS proved to be an excellent resource to get familiar with many robotics and engineering concepts, such as programming and working with motors and sensors.
The purpose of this book is to help you explore the many possibilities of MINDSTORMS in hopes that youll have just as much fun with this robotics set as I have and that youll learn a lot along the way!
why this book?
The LEGO MINDSTORMS EV3 robotics set includes numerous parts and instructions for five robots. I think youll find that its a lot of fun to build and program these robots, but exploring beyond these models can be a bit overwhelming when youre just getting started. The set provides you with the tools you need to make the robots work, but the user guide covers only a fraction of what you need to know in order to build and program your own robots.
This book is designed as a guidebook to help you discover the power of LEGO MINDSTORMS EV3 as you learn to invent, build, and program your very own robots.
is this book for you?
This book assumes no previous experience with either building or programming LEGO MINDSTORMS. As you read, youll move from basic to advanced programming and learn to build increasingly sophisticated robots. New users should begin with will be especially interesting for more advanced readers.
how does this book work?
Although you could use it as such, this book isnt intended as a reference manual; its more like a workbook. Ive mixed together building, programming, and robotic challenges to avoid long, theoretical chapters that can be hard to wade through.
For example, youll learn basic programming techniques at the same time that you learn to make your first robot move, and youll learn about more advanced programming as you build new robots. This book takes a learning by doing approach, which I think is the best way to learn how to build and program MINDSTORMS robots.
the discoveries
To help you really understand the concepts presented in each chapter, Ive included many so-called Discoveries , or challenges, throughout the book. The Discoveries will challenge you to expand the example programs or even come up with completely new programs. For example, once youve learned how to make the robot play sounds and display text on the screen, youll be challenged to make a program that has the robot show subtitles on the screen while it speaks.
Youll also find Design Discoveries at the end of many chapters. These will give you ideas to modify or improve the robot you built in that chapter. For example, youll be challenged to make a racing robot drive faster by adding gears between the motors and the wheels, and youll even be challenged to design a new robot that turns your EV3 into an intruder alarm!
estimating difficulty and time
To help you choose which Discoveries you might want to tackle, Ive provided an estimated difficulty level for each one. Easy Discoveries (