Course Reader

beaverswimmingAI and Robotics

Nov 14, 2013 (3 years and 4 months ago)

60 views

San José State University

Department of Mechanical and Aerospace Engineering

ME 106

Fudamentals

of

Mechatronics

Course Reader

Spring,
2011

BJ Furman


BJ Furman

ME 106
Reader rev. 1.0

January 6, 2011

iii

TABLE OF CONTENTS


Page no.

ACKNOWLEDGMENTS

................................
................................
.............................
iv

I
ntroduction to ME 106

................................
................................
................................
.
v

1

Analog Electronics

................................
................................
................................
.....
1.0

Ohm’s Law, current, resistance, voltage

................................
................................
.....
___

Signal sources

................................
................................
................................
..............
___

Signal conditioning

................................
................................
................................
.....
___

Operational amplifiers

................................
................................
................................
.
___

Transistors

................................
................................
................................
...................
___

MOSFET’s

................................
................................
................................
..................
___

Controlling power

................................
................................
................................
.......
___

2

Sensors and Transducers

................................
................................
..........................
2.0

Sensor
and transducer fundamentals

................................
................................
...........
___

Position

................................
................................
................................
........................
___

Pressure

................................
................................
................................
.......................
___

Acceleration

................................
................................
................................
................
___

Force and torque

................................
................................
................................
..........
___

3

Actuators

................................
................................
................................
....................
3.0

Motors

................................
................................
................................
.........................
___

Piezoelectric actuators

................................
................................
................................
.
___

Shape memory actuators

................................
................................
.............................
___

Drive systems

................................
................................
................................
..............
___

4

Digital Electronics

................................
................................
................................
......
4.0

Basic logic functions

................................
................................
................................
...
___

Importan
t digital logic IC’s

................................
................................
.........................
___


BJ Furman

ME 106
Reader rev. 1.0

January 6, 2011

iv

5

Microprocessor System Fundamentals

................................
................................
....
5.0

Coding schemes

................................
................................
................................
...........
___

System layout

................................
................................
................................
..............
___

6

Programming in C for Microprocessor Control

................................
.....................
6.0

Program structure

................................
................................
................................
........
___

Variables, arithmetic, and logic operations

................................
................................
.
___

Communicating to ports

................................
................................
..............................
___

Functi
ons

................................
................................
................................
.....................
___

M68HC11 basics

................................
................................
................................
.........
___

Appendix A: Laboratory Experiments

................................
................................
........
A.0

Introduction to the Mechatronic Engineering Lab

................................
......................
___

RC filters

................................
................................
................................
.....................
___

Electronic scale

................................
................................
................................
...........
___

Light controlled relay

................................
................................
................................
..
___

Electronic level

................................
................................
................................
............
___

Printer carriage motion control
................................
................................
....................
___

DC motor speed con
trol

................................
................................
..............................
___

Digital counter

................................
................................
................................
.............
___

Introduction to C programming on the M68HC11

................................
......................
___

Reading and writing to ports (AD and DA conversion)

................................
..............
___

Analog interfacing and stepper motor control

................................
.............................
___

Stepper motor speed control

................................
................................
........................
___

Appendix B: Pin
-
outs of Common Components

................................
.........................
B.0

Appendix C: Additional Information on Actuators

................................
..................
C.0

Appendix D: Drive Components

................................
................................
...................
D.0


BJ Furman

ME 106
Reader rev. 1.0

January 6, 2011

v

Acknowledgments

The authors would like to thank the other members of the Mechatronic Curriculum
Development Team: Tai
-
Ran Hsu, Ji Wang, Peter Reischl, Addisu Tesfa
ye, and Fred Barez,
for their contribution in large and small parts in initiating, implementing, and developing the
Mechatronics curriculum stem in the Department of Mechanical and Aerospace Engineering
at San José State University.

We also acknowledge sig
nificant contributions by the Advisory Committee in their ongoing
support of the development of mechatronics at San José State University. Of special note is
Mr. Ed Muns of the Hewlett
-
Packard Corporation who facilitated a generous donation of HP
Test and
Measurement equipment for the Mechatronic Engineering Laboratory, and Mr.
David Brown whose financial support enabled us to establish the David Brown Graduate
Fellowship in Mechatronics.

We also recognize the help of our student assistants: Joe Christman,
Doug Sprock, Marvin
Lam, Mike Kearny, and Jeff Fontana in the development of the Mechatronic Engineering
Laboratory and the laboratory experiments; our administrative assistant, Dorothy Lush, and
our technicians, Lou Schallberger and Tom Ng.

Financial sup
port from the National Science Foundation is specially acknowledged.


BJ Furman

ME 106
Reader rev. 1.0

January 6, 2011

6

Introduction

If you look around, you’ll notice that many of the devices you use in the course of a day are
mechatronic, that is, they integrate mechanical and electronic functions in a s
ynergistic way.
In fact, it is difficult to
avoid

mechatronic devices! Microwave ovens, automatic teller
machines, washing and drying machines, dishwashers, cameras, camcorders, VCR’s, CD
players, automobiles… These are all mechatronic devices. And not onl
y consumer products,
but industrial processes, such as a semiconductor fab, also are highly mechatronic in nature.

The overarching philosophy in mechatronics is that enhanced performance, flexibility, and
reliability can be obtained in a product or process

through the integration of mechanics and
electronics under the control of software.

Because of the ubiquitous nature of mechatronics, the mechanical engineer must understand
the fundamentals of mechanics, electronics, and software in order to be successfu
l in today’s
world. By and large, most undergraduate mechanical engineering programs do a good job
teaching the fundamentals of mechanics, but fall short in giving students the necessary
understanding of electronics, computer interfacing, and how these are

integrated in
mechatronic systems. This text attempts to give the student enough of a foundation in analog
and digital electronics, sensors and transducers, actuators, and microprocessor interfacing, so
he or she can begin to function effectively as an en
gineer in an increasingly mechatronic
world.


BJ Furman

ME 106
Reader rev. 1.0

January 6, 2011

7

1 Analog Electronics

What is voltage? What is current? What is resistance? Technically speaking, voltage is the
electric potential difference between two points in a circuit, current is the flow of charge in a

conductor, and resistance is determined by dividing the voltage between two points on a
conductor by the current flowing through the conductor. Operationally speaking, we can liken
voltage to pressure in hydraulic systems, current to fluid flow rate, and
resistance to a flow
restriction, such as an orifice.

Ohm’s law states a relationship between voltage, V, current, I, and resistance, R, in
electrical systems:

V=I•R

(1.1)

If any two of the three quantities are known, the third may be determined. This simp
le
relationship is fundamental and broadly applicable in analyzing any electronic circuit. For
example, if V = 10 V and R = 100 Ω, what is I through the resistor?


Figure 1.1

Ohm’s law example

Resistors in Parallel

When resistors

in a circuit are arranged in parallel, the total resistance of the circuit is
always less than any of the individual resistors, because there are additional paths for current
to flow through. Figure 1.2 shows a circuit with resistors arranged in parallel.

The equivalent
resistance of this arrangement is,


BJ Furman

ME 106
Reader rev. 1.0

January 6, 2011

8

R
eq

= 1/(1/R
1

+ …

(1.2)


Figure 1.2

Resistors in parallel. The total resistance of the circuit is always less than any
of the individual resistors, because there are additional p
aths for current to
flow through.

Resistors in Series

When resistors in a circuit are arranged in series, the total resistance of the circuit is always
greater than any of the individual resistors. Figure 1.3 shows a circuit with resistors arranged
in seri
es.

Figure 1.3 shows a circuit with resistors arranged in parallel. The equivalent resistance of
this arrangement is,

R
eq

= R
1

+ R
2

+ … + R
n

(1.3)


Figure 1.3

Resistors in series. The total resistance of the circuit is always gr
eater than any
of the individual resistors.

The Voltage Divider

Suppose a voltage source and two resistors are arranged as shown in Figure 1.4. What is the
output voltage, V
out
? If you apply Ohm’s law, you will find out that

V
out

= V
in
[R
2

/(R1 +R2)]

(1.4
)


BJ Furman

ME 106
Reader rev. 1.0

January 6, 2011

9


Figure 1.4

The voltage divider circuit.

This circuit is called a voltage divider, because a fraction of the source voltage appears across
R
2
. In fact, the larger the resistance of R
2
, the larger is the share of the input volta
ge across it.
Suppose R
1

= R
2

, what is V
out
? What if R
1

= 10R
2
, what is V
out
? What if R
1

= 0.1R
2
, what
is V
out
?

The Current Divider

Suppose a current source and two resistors are arranged as shown in Figure 1.5. The input
current is divided between the tw
o resistors, and the path of least resistance gets the largest
current. Again, using Ohm’s law, and noting that the voltage across both resistors is the same,


I
out

= I
in
[R
1

/(R1 +R2)]

(1.5)


Figure 1.5

The current divider circui
t.

What about Thevenins’ Theorem, Kirchhoff’s voltage and current laws???

Believe it or not, armed with Ohm’s law and the concepts of voltage and current division,
you are ready to tackle most of the electrical analysis you’ll need to do in any mechatronic
s
project. Of course there is much more to learn about in terms of specific components and
their behavior, but if you can rigorously apply these fundamental concepts, you will do well.


BJ Furman

ME 106
Reader rev. 1.0

January 6, 2011

10

Practice Problem
-

The Wheatstone Bridge

The arrangement of resistors i
n the circuit shown in Figure 1.6 is called a Wheatstone Bridge.
It’s a very useful circuit as you will find out later. Find V
out

in terms of V
in
and the resistors.
(Hint: do you see any voltage dividers in this circuit?)


Figure

1.6

The Wheatstone Bridge circuit.

Signal Sources

Mechatronic systems use sensors to determine the state of the system so appropriate action
can be taken at the right time to accomplish the desired function. For example, the airbag
deployment system in an

automobile uses an accelerometer to measure the rate of change of
the velocity of the vehicle. If the decceleration is above a prescribed level, say from a
collision, the system inflates the airbags, and hopefully prevents serious injury of the
passengers

inside. The voltage output from the accelerometer represents the acceleration of
the vehicle to the controller, which decides if it is large enough to inflate the airbags. We say
the acclerometer functions as a
signal source
. A signal source is differenti
ated from other
electrical sources, such as the car’s battery for example, in that for signal sources, we are
primarily interested in the
information

carried by the signal or voltage they output. Most
signal sources output relatively low
-
level voltages, wh
ich in turn need to be conditioned to be
of use to the system they are connected to. It is important therefore to understand the
limitation of signal sources, so that we can handle them properly.

Ideally, a sensor, such as the accelerometer, can be modeled

as a dependent voltage source,
that is, a voltage source whose output depends on an input. As shown in Figure 1.7, the value
of the voltage output from the acclerometer depends on the acceleration, for example 10
mV/g (where g is the accleration of gravit
y, about 9.81 m/s
2
). The value 10 mV/g is called
the
sensitivity

of the accelerometer.


BJ Furman

ME 106
Reader rev. 1.0

January 6, 2011

11

In practice, however, a signal source will have limitations including low level signals, a finite
value of output impedance (opposition to current flow), noise, non
-
line
ar behavior, and offset
such as shown in Figure 1.8.


Figure 1.7

Model of an accelerometer as an ideal signal source. The source is a
dependent voltage source with a sensitivity of 10 mV/g


Figure 1.8

A practical signal source model for the accelerometer. The practical model
includes a noise source, finite output impedance, non
-
linearity, and offset.

Considering the acclelerometer, even at a 10 g input, the output will only be 0.1 V. In order to
fire t
he air bag, the detonation circuit may need a 5 V pulse, so the output would have to be
amplified 50 times.

A finite impedance means that there will be a limit to the amount of current that the source
can supply. For sensors such as the acclerometer, this
current could be on the order of pico
-
amps (10
-
12

amps)! Consider the Thevenin equivalent circuit for an accelerometer, such as
shown in Figure 1.9. The output impedance of the accelerometer is 10

MΩ. Suppose a
voltage measurement device with an input impedance, R
in
, is connected at the output

BJ Furman

ME 106
Reader rev. 1.0

January 6, 2011

12

terminals of the accelerometer. If R
in

is, say 10 kΩ, what will be the voltage measured? We
essentially have a voltage divider, with

Vout=Vin[10
4
/10
7

+ 10
4
]
= 0.001Vin

(1.6)

We will only measure a very small fraction of V
in

if we record anything at all! The voltage
device has
loaded

the accelerometer. We will discuss how to handle impedance mismatches
such as this shortly.


Figure 1.
9

Equivalent circuit model for an accelerometer and voltage measurement
device. It is important to the effects of output and input impedance on the
level of the signal.

A sensitivity such as 10 mV/g begs to imply a linear relation between accleration and v
oltage
output, but there will always be some variation from exactly linear behavior in any sensor
with a nominally linear output relationship. We’ll take a closer look at linearity in the chapter
on sensors.

Power supply fluctuations, radiated electromagne
tic waves from surrounding devices, etc.,
contribute to noise in the practical source. It’s obviously important to minimize noise, so that
the signal of interest can be discriminated above the noise. Filtering the signal is often what
can be done to attenu
ate noise. Finally, the accelerometer should nominally provide 0 V
output at 0 g input, but there may be some constant or time varying shift or offset of the
input
-
output curve from passing through a zero intercept.

Thus, a signal source can be modeled as

a dependent voltage source with practical
limitations. Understanding the concepts of output and input impedance are important if a
signal source to avoid loading.

Practice Problem
-

Thermistor circuit

A thermistor is a device whose resistance changes wit
h temperature. Figure 1.10 shows a
typical temperature vs. resistance graph for a thermistor. Consider the circuit using a

BJ Furman

ME 106
Reader rev. 1.0

January 6, 2011

13

thermistor shown in Figure 1.11. Sketch the output voltage, V
o

of the circuit. At 0 ˚C, what is
the output impedance, looking into th
e terminals of V
o
?


Figure 1.10

Resistance vs. temperature for a typical thermistor


Figure 1.11

Thermistor circuit.

Dealing With Limitations of Practical Signal Sources

The limitation of low voltage le
vel can be addressed through amplification.



Summary Concepts

Practice Problems


BJ Furman

ME 106
Reader rev. 1.0

January 6, 2011

14

2 Sensors and Transducers


BJ Furman

ME 106
Reader rev. 1.0

January 6, 2011

15

3 Actuators


BJ Furman

ME 106
Reader rev. 1.0

January 6, 2011

16

4 Digital Electronics


BJ Furman

ME 106
Reader rev. 1.0

January 6, 2011

17

5
Microcontroller
Fundamentals


BJ Furman

ME 106
Reader rev. 1.0

January 6, 2011

18

6 Programming in C for Microcontrollers


BJ Furman

ME 106
Reader rev. 1.0

January 6, 2011

A
-
1

Appendix A: Laboratory Experiment
s

This appendix compiles the guidelines for the laboratory experiments in ME 106.


BJ Furman

ME 106
Reader rev. 1.0

January 6, 2011

A
-
2



BJ Furman

ME 106
Reader rev. 1.0

January 6, 2011

B
-
1

Appendix B:
Excerpts From Selected Data Sheets

This appendix compiles excerpts from selected data sheets used in ME 106.


BJ Furman

ME 106
Reader rev. 1.0

January 6, 2011

B
-
2



BJ Furman

ME 106
Reader rev. 1.0

January 6, 2011

C
-
1

Appendix C:
Motion Control Mechanics

This appen
dix compiles information relating to motor sizing and motion control mechanics
used in ME 106


BJ Furman

ME 106
Reader rev. 1.0

January 6, 2011

C
-
2



BJ Furman

ME 106
Reader rev. 1.0

January 6, 2011

D
-
1

Appendix D: Arduino
-
Related Information

This appendix compiles
Arduino
-
related information

used in ME 106


BJ Furman

ME 106
Reader rev. 1.0

January 6, 2011

D
-
2



BJ Furman

ME 106
Reader rev. 1.0

January 6, 2011

E
-
1

Appendix E
:
Lecture Notes

This appendix compiles the lecture notes used in ME 106


BJ Furman

ME 106
Reader rev. 1.0

January 6, 2011

E
-
2