Open-Source Robotics and Process Control Cookbook

Similar documents
An Introduction to Programming with IDL

Digital Signal Processing System Design: LabVIEW-Based Hybrid Programming Nasser Kehtarnavaz

Oracle 10g Developing Media Rich Applications

Embedded Systems Architecture

Programming 8-bit PIC Microcontrollers in С

Security for Microsoft Windows System Administrators

Rendering with mental ray and 3ds Max

MSP430 Microcontroller Basics

HTML5 MOBILE WEBSITES

Eleventh Hour Network+ Exam N Study Guide

FPGAs: Instant Access

Networked Graphics 01_P374423_PRELIMS.indd i 10/27/2009 6:57:42 AM

Computers as Components Principles of Embedded Computing System Design

Traveling Wave Analysis of Partial Differential Equations

Modeling & Simulation-Based Data Engineering

Android Forensics. Investigation, Analysis, Google Android. and Mobile Security for. Andrew Hoog. John McCash, Technical Editor SYNGRESS

The Definitive Guide to the ARM Cortex-M3

THE AVR MICROCONTROLLER AND EMBEDDED SYSTEMS. Using Assembly and С

MPEG-l.MPEG-2, MPEG-4

Algorithmic Graph Theory and Perfect Graphs

Pearson New International Edition. The 8051 Microcontroller and Embedded Systems Mazidi Mazidi McKinlay Second Edition

Coding for Penetration Testers Building Better Tools

Coding for Penetration

Information Modeling and Relational Databases

Engineering Real- Time Applications with Wild Magic

An Introduction to Parallel Programming

Windows Forensic Analysis Toolkit Third Edition Advanced Analysis Techniques For Windows 7

Windows Forensic Analysis Toolkit Third Edition Advanced Analysis Techniques For Windows 7

PTC Mathcad Prime 3.0

Managed. Code Rootkits. Hooking. into Runtime. Environments. Erez Metula ELSEVIER. Syngress is an imprint of Elsevier SYNGRESS

MECHATRONICS. William Bolton. Sixth Edition ELECTRONIC CONTROL SYSTEMS ENGINEERING IN MECHANICAL AND ELECTRICAL PEARSON

Complete PCB Design Using OrCad Capture and Layout

Graphics Programming in c++

M (~ Computer Organization and Design ELSEVIER. David A. Patterson. John L. Hennessy. University of California, Berkeley. Stanford University

The Essential Guide to Video Processing

Usability Testing Essentials

FISMAand the Risk Management Framework

This page intentionally left blank

Understand and Implement Effective PCI Data Security Standard Compliance

Introduction to AutoCAD 2008

Relational Database Design Clearly Explained Second Edition The Morgan Kaufmann Series In Data Management Systems By Harrington Jan L 2002 Paperback

AT&T Enterprise Hosting Services

HCS12 Microcontroller and Embedded Systems: Using Assembly and C with CodeWarrior 1 st Edition

Excel for Chemists. Second Edition

Computer Animation. Algorithms and Techniques. z< MORGAN KAUFMANN PUBLISHERS. Rick Parent Ohio State University AN IMPRINT OF ELSEVIER SCIENCE

Adaptive Motion Control of FIREBIRD V Robot

Future vehicle from recycled materials. using green energy

INFORMATION RETRIEVAL SYSTEMS: Theory and Implementation

MULTIDIMENSIONAL SIGNAL, IMAGE, AND VIDEO PROCESSING AND CODING

System Assurance. Beyond Detecting. Vulnerabilities. Djenana Campara. Nikolai Mansourov

Maya Python. for Games and Film. and the Maya Python API. A Complete Reference for Maya Python. Ryan Trowbridge. Adam Mechtley ELSEVIER

Workbook for C++ THIRD EDITION. Yedidyah Langsam, Ph.D. Brooklyn College of the City University of New York. Custom Publishing

PROGRAMMING AND CUSTOMIZING

Database Modeling And Design The Fundamental Principles The Morgan Kaufmann Series In Data Management Systems

ARCHITECTURE DESIGN FOR SOFT ERRORS

Stock Message Boards

MariaDB Crash Course. A Addison-Wesley. Ben Forta. Upper Saddle River, NJ Boston. Indianapolis. Singapore Mexico City. Cape Town Sydney.

Exploiting Distributed Resources in Wireless, Mobile and Social Networks Frank H. P. Fitzek and Marcos D. Katz

Moving to the Cloud. Developing Apps in. the New World of Cloud Computing. Dinkar Sitaram. Geetha Manjunath. David R. Deily ELSEVIER.

Pic Microcontroller Projects In C Second Edition Basic To Advanced

The Internet of Things

Essential MATLAB for Engineers and Scientists

Microprocessor Theory


HawkEye 45T Display User Manual

CompTIA A+s. Guide to 802: Managing. and Troubleshooting PCs. Mike Meyers' (Exam ) Fourth Edition. Mike Meyers.

Practical UML Statecharts in C/C++

Revolutionary Industrial PC for IoT Era With innovative i-modules For flexible expansion

MAKING PIC MICROCONTROLLER INSTRUMENTS AND CONTROLLERS

Broadband Wireless Mobile 3g And Beyond

Data Center Server Virtualization Solution Using Microsoft...

target, perl recommened >no dsdp

DOWNLOAD RELATIONAL DATABASE DESIGN CLEARLY EXPLAINED

Structured Parallel Programming

ARDUINO BOARD LINE UP

Cloud Computing and SOA Convergence in Your Enterprise

Microcontrollers. Principles and Applications. Ajit Pal +5 V 2K 8. 8 bit dip switch. P2 8 Reset switch Microcontroller AT89S52 100E +5 V. 2.

Modern Embedded Computing Designing Connected, Pervasive, Media-Rich Systems

PIC MICROCONTROLLER PROJECT BOOK FOR PICBASIC AND PICBASIC PRO COMPILERSPIC MICROCONTROLLER PROJECTS IN C BASIC TO ADVANCED

ARCHITECTURE AND CAD FOR DEEP-SUBMICRON FPGAs

Linux as primary Operating System

COSO Enterprise Risk Management

Application Programming

Structured Parallel Programming Patterns for Efficient Computation

Windows and Graphics Programming with Visual C ++

Philip Andrew Simpson. FPGA Design. Best Practices for Team-based Reuse. Second Edition

Foundations of Multidimensional and Metric Data Structures

Real World Multicore Embedded Systems

Team: XeroDual. EEL 4924 Electrical Engineering Design. Final Report 3 August Project Ehrgeiz. Team Name: XeroDual

Designing Embedded Systems with PIC Microcontrollers

Installation & Operation Guide

LEGITIMATE APPLICATIONS OF PEER-TO-PEER NETWORKS DINESH C. VERMA IBM T. J. Watson Research Center A JOHN WILEY & SONS, INC., PUBLICATION

COMPUTATIONAL DYNAMICS

Concrete Abstractions

Robotic Systems ECE 401RB Fall 2007

Preliminary Design Report

SDH/SONET Explained in Functional Models

Chapter 1 1. Build and Upgrade Your Own PC

LEGITIMATE APPLICATIONS OF PEER-TO-PEER NETWORKS

Digital System Design with SystemVerilog

Transcription:

Open-Source Robotics and Process Control Cookbook

This page intentionally left blank

Open-Source Robotics and Process Control Cookbook Designing and Building Robust, Dependable Real-Time Systems by Lewin A.R.W. Edwards AMSTERDAM BOSTON HEIDELBERG LONDON NEW YORK OXFORD PARIS SAN DIEGO SAN FRANCISCO SINGAPORE SYDNEY TOKYO Newnes is an imprint of Elsevier

Newnes is an imprint of Elsevier 30 Corporate Drive, Suite 400, Burlington, MA 01803, USA Linacre House, Jordan Hill, Oxford OX2 8DP, UK Copyright 2005, Elsevier Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher. Permissions may be sought directly from Elsevier s Science & Technology Rights Department in Oxford, UK: phone: (+44) 1865 843830, fax: (+44) 1865 853333, e-mail: permissions@elsevier.com.uk. You may also complete your request on-line via the Elsevier homepage (http://elsevier.com), by selecting Customer Support and then Obtaining Permissions. Recognizing the importance of preserving what has been written, Elsevier prints its books on acid-free paper whenever possible. Library of Congress Cataloging-in-Publication Data (Application submitted.) British Library Cataloguing-in-Publication Data A catalogue record for this book is available from the British Library. ISBN: 0-7506-7778-3 For information on all Newnes publications, visit our Web site at www.books.elsevier.com 04 05 06 07 08 09 10 9 8 7 6 5 4 3 2 1 Printed in the United States of America.

Dedication This book is dedicated to my wife Cristen, in recognition of her uncomplaining acceptance of yards of PVC conduit in hallways, pounds of gel-cells in the living room, and never-ending snarls of wire and motors throughout the house. v

This page intentionally left blank

Contents About the Author... xi What s on the CD-ROM?...xii Chapter 1: Introduction...1 1.1 History of this Book and What You ll Get From Reading It...1 1.2 Target Readership and Required Skills and Tools...5 1.3 Conventions Used in the Text...7 Chapter 2: Microcontrollers, Single-Board Computers and Development Tools...9 2.1 The Division of Labor...9 2.2 Candidate Microcontrollers for Hard Tasks...13 2.3 The Atmel AVR and its Development Hardware Up Close...17 2.4 Candidate x86-based SBCs for Soft Tasks...21 2.5 The Advantech PCM-5820 Single-Board Computer Up Close...27 2.6 Selecting an Inter-Module Communications Protocol...32 Chapter 3: Some Example Sensor, Actuator and Control Applications and Circuits (Hard Tasks)...41 3.1 Introduction...41 3.2 E2BUS PC-Host Interface...44 3.3 Host-to-Module Communications Protocol...49 vii

Contents 3.4 Stepper Motor Controller...52 3.5 Speed-Controlled DC Motor with Tach Feedback and Thermal Cutoff...70 3.6 Two-Axis Attitude Sensor using MEMS Accelerometer...79 3.7 RS-422 Compatible Indicator Panel...90 Chapter 4: The Linux-Based Controller (A Soft Task)...115 4.1 A Brief Introduction to Embedding Linux on PC Hardware...115 4.2 Configuring the Development System and Creating Our Custom Kernel..117 4.3 The Linux Boot Process Creating a Bootable CompactFlash Card...123 4.4 Creating a Root Filesystem for our Embedded System...128 4.5 Creating a Bootable Linux System-Restore CD-ROM Disc...136 4.6 Using the Parallel Port as a General-Purpose I/O Interface in Linux...142 4.7 Implementing Graphical Control Interfaces...149 4.8 Infra-Red Remote Control in Linux Using LIRC...175 4.9 Introduction to Machine Vision Using Video4Linux...189 4.10 Customizing Your BIOS The Structure of a Modern BIOS...201 Chapter 5: Encryption and Data Security Primer...209 5.1 Introduction...209 5.2 Classes of Algorithm...214 5.3 Protecting One-Way Control Data Streams...217 5.4 Protecting One-Way Telemetry...218 5.5 Protecting Bidirectional Control/Data Streams...220 5.6 Protecting Logged Data...222 5.7 Where to Obtain Encryption Algorithms...224 viii

Contents Chapter 6: Expecting the Unexpected...227 6.1 Introduction...227 6.2 Dangerous Exception Conditions and Recovering From Them...228 6.3 On-Chip vs. Off-Chip Watchdog Hardware...230 6.4 Good Power-On Reset Practices...232 6.5 A Few Additional Considerations for Battery-Powered Applications...235 Chapter 7: Contents of the Enclosed CD-ROM...237 Index...237 ix