Arduino Inventor's Guide: Learn Electronics by Making 10 Awesome Projects
We encourage you to build the projects as you go learning by doing These projects have been carefully designed to introduce both the tools and skills for programming and circuit building as well as fabricating using cardboard scraps and other household items The fun of learning is in playing out the entire process and that is what this book offers materIals The electronics components used throughout this book are based around our flagship product the SparkFun Inventor’s Kit KIT-13969 and are also readily available individually from a number of sources online We’ve also used a few parts that aren’t in the Inventor’s Kit and these additional parts are available as a single kit as well https www sparkfun com NoStarchArduino If you already have an electronics starter kit or want to buy the components separately rather than getting the Inventor’s Kit you can find the full Bill of Materials BOM for the book in Tables 1 and 2 We’ve included individual lists of materials at the beginning of each project as well We’ll also be using many basic building materials like cardboard cardstock construction paper drinking straws and paper plates to build the enclosures for the projects As you start working with electronics and integrating them with common materials you’ll find yourself looking at everyday household items in a new way Qt y Pa r t n u m b e r D e s c r i P ti o n 1 1 1 1 1 1 1 1 2 1 1 1 DEV-13975 CAB-11301 PRT-12002 PRT-11026 COM-12062 COM-09264 COM-11508 COM-11507 COM-10302 or COM-09190 COM-08588 COM-09806 COM-13689 SparkFun RedBoard or other Arduino-compatible board USB Mini-B cable Solderless breadboard Male-to-male jumper wires qty 30 Assorted color LEDs qty 20 RGB LED common cathode 10 kΩ resistors qty 20 330 Ω resistors qty 20 Push buttons Diode 10 kΩ potentiometer NPN transistor 2N2222 or BC337 xx inTroducTion table 1 SparkFun Inventor’s Kit parts used in the book
table 2 Additional parts used in the book not included in the SparkFun Inventor’s Kit Qt y Pa r t n u m b e r 1 1 1 1 1 1 1 SEN-09088 SEN-10988 SEN-08680 COM-07950 LCD-00709 ROB-09065 ROB-11696 Qt y Pa r t n u m b e r PRT-12043 PRT-13870 D e s c r i P ti o n Photoresistor TMP36 temperature sensor 50 mm SoftPot membrane potentiometer Piezo buzzer 16 2 character LCD Submicro size servo motor Hobby motor D e s c r i P ti o n Mini breadboard Short 4-inch male-to-male jumper wires qty 30 1 1 2 1 1 1 4 1 1 1 1 PRT-09140 Male-to-female jumper wires qty 10 COM-12062 SEN-09088 PRT-09835 PRT-09100 ROB-13845 ROB-13302 ROB-13259 COM-00102 Assorted color LEDs qty 20 additional LEDs Photoresistor additional 4 AA battery holder AA battery TB6612FNG H-bridge motor driver Geared hobby motors qty 2 Rubber wheel fit for the geared hobby motor qty 2 Mini slide switch requIred tools The only tools you’ll need for these projects are a pair of scissors a craft knife and a hot glue gun However don’t feel limited to these tools If you have a laser cutter available to you use it If you are itch ing to 3D-print a project feel free Our designs are made with paper craft and cardboard in mind but they can be combined with any fabrication technique you want You shouldn’t have to spend any money on the materials for this book if you don’t want to In fact there are probably a few projects you could use the book itself as a material for If you do that’s awesome As former teachers we are familiar with working with very small budgets and our focus is always on the most cost effective building materials such as cardboard paper wood and recycled plastics and metals xxi inTroducTion
Most of the projects in this book are designed to be built as prototypes that can be easily taken apart and reused However if you really like a project and want to make it permanent check out the appendix to see how to solder your project The tools for solder ing and electronics prototyping are relatively inexpensive and you can buy them from SparkFun https www sparkfun com or any hardware store near you requIred Computer Finally you’ll program the Arduino using a computer and a specific set of software tools Just about any average computer can handle the Arduino software If you have a PC running Windows you’ll need to be running Windows XP Vista 7 8 8 1 10 or newer For Mac users currently the latest version of Arduino is compatible with OS X 10 7 Lion or newer If you’re running a fairly standard version of Linux odds are there is a version of Arduino available As of this writing iOS and Android devices are supported only through beta-release software packages still under testing and devel opment You’re welcome to try these but they may not work and if they do they may not be reliable For Windows Mac or Linux users we’ll walk you through the process of setting up your computer in the first project What’s In thIs Book This book includes 10 hands-on projects as well as a primer on electronics and an appendix that covers soldering and other handy tips The projects start with a simple blinking LED and gradually incorporate different electrical components programming concepts and layers of construction sophistication as the projects progress Each project has separate sections on wiring programming and construction so that you can focus on individual aspects We wrap up each project with a Going Further section that gives you ideas for hacking and modifying the project Remember we want you to use these projects as launching points for your own inventions not as end goals electronics Primer Before jumping into the projects we present the foundations of electricity and electronics and intro duce key concepts used throughout the book xxii inTroducTion
Project 1 Getting started with Arduino Covers installing software and gives you a foundation in building and program ming circuits by walking you through a project that lights up an LED Project 2 A stoplight for Your house Explores using a breadboard and controlling multiple components at once to build a three-LED stoplight Project 3 The nine-Pixel Animation Machine Extends the stoplight to nine LEDs in a 3 3 matrix and teaches you about custom functions in Arduino Project 4 reaction Timer Walks you through using a button and an LED to make a game that tests your reaction times Project 5 A Color-Mixing night-Light Explores using a voltage divider and a light sensor to detect a room’s light level and automatically turn a multicolored LED on or off depending on how dark it is Project 6 Balance Beam Introduces the servo motor and how to control it with an external device to make a balance beam desk game Project 7 Tiny desktop Greenhouse Teaches you how to make a greenhouse that senses temperature and automati cally turns a fan on and opens an air vent when it’s too hot This project introduces concepts like controlling a motor with a transistor Project 8 drawbot the robotic Artist Explores simple tabletop robotics using an H-bridge motor controller You’ll build a simple robot that you can program to draw a picture for you Project 9 drag race Timer Shows you how to build a race track for toy cars that records their speeds You’ll use the servo motor light sensor and LCD to build a race timer This project is a Christmas morning dream Project 10 Tiny electric Piano Teaches you how to make music with your Arduino using a soft potentiometer as a small keyboard This project explores the piezo buzzer and how to use the tone function Time to get your piano man on Appendix More electronics Know-how Includes handy tips for using a multimeter soldering and reading the color bands on resistors xxiii inTroducTion