robotic control with bluetooth wireless communication

Upload: elias-cassal

Post on 02-Jun-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 Robotic Control With Bluetooth Wireless Communication

    1/28

    Robotic Control with

    Bluetooth W ireless Com m unication

    ME 224

    Fall 2005

    Prof. Horacio Espinosa

    David Macedonia

    Adam Same

    David Storch

    Norbert Wroblewski

  • 8/10/2019 Robotic Control With Bluetooth Wireless Communication

    2/28

    2

    Table of Contents

    I. Abstract 3

    II. Introduction 4

    III. Background & Theory

    BASIC Stamp 5LabVIEW 5

    Bluetooth 6

    Parallax Boe-Bot 6

    IV. Experimental Procedure & Activities

    Equipment 7

    Activity 1: Actuation 8

    Activity 2: Sensing 9

    Activity 3: Control 10

    Activity 4: Wireless Communication

    12

    V. Analysis of Results 14VI. Conclusion 15

    VII. References 16

    Appendix 18

  • 8/10/2019 Robotic Control With Bluetooth Wireless Communication

    3/28

    3

    I. Abstract

    Our final project was meant to tie together some of the techniques that we learned

    throughout the ME 224 course. The goal was to establish wireless communication

    to control the movement of a Parallax Boe-Bot. To accomplish this, we needed to

    tie together multiple different programs and pieces of hardware. The first step was

    to assemble the Boe-Bot and center its servo motors. We were then introduced to

    BASIC Stamp 2.0 programming, and used it to control the movement of the servos

    through serial communication. Once we had learned how to manipulate the robots

    motion through BASIC Stamp, we wrote a LabVIEW program to acquire data for the

    calibration of a gyroscope positioned on the Boe-Bot. The next step was to integrate

    the eb500 wireless card and the Boe-Bots BASIC Stamp, and then establish

    communication between the BASIC Stamp and Windows HyperTerminal. This

    allowed us to use HyperTerminal to wirelessly control the motion of the robot.

    Finally, we created a LabVIEW vi file that could be linked to Bluetooth to manipulate

    the robot in real time.

    We encountered many difficulties during this project, mainly because we were

    integrating so many different pieces of technology. The true challenge was not in

    the actual programming, but in establishing communication between the different

    systems. Our group was forced to strike a balance between perfecting the intricate

    details of BASIC Stamp and LabVIEW programs, and stepping back to examine the

    larger picture of how each part of the project was to be incorporated into the Boe-

    Bots overall control system. The group found the most success in establishing

    wireless communication. We were able to use simple BASIC Stamp commands to

    determine that the eb500 card was functioning with the Board of Education. We

    could use text inputs in HyperTerminal to wirelessly drive the Boe-Bot. The greatesttroubles were encountered when attempting to use an Analog-to-Digital converter to

    achieve wireless feedback. This feature greatly complicated the BASIC Stamp and

    LabVIEW programming, and we were ultimately unable to accomplish this goal

    within the allotted time period. We also ran into problems with our LabVIEW control

    program; the movement of the robot is not as smooth as when it is controlled

    directly with HyperTerminal.

    In the end, we accomplished a lot in the way of establishing wireless

    communication and creating a LabVIEW user interface. However, we were also left

    with many unresolved issues. This project was an interesting medium through

    which to integrate many of the techniques learned during the course.

  • 8/10/2019 Robotic Control With Bluetooth Wireless Communication

    4/28

    4

    II. Introduction

    Throughout our studies during ME 224, we have examined many areas of electrical

    systems. We began by using breadboards and the function generator to create

    simple circuits with resistors, capacitors, and LEDs. From there, we studied signal

    conditioning with op-amps and data acquisition with LabVIEW and the DAQ card.We later applied this information to experiments involving temperature control and

    thermal diffusion. This project is meant to utilize our knowledge of LabVIEW

    programming, as well as to introduce the concept of wireless communication.

    Our objectives were:

    Design and implement an experiment to realize the control of a commerciallyavailable robot.

    Enhance the knowledge of LabVIEW, Data acquisition, Feedback control, andMEMS sensing.

    Get an understanding of wireless communication using Bluetooth technology.

    The methodology of this project can be separated into four sections:

    Sensing: Calibration of the MEMS gyroscope to obtain the information of

    angular motion.

    Actuation: Assembling the Boe-Bot, centering the servo motors, and

    programming to control the Boe-Bots motion.

    Control: Using LabVIEW to control the navigation of the robot along a pre-

    defined path.

    Wireless Communication: Implementing the Bluetooth wireless modules to avoid

    the usage of wires.

    The paths the robot was required to follow can be found in Appendix A.

    References available to the group included the Parallax and EmbeddedBlue

    manuals, the reports generated by student groups from previous years, and the

    knowledge of our classmates. Indeed, the success of each group was due in part to

    our ability to collaborate and discuss the different aspects of the project that each

    had completed.

  • 8/10/2019 Robotic Control With Bluetooth Wireless Communication

    5/28

    5

    III. Backgroun d Theory

    BASIC Stamp:

    The Parallax BASIC Stamp is a microcontroller with a small BASIC

    interpreter. BASIC is a simple language to learn and use, and so theBASIC Stamp has long been a favorite among electronics hobbyists

    and students alike. The low cost of these microcontrollers are perfect

    for prototyping and controlling applications. Our project incorporates

    the BS2 variant of the Stamp. It operates at 20 kHz and can handle

    4,000 instructions per second.

    The control of a robot is just one of the many possible applications of the Basic

    Stamp technology. Other projects we have found online include Door Entry Card

    Readers, Weather Stations, Electronic Compasses, The TI82 interface, Water

    Volume Meters, and even Garage Door Openers.

    We will be using the basic stamp to control the pulse received by pins 12 and 13,

    the pins connected to the servo motors of our Boe-Bot. By programming a series of

    pulses sent to the motors, we hope to be able to maneuver our Boe-Bot.

    LabVIEW:

    LabVIEW is a platform and development environment for a visual programming

    language. Originally developed for the Apple Macintosh in 1986, LabVIEW is used

    for data acquisition, instrument control, and industrial automation.

    LabVIEW is considered to be dataflow language. Unlike traditional languages,

    LabVIEW and other dataflow languages do not determined by execute commands in

    sequence. Rather, the program is executed once all the inputs are available to a

    node. LabVIEW allows for multiple nodes to be working at once, therefore the

    program is capable of parallel processing and execution. Therefore, if a program

    requires multiple solutions to be calculated by input data, LabVIEW is a quick and

    efficient solution.

    The major advantage of data-flow is that it can be represented in a graphical

    setting. The program is represented much like an electrical circuit with nodes set as

    icons, and the data flowing between them as represented as wires. Complex

    systems can be reduced with the use of sub-VIs, iconic representations of programs

    which take input data and compute a result which is further used in the program.As a result, programs that would take up several screens can be reduced into neat

    representations.

    We will be using LabVIEW to get feed back from our gyroscope in order to calibrate

    the servo motors. Our ultimate goal is to be able to wirelessly control our robot

    using commands in LabVIEW.

    Figure 1: BASIC Stamp

  • 8/10/2019 Robotic Control With Bluetooth Wireless Communication

    6/28

    6

    Bluetooth

    Electronic devices that exist today use several different methods of communicating

    with one another. These include using a wide array of cables, wires, connectors,

    plugs, and other means.Wireless communications were developed to simplify the

    way electronic devices communicate, and reduce the wires attached to them

    making them easier for us to use. Bluetooth is a standard for wireless technology,

    created and developed by a group of electronics manufacturers to enable their

    electronic equipment to make their own connections without wires or user

    commands. It does this using a chip that can be plugged into whatever device is

    utilizing the technology. Instead of carrying information through a cable, the

    Bluetooth chip transmits the information at a unique frequency which is recognized

    and received by a receiver chip that connected to a receiver device such as a

    computer.

    Bluetooth technology is very advantageous to electronic devices today. The wireless

    feature enables the user the freedom to avoid being tied down with excess cabling.

    It is also very inexpensive. A Bluetooth chip only costs around five dollars, combined

    with the fact that it does not consume a great deal of power means that it is very

    logical to be implemented in modern wireless devices and can function anywhere.

    Bluetooth also reduces user interface since it initiates conversation with its fellow

    devices automatically. Lastly, Bluetooth is universal, streamlining across many

    major hardware companies and devices. Bluetooth can be applied to nearly every

    device made by almost every company.

    We will be using Bluetooth to communicate with our Boe-Bot wirelessly. A Bluetooth

    chip is plugged into the wireless card connected to the Boe-Bot, and it transmits

    signals to the receiver, attached to the computer through a USB cable. Using

    Bluetooth, we will not be constrained by wires and our Boe-Bot theoretically shouldbe able to be controlled in real time. The only limitation our Boe-Bot has is range,

    because the distance from which the chip and the receiver can interact is limited.

    Parallax Boe-Bot

    The Boe-Bot is a popular programmable robot made by Parallax Inc. Its

    distinguishing feature is the Board of Education (BOE), which acts as the robots

    controller board and is pre-assembled in the kit. The BOE contains the Basic Stamp

    II controller chip, which allows the robot to communicate with the popular and easy

    to use programming language Basic Stamp. It also contains connections enabling a

    wireless card to be plugged into it, as well as a connection to the computer. Aswitch is located on the board with three different settings: 0, 1, 2 to correspond to

    off, Basic stamp, and servo motion respectively. Using the Board of Education, the

    Boe-Bot can perform a large range of functions. In this project, we will be using it to

    travel along four set paths.

    The robot itself is quite small: about five inches long, 4 inches wide, and 3 inches

    tall. Its base is an aluminum chassis that serves as a platform for the servo motors

  • 8/10/2019 Robotic Control With Bluetooth Wireless Communication

    7/28

    7

    and BOE. It contains holes and grooves for other electronic equipment that the user

    wants to secure to the Boe-Bot. Two large wheels fit into the servo motors and held

    in place by a small screw. The rear wheel is a polyethylene ball with a hole drilled

    through the middle. It is attached to the robot with a cotter pin. The servo motors

    are attached to the underside of the chassis, and runs from a power supply that

    uses 4 AA batteries. The robot also has a breadboard for additional circuitry. The

    wireless card and Bluetooth adaptor were not part of the Boe-Bot kit, and were

    purchased separately.

    IV. Experimental Procedure Activities

    The equipment used during this project was:

    Parallax Boe-Bot kito carto servo motors

    o wheelso Board of Education/BASIC Stampo BASIC Stamp Editor 2.0o serial cable

    DBT-120 USB Bluetooth adapter

    A7 Engineering EmbeddedBlue eb500 Wireless Card

    LabVIEW 7.1 and DAQ

    Windows HyperTerminal

    Analog Devices ADXRS150EB Gyroscopic Sensor

    Our Boe-Bot was pre-assembled at the outset of the project. The cart served as the

    base of the robot. The two large wheels were attached to the servo motors. TheBoard of Education (BOE) was screwed to the top of the cart, and the servo motors

    were wired to pins 12 (Left) and 13 (Right). On the BOE was a small breadboard

    with a BASIC Stamp chip.

    Figure 1: Fully-assembled Boe-Bot

  • 8/10/2019 Robotic Control With Bluetooth Wireless Communication

    8/28

    8

    Activity 1: Actuation

    The first step after receiving the Boe-Bot was to center its servo motors. We

    detached the wheels from the servos, and then removed the servos from the cart.

    Centering was accomplished by sending a stop pulse to the BASIC Stamp:

    ' Robotics with the Boe-Bot - CenterServoP12.bs2' This program sends 1.5 ms pulses to the servo connected to' P12 for manual centering.

    ' {$STAMP BS2}' {$PBASIC 2.5}

    DEBUG "Program Running!"

    DOPULSOUT 12,750

    PAUSE 20LOOP

    The PULSOUT command of 750 results in a pulse width of 1.5 ms. This pulse is

    meant to give an angular velocity of zero to the servo motors. The servos initially

    rotated when the CenterServo program was run. We then rotated the potentiometer

    of each motor until rotation stopped, ensuring that a PULSOUT command of 750

    was related to a velocity of zero.

    Figure 2: Centering the servo motors

    Activity 2: Sensing

  • 8/10/2019 Robotic Control With Bluetooth Wireless Communication

    9/28

    9

    Following the centering of the servo motors, it was time to calibrate the gyroscope.

    The goal of calibration was to obtain an equation relating gyroscope voltage to

    angular velocity. First, we wrote a LabVIEW program to collect and organize data

    gyroscope voltage data from the DAQ card. We then developed a BASIC Stamp

    program that rotated the robot for a certain number of counts at different angular

    velocities. The LabVIEW and BASIC Stamp programs for calibration can be found in

    Appendices B and C, respectively. Full calibration data can be found in Appendix D.

    We received the following plot of voltage versus time:

    Voltage vs. Time

    0.0

    0.5

    1.0

    1.5

    2.0

    2.5

    3.0

    3.5

    4.0

    4.5

    5.0

    0 10 20 30 40 50 60 70 80

    Time (s)

    GyroscopeOutputVolta

    ge(V)

    Figure 3: Gyroscope Calibration: Voltages for Changing Pulse Width

    As one can see from our BASIC Stamp calibration program, each spike in voltage

    corresponds to a different angular velocity. Both servo motors of the Boe-Bot were

    given pulse widths in increments of five from 650 to 850. The gyroscope voltage

    was sent through the DAQ card to LabVIEW every 100 milliseconds, and

    successively written to a spreadsheet file. Between each rotation, the robot would

    pause, allowing the gyroscope to reset.

    To find the angular velocity, we manually measured the speed of rotation of theBoe-Bot for each PULSOUT command. This was accomplished by determining the

    time taken for the robot to move through a certain number of rotations. Once we

    obtained the corresponding velocities for each pulse width, we could plot gyroscope

    voltage as a function of angular velocity. The results of this are shown in Figure 4.

  • 8/10/2019 Robotic Control With Bluetooth Wireless Communication

    10/28

    10

    Voltage vs. Angular Velocity

    y = -0.6962x + 2.4705

    R2= 0.9993

    0.0

    0.5

    1.0

    1.5

    2.0

    2.5

    3.0

    3.5

    4.0

    4.5

    5.0

    -4.0 -3.0 -2.0 -1.0 0.0 1.0 2.0 3.0 4.0

    Angular Velocity (rad/s)

    V

    out

    Figure 4: Gyroscope Calibration: Voltage vs. Angular Velocity

    The servos were found to have zero rotation around 2.56 V, and max velocity at 0.5

    V and 4.5 V. The equation obtained from Figure 4 using a linear curve fit was:

    y = -0.6962x + 2.4705

    This equation obtained an R2value of 0.9993. Integrating this equation, we obtain

    a relationship between voltage and angular position:

    V = .3481

    2

    + 2.4705

    This correlation can be used in a LabVIEW program to determine the real-time

    angular position of the Boe-Bot. Theoretically, this information can be used to

    provide feedback related to the robots real-time motion.

    Activity 3: Control

    Having found the relationship between the voltage and the angular velocity, and

    knowing the pulse range required for each servo motor to move, we started working

    on controlling our robot. During calibration we learned how to control the servorotation using BASIC Stamp. In the program we were able to specify the length of

    the pulse that was sent to each servo motor, which determined the angular velocity

    of the wheel. By having the pulse length as a dependent variable in a for loop, we

    were able to set the counter, which allowed us to control the duration and speed of

    rotation of each wheel.

  • 8/10/2019 Robotic Control With Bluetooth Wireless Communication

    11/28

    11

    With this in mind we determined the most efficient pulse rates for certain actions

    (moving forward, moving backwards, turning left, and turning right). We noticed

    that towards the higher pulse rates (going up towards 850, and down towards 650)

    the speed of the servo motors approached a limit. We determined it was inefficient

    to drive the motors at full speed, and so chose pulse widths of 700 and 800 (pin 12,

    pin 13 respectively) configuration for forward motion, and widths of 725 and 725

    for rotation. These pulse widths were chosen because they showed little variance in

    distance traveled for a set amount of time, while maintaining a reasonable speed

    (greater than 90% of max speed).

    Pulse12

    Pulse13

    distance1

    distance2

    distance3 average

    time(seconds)

    velocity(cm/sec)

    650 850 54.10 54.20 54.80 54.37 3.00 18.12

    675 825 53.00 53.60 53.00 53.20 3.00 17.73

    700 800 49.30 49.50 49.90 49.57 3.00 16.52

    725 772 30.00 30.00 29.70 29.90 3.00 9.97

    750 750 0.00 0.00 0.00 0.00 3.00 0.00

    772 725 28.70 28.70 28.80 28.73 3.00 9.58800 695 49.60 49.70 49.20 49.50 3.00 16.50

    825 670 52.00 52.00 52.40 52.13 3.00 17.38

    850 650 52.60 52.90 52.90 52.80 3.00 17.60

    A similar test was done on the rotation of the robot at different pulses, with the

    most reliable pulses being chosen as our standard for operation during the next few

    phases of design.

    With a set velocity and turning speed we were able to write a preliminary LabVIEW

    program for the controlling parameters of the robot, which can be found in

    Appendix E: RobotControl.vi. In this program, the user can choose up to five sets of

    directions (distance X at angle Y). When the program was run, the outputs

    included the necessary pulse lengths for pins 12 and 13, as well as the number of

    iterations needed in the for loop:

    Figure 5: RobotControl.vi Front Panel

  • 8/10/2019 Robotic Control With Bluetooth Wireless Communication

    12/28

    12

    The user could then read the output data and type it into the appropriate locations

    in the BASIC Stamp control program. With this program we were able to navigate

    the Boe-Bot along any of the four pre-determined paths, or theoretically, any

    arbitrary path made of straight lines and angles. An example of these programs

    can be found in Appendix F. However, due to the nature of those four paths, it was

    not until later that we learned that this method of programming had major

    limitations. For example, backwards motion was impossible, as were clockwise

    turns. The biggest shortcoming of the program was that it did not communicate

    directly with BASIC Stamp, and therefore could not control the robot in real time.

    Our next goal was to create a LabVIEW program that communicated changes in

    command with BASIC Stamp. The exchange of information between the two

    programs relies on Bluetooth communication, which will be discussed in-depth in

    following sections.

    We utilized a LabVIEW program that replicated a 9-button keypad on the Front

    Panel. The user interface allows the operator to depress a button corresponding to

    the desired motion command. A series of nested True/False statements ensures

    that the correct numeric command (0 through 8) is associated with the depression

    of each button. LabVIEW outputs the numeric command to Bluetooth and

    eventually to the BASIC Stamp, and also displays the appropriate pulse widths on

    indicators. The LabVIEW program can be found in Appendix G.

    We were able to establish and maintain a wireless connection; however, we were

    not able to fluidly control the robot. In contrast to the smooth movement achieved

    using HyperTerminal, the LabVIEW control results in a pause between each

    command that leads to a very jerky motion.

    Activity 4: Wireless Communication

    We began working with Bluetooth technology by testing the communication

    between the wireless adapter and BASIC Stamp. We created a connection in

    HyperTerminal that was specific to the COM port being used by our DBT-120

    adapter and our groups eb500 wireless card. This involved installing the Bluetooth

    driver, establishing a connection to the wireless card, and determining the outgoing

    COM port from the computer to the wireless system. By using the receive.bs2

    program provided by A7 Engineering, we verified the wireless connection by typing

    text into HyperTerminal and seeing it reflected in BASIC Stamps debug window:

  • 8/10/2019 Robotic Control With Bluetooth Wireless Communication

    13/28

    13

    '{$STAMP BS2}szData VAR Byte(20)'Wait for the eb500 radio to be readyPAUSE 1000

    Main:SERIN 0,84,[STR szData\20\CR]DEBUG STR szData,CRGOTO Main

    Figure 5: Communication between HyperTerminal and BASIC Stamp

    Once we were certain that HyperTerminal could communicate effectively with BASIC

    Stamp, we developed a BASIC Stamp program that could control the Boe-Bots

    motion using numeric inputs from the keyboard. We began with a simple programthat could move the robot forward, backward, and turn left and right using the

    number keys 1, 2, 3, and 4. We took advantage of the BRANCH command within

    BASIC Stamp to link each number key to a motion instruction.

    We then modified the program to allow for better control over the Boe-Bots motion.

    The new program allows the user to type on the 9-button keypad on the right side of

    a desktop keyboard and employ nine different motion instructions:

    1 = Slow Left Turn

    4 = Medium Left Turn

    7 = Quick Left Turn

    8 = Forward9 = Quick Right Turn

    6 = Medium Right Turn

    3 = Slow Right Turn

    2 = Backward

    5 = Hold Position

    Figure 6: Numeric Key Pad Control

  • 8/10/2019 Robotic Control With Bluetooth Wireless Communication

    14/28

    14

    The reason for enabling the user to choose between three different speeds of

    rotation was to provide greater flexibility in movement and easier correction when

    examining the Boe-Bots feedback. The entire BASIC Stamp program can be found

    in Appendix H.

    Our final challenge was to integrate wireless control into the LabVIEW program

    described in the above section. LabVIEW could recognize the eb500 card through

    the Bluetooth Service Discovery sub-vi. We used the Bluetooth Open Connection

    and Bluetooth Write sub-vis to send the user-input commands through the wireless

    system to the BASIC Stamp. The commands were in the form of nine buttons on

    the LabVIEW Front Panel as shown below:

    Figure 7: LabVIEW User Graphical Interface

    This program involves the same type of command input as HyperTerminal, but

    instead of using the keyboard, the user clicks on the LabVIEW buttons. In contrast

    to the smooth control achieved using HyperTerminal, the LabVIEW program caused

    the Boe-Bot to move with a jerky motion.

    V. Analysis of Results

    The group achieved varying levels of success with the different parts of this project.

    In the early stages, we were quite pleased with our progress. The assembly and

    actuation of the Boe-Bot went as planned, and we were able to gain a good

    understanding of the workings of the robot as we worked with its servo motors and

    learned its programming language. Our calibration results easily fit to a linear

    function with an R2value that was very close to one, convincing us that the

    calibration stage of the project was done correctly.

    We encountered difficulty when we began working with the Bluetooth wireless

    communication, but took these challenges in stride. Using a completely new piece

    of technology with few given resources was a new concept to all members of the

    group. We were very pleased with our success in establishing wireless

  • 8/10/2019 Robotic Control With Bluetooth Wireless Communication

    15/28

    15

    communication between the Boe-Bot and HyperTerminal. The BASIC Stamp

    program we developed to manipulate the Boe-Bot with the keypad through

    HyperTerminal works almost flawlessly, the limiting factor being the strength of the

    connection between the DBT-120 and the eb500 card. The results from using

    HyperTerminal were quite better than we had expected. During this stage, we were

    able to showcase our knowledge of how different pulse widths can be used to fine-

    tune the movement of the Boe-Bot.

    The group was less pleased with a few other aspects of the project. We had

    moderate success controlling the Boe-Bot with LabVIEW. Our program allows the

    user to press a button corresponding to a motion command, and the robot does

    respond. However, the motion of the robot is very jerky, and there is a one-second

    delay between the issuance of the command and the response of the robot. Due to

    time constraints, we were unable to ultimately discover and correct this flaw. One

    possibility for this drawback is that the BASIC Stamp is being over-loaded with data

    sent over the wireless connection. Another source of the glitch could be in the

    LabVIEW program itself; perhaps the program is configured such that it is

    connecting to the Bluetooth card each time the for loop is executed. The group is

    anxious to hear how other students have configured their programs and to discover

    how we can improve our LabVIEW control.

    We are also disappointed that we were unable to get wireless feedback from the

    gyroscope. In theory, we would use an analog-to-digital converter to switch the

    analog output voltage from the gyroscope to a digital value. This digital value could

    then be sent via Bluetooth to LabVIEW. After calibration of the ADC, we would have

    an expression to convert digital values back to gyroscope voltage. We could then

    continually collect feedback data and use the equation obtained during calibration

    to integrate these voltages and establish the true angular position of the Boe-Bot.

    The group attempted to transmit gyroscope data using a National SemiconductorADC0804LCN chip, but with no success. A test of the ADC chip, meant to display

    digital values as a set of binary LEDs, produced no result. Due to time constraints,

    we were forced to abandon our quest for wireless feedback and focus on controlling

    the motion of the Boe-Bot.

    VI. Conclusion

    We successfully tied together a lot of ideas and techniques that we had learned

    throughout the course of ME 224. Our group successfully assembled, centered, and

    calibrated a Boe-Bot, and used Bluetooth technology to communicate with andmanipulate the motion of the robot. We used some techniques, such as LabVIEW

    programming, that we had been working on throughout the quarter. We also

    became familiar with a number of new aspects of technology, like BASIC Stamp,

    HyperTerminal, and Bluetooth. Although we were unable to incorporate wireless

    feedback in this project, we did accomplish our goal of learning more about the

    benefit of feedback systems, the need for analog-to-digital conversion, and how

    calibration of a component can help to integrate it into a control system.

  • 8/10/2019 Robotic Control With Bluetooth Wireless Communication

    16/28

    16

    The group has some ideas for future study of the topics involved in this project. For

    one, it would be interesting to see if, given what we now know about wireless

    communication, obtaining feedback is possible. Future project groups may be able

    to establish wireless communication faster than we did if they examine the steps

    that we took. Armed with that extra time, they may be able to accomplish what we

    could not. Another interesting thing would be to incorporate some other features

    onto the Boe-Bot. For example, the goal of the project could be to control the Boe-

    Bot wirelessly with LabVIEW and make it pop a balloon or collect objects around the

    room. As we learn more about how to move the Boe-Bot, future students can use

    that knowledge, expanding the possibilities of what can be accomplished during the

    few short weeks of this project.

  • 8/10/2019 Robotic Control With Bluetooth Wireless Communication

    17/28

    17

    VII. References

    Ahmadi, Alex; Hoffman, John; Huertas, Andres; Meruani, Azeem; Singer, Simcha.

    Robotic Control with Gyroscopic Sensing. Final Project ME 224, Prof.

    Horacio Espinosa. 06 June 2004.

    Armstrong, Kendra; Eccles, Nick; Maguire, Cary; Taam, Alex; Williams, Paul. Final

    Project Report. Final Project ME 224, Prof. Horacio Espinosa. 09 June

    2005.

    Bluetooth. . 30

    November 2005.

    Bluetooth. . 01 December 2005

    Boe-Bot Robot.

    . 01December 2005.

    Comparing ARobot and Boe-Bot.

    . 01 December

    2005.

    LabVIEW. . 01 December 2005.

    Lovsin, James; Morales, Erica; Sheehan, Dan; Widzer, Josh. Path Following Robot

    with Gyroscopic Sensing. Final Project ME 224, Prof. Horacio Espinosa.

    10 June 2005.

    What is Bluetooth? . 30

    November 2005.

  • 8/10/2019 Robotic Control With Bluetooth Wireless Communication

    18/28

    18

    Appendix A: Pre-Determined Rob ot Paths

  • 8/10/2019 Robotic Control With Bluetooth Wireless Communication

    19/28

    19

    Appendix B: LabVIEW Program Gyroscop e Calibration

  • 8/10/2019 Robotic Control With Bluetooth Wireless Communication

    20/28

    20

    Appendix C: BASIC Stamp Program Gyroscope Calibration

    ' {$STAMP BS2}' {$PBASIC 2.5}

    DEBUG "PROGRAM RUNNING"

    counter VAR Wordy VAR Wordx VAR Word

    PAUSE 10000

    FOR y = 130 TO 150FOR counter = 1 TO 500

    X = 5 * y

    PULSOUT 12, XPULSOUT 13, XPAUSE 20

    NEXTPAUSE 3000

    NEXT

    PAUSE 1000

    FOR y = 150 TO 170FOR counter = 1 TO 500

    X = 5 * yPULSOUT 12, XPULSOUT 13, XPAUSE 20

    NEXTPAUSE 3000

    NEXT

    DEBUG "Program Finished"

  • 8/10/2019 Robotic Control With Bluetooth Wireless Communication

    21/28

  • 8/10/2019 Robotic Control With Bluetooth Wireless Communication

    22/28

    22

    Appendix E: RobotControl.vi

  • 8/10/2019 Robotic Control With Bluetooth Wireless Communication

    23/28

    23

    Appendix F: BASIC Stam p Program Parallelogram P ath

    ' {$STAMP BS2}' {$PBASIC 2.5}

    DEBUG "PROGRAM RUNNING"

    counter VAR Word

    PAUSE 5000

    'first angle'FOR counter = 1 TO 122' PULSOUT 12, 725' PULSOUT 13, 725' PAUSE 20

    'NEXT

    'first displacementFOR counter = 1 TO 123

    PULSOUT 12, 700PULSOUT 13, 800PAUSE 20

    NEXT

    PAUSE 50

    'second angleFOR counter = 1 TO 20

    PULSOUT 12, 725PULSOUT 13, 725PAUSE 20

    NEXT

    PAUSE 50

    'second displacementFOR counter = 1 TO 123

    PULSOUT 12, 700

    PULSOUT 13, 800PAUSE 20

    NEXT

    PAUSE 50

    'third angleFOR counter = 1 TO 59

  • 8/10/2019 Robotic Control With Bluetooth Wireless Communication

    24/28

    24

    PULSOUT 12, 725PULSOUT 13, 725PAUSE 20

    NEXT

    PAUSE 50

    'third displacementFOR counter = 1 TO 123

    PULSOUT 12, 700PULSOUT 13, 800PAUSE 20

    NEXT

    PAUSE 50

    'fourth angle

    FOR counter = 1 TO 20PULSOUT 12, 725PULSOUT 13, 725PAUSE 20

    NEXT

    PAUSE 50

    'fourth displacementFOR counter = 1 TO 123

    PULSOUT 12, 700

    PULSOUT 13, 800PAUSE 20

    NEXT

    PAUSE 50

    'fifth angleFOR counter = 1 TO 59

    PULSOUT 12, 725PULSOUT 13, 725PAUSE 20

    NEXT

    PAUSE 50

  • 8/10/2019 Robotic Control With Bluetooth Wireless Communication

    25/28

    25

    Appendix G: Final LabVIEW W ireless Boe-Bot Control Program

    Block Diagram: False = button not pressed (both pulses = 750)

  • 8/10/2019 Robotic Control With Bluetooth Wireless Communication

    26/28

    26

    Block Diagram: True = button pressed (proper command and pulse widths given as

    outputs)

  • 8/10/2019 Robotic Control With Bluetooth Wireless Communication

    27/28

    27

    Appendix H: Final BASIC Stamp p rogram M ultiple-Speed Control

    '{$STAMP BS2}LOW 12LOW 13

    LMotor CON 12RMotor CON 13

    CmdData VAR ByteDEBUG "connecting",CRConnect:PAUSE 1000SEROUT 1,84,["con 00:OC:84:00:0C:A6",CR]DEBUG "connected, attempt commands",CR

    Main:SERIN 0,84,[DEC1 CmdData]DEBUG DEC1 CmdDataBRANCH CmdData,[Hold, slowleft, back, slowright, left,

    hold, right, fastleft, go, fastright]GOTO Main

    slowleft:PULSOUT LMotor,725PULSOUT RMotor,725SEROUT 1,84,["slow left "]GOTO Main

    back:PULSOUT LMotor,650PULSOUT RMotor,850SEROUT 1,84,["retreat! "]GOTO Main

    slowright:PULSOUT LMotor,775PULSOUT RMotor,775SEROUT 1,84,["slow right "]

    GOTO Main

    left:PULSOUT LMotor,688PULSOUT RMotor,688SEROUT 1,84,["left "]GOTO Main

  • 8/10/2019 Robotic Control With Bluetooth Wireless Communication

    28/28

    right:PULSOUT LMotor,813PULSOUT RMotor,813SEROUT 1,84,["right "]GOTO Main

    fastleft:PULSOUT LMotor,650PULSOUT RMotor,650SEROUT 1,84,["quick left "]GOTO Main

    go:PULSOUT LMotor,850PULSOUT RMotor,650SEROUT 1,84,["go! "]GOTO Main

    fastright:PULSOUT LMotor,850PULSOUT RMotor,850SEROUT 1,84,["quick right "]GOTO Main

    Hold:SEROUT 1,84,["hold position "]GOTO Main