1 / 39

Jazzing Up Your Microprocessor

Emphasis of the Presentation. (1) How you can infuse the use of a Basic Stamp microcontroller into a microprocessor or microcontroller course in electronics.A) Lab ExperimentsB) Boe-BotsC) Custom Ground-up Mobile Robots(2) How to construct and integrate this type of project into the ITEC curricu

vahe
Download Presentation

Jazzing Up Your Microprocessor

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


    1. Jazzing Up Your Microprocessor/Microcontroller Course Through the Infusion of Mobile Robotic Agents Utilizing Basic Stamp II Microcontrollers for Autonomous Navigation Dr. John R. Wright, Jr., CSIT Mr. John M. Kuperavage Mr. Jason T. Smith Department of Industry & Technology Millersville University of Pennsylvania

    2. Emphasis of the Presentation (1) How you can infuse the use of a Basic Stamp microcontroller into a microprocessor or microcontroller course in electronics. A) Lab Experiments B) Boe-Bots C) Custom Ground-up Mobile Robots (2) How to construct and integrate this type of project into the ITEC curriculum beyond the formal curricula. A) Independent Studies B) Honors Theses C) Student Organization Competitions

    3. Programming Languages High-Level Languages BASIC, C, C++, etc. Assembly Language Use of mnemonics Hex Machine Language “The programmer writes the program using hex codes to represent the op codes, operand addresses, and data” (Trocci & Ambrosio, 2003, p 171). Machine Language “Remember, the microprocessor does not process mnemonics, op codes, or hexadecimal numbers; it works on binary words” (Gilmore, 1996).

    4. Laboratory Exercises (Before) HeathKit 6800 Trainers Hex! Programming Experiments Binary/Decimal Conversion Hex/Decimal Conversion Straight Line Programs Arithmetic and Logic Instructions Program Branching Additional Instructions (ADC, SBC, etc.) Other Addressing modes (Extended & Indexed)

    5. High-Level Language Need Coupled with the Need for Better I/O Capability The Contenders Bot Board featuring the Motorola 68HC11/12 More powerful, faster, more I/O, Industry Standard Boe-Bot featuring the BASIC STAMP 2 Popular with Educational Technology/Engineering Institutions, very user friendly, curriculum and training available, many expandable features

    6. The Decision! “When choosing a processor it is important to avoid “religious” wars. Yes, some processors are faster than others for a given application, and some have very irritating instruction sets. Nevertheless the bottom line is, “Can it do the job and can you get the parts for an appropriate cost?” Beyond that, there are good and bad aspects to every processor family” (Morton, 2001, p 19).

    7. Advantages to Parallax, Inc. Ease of Use PBASIC Training Documentation (Books & Manuals) Accessories Sensors Support Sample Code Online Groups Customization of Packages BOE-Bot Kit

    8. Available Books (Curricula) – Great for Lab Experiments What’s a Microcontroller* Basic Analog & Digital Digital Robotics* Advanced Robotics Applied Sensors Industrial Controls** More…

    9. “Parallax Stamps in Class™ Educational Curriculum Download the individual texts at the related information link.  Includes all curricula from What's a Microcontroller through Industrial Control. Matlab-Based Graphical User Interface Development for BASIC Stamp 2 Microcontroller Projects. The name Matlab is derived from Matrix Laboratory. Matlab is a powerful software package that allows for plotting data in multiple dimensions.  This article demonstrates it's usage. Internet-Based Remote Control using a Microcontroller and an Embedded Ethernet Board. This article shows a developed DC motor position control experimental setup that can be accessed via the Internet. The experiment consists of two primary elements communicating with each other: i) a server consisting of a low-cost microcontroller, Parallax’s 40-pin Basic Stamp 2 module (BS2P40), interfaced with an embedded ethernet IC, Cirrus Logic’s Crystal CS8900A, and ii) a client computer.” Available Downloads (examples)

    10. Some Powerful Stamp 2 Accessories Stepper Motor Controller Boards Bluetooth Technology Field Programmer Graphing Software (Stamp Plot) Real Time Data Acquisition Software

    11. What About Industry Grade? Parallax offers… “Basic Stamp 2 Industrial Module - Our industrial version of the BASIC Stamp 2 module has an extended temperature range of -40 C to +85 C (-40 F to +185 F). This module normally has no shortage of program space or I/O pins. Serial PC interface provides enhanced debug features.” Industrial boards - 16 or 32 I/O Optically Isolated (Opto22)

    12. Laboratory Exercises (After) HeathKit 6800 Trainers Hex! Binary/Decimal Conversion Hex/Decimal Conversion Straight Line Programs Arithmetic and Logic Instructions Program Branching Calculator Challenge

    13. Laboratory Exercises (After) PBASIC! – Boe-Bot (BS2) What’s a Microcontroller - Basics - Set-up Detecting the Outside World Inputs Variables (bit, nib, byte, word) Micro-controlled Movement Servo Motor Control For/Next Loops Time Delays Simple Automation Debug (Print) Tying it all together Measuring an Input Interfacing to Integrated Circuits (555) Assembling & Testing Your Boe-Bot Basics Set-up Tuning the servos (calibration) Programming the Boe-Bot to go Places Low battery indicator Distance control Turning/Maneuvers Ramping Speeds EEPROM Navigation Branching/Subroutines Tactile Navigation Navigation with whiskers If/Then Statements Logic (XOR, Not, etc.) Light Sensitive Navigation with Photoresistors Measuring RC time Deadband Object Detection Using Infrared Frequency manipulation (Freqout) Real-time Navigation

    14. Suggested Course Lectures What is a Microprocessor? Basic Microprocessor Architectural Concepts (part I) Basic Microprocessor Architectural Concepts (part II) Inside the Microprocessor An Introduction to Microprocessor Instructions Communicating with the Microprocessor Memory Mass Storage Introduction to Microcontrollers The Basics of PBASIC Advanced PBASIC Instructions

    15. Why Don’t We Just Eliminate Teaching Assembly? “An assembly language program makes very compact code, but it takes a great deal of programming time. High-level languages take much less development time but take much more memory space than assembly programs” (Gilmore, 1996). However, semiconductor memory costs continue to drop. It’s a question of what’s more expensive: Extra Memory Extra Engineering Development Time Product quantity plays a huge role!

    16. Beyond the Traditional Classroom Honors Thesis Topic: Independent Study MU Robotics Team

    17. Honors Thesis Topic Honors Thesis: Creating an equation to determine of the optimum number of IR sensors needed for object detection. The basis for this study was to prove that the optimal number of IR sensors (timed efficiency vs. cost) is directly related to an objects size in a given array.

    18. Major Components Used BASIC Stamp 2 with carrier board This allows for powerful capabilities of interfacing sensors to control your output but the PBASIC is simple enough to program with limited programming background. Parallax S.S.I.R Sensors Infrared detection unit which is made to be used with the stamp directly with no other interfacing. BOE Bot Board of Education Bot carries the stamp carrier board and allows for movement with virtually no fabrication.

    19. Reason For Using These Components Object of the study was to determine sensor optimization in general. The Stamp is a simple way to draw conclusions that can be later transferred to more advanced systems. The Parallax S.S.I.R is designed specifically for use with the stamp therefore all the circuitry for operation is already included on the chip. Although the BOE bot is simple, it is also extremely reliable. All components can be bought in a kit and assembled quickly. The only fabrication needed is for the sensor mounting.

    20. Using IR The S.S.I.R. is an infrared detection unit Uses an LED to emit infrared light, which when bounced off an object can be detected. Both the emitter and the detector use the same port which gives added efficiency. Tuning the S.S.I.R. is possible by changing the frequency of the LED. Frequency changes your range of detection.

    21. On/Off control in two zones Nine sensors will be placed in an array in front of the BOE bot. When an object is detected by a sensor, the Stamp sets a variable as high to designate detection on that side. The stamp then turns the opposite direction of which ever zone the object was detected in. The BOE bot turns until the center IR detects the object. The BOE Bot then drives forward until it reaches the object.

    22. Algorithm

    23. Experiment Setup To test our hypothesis we will need to set up an experiment: An object will be placed within the array’s arc but out of its range. A number of sensors will be turned on starting with three in the first trial and ending with nine in the last trial. The three sensors include a middle sensor, one at the left limit, and one at the right limit. Each trial will increase the number of sensors turned on by two (one for each side) spaced equally apart. The sensors will be turned on and off within the code. The operation will then be started and timed.

    24. Experiment Setup Continued We will perform all four trials 10 times each and come up with an average time for each trial. This will be done with several objects of different sizes (TBD). Graphs will be formulated using the average times, number of sensors and object size. These graphs will be used to draw conclusions about the relationship between object size and number of sensors, based on time.

    25. Assumptions/Limitations Assumptions: Objects will always be places in the same position in relation to the BOE Bot. Power supply is constant Timing will be from start of motion to the end of motion. Code will not be altered (Except for turning sensors on and off). Limitations: Experiment is to be done on a flat smooth indoor surface. Object will be a solid color. Sensor range is limited to approximately two feet. All servo and wheel components will be standard Parallax components that have come with the BOE bot kit.

    26. In Progress This study is currently in progress. The exact code has not been finalized nor have any of the trials been run. I expect the trials to be run and my conclusions to be drawn in the Spring of 2005 at which time I will defend my findings in front of my thesis committee at Millersville University.

    27. Beyond the Traditional Classroom Honors Theses Topic: Independent Study MU Robotics Team

    28. Independent Study The purpose of this study was to establish a semi-autonomous mode in order to control a robotic device and then complete an assigned task. The integration of the two modes allow for both tele-operated functions from the user and automated control when the Basic Stamp II was in operation.

    29. Semi-Autonomous Control Scheme Overview

    30. The New Communication Standard Bluetooth is a wireless communication technology that was chiefly employed for data transfer and control during the study. Bluetooth class one technology has a range of 100m or about 330ft. The use of Bluetooth technology as a low cost, low power, high data rate transfer mechanism helped to make the real time control and semi-autonomous modes a reality.

    31. The Control Link Bluetooth technology allowed for the seamless integration of control. Information was sent through the “EmbeddedBlue™ 500.” which is available through parallax Inc. The Bluetooth technology allows for communication through any other class I Bluetooth device.

    32. Virtual Serial Port The program is first downloaded into the stamp via hardwire connection. All of the Bluetooth code must be preprogrammed in to facilitate communication between computer and Basic Stamp II. Once the code is downloaded into the Basic Stamp II the user opens up HyperTerminal. HyperTerminal communication must be configured and then the virtual serial port link can be established.

    33. Real Time Monitoring & One Key Control Real Time Monitoring: With the serial communication establish information can be sent and received through the uplink. This allows for “Real Time Monitoring” of any sensors interfaced with the basic Stamp II. One Key Control: The User can then initiate the Basic Stamp II’s preprogrammed functions by a single key stroke. In the study for example subroutines were used to check for user input and then execute a set of instructions. User-override feature utilized.

    34. Superior Signal Strength Interfacing the Basic Stamp II, motor speed controller and tele-operated receiver was interesting. Wiring the entire system in parallel turned out to be the answer because of the Basic Stamp II’s superior signal strength it was able to “lock-out” functions from the tele-operated receiver. The Basic Stamp II only “locks-out” outputs which the program sends digital signals to this means that a truly semi-autonomous state can be achieved thus Real time monitoring was developed.

    35. Beyond the Traditional Classroom Honors Theses Topic: Independent Study MU Robotics Team

    36. Latest Design (SA-1)

    37. Texts Cited Gilmore, C. M. (1996). Microprocessors Principles and Applications 2nd Edition. Glencoe McGraw-Hill, New York. Morton, T. D. (2001). Embedded Microcontrollers. Prentice Hall, Upper Saddle River, New Jersey. Tocci R. J. (2003). Microprocessors and Microcomputers Hardware and Software 6th Edition. Prentice Hall, Columbus, Ohio.

    39. Parallax Stamps (Appendix A) BS2 (Low-end Model) Processor Speed 20 MHz Program Execution Speed ~4,000 instructions/sec. RAM Size 32 Bytes (6 I/O, 26 Variable) EEPROM (Program) Size 2K Bytes, ~500 instructions Number of I/O pins 16 + 2 Dedicated Serial Cost $49 each BS2p40 (High-end Model) Processor Speed 20 MHz Turbo Program Execution Speed ~12,000 instructions/sec. RAM Size 38 Bytes (12 I/O, 26 Variable) EEPROM (Program) Size 8x2K Bytes, ~4,000 instructions Number of I/O pins 32 + 2 Dedicated Serial Cost $89 each

    40. Motorola’s Microcontrollers (Appendix B) 68HC11 512 bytes of RAM 2K bytes EEPROM 40 I/O pins 2 MHz 45-100 Million Instructions per Second Used with the BOT Board 68HC12 1024 bytes of RAM 4K bytes EEPROM 96 I/O pins 8 MHz

More Related