Microcontroller Interfacing Projects Microcontroller Interfacing Microcontroller Interfacing Microcontroller

  • Slides: 52
Download presentation
Microcontroller Interfacing Projects

Microcontroller Interfacing Projects

Microcontroller Interfacing

Microcontroller Interfacing

Microcontroller Interfacing

Microcontroller Interfacing

Microcontroller Interfacing

Microcontroller Interfacing

Microcontroller Interfacing

Microcontroller Interfacing

Microcontroller Interfacing

Microcontroller Interfacing

Microcontroller Interfacing

Microcontroller Interfacing

Student Project: PERIPHERALS AND MOTHERBOARD FOR THE BASIC STAMP

Student Project: PERIPHERALS AND MOTHERBOARD FOR THE BASIC STAMP

PURPOSE • The purpose of this project is to design a set of motherboard

PURPOSE • The purpose of this project is to design a set of motherboard core and peripheral modules for highthroughput applications to be implemented in grades 7 – 12 and in senior electrical engineering laboratories.

Teaching OBJECTIVE 1. ELECTRICAL COMPONENT BEHAVIOR 2. ELECTRICAL ENGINEERING DESIGN STRATEGIES 3. TECHNICAL SKILLS

Teaching OBJECTIVE 1. ELECTRICAL COMPONENT BEHAVIOR 2. ELECTRICAL ENGINEERING DESIGN STRATEGIES 3. TECHNICAL SKILLS GOALS • TO DEVELOP AN EFFICIENT ENVIRONMENT THAT WILL PRODUCE: – UNDERSTANDING OF ELECTRICAL CIRCUIT BEHAVIOR – WORKING PROTOTYPES FOR A LARGE VARIETY OF PROJECTS

Requirements • Modularity • Manufacturing • Physical Packaging • Reliability

Requirements • Modularity • Manufacturing • Physical Packaging • Reliability

Design Strategy • Use Stamp as Foundation Controller for multiple peripheral modules • Use

Design Strategy • Use Stamp as Foundation Controller for multiple peripheral modules • Use communication between Stamps to increase complexity of a project • Create condensed packaged Motherboard/Module demo’s

Foundation Controller • • • Output Current for I/O pins for Stamp I/II DOS

Foundation Controller • • • Output Current for I/O pins for Stamp I/II DOS based application to interface BSI Programming Languages Memory Size I/O pins Port interface between PC/Basic Stamp

Stamp Communication • Serin program command • Hardware implemented for communication process

Stamp Communication • Serin program command • Hardware implemented for communication process

Packaging • Transport Circuit Design to PC Board • Package multiple demo’s into one

Packaging • Transport Circuit Design to PC Board • Package multiple demo’s into one overall storage unit

7 -Segment Module

7 -Segment Module

LED Module

LED Module

Dipswitch Module

Dipswitch Module

Mother. Board/Module Demo’s FOUNDATION: BASIC STAMP II MICROCONTROLLER PERIPHERALS: DISPLAYS TRANSDUCERS STEPPERMOTORS SERVOMOTORS THERMISTORS

Mother. Board/Module Demo’s FOUNDATION: BASIC STAMP II MICROCONTROLLER PERIPHERALS: DISPLAYS TRANSDUCERS STEPPERMOTORS SERVOMOTORS THERMISTORS LED’S

Stamp/Module Costs • Source: Hosfelt Electronics, Inc 888 -264 -6464 • or 800 -524

Stamp/Module Costs • Source: Hosfelt Electronics, Inc 888 -264 -6464 • or 800 -524 -6464 • Catalog 99 R customer #397 M 12 • page stock# item ea quan tot • • 47 51 -393 DIP switch w/rocker actuator $. 85 20 $17. 00 82 42 -104 Solderless breadboard $10. 95 10 $109. 50 105 13 -398 Minature speaker $. 99 20 $19. 80 117 25 -350 3 mm Red LED $. 12 200 $24. 00 • Tot $170. 30

Continued Cost Analysis • HOSFELT ELECTRONICS, INC Catalog 99 B Cust #397 M 12

Continued Cost Analysis • HOSFELT ELECTRONICS, INC Catalog 99 B Cust #397 M 12 (MSU-ECE) • Page Part no quan item ea tot • • • 28 80 -243 2 pkt #65 carbide drills $3. 25 $6. 50 28 80 -247 2 pkt #53 carbide drills $3. 25 $6. 50 47 51 -334 20 mercury tilt switch $. 75 $15. 00 67 7406 50 Hex inverter $. 39 $19. 50 72 42 -194 8 4"X 6" PC board $5. 99 $47. 92 86 21 -267 100 16 -pin DIP socket $. 08 $8. 00 • Total: $103. 42

Continued Cost Analysis • • • page stock# item ea quan 62 AO 2047

Continued Cost Analysis • • • page stock# item ea quan 62 AO 2047 -ND 9 -pin D-sub connector, female $2. 15 25 53. 75 62 AO 245 -ND 25 -pin D-sub connector, male $3. 02 25 75. 50 224 ZHB 6718 CT-ND H-bridge $3. 76 20 75. 16 384 KC 003 T-ND Minature thermistor $2. 43 20 48. 64 • Tot $253. 05

Continued Cost Analysis • page cat# item size $ea quan $tot • • •

Continued Cost Analysis • page cat# item size $ea quan $tot • • • /cclad-s. htm S 1 -36 G 1/16" FR 4 glass epoxy with 1 oz copper foil 3 x 6 $12. 20 10 pkg 122. 00 /chemphot. htm KD-1 G type-S Develop soln 1 Gal $32. 90 1 32. 90 PRSK-1 G type-S Stripper 1 Gal $92. 45 1 92. 45 • • • /chemetch. htm#Ferric Chloride E-1 G Ferric Chloride 1 Gal $20. 80 1 20. 80 FSB-500 Scotchbrite pad 12 x 24 $21. 00 1 21. 00 • • /chemplat. htm ITP-1 QT Immersion Tin plate 1 qt $23. 80 2 47. 60 • tot $336. 75

Continued Cost Analysis • BS 1 -IC BASIC stamp 1 @$30. 60 ea quan

Continued Cost Analysis • BS 1 -IC BASIC stamp 1 @$30. 60 ea quan 15 • tot = $459, S&H not included.

Test Specification • • Size Dimensions Component Reliability Code Functionality Overall System Test Certification

Test Specification • • Size Dimensions Component Reliability Code Functionality Overall System Test Certification • • Manufacturing of Printed Circuit Boards Component Choice Code Functionality System Test

Conclusions • Success was achieved for project implementation for grades 7 – 12 •

Conclusions • Success was achieved for project implementation for grades 7 – 12 • Shortcoming: Did not construct projects of appropriate complexity for senior design electrical engineering laboratories Future Progress • Continued design and manufacturing of motherboard/peripheral module demo’s to be implemented in senior level electrical engineering laboratories

Modularity for a Robotic Locomotion System

Modularity for a Robotic Locomotion System

Modularity of Robotic Systems 1. Electrical modules 2. Mechanical modules 3. Software modules 4.

Modularity of Robotic Systems 1. Electrical modules 2. Mechanical modules 3. Software modules 4. Electrical/mechanical/software modules: a) of one type b) of few types

Case Study Approach Early Stages An exploration into the overall goal of our project

Case Study Approach Early Stages An exploration into the overall goal of our project where modularity is defined providing an overview into the mechanical structures and communication architecture. System & Design Analysis A detailed examination of the mechanical, electrical, and communication components of the electro-mechanical system. Future Perspective A hindsight perspective of problems encountered while elaborating on improvements for the process while providing an outlook upon the project’s future.

The Early Stages Overall Goal What is the point of this project? Modularity? What

The Early Stages Overall Goal What is the point of this project? Modularity? What is modularity? . Architecture Overview An overview of the system architecture from a high level in order to understand the integration with lower level components.

Overall Goal • Investigation of modularity • Design of a component to act as

Overall Goal • Investigation of modularity • Design of a component to act as a universal interface between the base unit and components – Improved wheel modular unit and base • Implementation of an efficient bus system with expansion capabilities with hardware

What is Modularity? • Modular/ Modularity (adjective) – “Designed with standardized units or dimensions,

What is Modularity? • Modular/ Modularity (adjective) – “Designed with standardized units or dimensions, as for easy assembly and repair or flexible arrangement and use. ” • Application to Robotics – Easily attachable and detachable modules – Each module contains the necessary mechanical and electrical components (I. e. motors, microprocessors, etc. )

Architecture Overview Slave Processor Master Processor Exploded View Servo Motor 1 FT Chip Servo

Architecture Overview Slave Processor Master Processor Exploded View Servo Motor 1 FT Chip Servo Motor 2 • Consists of single master processor where all program instructions originate. • Independent slave processor allow for device independent calibrations. Slave Processor • Instructions passed from master->slave>FT 639 (drives servo motors directly)

System and Design Analysis Mechanical Design Electrical System Communication Controls An exploration of the

System and Design Analysis Mechanical Design Electrical System Communication Controls An exploration of the mechanical design of: body, universal insert module, and servo motor housing. An exploration of PCB design, master module, and the slave module. An explanation of the communication of the overall integration system.

Design Criteria Dimension Explanation Size • Small and compact to keep weight to a

Design Criteria Dimension Explanation Size • Small and compact to keep weight to a minimal Weight Functionality • Lightweight allows for decreased torque requirements on motors while allowing for increased mobility • Ability to be functional pliable and adaptable • Possibility to incorporate sensors • Mobility in terms of a wheel and with legs

Body Design 1 Design 2 Components • made entirely of plexiglass • each side

Body Design 1 Design 2 Components • made entirely of plexiglass • each side is one single piece Components • made entirely of plexiglass • sides are individual pieces Problems • heavy • a lot of manufacturing Problems • slightly lighter • many parts

Body Design Final Design Components • 2 sheets of 6 x 10 x 0.

Body Design Final Design Components • 2 sheets of 6 x 10 x 0. 25” plexiglass – Manufactured using CNC machine • 12 Aluminum threaded Round Standoffs: ¼” OD, 1 -1/2” length Advantages • Light weight • less manufacturing (standoffs are off the shelf products • a total of 8 slots for modules

Universal Insert Module Initial Design: Two part component

Universal Insert Module Initial Design: Two part component

Universal Insert Module Final Conception • One piece component made of plastic or aluminum.

Universal Insert Module Final Conception • One piece component made of plastic or aluminum. • Easily manufactured with the use of the machine from Mechanical Engineering Dept at PSU.

Servo Motor Housing Problem • Resulting moments on servo horns • Deformation of servo

Servo Motor Housing Problem • Resulting moments on servo horns • Deformation of servo horns Original Design

Servo Motor Housing Solution • Redirect moment onto a shaft made of stronger material

Servo Motor Housing Solution • Redirect moment onto a shaft made of stronger material • shafts connected to servo motors with use of gears and chains Lower Servo Unit (Driving) Driving Shaft Steering Shaft connection Ball Bearing slot 6 -32 set screws • set steering shaft to lower unit Upper Servo Unit (Steering) 6 -32 set screws • connects to insert module Steering Shaft

Assembled Module Spacers Insert Module • made of ABS • manufactured using FDM machine

Assembled Module Spacers Insert Module • made of ABS • manufactured using FDM machine • 4 pieces • ¼” OD, 1/8” lenght Upper servo unit • made of ABS 1. 25 x 3 x 1’’ • manufactured using CNC machine Servo Motors Shafts • Drill Rods • Shafts from toy car Lower servo unit Wheel • taken from toy car • made of ABS 1. 25 x 3 x 1’’ • manufactured using CNC machine

Final Assembly Complete assembly of robot with four wheel modules inserted into the body

Final Assembly Complete assembly of robot with four wheel modules inserted into the body

Master Module Inputs Power Source: provides power to the microcontroller and also to the

Master Module Inputs Power Source: provides power to the microcontroller and also to the slave modules for their respective micro-controllers. Data Line In: consists of a single serial line coming from each individual slave module carrying valuable data instructions from each slave (i. e. may include speed, position, error, and feedback information) Outputs Data Line Out: Utilizes a serial line sending data and individual instructions to each slave module component (i. e. such as speed, position) containing a micro-controller Basic Stamp II Microcontroller Dedicated Bus System for SEND Dedicated Bus System for RECEIVE • 2 individual bus systems for sending and receiving data to avoid data collisions • Primary Program sequence contained within

Slave Module Schematic • Each slave module unit is independent unit containing: FT 639

Slave Module Schematic • Each slave module unit is independent unit containing: FT 639 servo controller chip, 1 Basic Stamp II microcontroller • 2 dedicated 5 V lines (servo motors & chips) Courtesy of Kapil and Darnel • 180 degree and 360 degree servo motor on board • Each slave module unit is independent unit containing: FT 639 servo controller chip, 1 Basic Stamp II microcontroller • 2 dedicated 5 V lines (servo motors & chips) Microcontroller Pin Assignments Pin 0 Dedicated COM to FT 639 chip Pin 14 Dedicated SEND line to master Pin 15 Dedicated RECEIVE line to master

PCB Circuit Board • Generated circuit board to be inserted into each module unit

PCB Circuit Board • Generated circuit board to be inserted into each module unit to allow for processing on the slave as opposed to master • Generated custom-designed PCB schematic sending NC and drill files for production • 2 layers: Top layer (red) and Bottom layer (blue) Future Expansion Servo Power Future Expansion • 3 dedicated channels for power and ground System Power RCV Line SND Line System Ground • 2 dedicated I/O channels for communication with the master • 2 dedicated channels for future expansion (hardware id sequence)

Communication Controls • Addressing ($FC, $FD, $FE, $FF) • Allows for routing of information

Communication Controls • Addressing ($FC, $FD, $FE, $FF) • Allows for routing of information from master to appropriate slave unit • Checks to see which modules are plugged in routing data and adjusting program accordingly • Flow Sequence • Sends data serially at 2400 baud • Master -> Slave > FT chip -> Slave -> Master • Allows handshaking while slave constantly pings for incoming data Address Master Module Unit Servo ($FD) ……. . Position Completion ($FF) ……. . Address Slave Module Unit (Addressed at $FF)

Problems Encountered Manufacturing Mechanically Problem: Inability to align parts consistently on the CNC machine.

Problems Encountered Manufacturing Mechanically Problem: Inability to align parts consistently on the CNC machine. Problem: Gear Specifications and slippage Result: Not using the bearings for the wheel shaft Problem: Inability to produce high quality and tolerant parts through fusion deposition modeling (FDM). . Result: Loss tolerances upon inserting screws with high accuracy. Result: Utilized two set screws and drilled into shafts but reduced torque Problem: Turning Mechanism for the wheel module unit Result: Moment still exists but is greatly reduced with spacer

Problems Encountered Electrically Problem: Data loss and Collisions Problem: Faulty Connectors/ connections Result: Consolidated

Problems Encountered Electrically Problem: Data loss and Collisions Problem: Faulty Connectors/ connections Result: Consolidated send and receive lines on individual bus systems and utilized improved power supply Result: Reconnecting slave unit several times until communication link established. Investigate better quality connectors. Problem: Data transmission Speeds Result: Utilized a 2400 baud transfer rates due to limitations imposed by the FT 639 chip even though optimal transfer rate between Basic Stamps was found to be 9600 baud. Problem: Sending data from master to slaves several times before communication sequence established Result: Integrated system works at times. Problem currently under further investigation.

The Next Generation Model Solutions to Gear Slippage • use of metal gears to

The Next Generation Model Solutions to Gear Slippage • use of metal gears to prevent stripping from screws • the use of larger gears to provide a better contact for the set screws • modifications to servo motor housing to incorporate a larger diameter size shaft Speed control with the use of encoders Hardware ID tags • determine location of module that is plugged in relative to the body • Use of a multiplexer to control data flow • Allows for more uniform integration with the software tagging Implementation of a Feedback System • Implementing proximity and various other sensors to create a “smart system” creating a feedback loop

Problems • 1. Think how to design a system of Lego-like mechanical and electrical

Problems • 1. Think how to design a system of Lego-like mechanical and electrical modules from which many different “animals” could be build. First analyze carefully Lynxmotion, Lego and Robix systems. This system may be the extension of the 2002 Robot Soccer Kit. • 2. Next analyze Erector, Capsela and Knex. • 3. How to design a system of “blocks” from which any type of human-like beasts (with different proportions but with the same kinematics) can be build. Each block must be selfcontained, including software. The system should be selfconfigurable in software after connecting blocks mechanically.

Sources • Curtis Bahn, RPI • J. E. Wampler • Michael Rodemer, University of

Sources • Curtis Bahn, RPI • J. E. Wampler • Michael Rodemer, University of Michigan, School of Art and Design • Physics and Media Group, MIT • Josh R. Fairley • Dr. Raymond S. Winton • Mike Haney, University of Illinois • Steve Benkovic, Cal State University , Northridgehttp: //homepage. mac. com/SBenkovic • s. benkovic@ieee. org • Kenneth Chin and Prang Chim • Dr. Jim Ostrowski. Bob Miller, Wally Szczesniak, Terry Kientz, • Brett Balogh , Siddharth Deliwala, John Bowen, • Darnel Degand, Kapil Kedia, • Adrian Fox, Christopher Li