Introduction to Mechatronic Design

Prentice Hall
J. Edward Carryer / Matthew Ohline / Thomas Kenny  
Total pages
December 2010
Related Titles


For upper level and graduate Mechatronics courses in Electrical, Computing, or Mechanical & Aerospace Engineering.


Unlike other texts on mechatronics that focus on derivations and calculations, Introduction to Mechatronic Design, 1e, takes a narrative approach, emphasizing the importance of building intuition and understanding before diving into the math. The authors believe that integration is the core of mechatronics-and students must have a command of each of the domains to create the balance necessary for successful mechatronic design-and devote sections of the book to each area, including mechanical, electrical, and software disciplines, as well as a section on system design and engineering. A robust package of teaching and learning resources accompanies the book.


A focus on developing intuition. The authors believe that developing intuition enables students to move from problem statements to problem solutions and, as a result, create new designs. This approach is taken throughout the book. 


Ex: In Chapter 9, Basic Circuit Elements, the material is presented with a running fluid flow analogy to help develop intuition about the behavior of basic circuit elements.


Practical application information. The book helps students develop the ability to understand a data sheet for devices they have not seen or used before.


Ex: See Chapter 16, Digital Inputs and Outputs and Chapter 17, Digital Outputs and Power Drivers.


Balanced coverage. Unlike other textbooks on the subject, this text provides substantial coverage of each engineering domain. In addition, while other books focus on control systems engineering, Carryer/Kenny/Ohline treat the topic as a separate issue and cover it at an appropriate level for a mechatronics text.


Software design. While software design is often omitted from other texts, most of the software section of this text is devoted to software design (as opposed to the mechanics of any particular software language or microcontroller architecture). The authors believe that software should be designed and carefully planned, and provide structures which serve to help organize the design of software specific to embedded systems.


Ex: See Chapter 5, Programming Structures for Embedded Systems.


A section devoted to Systems Design. System design as a topic is also missing from most other texts.  The authors devote a section of the book to the topic, including chapters covering rapid prototyping, troubleshooting, project planning and management, and finally a case study that shows how two student projects unfolded, and highlights the process of integration, and the alternatives and design decisions that were made along the way.


Emphasis on integration. Integration can be both a blessing and a curse in mechatronics. The authors believe that the best mechatronic solutions take full advantage of the flexibility and opportunities that result from combining the disciplines. However, since those new to the subject tend to underestimate the difficulty of integration, the authors offer tools and guidance to lead the student through the material successfully.


Ex: See Chapter 32, Mechatronic Synthesis.


Collateral materials. This text is fully supported by a package of robust resources, for both instructors and students, containing well thought-out and vigorously tested (for over 15 years) lab assignments, hardware, and software.

An instructor community Wiki that is monitored by the authors,  provides a continually growing set of resources. This medium allows instructors to share experiences, ask for advice and receive feedback from both the authors and the instructor community. Instructors can preview the site at Select "View the Community Wiki" and log in using a user name of wikiuser0001 with a password of bear3lemon.


Topical organization. For the professor, the organization of the text allows for flexibility in the way material is covered. For the student, the organization assumes little prior knowledge so chapters may be read in any order without causing confusion.

Table of Contents

Part 1: Introduction


Chapter 1 Introduction

1.1 Philosophy

1.3 Who Should Study Mechatronics?

1.3 How to Use this Book

1.4 Summary


Part 2: Software

Chapter 2 What's a Micro?

2.1 Introduction

2.2 What IS a “Micro”?

2.3 Microprocessors, Microcontrollers, Digital Signal Processors (DSP's) and More

2.4 Microcontroller Architecture

2.5 The Central Processing Unit (CPU)

2.5.1 Representing Numbers in the Digital Domain

2.5.2 The Arithmetic Logic Unit (ALU)

2.6 The Data Bus and the Address Bus

2.7 Memory

2.8 Subsystems and Peripherals

2.9 Von Neumann Architecture

2.10 The Harvard Architecture

2.11 Real World Examples

2.11.1 The Freescale MC9S12C32 Microcontroller

2.11.2 The Microchip PIC12F609 Microcontroller

2.12 Where to Find More Information

2.13 Homework Problems


Chapter 3 Microcontroller Math and Number Manipulation

3.1 Introduction

3.2 Number Bases and Counting

3.3 Representing Negative Numbers

3.4 Data Types

3.5 Sizes of Common Data Types

3.6 Arithmetic on Fixed Size Variables

3.7 Modulo Arithmetic

3.8 Math Shortcuts

3.8 Boolean Algebra

3.9 Manipulating Individual Bits

3.10 Testing Individual Bits

3.11 Homework Problems


Chapter 4: Programming Languages

4.1 Introduction

4.2 Machine Language

4.3 Assembly Language

4.4 High-Level Languages

4.5 Interpreters

4.6 Compilers

4.7 Hybrid Compiler/Interpreters

4.8 Integrated Development Environments (IDEs)

4.9 Choosing a Programming Language

4.10 Homework Problems


Chapter 5: Program Structures for Embedded Systems

5.1 Background

5.2 Event Driven Programming

5.3 Event Checkers

5.4 Services

5.5 Building an Event Driven Program

5.6 An Example

5.7 Summary of Event Driven Programming

5.8 State Machines

5.9 A State Machine in Software

5.10 The Cockroach Example as a State Machine

5.11 Summary

Homework Problems


Chapter 6 Software Design

6.1 Introduction

6.2 Building as a Metaphor for Creating Software

6.3 Introducing Some Software Design Techniques

6.3.1 Decomposition

6.3.2 Abstraction and Information Hiding

6.3.3 Pseudo-Code

6.4 Software Design Process

6.4.1 Generating Requirements

6.4.2 Defining the Program Architecture

6.4.3 The Performance Specification

6.4.4 The Interface Specification

6.4.5 Detail Design

6.4.6 Implementation Intra-Module Organization Writing the Code

6.4.7 Unit Testing

6.4.8 Integration

6.5 The Sample Problem

6.5.1 Requirements for the Morse Code Receiver

6.5.2 The Morse Code Receiver System Architecture

6.5.3 The Morse Code Receiver Software Architecture

6.5.4 The Morse Code Receiver Performance Specifications

6.5.5 The Morse Code Receiver Interface Specification The Button Module Interface Specification The Morse Elements Module Interface Specification The Morse Decode Module Interface Specification The LCD Display Module Interface Specification

6.5.6 The Morse Code Receiver Detail Design Button Module Detail Design Morse Elements Detail Design Morse Decode Detail Design Display Detail Design Main Detail Design

6.5.7 The Morse Code Receiver Implementation

6.5.8 The Morse Code Receiver Unit Testing. 6-28

6.5.9 The Morse Code Receiver Integration

6.6 Homework Problems


Chapter 7 Communications

7.1: Introduction

7.2: Without a Medium, there is no Message

7.3: Bit-Parallel and Bit-Serial Communications

7.3.1: Bit-Serial Communications Synchronous Serial Communications Asynchronous Serial Communications

7.3.2: Bit Parallel Communications

7.4: Signaling Levels

7.4.1: TTL/CMOS Levels

7.4.2: RS-232

7.4.3: RS-485

7.5: Communicating Over Limited Bandwidth Channels

7.5.1: Telephones and Modems Modulation Techniques Amplitude Modulation (AM) Frequency Modulation (FM) Phase Modulation (PM) Quadrature Amplitude Modulation (QAM)

7.6: Communicating with Light

7.7: Communicating over a Radio

7.7.1: RF Remote Controls

7.7.2: RF Data Links

7.7.3: RF Networks

7.8: Homework Problems


Chapter 8 : Microcontroller Peripherals

8.1 : Accessing the Control Registers

8.2 : The Parallel Input/Output Subsystem

8.2.1 : The Data Direction Register

8.2.2 : The Input/Output Register(s)

8.2.3 : Shared Function Pins

8.3 : Timer Subsystems

8.3.1 : Timer Basics

8.3.2 : Timer Overflow

8.3.3 : Output Compare

8.3.4 : Input Capture

8.3.5 : Combining Input Capture and Output Compare to Control an Engine

8.4 : Pulse Width Modulation (PWM)

8.5 : PWM Using the Output Compare System

8.6 : The Analog-to-Digital (A/D) Converter Subsystem

8.6.1 : The Process for Converting an Analog Input to a Digital Value

8.6.2 : The A/D Converter Clock

8.6.3 : Multiplexer Switching Transients and DC Effects

8.6.4 : Automating the A/D Conversion Process

8.7 : Homework Problems


Part 3: Electronics

Chapter 9 Basic Circuit Analysis and Passive Components

9.1 Voltage, Current and Power

9.2 Circuits and Ground

9.3 Laying Down the Laws

9.4 Resistance

9.4.1 Resistors in Series and Parallel

9.4.2 The Voltage Divider

9.5 Thevenin Equivalents

9.6 Capacitors

9.6.1 Capacitors in Series and Parallel

9.6.2 Capacitors and Time-Varying Signals

9.7 Inductors

9.7.1 Inductors and Time-Varying Signals

9.8 The Time and Frequency Domains

9.9 Circuit Analysis with Multiple Component Types

9.9.1 Basic RC Circuit Configurations

9.9.2 Low-Pass RC Filter Behavior in the Time Domain

9.9.3 High-Pass RC Filter Behavior in the Time Domain

9.9.4 RL Circuit Behavior in the Time Domain

9.9.5 Low-Pass RC Filter Behavior in the Frequency Domain

9.9.6 High-Pass RC Filter Behavior in the Frequency Domain

9.9.7 High-Pass RC Filter with a DC Bias

9.10 Simulation Tools

9.10.1 Limitations of Simulation Tools

9.11 Real Voltage Sources

9.12 Real Measurements

9.12.1 Measuring Voltage

9.12.2 Measuring Current

9.13 Real Resistors

9.13.1 A Model for a Real Resistor

9.13.2 Resistor Construction Basics

9.13.3 Carbon Film Resistors

9.13.4 Metal Film Resistors

9.13.5 Power Dissipation in Resistors

9.13.6 Potentiometers

9.13.7 Multi-Resistor Packages

9.13.8 Choosing Resistors

9.14 Real Capacitors

9.14.1 A Model for a Real Capacitor

9.14.2 Capacitor Construction Basics

9.14.3 Polar vs. Non-Polar Capacitors

9.14.4 Ceramic Disk Capacitors

9.14.5 Monolithic Ceramic Capacitors

9.14.6 Aluminum Electrolytic Capacitors

9.14.7 Tantalum Capacitors

9.14.8 Film Capacitors

9.14.9 Electric Double Layer Capacitors / Super capacitors

9.14.10 Capacitor Labeling Ceramic Capacitor (Disc and MLC) Labeling Aluminum Electrolytic Capacitor Labeling Tantalum Capacitor Labeling Film Capacitor Labeling

9.14.11 Choosing a Capacitor

9.15 Homework Problems


Chapter 10 Semiconductors

10.1 Doping, Holes and Electrons

10.2 Diodes

10.2.1 The VI Characteristic for Diodes

10.2.2 The Magnitude of Vf

10.2.3 Reverse Recovery

10.2.4 Schottky Diodes

10.2.5 Zener Diodes

10.2.6 Light Emitting Diodes

10.2.7 Photo-Diodes

10.3 Bipolar Junction Transistors

10.3.1 The Darlington Pair

10.3.2 The Photo-Transistor

10.4 MOSFETs

10.5 hoosing Between BJTs and MOSFETs

10.5.1 When Will a BJT be the Best (or Only) Choice?

10.5.2 When Will a MOSFET be the Best (or Only) Choice?

10.5.3 How Do You Choose When Either a MOSFET or a BJT Could Work?

10.6 Multi-Transistor Circuits

10.7 Reading Transistor Data Sheets

10.7.1 Reading a BJT Data Sheet

10.7.2 Reading a MOSFET Data Sheet

10.7.3 A Sample Application

10.7.4 A Potpourri of Transistor Circuits

10.8 Homework Problems


Chapter 11 : Operational Amplifiers

11.1 : Operational Amplifier Behavior

11.2 : Negative Feedback

11.3 : The Ideal Op-Amp

11.4 : Analyzing Op-Amp Circuits

11.4.1 : The Golden Rules

11.4.2 : The Non-Inverting Op-Amp Configuration

11.4.3 : The Inverting Op-Amp Configuration : The Virtual Ground : There is Nothing Magic About Ground

11.4.4 : The Unity Gain Buffer

11.4.5 : The Difference Amplifier Configuration

11.4.6 : The Summer Configuration

11.4.7 : The Trans-Resistive Configuration

11.4.8 : Computation with Op-Amps

11.5 : The Comparator

11.5.1 : Comparator Circuits

11.6 : Homework Problems


Chapter 12 : Real Operational Amplifiers and Comparators

12.1 : Real Op-Amp Characteristics - How the Ideal Assumptions Fail

12.1.1 : Non-Infinite Gain

12.1.2 : Variation in Open Loop Gain with Frequency

12.1.3 : Input Current is Not Zero : Input Bias Current and Input Offset Current : Input Impedance

12.1.4 : The Output Voltage Source is Not Ideal

12.1.5 : Other Non-Idealities : Input Offset Voltage : Power Supplies : Input Common Mode Voltage Range : Input Common Mode Rejection Ratio : Temperature Effects

12.2 : Reading an Op-Amp Data Sheet

12.2.1 : Maxima, Minima and Typical Values

12.2.2 : The Front Page

12.2.3 : The Absolute Maximum Ratings Section

12.2.4 : The Electrical Characteristics Section

12.2.5 : The Packaging Section

12.2.6 : The Typical Applications Section

12.3 : Reading a Comparator Data Sheet

12.3.1 : Comparator Packaging

12.4 : Comparing Op-Amps

12.5 : Homework Problems


Chapter 13 Sensors

13.1 Introduction

13.2 Sensor Output & Microcontroller Inputs

13.3 Sensor Design

13.3.1 Measuring Temperature with a Thermistor

13.3.2 Measuring Acceleration

13.3.3 Definitions of Sensor Performance Characteristics

13.4 Fundamental Sensors and Interface Circuits

13.4.1 Switches as Sensors

13.4.2 Interfacing to Switches

13.4.3 Resistive Sensors

13.4.4 Interfacing to Resistive Sensors Using a Resistive Sensor in a Voltage Divider Measuring Resistance Using a Current Source The Constant Current Circuit The Wheatstone Bridge

13.4.5 Capacitive Sensors

13.4.6 Interfacing to Capacitive Sensors Measuring Capacitance with a Step Input Measuring Capacitance with an Oscillator Measuring Capacitance with a Wheatstone Bridge

13.5 A Survey of Sensors

13.5.1 Light Sensors Photodiodes Phototransistors Emitter-Detector Pair Modules Photocells

13.5.2 Strain Sensors Metal Foil Strain Gages Piezoresistive Strain Gages Load Cells

13.5.3 Temperature Sensors Thermocouples Thermistors

13.5.4 Magnetic Field Sensors Hall Effect Sensors Reed Switches

13.5.5 Proximity Sensors Capacitive Proximity Sensors Inductive Proximity Sensors Ultrasonic Proximity Sensors

13.5.6 Position Sensors Potentiometers Optical Encoders Inductive Pickups / Gear Tooth Sensors Reflective Infrared Sensors Capacitive Displacement Sensors Ultrasonic Displacement Sensors Flex Sensors

13.5.7 Acceleration Sensors


Ed Carryer is the Director of the Smart Product Design Laboratory (SPDL) in the Design Division of Mechanical Engineering at Stanford University. He is¿ currently a Consulting Professor in the Design Division of Mechanical Engineering. He received his Ph.D. degree in Mechanical Engineering from Stanford University in 1992. Prior to that, he received an M.S. in Bio-Medical Engineering from the University of Wisconsin, Madison in 1978. His B.S.E. was awarded from the Illinois Institute of Technology in 1975, where he was a member (1/3) of the first graduating class of the Education and Experience in Engineering (E3)program.

Dr. Carryer's industrial experience varies wildly, from designing water treatment facilities for coal and nuclear power plants for Sargent & Lundy to designing the electronic controller for an Arctic Heated Glove under contract to NASA. He spent eight years in the Detroit area working in and about the auto industry. During that time he worked for Ford, GM and AMC on electronic engine control systems, predominantly for turbo-charged engines. He has an active design consultancy that has tackled such varied projects as an engine controller for an outboard motor manufacturer, an automated blood gas analyzer, and a turbo-charger boost control system for a new type of turbo-charger.

Matt Ohline is an Associate Consulting Professor in the Design Division of Mechanical Engineering at Stanford University.

Thomas Kenny is a Professor in the Mechanical Engineering department at Stanford University. Dr. Kenny received his PhD in Physics from UC Berkeley.

Dr. Kenny's research group is researching fundamental issues and applications of micromechanical structures. These devices are usually fabricated from silicon wafers using integrated circuit fabrication tools. Using these techniques, the group builds sensitive accelerometers, infrared detectors, and force-sensing cantilevers. This research has many applications, including integrated packaging, inertial navigation, fundamental force measurements, experiments on bio-molecules, device cooling, bio-analytical instruments, and small robots. Because this research field is multidisciplinary in nature, work in this group is characterized by strong collaborations with other departments, as well as with local industry.

Reader Review(s)

“Very comprehensive…Well written with good HW problems.” - Larry Banta, West Virginia University

“What I love about this book is that it puts much of what we teach in one text allowing the students to study in more depth the details their projects require." - Daniel J. Block, University of Illinois

“I expect this to become the gold standard for Mechatronics classes for years to come.” - David Fisher, Rose-Hulman

“I was very impressed with the organization of the material and the level of knowledge the authors bring to each topic. I was also impressed with the concise and clear way topics are introduced and explained.” - David Fisher, Rose-Hulman

“I think that's great! My students get an introduction to Mechatronics then have a textbook to take with them after the course that they can continue to use and learn from.” - David Fisher, Rose-Hulman

“The authors really know their stuff and offer good guidelines, rules of thumb, and advice on dealing with real electronics, actuators, and sensors. I also really enjoyed the project discussion and trying to put into words what needs to happen in a good design process!” - David Fisher, Rose-Hulman

“The best features of the proposed text are its breadth and its detailed coverage of practical electronics.” - William R. Murray, California Polytechnic State University

“The textbook is overflowing with information. There is traditional analysis, an extensive survey of current hardware (sensors, actuators, computer hardware), practical advice (do's & don't's). There is a lot to assimilate with many useful chapters that contain pedagogical examples and a wealth of practical information.” - Mark Nagurka, Marquette University

“The textbook is applied and not just a theoretical product. It reflects years of hardware experience from the authors.” - Mark Nagurka, Marquette University

“This one volume includes many subjects that are part of the enterprise of mechatronics. The book has exceptionally strong coverage of microcontrollers.” - Mark Nagurka, Marquette University