Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110...
Transcript of Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110...
![Page 1: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/1.jpg)
© GIT 2007 1
• Electronics• Pneumatics• Machining
ME 2110 - Creative Decisions & Design
Lecture 9 v.3
![Page 2: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/2.jpg)
© GIT 2007 2
Introduction to the ME 2110 Kit
Controller Box
Pneumatics
Electro Mechanical Actuators & Sensors
![Page 3: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/3.jpg)
© GIT 2007 3
Features of the Controller Box
• BASIC Stamp II-SX microcontroller• Interfaces with various external
devices• Stepper Motors• DC Motors• Pneumatic Valves• IR Distance Sensor• Rotary Encoder• Microswitches• Solenoids
• RS-232 Communication Port
![Page 4: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/4.jpg)
© GIT 2007 4
Layout of I/O Ports
![Page 5: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/5.jpg)
© GIT 2007 5
Electro/Mechanical Supplies
![Page 6: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/6.jpg)
© GIT 2007 6
Sensors
• Micro-switches• Push button switches• Infrared (IR) sensors• Rotary encoders
![Page 7: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/7.jpg)
© GIT 2007 7
Micro-switch
• Lever arm closes circuit
• Status of IN register holds status of port
• 0 = Open Circuit• 1 = Closed Circuit
• Same action is going to start competition
![Page 8: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/8.jpg)
© GIT 2007 8
Push Button Switch
• Latches “on” when depressed
• Must be depressed again to switch off
• Not the exact one supplied in kits – kit one is rectangular
![Page 9: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/9.jpg)
© GIT 2007 9
Infrared Distance Sensor
• 4” to 30” Range• Infrared beam is emitted• Beam reflects off object• Detected by receiver• Output voltage (not
linearly) proportional to distance
• A/D Converter: Reading between 0 and 255
![Page 10: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/10.jpg)
© GIT 2007 10
Rotary Encoder• Rotational motion of shaft
converted to electrical pulses, or counts, that are read by microcontroller.
• The rotational measurement is based upon the number of counts.
• Kit’s encoder is a relative encoder; it only counts relative to its starting position for each count command.
![Page 11: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/11.jpg)
© GIT 2007 11
A/D Converter
• Converts a continuous voltage to a multi-level discrete digital value
• Used with Distance Sensor (0-255)
• Use these values to convert to desired quantities using conversion factors
![Page 12: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/12.jpg)
© GIT 2007 12
A/D Converter
![Page 13: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/13.jpg)
© GIT 2007 13
Using the A/D Converter• Power up chip
• Choose channel
• Serially send a “Take Reading” command
• Serially receive the value
• Power down chip
![Page 14: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/14.jpg)
© GIT 2007 14
Actuators
• Solenoid• DC motor• Stepper motor
![Page 15: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/15.jpg)
© GIT 2007 15
Solenoid• Consists of a coil of wire – Electromagnet• When powered up, pulls in plunger• One way device
• Does not return automatically
![Page 16: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/16.jpg)
© GIT 2007 16
DC Motor• Speed is proportional to
voltage• Moves in both directions
• depends on sign of voltage
• Gearbox to slow down shaft
• Very high torque• Requires time to ramp up
and down
![Page 17: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/17.jpg)
© GIT 2007 17
DC Brush Motor• Fixed Field Magnet• Coils create an
electromagnet• Field magnet rotates
armature• As armature turns,
polarity reverses• Cycle continues• Both directions
N S
![Page 18: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/18.jpg)
© GIT 2007 18
Pulse Width Modulation (PWM)
• Controller box can only send 0 or 5 volts• PWM is used to run motor at intermediate
speeds• PWM uses cycles of pulses
5 Volts
0 Volts
Off On One Cycle
![Page 19: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/19.jpg)
© GIT 2007 19
Stepper Motors• Both motors are
controlled through P10• Speed is a value
chosen between 2 and 240
• Can move both directions
• Amount of motion can be specified
• Negligible ramping time
• Low Power• When off, shaft rotates
freely
![Page 20: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/20.jpg)
© GIT 2007 20
Stepper Motor
• Clockwise rotation shown• Reverse process for counterclockwise
rotation
![Page 21: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/21.jpg)
© GIT 2007 21
Programming the Stamp
• PBASIC (a version of BASIC) is used to program the Stamp
• Everything is global• Variables• Constants• Subroutines
• Programming and commenting style is very important
• Programming syntax is explained in the manual
![Page 22: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/22.jpg)
© GIT 2007 22
Programming EditorSave
Transfer to Controller
BoxRun Motor 1Read EncoderRelease WhackerGrab StuffClose DoorPut Down Weapons
![Page 23: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/23.jpg)
© GIT 2007 23
• Versioning• Keep old versions of your programs• Do not just overwrite old versions with new versions
• Transfer is uni-directional. • Computer to controller
• You can’t “read” the box when it is running. • You can only determine if the problem is the program or the
component by changing the components.
• The box does not support “interrupts.”• Save program on thumb drive, not on studio
computers.• Download basic stamp program from Parallax web
site to your computer.
Programming Editor
![Page 24: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/24.jpg)
© GIT 2007 24
Program Structure
• Constants Table• Constants are substituted at compile time
• Variable declaration• Reserves portions of the Stamp’s limited memory
• Main program loop• Subroutines
• Often much of the work is done in subroutines
![Page 25: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/25.jpg)
© GIT 2007 25
Variables
• Variables are memory reservations on the BASIC Stamp
• Variables must be declared before they can be used
• Variable types are: • Word (16 bits): 0-65535• Byte (8 bits): 0-255• Nibble (4 bits): 0-7• Bit: 0-1
![Page 26: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/26.jpg)
© GIT 2007 26
Bytes, Nibbles, and Bits
1 byte = 2 nibbles = 8 bits:
B7 B6 B4 B3 B2 B1 B0B5
High Nibble Low Nibble
Most SignificantBit (MSB)
Least SignificantBit (LSB)
![Page 27: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/27.jpg)
© GIT 2007 27
Words and Bytes
1 word = 2 bytes = 4 nibbles = 16 bits:
High Byte Low Byte
Word
![Page 28: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/28.jpg)
© GIT 2007 28
Selected Commands
• Branching• If…Then• Goto• GoSub…Return
• Looping• For…Next
• Debugging• Debug
• Sounds (Music)• Freqout
• DC Motor Control• PWM
• Digital I/O• Input, Output• High, Low
• Serial I/O • Serout• Shiftin, Shiftout
• Time• Pause
• Power Management• End
![Page 29: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/29.jpg)
© GIT 2007 29
Best Way to Learn is to Do
• Read through the manual • Examine the sample programs and program
fragments• Studio assignment• Ask questions• Additional Information and Program
• www.parallaxinc.com (BASIC Stamp)
![Page 30: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/30.jpg)
© GIT 2007 30
Pneumatic Supplies
![Page 31: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/31.jpg)
© GIT 2007 31
Pneumatic Actuator• Pressurized Extension• Spring Return• 2.5 in Stroke
![Page 32: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/32.jpg)
© GIT 2007 32
Pressure Vessel• Pressurize with Bike Pump• Max 100 psi• Supplies 10-15 Actuator strokes
![Page 33: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/33.jpg)
© GIT 2007 33
Pneumatic ValveDoes not operate below 25 psi
![Page 34: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/34.jpg)
© GIT 2007 34
Machining
Bracket Coupler
![Page 35: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/35.jpg)
© GIT 2007 35
Machining Studio
• Learn to Respect Machine Tools• Learn to Cut• Gain Experience• Generate Design Ideas• Build Confidence• Preserve Digits
Goals:
![Page 36: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/36.jpg)
© GIT 2007 36
Safety• No fooling around• Follow directions• Long pants (to your shoes)• Short sleeves or roll up sleeves• Socks• Closed toe shoes• Remove all jewelry
• watches, bracelets, rings, necklaces, dangling earrings
• Long hair must be tied back• No ties, scarves, dangling clothes• Always wear safety glasses• Violations will result in immediate removal from shop• Report all broken or non-working machines
![Page 37: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/37.jpg)
© GIT 2007 37
The Coupler
All tolerances ±0.010 unless otherwise specifiedAll dimensions in inches
0.500 0.650 ± 1/32 0.750
1/2-20 UNF6-32 UNCTHRU
0.125 φ0.750 DP
0.900 0.500
0.250
0.500+0.000-0.005
![Page 38: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/38.jpg)
© GIT 2007 38
The Lathe
![Page 39: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/39.jpg)
© GIT 2007 39
The Bracket
0.250
0.325
0.325
0.250
0.250
0.400
0.400
1.5002.300 REF.
0.950 REF.
0.700
10-24 UNCTHRU2 PL TYP
0.950
All tolerances ±0.010 unless otherwise specif ied
1/8 RAD.
Bracket
All dimensions in inches
![Page 40: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/40.jpg)
© GIT 2007 40
The Mill
![Page 41: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/41.jpg)
© GIT 2007 41
Don’t Rush
Be Safe
Ask Questions
![Page 42: Electronics • Pneumatics • Machiningsinghose.marc.gatech.edu/courses/me2110 Fall08/Lectures/lecture9 20080916.pdf© GIT 2007 2 Introduction to the ME 2110 Kit Controller Box Pneumatics](https://reader034.fdocuments.us/reader034/viewer/2022042301/5ecc32c63c742514dd26278e/html5/thumbnails/42.jpg)
© GIT 2007 42