mit-xxx visual basic for engineeringweb.acd.ccac.edu/~dwolf/files_to_download/rbt-225 - dan wolf...
TRANSCRIPT
1
Robotics in Industry - RBT-225
FALL 2016
Instructor: Dan Wolf
[email protected]://web.acd.ccac.edu/~dwolf/
Revised: 11/28/2016
WELCOME!
2
Week #1 - Introduction
Agenda :
1. Introductions
2. Course Formalities
Lab Assignment:
Lab_1_BasicStamp_Sensors.doc
3
Prior-Experience Evaluation
This is a very quick NON-CREDIT pre-test to allow me to
understand your current knowledge and capabilities.
Using the three electronic components, draw a schematic that will
allow the switch to energize the +5volt coil of the relay so that it
turns on the +24volt lamp.
24V Lamp
NO
NC
COMMON+5V
Coil
4
Course Introduction
This course offers an introduction to robotics, including motive power
elements, computer control, safety, work cells and maintenance. A
history and classification of robots is included. Programming,
calculation of robotic motion, electric and mechanical principles in a
Computer Integrated Manufacturing (CIM) environment are
studied.
The fact is, that civilization requires slaves. The Greeks were quite
right there. Unless there are slaves to do the ugly, horrible,
uninteresting work, culture and contemplation become almost
impossible. Human slavery is wrong, insecure, and demoralizing. On
mechanical slavery of the machine, the future of the world depends.
Oscar Wilde
5
Computer-Integrated Manufacturing
Computer-Integrated Manufacturing (CIM) is the manufacturing approach of using computers
to control the entire production process thus allowing individual processes to exchange
information with each other and initiate actions. Through the integration of computers,
manufacturing can be faster and less error-prone, although the main advantage is the ability to
create automated manufacturing processes. Typically CIM relies on closed-loop control
processes, based on real-time input from sensors. It is also known as flexible design and
manufacturing. CIM is much more than simply automating a series of manual operations.
6
Student Information
1. Name
2. Student ID Number
3. Phone Number
4. Alternate Phone Number
5. Do you have any hardware or electronics experience?
What areas?
6. What is your major? Is your major a 2 or 4 year program?
7. What do you already know? Word, Excel, PP, Mathcad, HTML
8.c. What is your expected graduation date?
9. Your EMAIL address
7
Introductions
1. Introduction to the Instructor
2. Student Introductions
a) Name
b) Where do you work or what is your degree?
c) Why are you taking this class?
8
Administrative Information
1. Grading
2. Syllabus
3. Questions?
9
Unit / Lab Assignments
See the Syllabus
10
Maximize Your Time
Do not get behind !
You will need the entire scheduled class time each week
11
Mini-Assignment #1 – due next week
Questions to ask of two other students:
1) Name
2) Degree
3) Name of Pet, hobby, or interest.
4) Employment
5) What do you want to learn from this class?
12
Industrial Robots
• Material Handling, Processing Operations, Assembly & Inspection
• Performing in hazardous conditions
• Security
• Manufacturing and process control (PLCs as in RBT-235)
Medical Robotics
• Surgery
• Bionic prosthetics (arms and legs)
• Drug dispensing
• Medical Laboratories (automating tests & analysis)
• Carriers (for food, documents, and medicines)
Non-traditional
• Domestic Robots
• Self-driving automobiles (and passenger mass-transit)
• Nano-robots (still at an early R&D stage)
The World of Robots
13
1. Material Handling
• Robotic handling operations (38%)
2. Processing Operations
• Robotic Welding (29%)
• Robotic Dispensing (4%)
• Robotic Processing (2%)
3. Assembly and Inspection
• Robotic Assembly (10%)
INDUSTRIAL ROBOTSTHE 5 MOST POPULAR APPLICATIONS
14
Robot Machining Video
Grinding and polishing of hip implants with a KUKA
robot:
https://www.youtube.com/watch?v=gO_8spCu29M
15
Robotic Applications
16
Sensors & Relays we will be using
1.BRN
3.BLU
4.BLK
2.WHI
CA18CLN12PAProximity Sensor
+V
Gnd
The datasheets for these are located on the class website.
Detects the presence
of an object.
Detects the absence of
an infrared light source.
.
DPDT Relay, +12V
coil
17
Proximity Sensor
1.BRN
3.BLU
4.BLK
2.WHI
CA18CLN12PAProximity Sensor
+V
Gnd
The datasheet for this is located on the class website.
Detects the presence of an object
using capacitance as the sensing
mechanism.
It will detect an object that gets
very close to it (3-12mm).
Detects the presence of an object.
18
Photoelectric Sensor
The datasheet for this is located on the class website.
Detects the absence/presence of an
infrared light source (within 2 m).
E3F2-R2C4
Infrared
Photoelectric
Sensor
Reflector
Object will break the
infrared light beam
19
BTA1-2C 12V Relay
The datasheet for this is located on the class website.
DPDT – Double Pole, Double Throw
N.O. – Normally Open Contacts
N.C. – Normally Closed Contacts
Contacts are rated for 10A at 120VAC
+12V Coil
20
Basic Electronic Refresher
E
I R
𝐸 = 𝐼𝑅 ∗ 𝑅 𝐸𝑇𝑜𝑡𝑎𝑙 = 𝐸𝐿𝐸𝐷 + 𝐸𝑅 5𝑉𝑜𝑙𝑡 = 2.0 𝑉𝑜𝑙𝑡 + 3.0 𝑉𝑜𝑙𝑡 𝐸𝑅 = 3.0 𝑉𝑜𝑙𝑡 Assume: ILED = IR = 5mA
𝑅 = 𝐸𝑅𝐼𝑅
= 3.0 𝑉𝑜𝑙𝑡
0.005= 600 𝑜ℎ𝑚
21
Classroom Safety Rules
1. No one shall ever be within the reach of the robot arm
during operation.
2. Someone shall always be assigned to remain at the
controller in order to emergency halt the robot.
3. The motor power switch shall always be off before anyone
can enter the robot space.
4. All software programs and hardware connections shall be
peer reviewed by a second person before being tested.
5. Always keep your hands away from the robot joints (pinch
points).
22
Equipment Safety
1. Do not connect any equipment to the controller box without first getting
approval from the instructor.
2. Do not apply power to the robot arm or power supplies without first
getting approval from the instructor.
3. The motor power switch shall always be off before anyone can enter the
robot space. (34” circle around the robot)
4. Always HOME the robot arm when you first start.
5. Do not leave any of the axes under mechanical strain for any length of
time. Especially, do not leave the gripper grasping an object indefinitely.
23
Equipment Rules
1.The gripper must always be in the open position
unless a program is actually running.
2.Do not leave the arm in a loaded position unless a
program is actually running.
3.The motor power switch shall always be off before
anyone can make any wiring changes.
4.All hardware connections shall be peer reviewed
by a second person before power is applied.
24
Lab Guidelines
1.Lab work should be in teams of two whenever
possible.
2.Each student should alternate as the “lead” for the
hardware and “lead” for the software.
• If you allow your partner to do most of the
software or hardware, you will be cheating
yourself out of the learning experience.
3. You will work on Lab#1 tonight.
25
Neatness counts
Make sure your connections, wire routing, and equipment
placement is neat and organized!
Bad Good
26
Lab #1 Interface Document
This is due at the end of the course and should include the
following schematics:
1) Standard SPST switch to a relay
2) Proximity Sensor to a Relay
3) Photo Sensor to a Relay
4) Relay contacts to an LED
5) Relay connected to a ScorBot Input
6) Relay (or normal SPST switch) to a BasicStamp digital input
7) ScorBot output to an LED.
8) ScorBot output to a relay coil
9) ScorBot output to a BasicStamp input
10) BasicStamp output to a ScorBot input
11) BasicStamp digital output to an LED (both driving and sinking)
12) BasicStamp digital output to drive a relay using a transistor.
13) BasicStamp digital output to drive a relay using a opto-isolator
27
Motivational Comment
Equipment problems and uncertainties are undesired
but normal in industry. Engineers and technicians are
paid to “out-think” the problems and then provide
solutions while staying focused and (realistically)
optimistic.
We will be experiencing this during the lab
experiments.
28
The End
29
Week #2 – Intro & Relays
Agenda :
1. Basic Stamp Software Commands & Programming
2. Chapter 1:
Burden Rate: Page 12-13
Setup time
Part cost
Cycle Time
Velocity Calculations Page 41
Robot Safety Guidelines: see page 42 – 46
Work Envelope
Lab Assignment:
Lab_2_BasicStamp_Relays.doc (due in two weeks)
30
Cost of Operations (Page 12 to 14 in the textbook)
1. Burden Rate is the hourly cost to the manufacturer for a given machine and
includes all costs associated with that machine (but not setup cost).
2. Lot Size is the amount of parts being made for this order.
3. Setup time is the length of time required to prepare a machine for production.
4. Part Production Cost is the cost of running the machine for one part. It does
not include setup costs or profit.
5. Total Finished Cost per Part is the total cost to make one part, including
setup, production, and profit costs.
6. Production Cost per Lot and Total Finished Cost per Lot can also be
calculated.
7. Setup Cost is the cost of the setup time (Setup Time * Burden Rate).
8. Setup Cost per Piece is the percentage of total setup cost that is applied to a
single piece (Total Setup Cost / Lot size).
31
Compute the cost of setup time
Assume:– a burden rate of $120 per hour
– The total setup time for the machine is 1.5 hours
– Lot size of 400 pieces
Total Setup Cost = Burden Rate * Machine Setup Time
= $120 * 1.5 Hours = $180
Setup Cost per Piece = Total Setup Cost / Lot Size
= $180 / 400 = 0.45 $ per piece
32
What are the production costs?
Assume:– a burden rate of $120 per hour
– A required markup of 27%
– The setup cost per part is $1.05
– The work cell can produce 8 parts every 12 minutes
Nbr of parts built per Hour =(60min/12min) * 8 = 40 parts per hour
Part Production Cost = Burden Rate / 40 pph = $120 / 40 = $3.00 Production cost per part
Note: Part Production Cost does not include setup cost.
Total Finished Cost per Part = (Part Production Cost + Setup Cost per Part) * 1.27
= ($3.00 + $1.05) * 1.27% = $5.14
33
1. Velocity is the rate which the robot can move each axis.
2. The maximum velocity of the ScorBot arm is 330mm/Sec (13”/Sec).
3. The maximum velocity of an axis must be reduced whenever it is carrying a load.
The percent reduction is based on the load weight.
• Calculate the velocity for the ScorBot arm if it must move a 0.5 pound
load at a 30% speed reduction:
Velocity for 0.5lb Load = 13”/Sec * 0.70% = 9.1”/Sec
• Calculate the time for the 0.5 pound load across 80 inches:
Time for 0.5lb Load = Distance / Velocity = 80 / 9.1” = 8.79 seconds
Question: Is there a reduced velocity rating for the ScorBot arm when it is
carrying a load? Or is 13”/Sec the max velocity when it has a 2.2 Lb load?
Velocity (Page 41 in the textbook)
34
Cycle Time (page 42 in the textbook)
Cycle Time = Time to move one step
Total Cycle Time = Time required for all steps
Assume the following arm sequence:
a) 38” movement of empty arm to first pickup position (𝑇𝑒𝑚𝑝𝑡𝑦)
b) Four second delay for the part to arrive (𝑇𝑑𝑒𝑙𝑎𝑦)
c) 24” movement of the fully loaded arm to the second position (𝑇𝑓𝑢𝑙𝑙)
d) Each of six programmed points requires 0.1 seconds (𝑇𝑝𝑝)
e) Gripper open or close requires 0.2 seconds (𝑇𝑔𝑚)
f) The velocity of the empty arm is 60” per second with a 20%
reduction at maximum payload.
Total cycle time = 𝑇𝑐𝑦𝑐𝑙𝑒 = 𝑇𝑓𝑢𝑙𝑙 + 𝑇𝑒𝑚𝑝𝑡𝑦 + 𝑇𝑑𝑒𝑙𝑎𝑦 + (6 ∗ 𝑇𝑝𝑝) + (2 ∗ 𝑇𝑔𝑚)
35
Find total cycle time (see previous slide)
Total cycle time = 𝑇𝑐𝑦𝑐𝑙𝑒 = 𝑇𝑓𝑢𝑙𝑙 + 𝑇𝑒𝑚𝑝𝑡𝑦 + 𝑇𝑑𝑒𝑙𝑎𝑦 + (6 ∗ 𝑇𝑝𝑝) + (2 ∗ 𝑇𝑔𝑚)
𝑇𝑒𝑚𝑝𝑡𝑦 = 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒
𝑉𝑒𝑙𝑜𝑐𝑖𝑡𝑦=
38"
60 𝑖𝑛/𝑠𝑒𝑐= 0.63 second
Velocity at maximum payload = Empty Velocity * 0.8 = 60 in/sec * 0.8 = 48 in/sec
𝑇𝑓𝑢𝑙𝑙 = 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒
𝑉𝑒𝑙𝑜𝑐𝑖𝑡𝑦=
24"
48 𝑖𝑛/𝑠𝑒𝑐= 0.5 second
𝑇𝑑𝑒𝑙𝑎𝑦= 4 seconds
Total cycle time = 𝑇𝑐𝑦𝑐𝑙𝑒 = 𝑇𝑓𝑢𝑙𝑙 + 𝑇𝑒𝑚𝑝𝑡𝑦 + 𝑇𝑑𝑒𝑙𝑎𝑦 + (6 ∗ 𝑇𝑝𝑝) + (2 ∗ 𝑇𝑔𝑚)
= 0.5 + 0.63 + 4 + 6 ∗ 0.1 + (2 ∗ 0.2)= 6.13 seconds
36
Work Cell Safety Guidelines
1. The maximum reach of the robot arm determines the safe working distance.
2. An “In-Use” warning light shall be located where it is visible by nearby personnel.
3. No un-neccesary hardware shall be within reach of the robot arm.
4. Workplace barriers shall surround the work cell.
5. Emergency stop switches shall be located at strategic points around the work cell.
6. Signs shall be located at strategic points around the work cell indicating movement
could occur at any time.
7. A “Lock-out/Tag-out” system shall be provided to allow a worked to disable the
system vie his personal padlock (or key or equivalent).
8. Pages 44 to 46 of the textbook contain excellent guidelines and things to
remember.
37
Work Cell Safety
38
Lab Reports - An Overview
The title page should include your name, chapter# and lab title.
Software printouts and schematics may be referenced in the
text.
Discuss as many of the new lab concepts as possible.
Optional work is highly encouraged and required for grades
above 89%.
One of the worst things to do is get behind on the labs.
Additional grading details are explained in the syllabus.
39
Lab Report Format
INTRODUCTION:
Provide an overview of the topics that are involved in the lab.
BODY:
List and discuss each experiment.
Include data and explain/discuss your calculations.
Optionals should be identified.
CONCLUSION:
Summarize each new instruction or concept.
PRINTOUTS:
Include software, hardware and layout diagrams.
40
Lab Report Schedule and Grading
• Lab reports are due two weeks after the last
work night for that lab.
• I require a majority of the labs before I will
grade them.
• I will return the graded labs to you the week
after I grade them.
• You must inform me in advance if your lab
report will be late.
41
Spell & Grammar Check Reminder
Are you using MS-Word for your labs?
Are you using the Spell Checker and Grammar
Checker?
To Configure:
Tools | Options | Spelling and Grammer
To run:
F7
42
Electronics Review before Lab 2
The relay coil current is IRELAY = 100mA, transistor gain is 50,
and VBE is 0.6V so:
VR = 5V – 0.6V = 4.4V
IR = 100mA / 50 = 2mA
R = 4.4V / 2mA = 2200 ohms (use a 2K)
43
Basic Stamp Introduction
The BASIC Stamp is a microcontroller developed by Parallax,
Inc. which is easily programmed using a form of the
BASIC programming language. It is called a “Stamp” simply
because it is close to the size of an average postage
stamp.
Downloadable from the course website:
Basic Stamp Programming Manual.pdf
Programming_the_Basic_Stamp.doc
What is a Micro-controller.pdf
44
Basic Stamp Information
We are using: “Board of Education” board which has a BS2 Basic
Stamp controller.
• Mechanically interlocked power supply to prevent dual connection of
wall-pack and 9-volt battery
• DB9 connector for BS2-IC programming and serial communication
during run-time
• P0 - P15 I/O pins, Vdd and Vss connections brought adjacent to
1.375 x 2 in ( 35 x 51 mm) breadboard area
• Female 10-pin dual row connector for optional AppMods
• On-board regulator delivers up to 1 amp of power for larger projects
• Jumper selection of servo power: regulated (Vdd) or unregulated
(Vin)
• Three-position power switch allows various powering options for
programming without providing power to servo connectors
45
Basic Stamp 2 Details (BS2)
• Processor Speed: 20 MHz; ~4,000 PBASIC instructions/sec
• PBASIC Commands: 42
• Package: 24-pin DIP
• I/O pins: 16 + 2 dedicated serial
• RAM Size: 32 Bytes (6 I/O, 26 Variable)
• EEPROM (Program) Size: 2 KBytes; ~500 PBASIC instructions
• Voltage requirements: 5.5 to 15 VDC (Vin), or 5 VDC (Vdd)
• Current requirements: 3 mA Run, 50 μA Sleep
• Source/Sink Current per I/O: 20 mA / 25 mA
• Source/Sink Current per unit: 40 mA / 50 mA per 8 I/O pins
• Communication: Serial (9600 baud for programming)
• Dimensions: 1.20 x 0.63 x 0.15 in (30.0 x 16.0 x 3.81 mm)
• Operating temp range: -40 to +185 °F (-40 to +85 °C)
46
Basic Stamp I/O Specifications
Input Impedance is 1M ohm
So a 5 Volt input level will result in a:
5V / 1M = 0.000005 = 5uA input current
The input for a logic low must be less than 1.4 Volts
The input for a logic high must be greater than 1.4 Volts
The Basic Stamp CONFIGPIN command allows this to be changed.
The BasicStamp inputs do not contain pull-up or pull-down resisters so they
must be connected to either 0V or +5V if they are being read.
Output current is: Source = 20mA or Sink 25mA per I/O pin
Across all I/O pins, not to exceed: Source = 40mA and Sink = 50mA
47
Two methods of interfacing to a digital input
What size resister is required?
Input impedance is 1M ohm so when the switch is open, the input will
source up to 5uA thru the resister (5V/1M = 5uA).
5uA * 1K = 5mV which is well below the input threshold of 0.5 Volt for a
logic low.
5uA Current flow
48
The End
Please read Chapter 2 prior to the class next week.
49
Week #3 – ScorBot Intro & Positions
Agenda :
1. ScorBot Positions and Run Program
2. Chapter 2
Robot Arm Geometries
Drive Systems Page 74
Control Techniques – Page 87
Sensors – Page 88
Potentiometers versus encoders
Resolvers (Synchros) – Page 95
Closed / Open-loop
Path Control
Lab Assignment:
Finish Lab #1 & 2 otherwise move ahead to Lab#3
a) Goto Position above destination @
Position #1
b) Slowly lower arm to item #1 @ Position@2
c) Close gripper
d) Raise arm back to Position#1
e) Move to Position#3 above the destination
f) Lower arm down to Position#4
g) Open gripper
h) Raise arm back to Position#3
i) Goto Home Position#5
50
In general, robot arms have three movements (up-down, in-out, side-to-
side). In addition, they can have as many as three additional wrist
movements on the end of the robot's arm: yaw (side to side), pitch (up
and down), and rotational (clockwise and counterclockwise).
Degrees of Freedom
The human wrist can
perform 22 different
movements!
51
X, Y, and Z are referenced to the tool plate.
Pitch, Yaw, and Roll are referenced to the wrist.
The six arm motions
Y-Axis
-LEFT & +RIGHT
via rotating the base
X-Axis
-IN towards the base
+OUT away from the base
Z-Axis
-DOWN and +UP
52
Accuracy versus Precision
53
• Six Axis, x, y, and z axis plus yaw (side to side), pitch (up and
down), and rotation
• Very flexible
• Load Capacity: 3-600kg
• Articulated Arm or Gantry
1) Configurations: Coordinate / Cartesian
54
2) Configurations: SCARA(Selective Compliance Assembly Robot Arm)
• Four axis: x, y, z, and wrist/twist about the z-axis (vertical)
• Large workspace, High Speed with very good repeatability,
not so good in the vertical axis
• Moderate Load Capacity: 1-20 kg
55
3) Configurations: Delta (Spider)
• Four axis: x, y, z, and
wrist/twist about the z-axis
(vertical)
• Restricted workspace, Very
high speed, not so good in
the vertical axis
• Lowest Load Capacity: 1-3 kg
56
Types of Path Movements
• Point-to-Point Path: The points
are specified but not the path.
• Controlled Path: More precise
than point-to-point because it
ensures a specific path is taken.
• Continuous Path: An extension
of point-to-point providing very
smooth movements.
57
Arm Movement Sequence
NO
YES
58
Power Sources
• Pneumatic – typically low-pressure air for low
weight carrying.
• Hydraulic – typically high-pressure oil for medium
to high force/weights, smoother than pneumatics,
potential environmental issues.
• Electrical - most common, better motion control,
safer because they can be shut down quickest.
59
Hardware Concepts
▪ SCORBOT Arm
➢ 12V Motors
➢ Encoders
➢ Gears
➢ Limit Switches
➢ Control Box
▪ Transmission ratio
▪ RPM Ratio
▪ Resolution ratio
▪ Encoders
60
Hardware Concepts – The Arm
▪ SCORBOT Arm
➢ 12V Motors
➢ Encoders
➢ Gears
➢ Limit Switches
➢ Control Box
61
ScorBot Arm Specifications
▪ Axis 1: Base Rotation 310 degrees
▪ Axis 2: Shoulder Rotation +130 Degrees / -35 Degrees
▪ Axis 3: Elbow Rotation +- 130 Degrees
▪ Axis 4: Wrist Pitch +- 130 Degrees
▪ Axis 5: Wrist Roll Unlimited
▪ Axis 6: GRIPPER Open/Close + Measurement of gripper opening
▪ Maximum Working Radius: 61mm (24.4")
▪ Gripper Opening: 75mm (3") without rubber pads - 65mm (2.56") with rubber pads
▪ Maximum Work Load: 1kg (2.2 Lb)
▪ Transmission: Gears, Timing Belts and Lead Screw
▪ Actuators: 6 DC Servo Motors with Closed-Loop Servo Control
▪ Feedback: Optical Encoders on All Axis
▪ Hard Home: Fixed Reference Position on all Axes
▪ Repeatability: +- .05mm (+- 0.02")
▪ Maximum Speed: 330mm/Sec. (13"/Sec)
▪ Weight: Robot Arm: 11kg (24 Lb) - Controller: 5kg (11 Lb)
62
Torque Calculations
▪ Torque = L(feet) * F(pounds)
▪ Assume:▪ Downward force at W4 is 10 pounds
▪ The combined length of L1 and L2 is 30 inches.
T = L * F
Torque at M1 must be
2.5ft * -10 lbs = -25 ft-lbs
in order to hold the arm level.
63
Gear Ratio (GR)
In this example, gear a turns 3 times for each turn of gear b:
GR=𝑅𝑎
𝑅𝑏
Ra = radius of gear attached to the motor shaft
Rb = radius of gear attached to the robot base
Ra=20mm, Rb=60mm
GR = 𝑅𝑎
𝑅𝑏=
20
60=
1
3
64
Transmission Ratio (𝑇𝑎𝑏)
In this example, gear a turns 3 times for each turn of gear b:
𝑇𝑎𝑏 =1
𝐺𝑅or 𝑇𝑎𝑏 =
𝑅𝑏
𝑅𝑎: 1
𝑇𝑎𝑏 = Transmission ratio from gear a to gear b
Ra = radius of gear attached to the motor shaft
Rb = radius of gear attached to the robot base
Ra=20mm, Rb=60mm
𝑇𝑎𝑏 = 60
20:1 = 3:1
65
If gear B is larger than gear A then the speed of gear B is
reduced while the torque of gear B is increased.
or
If gear B is smaller than gear A then the speed of gear B is
increased while the torque of gear B is decreased.
Transmission Ratio (𝑇𝑎𝑏)
66
RPM Ratio
In this example, gear a will turn na
nbfaster than gear b:
𝑊𝑏
𝑊𝑎=
1
𝑇𝑎𝑏=𝑛𝑎𝑛𝑏
Wb = rate of revolution of gear attached to robot base
Wa = rate of revolution of gear attached to motor shaft
Wa = 1500 rpm, 𝑛𝑎 = 15 𝑡𝑒𝑒𝑡ℎ, 𝑛𝑏 = 45 teeth
Wb = Wa * 𝑛𝑎/𝑛𝑏 = 1500 * 15/45 = 500 rpm
67
Resolution Ratio
The smallest step feasible by turning the gears:
𝑅𝑒𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛_𝐺𝑒𝑎𝑟_𝑏
𝑅𝑒𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛_𝐺𝑒𝑎𝑟_𝑎=𝑆𝑏
𝑆𝑎=
𝟏
𝑻𝒂𝒃=𝒏𝒂
𝒏𝒃
Sa = 15ο (angular resolution of gear attached to motor shaft)
𝑛𝑎 = 15 𝑡𝑒𝑒𝑡ℎ, 𝑛𝑏 = 45 teeth
Sb = Sa * 𝑛𝑎
𝑛𝑏
= 15ο * 15
45= 5ο
68
Ball-Screw Drives (Page 81 in textbook)
Also known as a Linear Actuator
69
Harmonic Drives (Page 83 in the textbook)
Their main advantages include: high torque capacity,
excellent positioning accuracy and repeatability, compact
design, zero backlash, high single-stage reduction ratios
and high torsion stiffness.
70
Non-Linearity Issues
▪ Backlash – Term describing actuator hesitation and overshoot caused by small gaps between motor gears
▪ Can result in small, but unnecessary, oscillations of the actuator position
▪ Dead Zone – Because the sensitivity of actuators is limited, not every non-zero input will result in action. The Dead Zone is the +/- region above a zero (0) input that will result in no actuator movement.
71
Purpose of Robotic Control Systems
The “brain” performs the following:
• Direct control of a manipulator (forces or displacements)
• Path planning and navigation (mobile robots)
• Compensate for robot’s dynamic properties (inertia,
damping, etc.)
• Avoidance of internal/external obstacles
72
Control Systems
• May use auxiliary computers or embedded
microprocessors.
• Common control methods:✓Open Loop Control
✓Closed Loop Control➢Bang-Bang Control
➢PID Control (Proportional Integral Derivative)
• The control systems have not been standardized
by the industry and are manufacturer specific.
73
Closed Loop Controller
▪ “Two-way” (feedback)
▪ The input is adjusted to drive the output to the intended
value
74
Open Loop Controller
▪ “One-way” signal to the output device
▪ Feedback is not provided to ensure the output matches the
intended
▪ The amount of force that is applied is constant so it’s
affect may be slower or faster than desired (or may vary
depending on the current state of the output environment)
75
Arm Position Sensors (page 88 in textbook &
Appendix E in the ScorBot User Manual)
1. Potentiometer
a) used for course position data
b) Wiper contact causes wear and early
failure
c) Affected by temperature and humidity
d) Requires analog to digital conversion
2. Optical encoder
a) Does not provide positional information
b) Non-contact thus reduced wear
c) Greater resolution and accuracy
d) Larger size than potentiometers
3. Resolver (aka “variable transformer”)
a) Includes position sensing
b) Smaller and more robust
Page 88 in textbook
Appendix E in the ScorBot
User Manual
76
Incremental Encoder Example
• Does not provide positional information
• Non-contact thus reduced wear
• Greater resolution and accuracy
• Larger size than potentiometers
77
Absolute Encoder Example
• Also provides rotational position information.
• The higher the resolution, the higher the cost.
78
Incremental Encoder Resolution
• Encoder Resolution is proportional to the number of holes
on the disk per degree of rotation:
Resolution = Total Pulses / 360deg
• The smallest increment of change is 1 pulse so:
Smallest ∆ ᶿ =1
resolution
What is the resolution of an encoder that has 800 holes (pulses) per disk?
Resolution = 800 / 360 = 2.22 pulses per degree of movement
The smallest incremental change is = 1 / 2.22 = 0.45 degrees/pulse
79
Resolution Clarification (both methods are used)
Resolution - The resolution of a measurement system is the smallest
yet to distinguish difference in values.
For incremental encoders, resolution is defined as counts per turn.
For absolute single-turn encoders, it is positions per turn, expressed
as a multi-bit word. i.e. 720 / 360 = 2 pulses per degree
Encoders usually have from 100 to 6,000 segments per revolution.
This means that these encoders can provide 3.6 deg of resolution for
the encoder with 100 segments and 0.06 deg of resolution for the
encoder with 6,000 segments.
Textbook Page 91: Resolution = Total Pulses / 360 degrees
80
Classroom Safety Rules
1. No one shall ever be within the reach of the robot arm
during operation.
2. Someone shall always be assigned to remain at the
controller in order to emergency halt the robot.
3. The motor power switch shall always be off before anyone
can enter the robot space.
4. All software programs and hardware connections shall be
peer reviewed by a second person before being tested.
5. Always keep your hands away from the robot joints (pinch
points).
81
Equipment Safety
1. Do not connect any equipment to the controller box without first getting
approval from the instructor.
2. Do not apply power to the robot arm or power supplies without first
getting approval from the instructor.
3. The motor power switch shall always be off before anyone can enter the
robot space. (34” circle around the robot)
4. Always HOME the robot arm when you first start.
5. Do not leave any of the axes under mechanical strain for any length of
time. Especially, do not leave the gripper grasping an object indefinitely.
82
Equipment Rules
1.The gripper must always be in the open position
unless a program is actually running.
2.Do not leave the arm in a loaded position unless a
program is actually running.
3.The motor power switch shall always be off before
anyone can make any wiring changes.
4.All hardware connections shall be peer reviewed
by a second person before being powered.
83
Quality, Budget, and Schedule
“Stay out of Trouble in the First Place”
84
Development Sequence
1. Define the top-level task to be done by the robot
2. Define incremental positions of the arm (positions 1 to x)
3. Define the arm movements (steps 1 to n).
4. Teach the positions to the robot
5. Verify/Review the positions
6. Connect the hardware
7. Write movement software
8. Verify/Review the movement software (peer review)
9. Verify/check the hardware (peer review)
10. Apply power and test
85
Requirement Phase:
1. Top-level description of what must be automated.
Design Phase:
1. Define the task
2. Define the hardware
3. Define the pickup and drop-off points (work positions)
Implement Phase:
1. Implement the hardware
2. Define the incremental arm positions (Teach menu)
3. Program the arm movements (Edit Program menu)
Test Phase:
1. Test (Run Program Menu)
Project Development
86
Schematics that are required for Labs 1 & 2
First lab report is for Lab 2, due in two weeks
You should have FOUR schematics for Lab#1:
1. Standard SPST switch to a relay
2. Relay with Proximity Detector
3. Relay with Photosensor
4. Relay contacts to an LED
You should have ONE schematic for Lab#2:
6. Relay (or normal SPST switch) to a BasicStamp digital
input
Do not copy your partners schematic – you must generate
your own (finished) version based on the draft schematic that
you created during the lab.
87
The End
88
Week #4 – ScorBot Software
Agenda :
1. ScorBot Software commands
2. Chapter 3 – Work Cells Lab Assignment:
Lab Assignment:
Lab_1&2 (combined) due next week.
Lab_3_ScorBot_First_Move.doc (due in two weeks)
89
Basic Stamp I/O Specifications
Input Impedance is 1M ohm
So a 5 Volt input level will result in a:
5V / 1M = 0.000005 = 5uA input current
The input for a logic low must be less than 1.4 Volts
The input for a logic high must be greater than 1.4 Volts
The Basic Stamp CONFIGPIN command allows this to be changed.
The BasicStamp inputs do not contain pull-up or pull-down resisters so
they must be connected to either 0V or +5V if they are being read.
Output current is: Source = 20mA or Sink 25mA per input
Not to exceed: Source = 40mA and Sink = 50mA
90
Two methods of interfacing to a digital input
What size resister is required?
Input impedance is 1M ohm so when the switch is open, the input will
source up to 5uA thru the resister (5V/1M = 5uA).
5uA * 1K = 5mV which is well below the input threshold of 0.5 Volt for a
logic low.
5uA Current flow
91
Digital Input may or may not include internal
pull-up resisters
Gnd
Device which
includes internal
pull-up resisters
Input
THIS WILL WORK IF THE INPUTS
HAVE INTERNAL PULL-UP
RESISTERS.
+5V
Basic Stamp
P8 Input
+5V
THIS WILL NOT WORK
BECAUSE THE BS DOES
NOT HAVE INTERNAL
PULL-UP/DOWN
RESISTERS!
92
Output - Connecting an LED
In this configuration a LOW, or 0V, at P8 will allow current to flow from Vdd (+5V) through the LED and then to ground (thru P8). When P8 is HIGH (+5V), no current will flow and the LED will not light. The LED is Active Low.
Connected on P8
Vdd, NOT Vin.
Low
93
Another configuration that could be used is to have the LED
Active-High. In this configuration the LED will light when the
output is HIGH, or +5V. Current flows from the 5V output on P8
to ground or Vss (0V).
The 220 resistor will limit current flow to
approximately 20mA . The output current
from a BS2 pin should be limited to 20mA
maximum. The maximum current for an
LED is generally 30mA.
Output - Connecting an LED Part 2
High
94
Connecting an Active-Low Switch
Connect a push-button switch to P10 on the Basic Stamp
▪ The push-button is a momentary normally-
open (N.O.) switch. When the button IS NOT
pressed (open), P10 will sense Vdd (5V,
HIGH, 1) because it is pulled-up to Vdd.
▪ When PB1 IS pressed (closed), P10 will sense
Vss (0V, LOW, 0) making it Active-Low.
95
Another configuration that could have been used is shown here. Notice that the position of the switch and resistor have been reversed.
– When the button IS NOT pressed (open), P10 will sense Vss (0V, LOW, 0) because it is pulled-down to Vss.
– When PB1 IS pressed (closed), P10 will sense Vdd(5V, HIGH, 1) making it Active-High.
The BASIC Stamp has uncommitted inputs. That is,
when an I/O pin is not connected and acting as an
input, it cannot be assured to be either HIGH or LOW.
Pull-up and pull-down resistors are needed to commit
the input to the non-active (open) state for switches.
The 1K resistor is used to prevent a short-circuit
between Vdd and Vss when the switch is closed.
Connecting an Active-High Switch
96
Computer-Integrated Manufacturing
Computer-Integrated Manufacturing (CIM) is the manufacturing approach of using computers
to control the entire production process thus allowing individual processes to exchange
information with each other and initiate actions. Through the integration of computers,
manufacturing can be faster and less error-prone, although the main advantage is the ability to
create automated manufacturing processes. Typically CIM relies on closed-loop control
processes, based on real-time input from sensors. It is also known as flexible design and
manufacturing. CIM is much more than simply automating a series of manual operations.
97
3-Step Process to Implement CIM
1. Assessment• Identify weaknesses and strengths
• Include the people and market components (in addition to
hardware and software).
2. Simplification• Eliminate waste so we don’t automate unnecessary tasks
• Continuous improvement should never end!
3. Implementation• Must include performance measurements (before and after)
98
Six Key Measurement Parameters
1. Product Cycle Time
2. Setup Times
• This also reduces Product Cycle Time
3. Inventory cost
4. Quality
• Do the parts meet specifications?
• Reduction of scrap and rework
5. Employee Output (productivity)
6. Continuous Improvement
• Critical but not as definitive to measure
99
Automated Production
1. Flexible Automation• Agile manufacturing – How fast a company can respond to
changes.
• Suited for products with moderate volume and cost and where
the manufacturing process is subject to change.
• FMS – Flexible Manufacturing System
• FMC – Flexible Manufacturing Cell
2. Fixed Automation• Suited for high volume, low cost, well-defined, stable products
• In-line system/cells can usually handle larger parts
• Rotary system/cells usually require less space
100
Fixed Automated Production
Fixed Automation• Suited for high volume, low cost, well-defined, stable products
• In-line system/cells can usually handle larger parts
• Rotary system/cells usually require less space
In-line Rotary
101
Project Development Sequence
1. Define the top-level task to be done by the robot
2. Define incremental positions of the arm (positions 1 to x)
3. Define the arm movements (steps 1 to n)
4. Teach the positions to the robot
5. Verify/Review the positions
6. Connect the hardware
7. Write movement software
8. Verify/Review the movement software (peer review)
9. Verify/check the hardware (peer review)
10. Apply power and test
102
Requirement Phase:
1. Top-level description of what must be automated.
Design Phase:
1. Define the task
2. Define the hardware
3. Define the pickup and drop-off points (work positions)
Implement Phase:
1. Implement the hardware
2. Define the incremental arm positions (Teach menu)
3. Program the arm movements (Edit Program menu)
Test Phase:
1. Test (Run Program Menu)
Project Development
103
Control Systems Programming
• Teach and Repeat Programming: A trained
operator (programmer) typically uses a portable
control device to teach a robot its task manually.
Robot speeds during these programming sessions
are slow.
• Off-Line Programming: The programming is
written off-line, transferred to the robot controller,
and then modified for the exact axis positions.
104
Rule of Thumb – Inform the Operator
The following events should always be identified to the
operator:1) When the robot has completed it’s tasks.
2) When the robot is waiting for a condition change (i.e. arrival of
a part)
3) Fault conditions
These conditions should also be clearly identified in the
software as comment statements.
105
SCORBASE Software Limitations
ScorbaseTM programs are subject to the following
constraints:
• a limit of 16 subroutines can be defined
• a limit of 16 sensor memory stores can be used
• a limit of 16 counters can be used
• a limit of 100 positions can be "taught“ *
• program length is limited to 250 lines *
• relative positions can be defined only in relation to an absolute
position, not in relation to another relative position
* = These limits can be overridden via DOS command line options.
106
Programming Instructions: Basic
Arm Control/Movements
▪ O/C OPEN/CLOSE GRIPPER
▪ GO TO POSITION . . . FAST/SPEED #
▪ WAIT . . . SECONDS
▪ TURN ON/OFF OUTPUT #
▪ REMARK : /PRINT
▪ SET AXIS #. TO ZERO
These are Open-Loop commands
107
Programming Instructions: Loop
& Jump Commands▪ JUMP TO LINE #. . .
▪ SET COUNTER #. . . TO . . .
▪ DECREMENT COUNTER # . . .
▪ IF COUNTER #. . > 0 JUMP TO . . .
▪ SET / RETURN / CALL SUBROUTINE #. .
▪ SET / RETURN / CALL SUBROUTINE #. .
▪ SET MEMORY# . . TO SENSOR
▪ REMARK : /PRINT
These allow for Closed-Loop control:
▪ IF INPUT #. JUMP TO . . .
▪ IF MEMORY #. . < = > MEMORY #. . JUMP .
▪ ON MOTOR #. ERROR, JUMP TO . . . C/S/O
108
X, Y, and Z are referenced to the tool plate.
Pitch, Yaw, and Roll are referenced to the wrist.
The ScorBot Arm – X,Y,Z Coordinates
Y-Axis
-LEFT & +RIGHT
via rotating the base
X-Axis
-IN towards the base
+OUT away from the base
Z-Axis
-DOWN and +UP
109
The ScorBot Arm – Arm Calibration
1. The arm calibration moves the axes at each of the ten speeds, measures the
exact rate of movement, and calculates the true speed ratios between axes.
2. Press “5-Home Menu” and then A-Arm Calibration to perform the calibration.
• The robot first searches for its hard home, and then begins the calibration
process.
• The procedure can take up to 10 minutes.
3. The calibration data is stored in the ZERO file on your disk(ette). When you
copy SCORBASE to another diskette, be sure to copy the ZERO file as well.
110
The ScorBot Arm – Home Position
1. The robot uses micro-switches to establish the position of the arm. The
home position established by the micro-switches is called “Hard Home”.
2. “Soft Home” can be established by the user at a different position but you
should always keep “Soft Home” the same as “Hard Home”.
3. All teach positions are relative to the “Soft Home” position. If you teach
positions and then redefine “Soft Home”, all of your positions will be
changed to the new “Soft Home” reference point.
111
The ScorBot Arm – Home Procedure
1. For safety and for correct operation, always start the arm in the home position.
2. Start the ScorBase software then Power up the controller box.
3. Select “5 Home” from the ScorBase Level 3 Main Menu
4. Watch the robot carefully while executing the next step. If the arm is
moving too close to the base or to another object, hit any key to
immediately stop the homing process.
5. Press “G” to synchronize the robot
The arm will be moved to find each of the movement limit micro-switches and
then will be stopped in the “Hard Home” position.
6. Do not use the “5-Home Menu => Set Present Position as Home” command.
112
Lab Report Improvement Suggestions
1. Describe the signal flow of the hardware.Object = Coil = NC Contacts = LED1 is On
Detected Energized are Open LED2 is Off
2. List the arm positions.
3. Show a diagram of the positions.
4. Flowchart (or pseudo-code) the software for the arm task.
5. Use text to explain how the software works, especially the
new and/or special actions.
6. List potential and actual operational, performance or safety
issues.
7. Describe any constraints or limits of the system.
I.e. system will not operate correctly if the both the source
and destination contain objects.
113
Important note about tonight’s lab…
Note: For lab#3, each student must complete steps 3
to 11 on their own.
It is the only way to learn this material.
114
The End
115
Week #5 – ScorBot Controller I/O
Agenda :
1. ScorBot controller input and outputs.
2. Chapter 4 – End of Arm Tooling
Lab Assignment:
Lab_4_ScorBot_Move_with_Sensors.doc
116
Free Schematic and Flowchart Tools
www.digikey.com/designtools
▪ Scheme-iT – Schematic and Flowchart tool
▪ PartSim – Circuit Simulation
▪ PCBWeb – CAD application for designing &
manufacturing electronics hardware
▪ Quadcept – PCB layout
117
End of Arm Tooling – Gripper Types
118
Refresh Slides from Last Week
Review the first six interfacing slides from last
week if necessary.
Questions?
119
1. Eight Inputs
0-1.5V => Input On
2.5-24V => Input Off
Inputs 1 & 2 have panel
switches
2. Outputs 1 to 4
Relay Outputs with NO
and NC contacts
Max of 4A per contact
3. Outputs 5 to 8
Open Collector Outputs
Max of +24V and 0.5A
ScorBot Controller I/O(see Appendix C in the SCORBASE User Manual)
120
1. Figure 1 – The input is an open-collector, NPN type, with a grounded emitter.
2. Figure 2 – The input is an open-collector, PNP type, with emitter connected to +V.
3. Figure 3 – Relay or switch contacts
4. Do NOT connect a voltage to the controller inputs.
Figure 1 Figure 2 Figure 3
ScorBot Controller Inputs(see Appendix C in the SCORBASE User Manual)
Relay
Contacts
Scorbot
121
1. The zener diode protects the input from an overvoltage by limiting the voltage to
+5 Volt.
2. If the input is disconnected then:
Current flows from +5 V thru R2 and the zener. The zener maintains +5 V so the
input voltage is +5 Volt.
Controller Inputs – Circuit Analysis(Input is Open / Not Connected)
Not connected
122
1. The zener diode protects the input from an overvoltage by limiting the voltage to
+5 Volt.
2. If you short the input to ground then:
Current flows from +5 V thru R2 and R1 to ground so:
ScorBot Controller Input
Circuit Analysis (Input is Shorted)
Input
shorted to
ground
𝐼 =5𝑉𝑜𝑙𝑡
𝑅2 + 𝑅1=5𝑉𝑜𝑙𝑡
102𝐾= 49𝑢𝐴
𝑉𝑅1 = 𝐼 ∗ 𝑅1 = 49𝑢𝐴 ∗ 2000 = 0.098 𝑉𝑜𝑙𝑡
0.098V is less than 1.5V so the input will be On.
123
Outputs 1 to 4 have Relay Outputs with NO
and NC contacts:
Outputs 5 to 8 have Open Collector Outputs:
ScorBot Controller Outputs(see Appendix C in the SCORBASE User Manual)
124
ScorBot Controller Outputs(see Appendix C in the SCORBASE User Manual)
OUTPUTS 5 TO 8 DO NOT EXIST ON OUR CONTROLLERS
Think of an open-collector output (Fig 1) as a switch (Fig 2).
However:
a) Do not exceed +24 Volt or 0.5 Amp.
b) Make sure you include a backflow protection diode
across any relay coils.
Fig 1
Fig 2
125
1. Create a schematic that will interface the
proximity sensor to one of the ScorBot inputs.
2. Create a schematic that will interface the
Photoelectric sensor to one of the ScorBot inputs.
3. Can you eliminate the relay by connecting the
sensor directly to the ScorBot?
Extra Lab Credit: How can you configure tonight’s lab
to detect blocks that are two different heights?
Class Assignment
126
There are two software instructions that will allow you to
execute different software commands depending on the
status of an input.
If the specified input is high then jump to the specified line#:
If Input # Jump to ...
Jump to the specified line#:
Jump to Line #...
ScorBot Input Decision Commands
127
The End
Thank You !
128
Week #6 – Conveyor Belt
Agenda :
1. Exam Review
2. ScorBot Conveyor Belt
3. Chapter 5 – Automation Sensors
Electrical connections via schematics
Lab Assignment:
Finish Lab #4 then Start Lab#5
129
Lab Report Due Dates
Lab#2 is due tonight, Oct 3
Lab#3 is due Oct 10
Lab#4 is due Oct 17
Note: Additional explanation about the software and
hardware will be expected.
130
Exam Review
1. Open book exam.
2. Make sure you bring all of your textbook, course notes, labs,
powerpoints, etc.
3. All exam questions can be answered with the help of the class
material.
4. All material up to and including tonight (Week#6) is included.
5. Varied types of questions.
6. One hour objective however I will try to reasonably extend the
time if one hour does not seem to be enough.
7. Look over your class material and be prepared to locate the
answers within your class material.
8. No lecture next week – Exam and then Lab#5.
131
Protective Diode Reminder
The Diode across the relay coil protects the output transistor from
“back EMF” that occurs when the relay coil is de-energized.
132
Sensor Types (see Table 5-3 in Text book)
1. Discrete – Have a single on/off trigger point
a) Limit Switches
b) SPDT
c) DPDT
2. Analog Sensors - measure a range of input conditions such as temperature,
RPM, or pressure which are converted to signals such as 0-5 volts, 0-10
volts or 4-20mA.
3. Non-contact Sensors
a) Proximity
b) Photo-electric
4. Smart Sensors
A smart transducer is an analog or
digital transducer or actuator combined with a processing unit and a
communication interface. Although ScorBot cannot interface directly to
them, they can be connected to the BasicStamp which collects the data
and then provides a true/false command to ScorBot.
133
Smart Sensor Examples
Omega carries many different sensors:
http://www.omega.com/subsection/limit-switches.html
Non-Contact Level Controller for Small Tank
Applications
The LVCN414 Series is a non-contact, ultrasonic level
controller and transmitter that delivers reliable, cost-
effective, high-performance, small-tank fluid handling
control solutions. The LVCN414 targets process, control
and chemical feed applications in small tanks mounted
on skids, tools or machines. It is easily configured
through a USB connection and Windows compatible
software. The LVCN414 allows for real-time/ anytime
measurement, lowering operational costs and increasing
productivity. The LVCN414 is a total small tank level
control and measurement solution.
A-33 RTD
Transmitter
134
Banner SM312D – Diffuse Mode Sensor
▪ Range to 380 mm (15")
▪ Highly repeatable 1 millisecond response
▪ Both sourcing and sinking outputs (150 mA max. each) at
10-30V dc.
bn + bn +
bu 10-30V dc
bu 10-30V dc
– –
wh Load
wh Load
bk Load
bk Load
4-Pin Euro-Style Pin-out
(Cable Connector Shown)
White Wire
Brown Wire Blue Wire
Black Wire
135
Bottle Sensorshttp://www.balluff.com/balluff/MUS/en/products.jsp
136
Class Assignment - Sensor Response Time
The Omron-E3F2-R2C4 sensor will be used to count the cans of beer
being filled at a high speed canning plant. Refer to the response time
listed in the datasheet. What is the maximum number of cans that can be
counted on the assembly line in an hour?
137
Conveyor SummarySee Appendix H of the ScorBot User Manual
1. Uses a 12V motor
2. Uses a DB-9 connector for the wiring interface
3. The conveyor does not have a micro-switch to detect position.
Lead Color in D9 Connector Encoder Circuit
Function External Cable Pin # (PC500) Pad #
Power Motor (+ ) red 1
Power Motor (–) green 9
Phototransistor 0 brown 8 4
Phototransistor 1 white 6 3
VLED yellow 3 2
Ground Logic (GND) black 5 1
Microswitch orange 4
Table D-2: Single Axis Wiring with D9 Connector
Note: This table has
not yet been verified as
being accurate.
138
Automatic Conveyor Stop
139
1. Manual control of the conveyor motor:
Create a schematic that will interface the
conveyor belt to one of the ScorBot
outputs.
2. Extra Lab Credit: How can you configure
tonight’s lab to detect blocks that are two
different heights?
3. Note: Make sure that everyone takes
their turn wiring the circuits each night.
Class Assignment
140
Manual Conveyor Stop
141
SET MEMORY #. . TO . . .
This command allows you to enter an arbitrary value and store it in one of 64
memory cells. Each memory cell can have a value of ± 32767.
This command is most valuable for storing the size (in millimeters) of an object.
SET MEMORY# . . TO SENSOR
This command allows you to measure the spread of the gripper fingers in order to
record the size of an object being grasped by the gripper. At run-time SCORBASE
translates this measurement into millimeters, and stores the result in a specified
memory cell (#1 to 64).
SET MEMORY Software CommandScorBot User Manual Page 4-33
142
IF MEMORY #. . < = > MEMORY #. . JUMP . . .
This command is a conditional jump command. It allows you to compare the values
of two memory cells, and to use that comparison to make a real-time decision
regarding the continued course of action.
The comparison operations can be as follows:
IF MEMORY Software CommandScorBot User Manual Page 4-33
Symbol Meaning
= Equal to
< Less than
> Greater than
<= Less than or equal to
>= Greater than or equal to
<> Not equal to
143
ScorBot User Manual
All of the ScorBot software commands are
described in the ScorBot User Manual
starting on page 4-31.
• Paper copies are available for use in the lab.
• A PDF copy can be downloaded from the class website.
144
Optional Assignment
Test the following:
145
The End
Thank You !
146
Week #7 – Exam
Agenda :
1. Exam #1
Lab Assignment:
Lab_5_ScorBot_Conveyor.doc
Please use the time after the exam to:
a) Finish the previous labs.
b) Add optionals.
c) Try something new.
147
Lab Development Process
In order to efficiently share the limited equipment:
1. Design the wiring, create the schematic, and define the
positions.
2. Build the hardware at your desk. Test what you can.
3. Write the software at your desk & save on a floppy disk.
4. Peer review everything.
5. Go to the ScorBot arm for debugging & test.
a) Make connections to the ScorBot controller.
b) Load your program from the floppy disk.
c) Teach the positions that were already defined.
d) Debug and test.
148
The End
Thank You !
149
Week #8 – Work Cells
Agenda :
1. Exam Review
2. Student Survey
3. Chapter 6 – Work-cell support systems
6.3 Vision systems
6.4 Material Handling
6.5 Part Feeding
6.7 Parts Tracking (bar code)
Lab Assignment:
Catch-up or Pixy Video System
150
Lab Report Due Dates
Lab#2 (BasicStamp Relays) is due tonight, Oct 3
Lab#3 (positions) is due Oct 10
Lab#4 (sensors) is due Oct 24
Lab#5 (conveyor) is due Oct 31
Lab#6 (vision) is due tentatively due Nov 14
Note: Additional explanation about the software and
hardware will be expected.
151
Vision Systems
Vision Tasks:
1. Part Identification (used for tracking)
2. Part Location (acquisition of randomly placed parts)
3. Part Orientation (to allow the part to be correctly gripped)
4. Part Inspection (typically quality control)
Vision Standards (Automated Imaging Association):
AIA A15.08/1 – Analog Camera Connectors
AIA A15.08/2 – Digital Camera Connectors
AIA A15.08/3 – Monochrome Digital Interface Specification
AIA A15.08/4 – RGB Digital Interface Specification
AIA A15.08/5 – Monochrome Analog Interface Specification
AIA A15.08/6 – RGB Analog Interface Specification
These standards are not readily available unless purchased from the AIA.
152
Vision System Components
Serial Data transfer is going to be slower than thru the Data Backplane.
153
Camera Types
• Vidicon tube produces an analog output that is not as linear or as stable as
a CCD device and it can have a 10% error due to image distortion.
• CCD Camera
a) These devices measure the intensity of radiation striking a surface
and converts the intensity to a digital value.
b) Accurate, rugged, and have good linearity (i.e. a scanner)
c) These use a solid-state array of light-sensitive transisters or diodes.
d) Linear Arrays measure a single line
or
Imaging Arrays measure a complete two-dimensional image (and
cost more).
154
Image Measurment
If a 1-inch square produces an image that fills an 8x8 CCD array then the
smallest variation (resolution) that can be detected is 1/8 inch.
However, if a 1-inch square produces an
image that fills an 32x32 CCD array then
the smallest variation (resolution) that can
be detected is 1/32 inch.
Between the two extremes of On and Off are shades of gray which cause the
pixels to be partially on. The number of states between On and Off is called
the gray scale. Current systems have gray scales from 4 to 4096 or higher.
155
Image Analysis & Recognition
Analysis Find the edges of the object
First we create a sharp contrast between the part and the background using
either backlighted surface or a contrasting surface with top lighting.
1. Edge Detection
a) Look for jumps in the gray level using an edge probability value
2. Clustering
a) Uses a discrimination function to find adjacent pixels that have
similar properties.
Recognition Identify the Object
1. Template Matching – compares the video to templates in memory.
2. Statistical Matching – uses an algorithm to identify and evaluate
significant features of the object.
156
Lighting Techniques
• Front Lightinga) Continuous Lighting for still or slow moving objects.
b) Strobed Lighting for fast moving objects.
• Back Lightinga) Greatest contrast of the silhouette but it lacks surface
details.
• Structured Lightinga) A narrow beam of light is used to capture specific
surface details.
• Laser Lighting for 3D scanning
157
Material Inspection
Quality Inspection:
a) Automatic measurements (i.e. ScorBot gripper)
b) Visual Inspection via identification of defects (vision
system)
It’s not enough to “make enough parts for the
day” (i.e. schedule). We must also make
“good” parts (i.e. Quality) which meet or
exceed the specifications. And we must
make them efficiently (i.e. budget).
158
Material Tracking
• Bar Coding>50 different bar coding systems in use
Two most common are:
a) Interleave two of five (numbers only)
b) Code 39 (26 letters, 10 digits, and 7 additional characters)
• Error rate < 1 character in 70M scanned characters
• Most widely used and accepted
• High level of data security
• Radio Frequency TagsUse passive electronic circuits to transmit a code when subjected to
radio frequency energy (i.e. the new chips in credit cards or the “pet
tags” applied under the skin to cats and dogs).
159
Basic Stamp Vision Controller
Left or Right Movement Detector.
What happens if we add two
more light detectors to achieve
high and low indications ?
Or an 8x8 matrix?
Or a 32x32 matrix?
How would we design the
ScorBot software?
160
Pixy Vision Camera
▪ Scans 50 times per second.
▪ Has a USB interface to a external computer (Arduino, Rasberry PI, BasicStamp)
but it also has SPI, I2C, and UART serial interfaces.
▪ Can detect up to 7 color signatures but color codes may be used for more objects
▪ Digital Output (0 or 3.3V) to indicate an object was detected.
▪ Analog Output (0 to +5V) to indicate the position of an object.
▪ Processor: NXP LPC4330, 204 MHz, dual core
▪ Image sensor: Omnivision OV9715, 1/4", 1280x800
▪ Lens field-of-view: 75 degrees horizontal, 47 degrees vertical
▪ Lens type: standard M12 (several different types available)
▪ Power consumption: 140 mA typical
161
Pixy Camera Connections
+5 V
R1=2k
R2=100
k
5.1 V
Pixy Camera
Pin 1
0 to 3.3V
2N2222
330 ohm
ScorBot
Input 0
Pin 6,8,10
Gnd
Simple Object Detection:
162
Pixy Camera Connections
Position #2
X>160
Y<100
Y-A
xis
of th
e p
latfo
rm
X-Axis of the platform
6" x 6" Loading Platform
Y=200
Position #1
X<160
Y<100
Position #3
X<160
Y>100
Position #4
X>160
Y>100
Pixy Video
Camera
looking down
on the platform
The Pixy Camera will identify a
known object at one of the four
positions and will then tell the
ScorBot Arm which will
“process” the object.
Output#2 Output#3 Position#
0 0 #1
0 1 #2
1 0 #3
1 1 #4
X=0 X=320
Y=0
163
Pixy Camera Connections
Object location is being identified
Pixy Tracking
Camera
ICS
P C
on
ne
cto
r
ScorBot
Input 1
Arduino
MicroController
Input 1
Input 0
Dig
Ou
t 1
ICS
P C
on
ne
cto
r
USBUSB
Laptop
2N2222
2K ohm
Input 0
2N2222
2K ohm
Dig
Ou
t 0
Input0 Input1 Location# 0 0 0 0 1 1 1 0 2 1 1 3
164
The End
165
Week #9 – Systems Integration
Agenda :
1. Chapter 7 – System Integration
7.4 PLCs
7.5 CNC
7.7 Interfaces
Electrical noise
STUDENT SURVEY!
Lab Assignment:
Lab_6_ScorBot_Vision.doc
166
The Embedded Muse Newsletter
Good Practical hardware and software engineering
information:
The Embedded Muse
The Ganssle Group
Editor: Jack Ganssle,[email protected]
Website:
http://www.ganssle.com/
Subscribe to his newsletter:
http://www.ganssle.com/tem-subunsub.html
167
Industrial Control Design Magazine
Good Practical Manufacturing Control information (control,
design, motion, sensing, etc):
Online Website:
http://www.controldesign.com/
Free Subscriptions:
https://putman.omeda.com/cto/form.do
168
The ScorBot Arm – X,Y,Z Coordinates
Note: It is possible that
the +/- directions are
reversed.
169
What is a PLC?RBT-235, Programmable Logic Controllers
As defined by the National Electrical Manufacturers Association
(NEMA), a Programmable Logic Controller is:
"a digitally operating electronic apparatus which uses a
programmable memory for the internal storage of instructions for
implementing specific functions, such as logic, sequencing, timing,
counting and arithmetic, to control through digital or analog
input/output, various types of machines or process".
In other words, it is a generic, computer controlled device that can be
used to control a process such as required in a a factory
manufacturing environment or a Disney fun ride.
170
What is CNC?
CNC means Computer Numerical Control. This means a computer
converts the design produced by Computer Aided Design software
(CAD), into numbers. The numbers are considered to be the
coordinates of a graph which control the movement of the cutter.
CNC is widely used for lathe, drill press, milling machine, grinding
unit, laser, sheet-metal press working machine, tube bending machine
etc. Highly automated machine tools such as turning center and
machining center which change the cutting tools automatically under
CNC control have been developed. CNC applications also include
welding machines (arc and resistance), coordinate measuring
machine, electronic assembly, tape laying and filament winding
machines for composites etc.
171
Class Design Problem
The CeeMent Manufacturing Company mixes the materials for high strength
concrete and then packages it into 200 lb bags. An Allen-Bradley PLC with
relay outputs is used to control the final packaging. At the very end of this
line, there is a heavy duty conveyor belt which moves the 200 lb bags to
shipping pallets. In order to ensure quality, a special bar-coded bag is
inserted into the system and is then detected by the bar code scanner. Up
to now, the production line is then stopped and a worker must manually
move the bag to the quality test area.
One of the workers submitted a continuous improvement suggestion to use
the extra ScorBot robot which could be commanded by the Allen-Bradley
PLC to move the bag off the line, thus avoiding the manual labor.
You have been asked to design the hardware and functional interface.
The Allen-Bradley PLC has 16 spare relay outputs (N.O. and N.C. contacts)
and four spare digital inputs (two contacts to be shorted).
172
Process Controllers - Basic Stamp Examples
173
Manual Conveyor Stop(possible ground loop problems)
174
Automatic Conveyor Stop(possible ground loop problems)
175
Grounding Problems
Explain how to avoid current loops.
Explain ground isolation.
176
Grounding Problems
177
Improved Grounding
178
Opto-Isolator
Uses an LED and a
photo-transister to
achieve high electrical
isolation between the
input and output
circuits.
Assuming the input and output use two different
grounds, the power surges on the output motor will not
affect the input.
179
Improved Electrical Isolation
180
Pixy Camera Connections
Position #2
X>160
Y<100
Y-A
xis
of th
e p
latfo
rm
X-Axis of the platform
6" x 6" Loading Platform
Y=200
Position #1
X<160
Y<100
Position #3
X<160
Y>100
Position #4
X>160
Y>100
Pixy Video
Camera
looking down
on the platform
The Pixy Camera will identify a
known object at one of the four
positions and will then tell the
ScorBot Arm which will
“process” the object.
Output#2 Output#3 Position#
0 0 #1
0 1 #2
1 0 #3
1 1 #4
X=0 X=320
Y=0
181
Pixy Camera Connections
Object location is being identified
Pixy Tracking
Camera
ICS
P C
on
ne
cto
r
ScorBot
Input 1
Arduino
MicroController
Input 1
Input 0
Dig
Ou
t 1
ICS
P C
on
ne
cto
r
USBUSB
Laptop
2N2222
2K ohm
Input 0
2N2222
2K ohm
Dig
Ou
t 0
Input0 Input1 Location# 0 0 0 0 1 1 1 0 2 1 1 3
182
The End
Thank You !
183
Week #10 – Safety
Agenda :
1. Chapter 10 – Safety
2. Peer Review the ScorBot Vision Software
Lab Assignment:
Lab_6_ScorBot_Vision.doc
184
Anheuser Busch Beer Run
Driverless Truck:
http://www.cnbc.com/2016/10/25/driverless-beer-run-bud-makes-shipment-
with-self-driving-truck.html
Manufacturing of aluminum cans:
https://www.youtube.com/watch?v=V4TVDSWuR5E
185
Lab_6 Vision Peer/Design Review
1. Refer to Lab_6b_Pixy_Object_Detection.Doc
2. The class will peer review the Arduino software in order to:
a) Understand how it works.
b) Identify and correct any bugs.
c) Identify any operational limitations that it may have.
186
“Experienced” does not mean “careful”
187
Safety – a “must discuss” topic
• Many robot accidents occur during programming,
maintenance, repair, or setup because the worker is likely to
within the robot's working envelope.
• Safety-related publications and guidelines:✓ OSHA's publication 2254 (Revised), "Training Requirements in
OSHA Standards and Training Guidelines”
✓ ANSI/RIA R15.06-1999 (Industrial Robot Safety) Sections 6, 7, 8, & 9
✓ OSHA 29 CFR 1910.333, Selection and Use of Work Practices
✓ OSHA 29 CFR 1910.147, The Control of Hazardous Energy
(Lockout/Tagout)
188
Classroom Safety Rules
1. No one shall ever be within the reach of the robot arm
during operation.
2. Someone shall always be assigned to remain at the
controller in order to emergency halt the robot.
3. The motor power switch shall always be off before anyone
can enter the robot space.
4. All software programs shall be peer reviewed by a second
person before being executed.
5. Always keep your hands away from the robot joints (pinch
points).
189
Equipment Safety
1. Do not connect any equipment to the controller box without first getting
approval from the instructor.
2. Do not apply power to the robot arm or power supplies without first
getting approval from the instructor.
3. The motor power switch shall always be off before anyone can enter the
robot space. (34” circle around the robot)
4. Always HOME the robot arm when you first start.
5. Do not leave any of the axes under mechanical strain for any length of
time. Especially, do not leave the gripper grasping an object indefinitely.
190
Equipment Rules
1.The gripper must always be in the open position
unless a program is actually running.
2.Do not leave the arm in a loaded position unless a
program is actually running.
3.The motor power switch shall always be off before
anyone can make any wiring changes.
4.All hardware connections shall be peer reviewed
by a second person before being powered.
191
Work Cell Safety
192
The End
Thank You !
193
Week #11 – Google Driverless Car Video
Agenda :
1. Lab Report Suggestions
2. Google Driverless Car Video
3. Finish Video Lab
Lab Assignment:
Video Lab
194
Week #12 – Project Definition & Design
Agenda :
1. Class Project
Lab Assignment:
Project Definition
Lab_Team_Project.doc
195
Example Table Layout
196
How much is your time worth?
11 participants in the
workplace can cost the
company $14.67 per
minute.
197
Development & Design Steps
198
Project Objectives
199
College versus Industry Projects
1. College labs are not the same as industry projects
• Research and learning orientated.
• Experimentation is encouraged.
• “Learning Curve” is planned for.
• Labs are normally repeated each semester thus results are
predictable.
• Hardware and facilities are normally adequate.
• Delays impact grades but instructors may be forgiving.
2. Industry Projects must meet Quality, Budget, and Schedule objectives
• Goal/objective orientated.
• Completion within budget, schedule & quality is required.
• “Learning Curve” is neither well planned nor understood.
• First-time efforts experience more unplanned negative impacts.
• Access to the hardware is not always easy/adequate.
• Delays cost dollars (which are rarely forgiven).
200
Typical College Lab Execution
1. Students may only be given the lab instructions on the first
night of the lab.
2. Students may not read the lab instructions prior to the first
night of the lab.
3. All parts of the lab may not work. I.e. there will be bugs.
4. Students will experiment to understand the material so
understanding of the purpose and concepts is complete at
the end of the lab.
In industry, we want to define the objectives and
understand the concepts at the beginning of the
project.
204
Week #13 – Coordinates & Repeatability
Agenda :
1. Finish Vision Lab#6b
2. Lab#9 – Coordinates
3. Lab#10 - Repeatability
Lab Assignment:
Lab#9 - Coordinates
Lab#10 - Repeatability
205
Lab Report Due Dates
Lab#1 (Interface Document) is due Dec 12
Lab#2 (BasicStamp Relays) was due tonight, Oct 3
Lab#3 (positions) was due Oct 10
Lab#4 (sensors) was due Oct 24
Lab#5 (conveyor) was due Oct 31
Lab#6b (vision) is due Dec 5
Lab#9 (Coordinates) is Due Dec 12
Lab#10 (Repeatability) is due Dec 12
206
Lab #1 Interface Document
This is due at the end of the course and should include the
following schematics:
1) Standard SPST switch to a relay
2) Proximity Sensor to a Relay
3) Photo Sensor to a Relay
4) Relay contacts to an LED
5) Relay connected to a ScorBot Input
6) Relay (or normal SPST switch) to a BasicStamp digital input
7) ScorBot output to an LED.
8) ScorBot output to a relay coil
9) ScorBot output to a BasicStamp input
10) BasicStamp output to a ScorBot input
11) BasicStamp digital output to an LED (both driving and sinking)
12) BasicStamp digital output to drive a relay using a transistor.
13) BasicStamp digital output to drive a relay using a opto-isolator
207
Lab 9 (Coordinates)
Analyze and document the X, Y, Z coordinates for the Scorbot:
1. Which direction/plane is for X, Y, and Z?
2. Which direction is negative and which is positive?
3. Where are the zero coordinates?
4. What are the default coordinates for the Home position?
5. How can you document it so that a different person (not
as skilled) can understand it?
208
Additional Lab Ideas
Use the turntable to move objects to the Scorbot. Add a sensor
to detect position.
Using a conveyor belt, setup the Scorbot for a linear X-axis
object detection via Pixy.
Relative arm movements.
209
The End
210
Week #14 – Project Test & Debug
Agenda :
1. Class Project Documentation
MS-Word Report
Ms-Excel or MathCad used to explain calculations & Data
PowerPoint Explanation
Lab Assignment:
Class Project Test & Debug
Lab_Team_Project.doc
211
Lab #1 Interface Document
This is due at the end of the course and should include the
following schematics:
1) Standard SPST switch to a relay
2) Proximity Sensor to a Relay
3) Photo Sensor to a Relay
4) Relay contacts to an LED
5) Relay connected to a ScorBot Input
6) Relay (or normal SPST switch) to a BasicStamp digital input
7) ScorBot output to an LED.
8) ScorBot output to a motor relay coil
9) ScorBot output to a BasicStamp input
10) BasicStamp output to a ScorBot input
11) BasicStamp digital output to an LED (both driving and sinking)
12) BasicStamp digital output to drive a relay using a transistor.
13) BasicStamp digital output to drive a relay using a opto-isolator
212
The End
213
Week #15 – Project Documentation &
Course Review
Agenda :
1. Course Review
Lab Assignment:
Class Project Documentation
214
▪ Did you miss anything that was explained in the lab instructions?
▪ Pins were too large.
▪ Laptops were too slow.
▪ Arduino to Scorbot Wires were too short
▪ Arduino code had to be revised.
▪ Pixy video sensitivity was difficult to adjust
▪ Not familiar with the Pixy camera
▪ Common grounding between Arduino, Pixy, and Scorbot
▪ Camera mounting had to be designed and implemented
Video Lab EvaluationWhy did the Video lab require 4+ weeks to complete?
215
Prior-Experience Evaluation
This is a very quick NON-CREDIT pre-test to allow me to
understand your current knowledge and capabilities.
Using the three electronic components, draw a schematic that will
allow the switch to energize the +5volt coil of the relay so that it
turns on the +24volt lamp.
24V Lamp
NO
NC
COMMON+5V
Coil
216
▪ Lab time versus Theory/Lecture time?
▪ Hardware versus Software focus?
▪ Not enough material or too much material?
▪ Text Book?
▪ Lab handouts?
▪ Course was too fast or too slow?
▪ Equipment suitability?
▪ Classroom environment?
▪ Were the Powerpoint Lecture Notes useful?
Course Improvement: Items to consider
217
Brain Storm Session (10 minutes):Document all ideas – all ideas are valid.
Prioritizing (10 minutes):Everyone gets 20 points. Assign your points to the ideas that you feel
will be most beneficial.
I will use the results to guide future improvements.
Course Improvement Workshop What should we change to improve this course?
218
The exam will be both open (part 1) and closed book (part 2).
Bring all of your course notes, lab reports, exams, ect. You will
need whatever you do not bring.
Bring a calculator and pencil. No loaners will be available.
Questions?
Review and Questions
219
The End
Thank You!
220
Week #16 - Final Exam
Exam Time: tbd
All outstanding work is due.
221
It has been fun and exciting this past semester!
Thank-You for taking the class!
Feel free to call me in the future if you think I can help
you in any way.
Thank – You!
Did you register for
Spring Semester
classes?