make_an_arduino_controlled_robot.pdf

(19491 KB) Pobierz
Make an Arduino-
Controlled Robot
Michael Margolis
Make an Arduino-Controlled Robot
by Michael Margolis
Copyright © 2013 Michael Margolis. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are
/my.safaribooksonline.com).
For more information, contact our corpo-
also available for most titles (http:/
rate/institutional sales department: 800-998-9938 or
corporate@oreilly.com.
Editor:
Brian Jepson
Production Editor:
Rachel Steely
Interior Designers:
Nellie McKesson and Edie
Freedman
October 2012:
2012-09-12
2012-10-03
First Edition
Revision History for the First Edition:
First release
Second release
See
http:/
/oreilly.com/catalog/errata.csp?isbn=9781449344375
for release details.
While every precaution has been taken in the preparation of this book, the publisher and authors assume
no responsibility for errors or omissions, or for damages resulting from the use of the information contained
herein.
ISBN: 978-1-449-34437-5
[LSI]
Table of Contents
Preface
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
1.
Introduction to Robot Building
. . . . . . . . . . . . . . . . . 1
Why Build a Robot?
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
How Robots Move
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Tools
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.
Building the Electronics
. . . . . . . . . . . . . . . . . . . . . . . . 9
Hardware Required
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Construction Techniques
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Soldering
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Building the Motor Controller
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Soldering the Reflectance Sensors
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Making a Line Sensor Mount
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Next Steps
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.
Building the Two-Wheeled Mobile Platform
. . 21
Hardware Required
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Mechanical Assembly
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Lay Out the Chassis Parts
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Motor Assembly
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Assemble the Chassis Components
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Attaching the Control Electronics
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Mounting the IR sensors
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Mounting the IR Sensors for Edge Detection
. . . . . . . . . . . . . . . . . . . 39
Mounting the IR Sensors for Line Following
. . . . . . . . . . . . . . . . . . . . 41
iii
Zgłoś jeśli naruszono regulamin