F AMPHIBlONICS Build your wn Reptilian robot o Step-bystep guide to constructing one robot with walking ability and artificial intelligence o Costs under $200 to build-a true hobbyists robot Discusses mechanical construction, electron cs o Pic programmin. use of sensors, and robotic inteligence rt能 e Software chapter includes routines to coordinate TAB the servos for naking, monitoring the sensors OBOTICS Karl and the output and control of sound and light Williams
Amphilbionics
Amphibionics Amphibionics 00 3/24/03 12:49 PM Page i
This page intentionally left blank
This page intentionally left blank
Amphibionics Build Your Own Biologically Inspired robot Karl wiliams McGraw-Hill London Madrid Mexico City Milan New Delhi San Juan Seoul Toronto
Amphibionics Build Your Own Biologically Inspired Robot Karl Williams McGraw-Hill New York Chicago San Francisco Lisbon London Madrid Mexico City Milan New Delhi San Juan Seoul Singapore Sydney Toronto Amphibionics 00 3/24/03 12:49 PM Page iii
The McGraw Hill companies Copyright o 2003 by The McGraw-Hill Companies, Inc. All rights reserved. Manufactured in the United States of America. Except as permitted under the United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the publisher. 0-07-142921-2 The material in this e Book also appears in the print version of this title: 0-07-141245-X. All trademarks are trademarks of their respective ather than put a trademark symbol after every occur- ial fashion only, and to the benefit of the trademark owner, with no intention of infringement of the rk. Where such designations appear in this book, they McGraw-Hill e Books are available at speci discounts to use as premiums and sales promotions, or for use in corporate training programs. For rmation,please contact George Hoare, Special Sales, at george_hoare@mcgraw-hill.comor(212) TERMS OF USE This is a copyrighted work and The McGraw-Hill Companies, Inc ("McGraw-Hill)and its licensors reserve all hts in and to the work. Use of this work is subject to these terms. Except as under the Copyright Act of 1976 and the right to store and retrieve one copy of the work, you may not decompile, reproduce, modify, create derivative works based upon, transmit, distribute, disser or sublicense the work or any part of it without McGraw-Hill,s prior consent. You may use the work for your wn noncommercial and personal use; any other use of the work is strictly prohibited. Your right to use the work may be terminated if you fail to comply with these terms. THE WORK IS PROVIDED"AS IS" MCGRAW-HILL AND ITS LICENSORS MAKE NO GUARANTEES OR WARRANTIES AS TO THE ACCURACY, ADEQUACY OR COMPLETENESS OF OR RESULTS TO BE OBTAINED FROM USING THE WORK, INCLUDING ANY INFORMATION THAT CAN BE ACCESSED THROUGH THE WORK VIA HYPERLINK OR OTHERWISE AND EXPRESSLY DISCLAIM ANY WAR RANTY. EXPRESS OR IMPLIED INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. McGraw-Hill and its licensors do not arrant or guarantee that the functions contained in the work will be uninterrupted or error free. Neither McGraw-Hill nor its licensors shall be liable to you or anyone else for acy, error or omission, regardless of cause, in the work or for any damages resulting therefrom. lill has no res for the content of any information accessed through the work. Under no cir- umstances shall McGraw-Hill and/or its licensors be liable for any indirect, incidental, special, punitive, conse- quential or similar damages that result from the use of or inability to use the work, even if any of them has been dvised of the possibility of such damages. This limitation of liability shall apply to any claim or cause whatso- ever whether such claim or cause arises in contract tort or otherwise. DOI:10.1036/0071429212
Copyright © 2003 by The McGraw-Hill Companies, Inc. All rights reserved. Manufactured in the United States of America. Except as permitted under the United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the publisher. 0-07-142921-2 The material in this eBook also appears in the print version of this title: 0-07-141245-X. All trademarks are trademarks of their respective owners. Rather than put a trademark symbol after every occurrence of a trademarked name, we use names in an editorial fashion only, and to the benefit of the trademark owner, with no intention of infringement of the trademark. Where such designations appear in this book, they have been printed with initial caps. McGraw-Hill eBooks are available at special quantity discounts to use as premiums and sales promotions, or for use in corporate training programs. For more information, please contact George Hoare, Special Sales, at george_hoare@mcgraw-hill.com or (212) 904-4069. TERMS OF USE This is a copyrighted work and The McGraw-Hill Companies, Inc. (“McGraw-Hill”) and its licensors reserve all rights in and to the work. Use of this work is subject to these terms. Except as permitted under the Copyright Act of 1976 and the right to store and retrieve one copy of the work, you may not decompile, disassemble, reverse engineer, reproduce, modify, create derivative works based upon, transmit, distribute, disseminate, sell, publish or sublicense the work or any part of it without McGraw-Hill’s prior consent. You may use the work for your own noncommercial and personal use; any other use of the work is strictly prohibited. Your right to use the work may be terminated if you fail to comply with these terms. THE WORK IS PROVIDED “AS IS”. McGRAW-HILL AND ITS LICENSORS MAKE NO GUARANTEES OR WARRANTIES AS TO THE ACCURACY, ADEQUACY OR COMPLETENESS OF OR RESULTS TO BE OBTAINED FROM USING THE WORK, INCLUDING ANY INFORMATION THAT CAN BE ACCESSED THROUGH THE WORK VIA HYPERLINK OR OTHERWISE, AND EXPRESSLY DISCLAIM ANY WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. McGraw-Hill and its licensors do not warrant or guarantee that the functions contained in the work will meet your requirements or that its operation will be uninterrupted or error free. Neither McGraw-Hill nor its licensors shall be liable to you or anyone else for any inaccuracy, error or omission, regardless of cause, in the work or for any damages resulting therefrom. McGraw-Hill has no responsibility for the content of any information accessed through the work. Under no circumstances shall McGraw-Hill and/or its licensors be liable for any indirect, incidental, special, punitive, consequential or similar damages that result from the use of or inability to use the work, even if any of them has been advised of the possibility of such damages. This limitation of liability shall apply to any claim or cause whatsoever whether such claim or cause arises in contract, tort or otherwise. DOI: 10.1036/0071429212 ebook_copyright 8.5 x 11.qxd 6/27/03 9:36 AM Page 1
To laurie
To Laurie Amphibionics 00 3/24/03 12:49 PM Page v
This page intentionally left blank
This page intentionally left blank
For more information about this title. click here Summary of Contents Introduction Acknowledgments 1 Tools, Test Equipment, and Materials 2 Printed circuit Board Fabrication 17 3 Microcontrollers and pIc Programming 25 4 Frogbotic: Build Your Own Robotic Frog 51 5 Serpentronic: Build Your Own Robotic snake 117 6 Crocobot: Build your own Robotic crocodile 191 7 Turtletron Build Your own Robotic Turtle 271 Copyright 2003 by The McGraw-Hill Companies, Inc. Click Here for Terms of Use
vii Introduction xv Acknowledgments xvii 1 Tools, Test Equipment, and Materials 1 2 Printed Circuit Board Fabrication 17 3 Microcontrollers and PIC Programming 25 4 Frogbotic: Build Your Own Robotic Frog 51 5 Serpentronic: Build Your Own Robotic Snake 117 6 Crocobot: Build Your Own Robotic Crocodile 191 7 Turtletron: Build Your Own Robotic Turtle 271 Summary of Contents Amphibionics 00 3/24/03 12:49 PM Page vii For more information about this title, click here. Copyright 2003 by The McGraw-Hill Companies, Inc. Click Here for Terms of Use
Amphibionics 8 Taking It Further 345 Index 35l
8 Taking It Further 345 Bibliography 349 Index 351 Amphibionics viii Amphibionics 00 3/24/03 12:49 PM Page viii
For more information about this title. click here Contents Introduction Acknowledgments 1 Tools, Test Equipment, and Materials Test Equipment Construction Materials 1025 Summary 2 Printed circuit board Fabrication 17 Summary 3 Microcontrollers and Plc Programming 25 Microcontrollers PIC 16F84 MCU PicBasic Pro Compiler Copyright 2003 by The McGraw-Hill Companies, Inc. Click Here for Terms of Use
ix Introduction xv Acknowledgments xvii 1 Tools, Test Equipment, and Materials 1 Test Equipment 10 Construction Materials 12 Summary 15 2 Printed Circuit Board Fabrication 17 Summary 22 3 Microcontrollers and PIC Programming 25 Microcontrollers 25 PIC 16F84 MCU 26 PicBasic Pro Compiler 28 Contents Amphibionics 00 3/24/03 12:49 PM Page ix For more information about this title, click here. Copyright 2003 by The McGraw-Hill Companies, Inc. Click Here for Terms of Use