ebook img

Practical Arduino Engineering PDF

320 Pages·2011·9.93 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Practical Arduino Engineering

For your convenience Apress has placed some of the front matter material after the index. Please use the Bookmarks and Contents at a Glance links to access them. Contents at a Glance  About the Author...................................................................................................xii  About the Technical Reviewer.............................................................................xiii  Acknowledgments...............................................................................................xiv  Preface..................................................................................................................xv  Chapter 1: The Process of Arduino Engineering.....................................................1  Chapter 2: Understanding the Arduino Software..................................................15  Chapter 3: Robot Engineering Requirements: Controlling Motion........................27  Chapter 4: Adding Complexity to the Robot: Working with LCDs..........................61  Chapter 5: Robot Integration Engineering a GPS Module with the Arduino..........97  Chapter 6: Interlude: Home Engineering from Requirements to Implementation133  Chapter 7: Robot Perception: Object Detection with the Arduino.......................165  Chapter 8: Mature Arduino Engineering: Making an Alarm System Using the Arduino...................................................................................................................197  Chapter 9: Error Messages and Commands: Using GSM Technology with Your Arduino...................................................................................................................217  Chapter 10: Control and Instrumentation: The Xbox Controller and the LabVIEW Process...................................................................................................................239  Chapter 11: Controlling Your Project: Bluetooth Arduino...................................277  Appendix A: Hardware and Tools........................................................................299  Index...................................................................................................................303 iv C H A P T E R 1 The Process of Arduino Engineering In this chapter, we will discuss the engineering process and how you can use it streamline your prototypes by avoiding problems with hardware and software and keeping to a fixed schedule. Throughout this book, you will have projects that will be organized into a sequence I like to call the “engineering process.” Here’s a quick summary of the sequence: 1. Requirements Gathering 2. Creating the requirements document 3. Gathering hardware 4. Configuring the hardware 5. Writing the software 6. Debugging the Arduino software 7. Troubleshooting the hardware 8. Finished prototype As you can imagine, even this summary of engineering process is very effective when prototyping, which is why we will use it with the Arduino in this book. What is the Arduino? The Arduino is a very customizable microcontroller used by hobbyists and engineers alike. Also, it is open source, which means that the source code is available to you for your programming needs; the integrated development environment (IDE) (where you will be writing your software) is free, and most the resources you can find are open source. The only thing you have to buy is the Arduino microcontroller itself. The Arduino is supported very well on the Web and in books, which makes it very easy to research how-to topics; a few sites that will help you get started are www.Arduino.cc and http://tronixstuff.wordpress.com/tutorials/. But this book is more than simply a how-to reference; this book is going to teach you the engineering process—a skill that is useful for making projects more readable, efficient, and reliable. Gathering Your Hardware Before we examine the engineering process steps, it’s important to know some of the parts and materials you’ll need. Throughout this book, you will need the following pieces of hardware to complete the 1 CHAPTER 1  THE PROCESS OF ARDUINO ENGINEERING various projects we’ll be working on (for a complete list of hardware used in this book, please see Appendix A): • Arduino Duemilanove or UNO: You can use either the Duemilanove or the UNO micro-controller for this book (see Figure 1-1). They have multiple I/O ports for sensors and motors. We will be using these I/O points to control and keep track of the various projects in this book. Figure 1-1. Arduino UNO (left) and Duemilanove (right) • ArduinoBT or Bluetooth Mate Silver: I suggest using the Bluetooth Mate Silver modem for this book because it can make your Arduino Duemilanove or UNO behave like an ArduinoBT at half the cost. Also, the ArduinoBT does not have a 3.3V output point, so you would need to add circuitry to the Arduino in order to get 3.3V, which you need in Chapter 6 of this book. Figure 1-2 illustrates these two pieces of hardware. 2 CHAPTER 1  THE PROCESS OF ARDUINO ENGINEERING Figure 1-2. ArduinoBT (left) and Bluetooth Mate Silver (right) • Solderless breadboard: Another very important piece of hardware is the solderless breadboard (see Figure 1-3), which is used to implement your circuitry. For this book, you need to have a midsize solderless breadboard. It will be used in both the design and troubleshooting phases of the projects. 3 CHAPTER 1  THE PROCESS OF ARDUINO ENGINEERING Figure 1-3. An example of a solderless breadboard • Wire: We will use a large quantity of wire in this book; you can get a wire jumper kit at almost any electronics store. • Arduino shields: We will be using several shields in this book, including the Motor, GPS, GSM, and LCD shields (see Figure 1-4). 4 CHAPTER 1  THE PROCESS OF ARDUINO ENGINEERING Figure 1-4. A couple of Aeduino Shields the GPS Shield on the left and the motor shield on the right. • Motor shield: This shield is used to control motors up to 18V. It includes a surface- mount H-bridge, which allows for a higher voltage motor to be used as well as for control of two motors. For more information on H-bridges, please see Chapter 3. • GPS shield: This shield is used to get positioning information from GPS satellites. It uses the National Marine Electronics Association (NMEA) standard, which can be parsed to tell you any number of things such as longitude and latitude, whether the GPS has a fix, what type of fix, a timestamp, and the signal-to-noise ratio. For more information on GPS systems, please see Chapter 5. • GSM shield: This shield will allow you to use the power of the Global System for Mobile Communications (GSM) to send text messages back and forth at great distances; this shield also uses a standard protocol called the GSM protocol. • LCD shield: We will use this to add images and life to our robots. The LCD shield can also be used to create your own user interface for your robot or any other project that you would like to persue. • Sensors: These are very important because they give your projects life. Some sensor examples are PIR (Passive Infrared), sonar, and temperature (see Figure 1- 5). 5 CHAPTER 1  THE PROCESS OF ARDUINO ENGINEERING Figure 1-5. A PIR sensor (left) and a Sonar sensor (right) • PIR sensor: This is an outstanding sensor for detecting changes in infrared light and can detect changes in temperature. It is also great at detecting motion, and that’s what we will use it for. • Sonar sensor: Sonar sensors are good at detecting objects in their surroundings. The Sonar sensor we will be using is a Parallax sensor that uses digital pinging to tell how far away an object is. • Temperature sensor: These sensors are used to read temperature. To use them, you first scale the voltage to the temperatures you want to record; you can find more information about this sensor in Chapter 6. • Servos and motors: We will be using motors and servos to control many aspects of the projects (see Figure 1-6). 6 CHAPTER 1  THE PROCESS OF ARDUINO ENGINEERING Figure 1-6. Examples of a few motors: • Miscellaneous: These are the most common components, such as resistors, capacitors, LEDs, diodes, and transistors (see Figure 1-7). Figure 1-7. Miscellaneous pieces of hardware (terminal blocks, capacitors, resistors, LEDs, and switches) 7

Description:
Arduino boards have impressed both hackers and professional engineers. Whether youre a hobbyist or a professional, it isnt just a breadboard and a hazy idea that keeps you going. Its essential to institute a proper design, device instrumentation and, indeed, test your project thoroughly before commi
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.