36
Group Lab Assignment (50 Points) • Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line • 10 Point bonus – first group to succeed • 10 Point bonus – each ball consecutively delivered • Any mechanical modification • Autonomous

Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

Embed Size (px)

Citation preview

Page 1: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

Group Lab Assignment (50 Points)

• Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line

• 10 Point bonus – first group to succeed

• 10 Point bonus – each ball consecutively delivered

• Any mechanical modification

• Autonomous

Page 2: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

Design Axioms• Main Entry: ax·i·om

Pronunciation: 'ak-sE-&mFunction: noun1 : a maxim widely accepted on its intrinsic merit2 : a statement accepted as true as the basis for argument or inference : POSTULATE 13 : an established rule or principle or a self-evident truth

Wikipedia: …The method gets its name from its use of design principles or design Axioms (i.e., given without proof) governing the analysis and decision making process in developing high quality product or system designs.

Page 3: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

Robotics Design Axioms

• Software cannot overcome weak mechanical design

• A machine cannot control what it cannot sense

Page 4: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

Lego Robotics Design Axioms• Lighter is better than heavier

• Smaller is better than larger

• Solutions requiring the least travel are better

• Direct actuation is better than relying on Gravity

• Fewer parts is better than many parts

• Constrained objects behave better than unconstrained

• Active sensing of location is better than deducing from navigation

• Self-aligning is better than requiring careful aim

• Reaching low is better than reaching high

• Reaching near is better than reaching far

• Mechanical solutions are better than robotic solutions

• Solutions that allow easy return or retrieval are better

• Solutions with fewer causes of failure are better

Page 5: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

Design project

• Milestone 1 Friday 12th.

• Make the iStamp play a song of your choosing,e.g. Mary had a little lamb or Stairway to heaven, see detailed description

• Example lab0701.bsp – read manual for Piezo output

Page 6: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

Introduction to Mechatronics

ENGR450 PresentationMatthew Stein

Page 7: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

Mecha-what?The word itself is a portmanteau of 'Mechanics' and 'Electronics'.

Main Entry: 1port·man·teau

Pronunciation: \port-ˈman-(ˌ)tō\

Function: noun

Etymology: Middle French portemanteau, from porter to carry + manteau mantle, from Latin mantellum

Date: 1579

1 : a large suitcase 2 : a word or morpheme whose form and meaning are derived from a blending of two or more distinct forms (as smog from smoke and fog)

Page 8: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

Basics of Mechatronics

Figure courtesy of Kevin Craig Marquette University

Always described as a combination of mechanical and electronic devices

Page 9: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

Like what?

Figure courtesy of Kevin Craig Marquette University

Formerly mechanical control system replaced

Performance improved by digital control

Page 10: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

How is it done?

Page 11: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

A little more detail

Physical SignalPhysical Signal

Electronic signalElectronic signal

Power

Power

Mechanical

Electronic

Page 12: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

For Example:

From:Howstuffworks.com

Page 13: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

Anti-lock brakes

Physical Signal

Wires

Mechanical

Electronic

Wires

Hydraulics

Physics of car

Page 14: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

This class

Page 15: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

Signals

• Arrows in the diagram are signals

• Signals are either mechanical– Pneumatic/Hydraulic pressure or flow– Position/velocity/acceleration/rotation– Deformation/deflection/pressure

• Or electrical– Voltage/current/charge– Analog or digital

• Mechatronics always has both

Page 16: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

What’s the difference

• A digital signal is a voltage– Either 5V or 0V (logical 1 or logical 0)– In between is undefined– Chosen for convenience– Konrad Zuse, Eckerd&Mauchley (1940’s)– Represented in binary

Page 17: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

Lab Exercise (10 minutes)

• Hook a DVM to port 0

• Write a simple program to toggle ON/OFF

• What is the reading on the DVM?

• Mechatronics makes use of the physical implementation of digital logic– Makes electrical use of 0V to 5V transition

Page 18: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

Analog signals

• An analog signal is also voltage– Range chosen for convenience– Any value in a given range

• 0V-5V

• -5V – 5V

• 0 V– 10V

– All physical signals are inherently analog

Page 19: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

How to handle

• Digital computer cannot handle directly– 3.7V not immediately usable by a computer

• Convert between Analog and Digital– Analog to digital conversion (A/D)– Digital to Analog conversion (D/A)– Produce a voltage to represent the value of a

signal relative to its range

Page 20: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

How’s it done?• Start with D/A:

• Lab exercise (Start now, complete by Friday)

• Build this circuit

• Any resistor > 1K will do

• Get 13 identical resistors

• Wire them up like this

Probe

Output ports 0-3

Page 21: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

Digital Range

• 4-Bit number

• Range 0-15

• Represents in volts 0 to VREF in increments of 1/15th

• If VREF = +5V

• Every bit is 5/15V or 1/3V

Page 22: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

Possible Representations

Binary Number

Voltage Binary Number Voltage

0000 0V 1000 2.6V

0001 .33V 1001 3VV

0010 .66V 1010 3.33V

0011 1V 1011 3.66V

0100 1.33V 1100 4V

0101 1.66V 1101 4.33V

0110 2V 1110 4.66V

0111 2.33V 1111 5V

• 4-Bit number representing 0V – 5V

Page 23: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

Binary Number

Voltage Binary Number Voltage

0000 0V 1000 2.5V

0001 .3125V 1001 2.8125V

0010 .625V 1010 3.125V

0011 .9375V 1011 3.4375V

0100 1.25V 1100 3.75V

0101 1.5625V 1101 4.0625V

0110 1.875V 1110 4.375V

0111 2.1875V 1111 4.6875V

• 4-Bit number representing 0V – 5V

Possible Representations

Page 24: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

Voltage Equivalents

• B0 “Bit Zero” The Least Significant Bit (LSB)

• B0 = 0.3125V (1/16 VREF)

• B1 = 0.625V (2/16 VREF)

• B2 = 1.25V (4/16 VREF)

• B3 = 2.5V (8/16 VREF)

Page 25: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

Easy conversion

• If each bit is a 5V/0V signal

• This circuit effectively adds bits together

Page 26: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

Easy conversion Wikipedia Thevenin Example: R-2R Ladder

Page 27: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

D/A Conversion

• D/A works by a relatively straightforward resistor network.

• 4 bit nibble represents 16 distinct voltages scaled by VREF

• More bits more distinct voltages

• Conversion instantaneous (i.e speed of light)

Page 28: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

Simple A/D Conversion

• Uses D/A and successive approximation.

• Counter increases binary number until voltages match

• Once matched,

signal the end of A/D

More complex schemes are faster but not that different

Page 29: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

A/D Conversion

• Result is a n-bit binary number representing voltage (percentage of VREF)

• More bits more precision

• 8 bits = 256 distinct voltages

• 10 bits = 1024 voltages (2 10 )

Page 30: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group
Page 31: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

From izeBot Manual

Since the i-stamp or Basic Stamp 2SX, which is the main micro-controller in the iZEBOT Stamp-BOX, does not have an analog to digital converter module (A/D converter), an external converter must be connected in order to communicate with components that send out voltage signals, such as Module GP2D120. Therefore, IC QP410 will be used to convert and send digital signals to the main micro-controller. (pg 35)

Page 32: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

Program to read the ADC

Page 33: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

Notes from manual(1) Pauses or delays for 1 second so that the IC QP410 is ready to

operate.

(2) Sends a pulse signal so that the IC QP410 can acknowledge and get ready to communicate with the Stamp-BOX

(3) The i-Stamp sends the value of the channel to be read to the IC QP410. From Listing A12-1, the value is 1 which means that it will be communicate with ANALOG1

(4) The i-Stamp reads the value from channel ANALOG1 of the IC QP410 and stores it in the variable ADC. The variable is defined as type word, which can store up to 16 bits of data, therefore easily storing the 10 bit data from the IC QP410.

(5) i-stamp sends the value that it reads to be displayed on the Debug Terminal.

Page 34: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

Lab Exercise (20 minutes)

• Build the structure to attach the GP2D120 to the ezbot

• Use the program to determine basic functionality

Page 35: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

How does it work?• Figure from manual

• “Array of photransistors” will be discussed later

Page 36: Group Lab Assignment (50 Points) Robot starts behind line, delivers Ping-pong ball to destination and returns to behind line 10 Point bonus – first group

Group Lab Assignment 1 (30 minutes, 20 Points)

• Use the relationship given in the manual

• Calibrate the GPD

• Write a program that displays distance in CM

• Instructor will test +/1 2cm for credit