Jazzing Up Your MicroprocessorMicrocontroller Course Through the Infusion of Mobile Robotic Agents U - PowerPoint PPT Presentation

1 / 40
About This Presentation
Title:

Jazzing Up Your MicroprocessorMicrocontroller Course Through the Infusion of Mobile Robotic Agents U

Description:

We will perform all four trials 10 times each and come up with an average time for each trial. ... employed for data transfer and control during the study. ... – PowerPoint PPT presentation

Number of Views:72
Avg rating:5.0/5.0
Slides: 41
Provided by: ValuedGate1279
Category:

less

Transcript and Presenter's Notes

Title: Jazzing Up Your MicroprocessorMicrocontroller Course Through the Infusion of Mobile Robotic Agents U


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

http//www.parallax.com/detail.asp?product_id2813
2
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
TrainersHex!
  • 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)
  • Interfacing Experiments
  • Memory Circuits
  • Clock
  • Address Decoding
  • Data Output
  • Data Input
  • D/A A/D

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
  • Whats a Microcontroller
  • Basic Analog Digital
  • Digital
  • Robotics
  • Advanced Robotics
  • Applied Sensors
  • Industrial Controls
  • More

http//www.parallax.com/html_pages/products/books/
books.asp
9
Available Downloads (examples)
  • Parallax Stamps in Class Educational
    CurriculumDownload 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, Parallaxs 40-pin Basic
    Stamp 2 module (BS2P40), interfaced with an
    embedded ethernet IC, Cirrus Logics Crystal
    CS8900A, and ii) a client computer.

http//www.parallax.com/html_pages/edu/downloads/d
ownloads.asp
10
Some Powerful Stamp 2 Accessories
  • Stepper Motor Controller Boards
  • Bluetooth Technology
  • Field Programmer
  • Graphing Software (Stamp Plot)
  • Real Time Data Acquisition Software

http//www.parallax.com/html_pages/products/indust
rial/industrial.asp
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)

http//www.parallax.com/html_pages/products/indust
rial/industrial.asp
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)
  • Whats 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 Dont 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.
  • Its a question of whats 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
  • The array field is divided up into two zones
    each with on/off control logic.
  • 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.

Left Zone
Right Zone
22
Algorithm
Initial Search
Centering the BOE bot on the Object
Driving to the Object
Does the center IR detect the can?
BOE bot Drives forward for .2 seconds
No
Yes
Yes
BOE bot Drives forward for .2 seconds
Does the center IR detect the can?
No
BOE Bot checks status of Limit Switch
BOE Bot checks status of sensors
BOE Bot checks status of sensors
BOE Bot checks status of sensors
BOE bot turns left for .2 seconds
Is the limit switch touched?
No
No
Is there detection in the right zone?
Is there detection in the left zone?
Yes
BOE bot turns right for .2 seconds
No
Yes
Object Found
Yes
23
Experiment Setup
  • To test our hypothesis we will need to set up an
    experiment
  • An object will be placed within the arrays 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 IIs
    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 IIs
    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)
Semi-Autonomous One 2004 MU Robotics Team
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.

38
Thank You!
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

http//www.parallaxinc.com/html_pages/tech/faqs/st
amp_specs.asp
40
Motorolas 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

Note Both can be programmed with SBASIC
developed by Karl Lunt
http//www.seattlerobotics.org/encoder/jan97/The68
HC12.html http//www.dcd.pl/dcdpdf/alt/df6811cpu_d
s.pdf
Write a Comment
User Comments (0)
About PowerShow.com