Escolar Documentos
Profissional Documentos
Cultura Documentos
Engineering Design by
Teams: Robotics 1
Lecture 2. Embedded Systems
for Robotics
Instructor: Huynh Viet Thang
Aug. 2015
1
Textbook:
T. Brunl Embedded Robotics, Springer 2003
The University of Western Australia, Electrical,
Electronic and Computer Engineering
Embedded systems
Robots and Controllers
Sensors
Actuators
Control techniques
Embedded systems
Applications
Areas
7
Application Areas
TV
stereo
remote control
phone / mobile phone
refrigerator
microwave
washing machine
electric tooth brush
oven / rice or bread cooker
watch
alarm clock
electronic musical instruments
electronic toys (stuffed animals,handheld toys, pinballs, etc.)
medical home equipment (e.g. blood
pressure, thermometer)
Application Areas
Medical Systems
pace maker, patient monitoring systems, injection systems,
intensive care units,
Office Equipment
printer, copier, fax,
Tools
multimeter, oscilloscope, line tester, GPS,
Banking
ATMs, statement printers,
Transportation
(Planes/Trains/[Automobiles] and Boats)
Application Areas
Automobiles
engine management, trip computer, cruise control,
immobilizer, car alarm,
airbag, ABS, ESP,
Building Systems
elevator, heater, air conditioning, lighting, key card
entries, locks, alarm systems,
Agriculture
feeding systems, milking systems,
Space
satellite systems,
10
Application Areas
Facts:
1997: The average U.S. household has over 10
embedded computers (source: www.it.dtu.dk/~jan)
11
Automobiles
12
13
14
Microcontrollers
15
16
Microcontrollers
Microprocessor
CPU (on single chip)
Microcontroller
CPU + Timers + I/O (+RAM) (+ROM)
Reduced chip count for board design
Embedded system
Todays Technology:
Surface Mount Device (SMD)
Ball Grid Array (BGA)
17
Keyboard
Monitor
Parallel port (printer port)
Serial port + USB
Embedded System:
Sensors (e.g. in automobile: acceleration sensor, seat
sensor)
Actuators (e.g. in automobile: valves for airbags)
18
19
20
21
Assignment
You are required to design the controller (as an
embedded system) for a consumer product,
describe the system (give the specification) if the
product is
A) an air-conditioner
B) a washing machine
C) a smart TV
D) a smart phone
22
Robots and
Controllers
What are the advantages of using mobile robot
systems as opposed to traditional ways of
education, for example mathematical models
or computer simulation?
23
3 advantages
Students can relate to a robot much better than to a
piece of software; tasks to be solved involving a robot
are of a practical nature and directly make sense to
students;
A working robot program will be a robust system that
takes into account and overcomes inaccuracies and
imperfections: a valid engineering approach to a typical
(industrial) problem;
Mobile robot programming is enjoyable and an
inspiration to students;
24
Mobile robots
A case study from the
Mobile Robot Lab at the
University of Western
Australia [Braunl 2006]
EyeBot family using
EyeCon
Wheeled robots
Tracked robots
Legged robots
Flying robots
Underwater robots
25
Differential Drive
Driven wheels
Ackermann Steering
Driven wheels
Steered wheels
Braitenberg vehicles
A conceptual abstraction of actuators, sensors, and
robot control by Braitenberg (1984)
Simple interaction between motors and sensors
If a light sensor is activated by a light source, it will proportionally
increase the speed of the motor it is linked to.
Light source
28
Embedded controllers
The EyeCon: 32-bit CPU
29
30
RoBIOS
31
Sensors
What is important is to find the right
sensor for a particular application.
32
Overview
Data transfer from the sensor to CPU
either CPU-initiated (polling)
or sensor-initiated (interrupt)
33
Sensor categories
Based on sensor output
34
35
Binary sensor
Simplest
Easy to design
Active low in
this example
What if active high?
36
37
38
Shaft encoder
Encoder is fundamental feedback sensor for
motor control
Magnetic encoders and Optical encoders
Incremental encoders:
Count number of
segments passed from
a certain starting point
Not sufficient to locate
a certain absolute position
39
Other sensors
Sonar (ultra-sound)
Infrared sensors
41
Digital Camera
Microphone
42
Actuators for
Robots
Actuators are used in order to
produce mechanical movement in
robots.
Slides from Braunl and Jussi Suomela
43
Actuators
44
Actuator Types
Electrical
Hydraulic
Pneumatic
Others
DC-Motors
simple, cheap
easy to control
1W - 1kW
can be overloaded
brushes wear
limited overloading
on high speeds
46
DC-motor control
Controller + H-bridge
PWM-control
Speed control by
controlling motor
current=torque
Efficient small
components
PID control
47
H-Bridge
48
49
H-Bridge
Hardware Implementation with
Microcontroller:
2 Digital output pins from microcontroller,
[one at Gnd, one at Vcc] feed into a power
amplifier
Alternative: use only 1 digital output pin plus one
inverter, then feed into a power amplifier
50
Stepper
Motors
51
angle control
slow
usually no feedback used
accurate positioning
easy to control
52
Stepper Motors
Stepper motors are another type of motors that do not require feedback
A stepper motor can be incrementally driven, one step at a time,
forward or backward
Stepper motor characteristics are:
Number of steps per revolution (e.g. 200 steps per revolution = 1.8
per step)
Max. number of steps per second (stepping rate = max speed)
Driving a stepper motor requires a 4 step switching sequence for fullstep mode
Stepper motors can also be driven in 8 step switching sequence for
half-step mode (higher resolution)
Step sequence can be very fast, the resulting motion appears to be very
smooth
53
54
55
Stepper Motors
Advantages
No feedback hardware required
Disadvantages
No feedback (!)
Often feedback is still required,
e.g. for precision reasons, since a stepper motor can lose a step
signal.
57
59
Pulse-Width Modulation
(PWM)
A/D converters are used for reading analog
sensor signals
Why not use D/A converter for motor control?
Too expensive (needs power circuitry)
Better do it by software, switching power on/off in
intervals
This is called Pulse-Width Modulation or PWM
60
61
Pulse-Width Modulation
How does this work?
We do not change the supplied voltage
Power is switched on/off at a certain pulse ratio
matching the desired output power
Servos
63
Servos
64
65
Servos
Terminology:
Do not confuse servos with servo motors
DC motors (brushed or brushless) are also sometimes also
referred to as servo motors
See: http://www.theproductfinder.com/motors/bruser.htm
So when does a motor become a servo motor? There are
certain design criteria that are desired when building a servo
motor, which enable the motor to more adequately handle
the demands placed on a closed loop system.
First of all, servo systems need to rapidly respond to
changes in speed and position, which require high
acceleration and deceleration rates.
This calls for extremely high intermittent torque.
66
Hydraulic Actuators
linear movement
big forces without gears
actuators are simple
in mobile machines
Bad efficiency
motor, pump, actuator combination is lighter
than motor, generator, battery, motor & gear
combination
67
Hydraulic actuators
68
Pneumatic Actuators
like hydraulic except power from compressed air
fast on/off type tasks
big forces with elasticity
no leak problems
69
Control techniques
Closed loop control is an essential topic for
embedded systems, bringing together actuators
and sensors with the control algorithm in software
70
Control Techniques
Problem: supplying the same analog voltage (or the same
PWM signal) to a motor does not guarantee that the motor
will run at the same speed under all circumstances!
71
On-off control
The power to motor is either switched on or
switched off
72
73
74
75
Step-response of an on-off
controller
Not smooth
Can we improve this?
76
PID Control
PID = P + I + D
P = Proportional
I = Integral
D = Derivative
77
79
80
81
82
Substitute KI for
84
P, PD and PID
85
PID controller
A complete PID formula
86
87
88
Summary
Embedded systems
MCU vs. Computer
Sensors
Binary, Encoder, Sonar, Infrared sensors, Orientation sensors,
Cameras, Microphones
Actuators
DC motor, Servo, Stepper motors, H-Bridge and PWM
Control techniques
On-off, PID
Projects
1. Auto-driving Car
2. Smart 2-DOF Robot Arm
90