Professional Documents
Culture Documents
Abstract
A “robot” is explained as “a device that performs functions normally
ascribed to humans” - Webster.
“Autonomous” means that the robot can work totally independently of
itself, once it has been programmed, and it should be able to function
without interaction from any human influence. Many robots are used
nowadays to work in conditions where it is inaccessible for humans to
work and therefore need to be autonomous.
The aim of this project is to program a robot (shown left) using PIC
(peripheral interface controller) chips, so that it will utilise its infra red
Laboratory work
• Mobile robot and the use of 8051 (or the ROM-less version
8031)
• free project
– Various robots: robot soccer, legged robots..
– graphic card
– DSO
– temperature control
– legged robot
– windows programming interfaces
– etc.
Prerequisite
• Computer interfacing: 8255 , 8253
• Analog electronics, op-amp, transistor circuits
• Digital logic concepts
• Hardware prototyping & wire-wrap techniques
Content of this course
– Learn about microprocessor system development
techniques.
– Learn about real-time software development techniques.
– Learn to build interfaces between real world data and the
computer.
– Learn to process and analyse signal data by a computer.
Aims
• To teach computer interfacing using real example.
(Sensors and motors)
• To learn micro-controller usage
– parallel IO
– serial IO
– hardware Interrupt
– timer 8253
– operating systems.
Content of this introduction
• Course outline
• To give a general perspective of our robot.
• To introduce concepts of various interfacing
techniques used.
• Don’t worry about the circuits, they will be
explained in details in future.
Schedule
• 1/2 term: basic robot building
• 1/2 term: advanced robots or other projects
Proverb
• Those who work with their hands are laborers,
• those who work with their hands and heads are
craftsmen,
• those who work with their hands and their heads and
their hearts are artists.
Descriptions of the
Interfacing techniques
• Microprocessors systems
– memory interface
– IO interface
• hardware interfacing
• software control
• signal processing
How to achieve our goals?
• To build a robot, and why?
• to program the robot
• give intelligence to the robot
Overview of the robot
• Sensory:
– Sensor 1: ultra-sonic sensors
– Sensor 2: touch sensors
– Sensor 3: range proximity sensors
– Sensor 4: Path following sensors
– Sensor 5: Sound sensors
• Wheels and gear box, Dc motor control
– Speed control by photo interrupters
• Brain: 8031 basic
• Intelligence
• Power supply
Diagram of the robot
structure
• forward
Touch sensor
ULS radar
on servo motor
Motor Right
Controller wheel
PC 8031CPU
& 8255
Rear wheel
RS232
Our robot car
•
Overview of the controlling
bits
• CPU--8255--sensors and effectors bits.
adxl202
2-axis
accelerometer
ADXL202EB
• Measure Weight
Tilt
Measurements
Analog Tilt Measurements
• Pass signal through low-pass filter, then to ADC
– Averages signal
– Filter cutoff frequency should be < 0.1 bandwidth
+5V
LM324
0.1µ F
Vi R PIC
ADXL202EB +
Bandwidth = 100 Hz ADC0
C - Vo
Vi
1
≤ 10 Hz Vo
2πRC
t
Digital Tilt Measurements
• Send PWM signal directly to CCP
– Set to measure pulse width
– Uses a valuable microcontroller resource
+5V
0.1µ F
Pic
ADXL202EB
Bandwidth = 100 Vi
Hz CCP
= 1000 Hz + Vi -
C
Vi
Vo
t
Threshold Measurements
• Pass acceleration signal through comparator, then to
input capture
– Need high signal bandwidth to see pulse
R LM311 comparator
ADXL202EB
Vi
Bandwidth + Vo
= 1000 Hz Rb
C -
PIC
Rpullup
+5V
Vth
Vo
1 Vi
≤ 100 Hz Vth
2πRC
t
Mindstorms
Mindstorms on the Net
• Excellent facility to
overcome any obstacles
that may be encountered
• Common questions
answered
• Program tuition
• Additional products
introduced
Touch and light sensors
• Very easy to
assemble
• Very sensitive to
external stimuli
Rotation and
temperature sensors
• Temperature
sensor would be
of particular use
in conducting
potentially
dangerous
science
experiments via
robotics
Robotic Command Explorer
• RCX
• program
downloaded via
infra red beam
• 3 output terminal-
used for motors
• 3 in/out terminals
for touch, light,
temperature
sensors
My model
• Lego construction
enjoyable, however the
integration of the motors
seemed a little difficult in
terms of design
• The motors should snap
together
It works
Using both sensors
RCX as “Find”
Command Simulator
Translating Abstract
Computing Concepts into
Physical Form
(or) the True Story
of………..
When Harry Met
Sally!
…..Young, successful,
blonde-haired, blue-eyed,
charming I.T. professional
seeks HOT STUFF
Please contact HARRY at
P.O. Box 1591……….
Scenario I: End of File
(“Face it, Harry, she just aint out there!”)
Starting Point:
Execute “Find” Command
Correct
Record
RECORD 1 not found/
E.O.F.
RECORD 2 =
Program
ends after
RECORD 3
30 Seconds
Incorrect Records
RECORD 4
Correct Record
Scenario II: Timeout
RCX “Find” Command Simulator
Timeout Scenario
(Only one step short of Heaven….…)
Starting
Starting Point:
Point:
Execute
Execute“Find”
“Find” Command
Command
“Find”Program (30
Seconds’ Duration)
ends without record
RECORD 1 being found
=
RECORD 2 Timeout!
RECORD 3
Incorrect Record
RECORD 4
Correct Record
Scenario III: Successful Record Retrieval
(and their eyes met across a crowded room)
Starting Point:
Execute “Find” Command
“Find” ends
when
RECORD 1 correct Message
record found sent to
RECORD 2 second
RCX
RECORD 3
Incorrect Records
RECORD 4
Correct Record
How the “Find” Command
Simulator Works
• Running RCX Program as a Metaphor for Execution of “Find”
Command (Search Engine query).
Example of
one Program
that didn’t
work because
of conflict
between
stacks
Academic Evaluation
• Excellent means of introducing basic • The integration of both software and
programming concepts such as loops, hardware gives a very balanced
nested loops and conditional education
statements, in an environment where • The complementary relationship
effects on an end product can easily between hardware and software can
be viewed be seen at a glance, as opposed to the
• Excellent teaching tool for In/ Out traditional approach of introducing
devices and interfacing both as separate disjointed topics in IT
• Robotics is put easily within the grasp
of a teenager
Ultrasound
Ultrasound
• ~40Khz
• Time of Flight
Small detail hard to resolve
• Depending on sensor,
– return analog waveform
– Return time until first peak
• Hard to resolve small detail
• Multipath
14
5
12
4
Echo Pulse Width (ms)
3 8
6
2
4
1
2
0 0
0 10 20 30 40 0 2 4 6 8 10
D is tanc e to re f le c te d o b je c t (in) D is tanc e to re fle c te d o b je c t (ft)
Ultrasonic Range Detectors
1 ft
Ultrasonic Range Detectors
• Noise
– Relatively stable readings especially between 1ft to 6ft
– Readings for larger distances are less consistent but averaging or
median filtering can help
– Beam spread is significant
• Sampling
– Can reasonably acquire 20-30 samples per second
• Uses
– Long range obstacle mapping
– Distance to target measurements
Gas Sensor
Application For
Indoor Monitoring
Background
System Construction
The Gas Sensor
The Robot
Research Background
Today, many dangerous chemicals are produced and
transported. There is a need to detect the emission of
these chemicals in case of chemical accidents or fires.
③
⑤ ④ ⑥
A/D
Gas Sensor Robot
Converter
Construction Introduction
D/A Converter
PCI-3343A is used in our system. It’s hardware
Specification is shown as below.
Output Current: 5mA (max)
Number of Channels: 4 channels
Output range: ±10Vdc
Resolution: 12 bit
Error: ±0.4% (max) ( 0 to 50 °)
Relative accuracy: ±1 LSB (max) ( 0 to 25 °)
Settling time: 10μs*¹ ( per channel)
Amplifier Circuit
TGS 2610
Gas Sensor Features
General purpose sensor with sensitivity to wide
variety of combustible gas
Low power consumption
High sensitivity to methane, propane, and butane
Applications
Domestic gas leak detectors and alarms
Portable gas detectors
Combustible gas and vapor detection
Gas Sensor
Specifications
Basic Measuring Circuit:
Ps = (Vc - VRL)² / Rs
Rs = (Vc - VRL) RL / VRL
The value of VRL should be
chosen to keep Ps <=15mW
Sesnor1: Ultra-sonic radar (USR)
• Echo reflection: Distance= tdelay*Velocitysound/2
• Velocitysound=330m/s
Ultra-sonic Transmitter
Robot
On/off
control
time
Ultra-
or
sonic
40KHz 555 oscillator 4001 speaker
or 3x CMOS 4049B/4001
to enhance
40KHz Crystal oscillator
power
Ultra-sonic Receiver circuit Board
USR-01b
•
TTL
level
output
Level
shifter
RX
mic
GND
Tx
Mic.
GND Tx mic.
40KHz oscillator
driver
Suggested Ultra-sonic radar design
bit 0 1 2 3 4 5 6 7 bit 0 1 2 3 4 5 6 7
R0 SUS . . . . R2 DT[0,1,2,3] VUS
40KHz 40KHz
2.5KHz
packet
RDY R0: SUS Tx
R2:DT,VUS Rx
10KΩ
switch
output robot front
0.1µ F
Top view
Sensor 3: Infra-red (880nm wavelength)
proximity sensor to detect nearby obstacles
Light covers
IR detector
GP1U52X
Top view
Infra-red Proximity detector circuit
from Mobile Robots by Jones,AK Peters
•
LED1
LED2
IR
LED
8255 of IR
ADC
8031 sensor
micro-
controller Output code & level
depend on D Distance D
Sensor 4: Path following sensor
use the same Infrared Proximity detector circuit
wheel
IR LED1 White
IR detector strip
on black
tail ground
IR LED2
head
Aanlog-to-digital
converter
Condenser Amplifier
microphone To 8255
of 8031
micro-
controller
The Motor System
Feedback control
Motion control
• Power the wheels
– Power method 1: Mechanical relay
– Power method 2: Single direction Power Transistor
– Power method 3: Dual direction H-bridge circuits
• Speed control
– Speed control 1: pulse code modulation
– Speed control 2: by photo interrupters and Feedback
– Optic isolation
• legged robot by servo motors
Power method1: Direct Current DC (1A)
motors by mechanical relay
•
Current
driver DC motor
8255
e.g.
ULA2001A
Mechanical relay
TPIC2701 or ULN2001A from Texas instrument
http://www.ti.com/sc/docs/psheets/abstract/datasht/slis019a.htm
Power method 2: Direct Current DC(1A)motors by
transistor (one direction)
High power
560Ω , 1W resistor
From 8255 5 Ω , 5W
output Current TIP3055
driver +
or optical DC motor
isolator -
Power method 3: Direct Current DC
motors by H-bridge transistor circuit
(Two-direction)
5V
motor
A
• JP11 -> Motor
• Forward : A=1, B=0
• Backward:A=0,B=1
• Stop :A=B B
GND
Speed control 1:Approximate speed
control by Pulse Width Modulation
E.g. 2.5KHz
Off time
Mark (motor on)
IR receiver output
A metal disk
indicator
output
GND
Registers for motor control
• L=left, R=right
0 1 2 3 4 5 6 7
• M=motor,
RME
RMD
LME
LMD
R0
• E=enable,
• D=direction
R1 RCT(0,1,2,3) LCT(0,1,2,3)
• RCT, right counter
• LCT, left counter
VRM
VLM
R2
• VRM, valid right turns
• VLM, valid left turns
Precise speed control by feedback
• Set RCT(0,1,2,3) ,LCT(0,1,2,3) to specify the number of
turns of the wheels.
• Set RME, LME to start move motors; directions depend on
RMD, LMD
• VRM,VLM will be reset to 0.
• The photo interrupters signals from the left/eight wheels
will increment the internal wheel counters.
• When the wheels make the correct number of turns
specified by RCT(0,1,2,3) and LCT(0,1,2,3), VRM, VLM
will be set to 1 respectively.
Optical isolation
• The motor system draws large current, it make
induce power surge at the power supply.
• To separate electrically the motor system and the
digital system, we use optical isolators.
100Ω
Digital To power control system
input light
Positional control: Servo motors:
e.g. Futaba FP-S148 RC
Pulse width modulation control pulses
for R/C servo motors
• Variable power supply design and usage, e.g. step down 5V --> 3V.
TIP3055
Input power R1
Output=V1[R2/(R1+R2)]
V1 R2
Use of 7805 power stabilizer and power
isolation
• 7.2V or 8031
7805
above
Power 7805 Xilinx
supply
Optical Low power
Electrically Isolated
isolators
High power
3 Volts Current Left/Right
battery driver motors
circuit
conclusion
• We will build a mobile robot and learn interfacing
techniques along the way
• We will build intelligence software for the robot to
learn more about machine intelligence
Happy Hollow
Elementary School
HHES Team
Spring 2000
Accomplishments
• 5 Deliverables this semester
Lightening Detector
Complete Web Page
Optical Sensor
Digital Editing CD-ROM/Demo
Water Garden
Weather Station
Accomplishments and Plans
Lightning Sensor
• Features
- Detects common cloud-to-ground and in cloud
lightning
- Simple circuit offered design opportunities
•Specifications
- Full bandwidth from 500Hz to 1MHz (wideband)
- Highest efficiency from 5KHz to 500KHz
- 80 mile detection range
- 0.14 RF V/M sensitivity
Lightning Sensor
Operation:
• Stripline antenna detects EM radiation
• Induced current excites base of transistor
• Current from 9V battery is allowed to flow through IR emitter
• IR detector (diode) passes lightning detection to serial port
Ω
100µ F
Ω
Ω
Lightning Sensor
• Construction is Complete!!!
Project Finalization
• Water Garden Dedication at HHES with Parents,
Students, and Faculty
• Introduction of Aquatic Life
• Final Meeting with Project Partner to give
instructions for the future
Watergarden
TV Station
Accomplishments and Plans
TV Accomplishments
• Create compilation of Digital Video Editing
information
• Research different DVE hardware and software
packages
• Demonstrate possible use of target package
DVE Information
• Basics of Digital Video: Key terms and technologies:
– Codec
– Bandwidth
– Compression
– Keyframe, etc.
• Why are these important?
• What systems engineering implications do they hold?
TV Accomplishments
• Create compilation of Digital Video Editing
information
• Research different DVE hardware and software
packages
• Demonstrate possible use of target package
DVE Packages
• Presented alternatives based on price, ease of use,
and system compatibility.
• Components:
• CPU Recommendations
• Minimum RAM
• Hard Drive Storage considerations
• Digitizing Card
• Distribution and Archiving
DVE Packages
• Sample Hardware:
• RealMagic Digital Video Recorder (MPEG 2), $999
» Allows native MPEG 2 compression and editing
» High quality, but high price*
• Pinnacle Studio DC10 Plus, $178
» Lower price, but lower quality
» System requirements eased
• Pinnacle miroVideo DC30 Pro, $589
» Middle-of-the road performance
» Good Price-to-Quality ratio
• Units differ primarily in compression and bandwidth.
*
Low-end professional suites cost approx. $15,000
Distribution and Archiving
• Tape
• Still most universal way of watching a video tape.
• Most cards allow output from computer to tape.
Edwin Olson
• Msepanta GMU
Team Members
Ceg/Csc 3430
Microprocessor systems
and applications
Purdue Engineering Student Council
Robot 1
Using mobile robots as examples to
Introduction
demonstrate hardware interface
techniques
Cousins
• Rug warrior (most popular) at
http://www.tiac.net/users/akpeters/Rug-warrior.html
• MIT Autonomous Robot with a set of course notes
(very detailed) http://web.mit.edu/6.270/www/notes.html
• Lego mindstorms (very new) at
http://www.legomindstorms.com/
• http://www.RobotStore.com/lego_mindstorms_rcx_notes.html
References
• The 80x86 IBM PC and Compatible computers (Volume II),
Mazidi, Prentice Hall
• One of the 80x86 books by Brey, Prentice Hall
• Other reference
– Get a book on 8051 (Chinese or English) such as
– 8051 Microcontroller, The: Hardware, Software, and Interfacing
by James W. Stewart, Kai X. Miao,Prentice Hall; ISBN:
013531948X
– C and the 8051 : Hardware, Modular Programming, and
Multitasking by Thomas W. Schultz, Prentice Hall; ISBN:
0137548397