DT03 Design Report

download DT03 Design Report

of 67

Transcript of DT03 Design Report

  • 8/9/2019 DT03 Design Report

    1/67

    Fire-Fighting Robot

    Project Design Report

    Design Team 3

    Joseph M. McGlinchy

    Matthew J. Taschner

    Thomas V. Vo

    Faculty Advisor

    Dr. Tom Hartley

    December 3, 2007

  • 8/9/2019 DT03 Design Report

    2/67

    Table of Contents

    Table of Contents................................................................................................................ iiTable of Figures ................................................................................................................. ivTable of Tables ................................................................................................................... vAbstract ............................................................................................................................... 1

    Introduction......................................................................................................................... 1Statement of Need........................................................................................................... 1Problem Definition...................................................................................................... 1Goals ........................................................................................................................... 1Objectives ................................................................................................................... 1Constraints .................................................................................................................. 2

    Design Specifications.......................................................................................................... 2Power System.................................................................................................................. 2Mechanical Specifications .............................................................................................. 2Sensors ............................................................................................................................ 2Actuator........................................................................................................................... 3

    Locomotion ..................................................................................................................... 3Alternative Design Analysis ............................................................................................... 3Robot Body ..................................................................................................................... 3

    Modifying Commercial RC Vehicle........................................................................... 3Custom Design............................................................................................................ 3

    Power System.................................................................................................................. 4One Supply.................................................................................................................. 4Two Supplies .............................................................................................................. 4Three Supplies ............................................................................................................ 5

    Motor Drive System........................................................................................................ 5Motors............................................................................................................................. 5

    DC Geared Motors...................................................................................................... 5RC Servo Motors ........................................................................................................ 6Stepper Motors............................................................................................................ 6

    Speed Controllers............................................................................................................ 6Pre-made Controllers .................................................................................................. 6Self-made Controllers ................................................................................................. 7Proximity Sensors ....................................................................................................... 7Ultrasonic.................................................................................................................... 7Infrared........................................................................................................................ 7Method Selected.......................................................................................................... 8

    Line Detector .................................................................................................................. 8Line Detector Package ................................................................................................ 8Photodiode and LED................................................................................................... 8

    Flame Detector................................................................................................................ 9Camera ........................................................................................................................ 9Infrared........................................................................................................................ 9Ultraviolet Detector .................................................................................................... 9

    Audio Detector.............................................................................................................. 10Commercial Product ................................................................................................. 10

    ii

  • 8/9/2019 DT03 Design Report

    3/67

    Custom Design.......................................................................................................... 10Flame Extinguisher System .......................................................................................... 10

    Water Pump Bottle and Linear Actuator .................................................................. 10Pressured 12 Ounce CO2 Tank and Linear Actuator................................................. 11Air Compressor, Water and Solenoid Valve............................................................. 11

    Microcontroller ............................................................................................................. 11Holocon..................................................................................................................... 11Other Microcontroller ............................................................................................... 12

    Accepted Technical Design .............................................................................................. 12Power System................................................................................................................ 12Motor Specifications..................................................................................................... 13Motor Control ............................................................................................................... 15Sensors .......................................................................................................................... 17Audio Detector.............................................................................................................. 17Ultrasonic Sensors ........................................................................................................ 21Infrared Rangers............................................................................................................ 23

    White Line Detector...................................................................................................... 24Flame Detection Sensors............................................................................................... 27Digital Compass............................................................................................................ 29Fire Extinguisher........................................................................................................... 31Software ........................................................................................................................ 33Pseudo Code.................................................................................................................. 36Main Loop..................................................................................................................... 36Entering Room Algorithm ............................................................................................ 37Leave Room Algorithm ................................................................................................ 37Flame Locate and Extinguish Algorithm...................................................................... 37Return Home Algorithm ............................................................................................... 38Robot Body Construction and Layout .......................................................................... 38

    Testing Procedures............................................................................................................ 45Drive System................................................................................................................. 45Audio Signal Detection................................................................................................. 46Linear Actuator Testing ................................................................................................ 46White Line Detection.................................................................................................... 47Flame Detection ............................................................................................................ 47Digital Compass............................................................................................................ 48Ultrasonic Rangers........................................................................................................ 49Infrared.......................................................................................................................... 49System Testing.............................................................................................................. 49Schematics .................................................................................................................... 50

    Financial Budget ............................................................................................................... 53Labor Cost..................................................................................................................... 53Material Cost................................................................................................................. 53

    Project Schedule................................................................................................................ 56Design Team Information................................................................................................. 60Conclusions and Recommendations ................................................................................. 60References and Acknowledgments ................................................................................... 60

    iii

  • 8/9/2019 DT03 Design Report

    4/67

    Table of Figures

    Figure 1: Different curve relationships for the Transmotec 12V motor .......................... 14Figure 2: Transmotoec SD3729 spur DC gear motor with encoder option ..................... 15

    Figure 3: Output waveform of the motor's encoders in digital form ............................... 15Figure 4: H-Bridge Schematic for control of DC motors ................................................ 16Figure 5: One cycle of a Pulse Width Modulation (PWM) signal................................... 17Figure 6: Circuit used for detecting tone between 3-4kHz to start robot.......................... 17Figure 7: Frequency response for bandpass filter sub-circuit........................................... 20Figure 8: 3.5 kHz, 3Vptp waveform input to 4th stage; peak detector output between2.7V and 3V...................................................................................................................... 21Figure 9: SRF05 Timing Diagram with Trigger and Echo on the same line, courtesy ofRobot Electronics.............................................................................................................. 22Figure 10 Pinout for Devantech SRF05 Ultrasonic Ranger, courtesy of Robot Electronics........................................................................................................................................... 22

    Figure 11: Output voltage characteristic of Sharp GP2D120, courtesy of Acroname...... 24Figure 12: Circuit schematic for detecting a white line.................................................... 25Figure 13: White line detector layout on bottom of robot ................................................ 26Figure 14: Photodiode Spectral Responsivity, courtesy of Texas Advanced OpticalSolutions ........................................................................................................................... 26Figure 15: Sensitivity pattern for Hamamatsu UVTRON Flame Sensor, courtesy ofHamamatsu ....................................................................................................................... 27Figure 16: Simplified block diagram of drive circuit used to implement HamamatsuUVTRON R2868 Flame Detector, courtesy of Hamamatsu ............................................ 27Figure 17: Sensitivity Diagram for LTR-4206E NPN phototransistor, courtesy of Lite-OnElectronics......................................................................................................................... 28

    Figure 18: Layout of 3 VIRFL flame detectors on second level of robot......................... 29Figure 19: Example of a CO2 bike pump to be used as the flame extinguisher courtesy ofwww.cyclesense.co.uk ...................................................................................................... 31Figure 20: General picture of actuator and bike pump configuration.............................. 32Figure 21: Actuator schematic displaying relay model and DC solenoid ....................... 32Figure 22: Internal schematic of the WRC4-OB5S relay courtesy of www.wrcakron.com........................................................................................................................................... 33Figure 23: Message format from Holocon to PIC33F that contains a direction anddistance command............................................................................................................. 34Figure 24: Message format from PIC33F to Holocon that confirms that given distanceand direction have been traveled....................................................................................... 35

    Figure 25: House model arena divided into grids............................................................. 35Figure 26: Wheel to be used on robot courtesy of www.trossenrobotics.com ................ 39Figure 27: Hub insert for wheel bore with 1/8" keyway courtesy ofwww.trossenrobotics.com................................................................................................. 40Figure 28: Physical design of H-Bridge on heat sink connected to controller ................ 41Figure 29: Overall 3-D View of robot. ............................................................................. 42Figure 30: View of robot from the front of robot ............................................................. 43Figure 31: View of robot from the side with typical candle length.................................. 44

    iv

  • 8/9/2019 DT03 Design Report

    5/67

    Figure 32: View of robot from the top.............................................................................. 44Figure 33: View from bottom of robot ............................................................................. 45Figure 34: Higher level schematic for sensor connections ............................................... 50Figure 35: Higher level schematic for sensor/actuator connections to microcontrollers.. 51Figure 36: Circuit Diagram for H-Bridge ......................................................................... 52

    Figure 37: Circuit Diagram for Audio Detection Circuit.................................................. 53Figure 38: Design Gantt Chart for project. ....................................................................... 58Figure 39: Implementation Gantt Chart for project ......................................................... 59

    Table of Tables

    Table 1: Power calculations for all components .............................................................. 13Table 2: Values for bandpass filter sub-circuit................................................................. 19Table 3: Summary of commands sent by host microcontroller to HMC6352, courtesy ofHoneywell ......................................................................................................................... 30

    Table 4: Direction commands with corresponding values given from Holocon to PIC33F............................................................................................................................................ 34Table 5: Wheel Specifications ......................................................................................... 39

    v

  • 8/9/2019 DT03 Design Report

    6/67

    Abstract

    Trinity College hosts an annual Robot Fire-Fighting contest drawing participants fromaround the world. The contestants vary in age, skill level, and experience, ranging from

    middle school students, college students, professors and all other robot enthusiasts. Thepurpose of this contest is to simulate the real-world operation of an autonomous robotproviding a fire protection function in a house. The situation being simulated is a robotinside a home responding to a smoke detector going off by searching the house for a fireand putting it out as fast as possible. The contest is used as an educational tool whilesimultaneously promoting advancements in the field of robotics. This robot will first beactivated by a smoke alarm signal, which then will proceed throughout the mockhousehold and search for a flame. Upon finding the flame, the robot will extinguish it byactuating a pressurized CO2 cartridge. Once the flame is out, the robot will return to itsoriginal starting position in the quickest amount of time possible. There is no weightrestriction for this robot, but in order to maximize its speed and performance the robot

    will be light and small in size.

    Introduction

    Statement of Need

    Trinity College hosts a competition that challenges participants to come up withnew innovative ideas to provide a fire fighting protection function to a home orwarehouse through the use of robotics. A robot must be constructed to navigatethrough a mock household and extinguish a flame.

    Problem Definition

    Goals

    A robot that will have the capabilities of locating a flame in a mockhousehold (represented by a 248 cm by 248 cm maze-like arena),extinguish the flame, and then return to the starting position. The robotwill consist of a flame detection device, wall proximity devices,locomotion, and a device capable of extinguishing the flame.

    Objectives

    The robot must be able to navigate through the arena and search for aflame in a random room. Upon locating the flame, the robot must be ableto put it out using some type of extinguishing device and then return to itsoriginal starting location in the arena. Size of the robot must be ofconsideration, but weight is not an issue.

    1

  • 8/9/2019 DT03 Design Report

    7/67

    Constraints

    The robot must be capable of performing these actions within the shortestamount of time possible. It has a maximum of 5 minutes to perform a runin the arena. The robot must not mark or damage any of the walls in the

    arena. It cannot get stuck in a continuous loop more than 5 times. Therobot has no weight restriction, but it must be capable of fitting into a 31cm long by 31 cm wide by 27 cm high box.

    Design Specifications

    Power System

    The entire robot will be supplied by 3 packs of rechargeable Lithium Ion batteries.All of these power supplies will be at a potential of 14.8V. The motors beingused take 12VDC, so this voltage must be stepped down in order for the motors to

    operate at their nominal voltage. Also, the 14.8V must be stepped down to 3.3Vfor the controller of the motors as well as to 5V for the sensors. Two of thesesupplies will be used for each individual motor while the other supply will beused for the rest of the components. The robot must be capable of performing allof its actions for up to an hour. This means the supplies must have a totalcapacity to support this specification.

    Mechanical Specifications

    Since there is a time limit (5 minutes) to each run in the arena, the robot must beable to move quickly and efficiently. The maximum speed that robot will be

    designed to move will be 5 ft/sec. The robot will be constructed with the thoughtin mind that the arena has corners in which the robot has the potential to get stuckin. Therefore, the body will be circular and the robot will have a zero degreeturning radius. There is no weight limit for the competition, but keeping the robotlight will give the robot more speed and agility. The size of the robot must alsobe considered since it must be able to fit in a box measuring 31 cm long by 31 cmwide by 27 cm high. Also, the robot will have a plow in the front to discardobjects in its path.

    Sensors

    Ultrasonic range finders and infrared range finders will be used on all sides ofthe robot in order to detect the presence of a wall. Range: 2cm 4m Three IR flame sensors and a UV sensor will be mounted on the front of robot

    in order to detect the presence of a flame. Range: 0 to 1.2m

    A photodiode and LED circuit will be placed on the underside of the robot sothat it can detect the white lines marking the entrance to each room of thearena as well as the white 30 cm radius solid circle surrounding the candle.

    2

  • 8/9/2019 DT03 Design Report

    8/67

    A digital compass will be used so the robot will know which direction it isfacing and also so it knows the path it has taken.

    Actuator

    There will be only one actuator on the robot so it can extinguish the flame. Sincethere are time reductions given to robots that do not use air flow to put out theflame, a pressurized CO2 cartridge will be used for extinguishing.

    Locomotion

    In order to move about the arena, the robot will consist of two DC geared motors.Geared motors are being used in order to produce the right amount of torque. Theweight of the robot is estimated to be about 20 pounds. With this in mind, as wellas 4 inch diameter wheels, these motors need to produce at least 0.0375 - 0.0625

    ft-lbs of torque for each size wheel respectively. The motor needs to be able toproduce speeds up to 290 RPM.

    Alternative Design Analysis

    Robot Body

    There are no constraints on what the body may be constructed out of. However, aheavy robot will be less agile. Another consideration would be to make the robotbody round. A round body, as opposed to a square body, will help to ensure thatthe robot does not get stuck in a corner.

    Modifying Commercial RC Vehicle

    Initially, the idea of purchasing a commercial RC vehicle and modifyingits base to use for the robots body was more attractive because lessmechanical design would be required. This however, limits the design ofthe body to what is available on the market. This option involvesspending time tracking down a best fit RC vehicle that offers theflexibility to retrofit various robot components to it. Anotherconsideration for this option is whether the drive system on the RC vehiclewould require modification or if it would need to be replaced altogether.

    It most likely would need modification since most RC vehicles aredesigned to move at fast speeds and not with high torque.

    Custom Design

    This option offers complete flexibility, which includes the exact shape ofthe robot and the materials used in construction and placement of

    3

  • 8/9/2019 DT03 Design Report

    9/67

    platforms required for the various components. This option includesmore mechanical labor but the robot body will be constructed exactly asdesired.

    Method Selected

    Finding an RC vehicle that is round and that can be modified to mount thecomponents required would be more difficult. Custom design was themethod chosen because it will allow for a more efficient robot bodydesign.

    Power System

    The power system is one of the most important systems for the design of therobot. This is the system that will supply power to all of the different componentson the robot including the sensors, actuators, microcontroller, and motor drive

    system. The power supply that is going to be used to operate the robot will be inthe form of rechargeable batteries: one, two, or three separate packs.

    One Supply

    Each one of these alternative designs consists of both pros and cons.When utilizing only one battery pack, the overall weight and space of therobot will be low. The single supply would distribute the power to all ofthe elements of the robot directly or through regulators and/or voltagedivider circuits. Since there is only one supply, the worries of charging,

    status updates, and electrical and mechanical connections would bereduced. However, the main problem with this design is the noisegenerated from the motors and actuators that potentially would affect thesensors readings as well as the microcontroller itself.

    Two Supplies

    Using two separate battery packs for the robot would greatly reduce theworries of noise from the motors and actuators affecting the sensors andcontroller. Ideally, the noise would have no affect on the sensors with two

    supplies. One supply would be used just for the motor drive system whilethe other supply would contribute to the sensors, actuators, andmicrocontroller. The down side to this design is the fact that having moresupplies means having a heavier robot. There is no weight limit on therobot, but there is a size constraint. Having more than one supplyindicates that more space is required as well as more physical connections.

    4

  • 8/9/2019 DT03 Design Report

    10/67

    Three Supplies

    Lastly, the use of three supplies for the robot will be considered. Onebattery pack would operate the motor drive system, another would supplythe sensors and microcontroller, and the third used specifically for the

    actuators. Again, the factors that must be considered here are weight andspace. Obviously the more supplies that the robot would have the heavierit will be as well as more room being consumed.

    Method Selected

    Using the two separate supplies as described above is the best alternativehere. The only reason that three supplies were even considered is the factthat the actuator could generate noise that might affect the sensors andmicrocontroller. However, this will not be an issue because there is onlyone actuator being used to extinguish the flame. Even if this actuator were

    to produce noise, the sensors would not be affected because they wouldnot be taking any readings during actuation. Once the sensors detect thefire, the microcontroller would send a signal to the actuator to extinguishthe flame and the sensors would not be needed at that time. Therefore,three supplies would be overdoing it while two supplies would be enoughso that the noise from the motors would not be an issue for the sensors.

    Motor Drive System

    The motor drive system is also one of the more important systems for this fire-fighting robot. Without this system, the robot would clearly not be able to move.

    The two parts of this system consist of the speed controllers and the actual motorsthemselves.

    Motors

    DC Geared Motors

    DC geared motors are a good option because they can easily be controlled.The microcontroller itself would not be able to control these motorsdirectly, which is where separate speed controllers would be used. Themicrocontroller would send information to the speed controller, which in

    turn would tell the DC motors what to do. Also, the motors are suppliedwith attached encoders. The data from the encoder can tell themicrocontroller exactly how far the attached wheel has been displaced.

    These motors are reversible, in that they can operate in both forward andreverse directions. The main purpose of the geared motors is to be able togenerate more torque rather than more speed. The robot is not going to

    5

  • 8/9/2019 DT03 Design Report

    11/67

    have to move very fast, but it will have to have enough strength to beable to accelerate and decelerate quickly.

    RC Servo Motors

    Servo motors are very common in the field of robotics, especially smallrobots. The advantage of having servo motors is that a separate speedcontroller would not be needed. These motors operate through the use of pulse width modulation by receiving certain frequencies of pulses toposition the shaft. Conversely, since full travel of these motors is typically

    180, they would have to be modified in order for continuous travel. Also,these motors are generally slower and less powerful than a DC motor.

    Stepper Motors

    Stepper motors are very similar to servo motors, in that they receivecommands from the microcontroller and move to a specific location.These motors would not need the use of encoders because the controllerwould already know the location of the motor shaft. However, thesemotors are capable of skipping steps, which would cause the controller tothink the motor is in one step when it is actually in another. Also, thereare more wires involved with a stepper motor than a DC motor; each ofthe wires would be used to drive a coil within the motor.

    Method Selected

    Looking at these three possibilities, the best choice seems to be the DCgeared motors. These motors can easily be controlled and will also givethe desired torque and speed needed to drive the robot.

    Speed Controllers

    Pre-made Controllers

    Some other person or company that has already made speed controllerscan easily be purchased. They have already been tested and it is known

    that they will do the job required. One of the cons to these controllers isthe fact that it will require some time to understand exactly how theyoperate. Once this is determined, they will be very helpful and useful.There are controllers out there that have feedback imbedded in the logic sothat they can know what the motor is actually doing. These would be veryuseful for DC motors, but can be rather expensive.

    6

  • 8/9/2019 DT03 Design Report

    12/67

    Self-made Controllers

    When designing ones own controller to operate a motor, much time andeffort are needed. Not that time and effort arent needed for pre-madecontrollers, but some time is required in the actual design. For this design,

    a simple H-bridge would be constructed using transistors. Thesetransistors would have to be able to sustain a certain range of current andvoltage. Also, without feedback it is impossible to know what the motoris actually doing. So, encoders would have to be used for the motorfeedback. The advantage of one designing a speed controller is that theywill know exactly how it works when it is finished.

    Method Selected

    Both of these alternative design techniques are very useful and practical.However, constructing an H-Bridge and using a microcontroller to control

    the transistors seems to be the best choice. It is quite simple to determinehow the transistors will operate and which transistors need to be on atwhat time.

    Sensors

    Proximity Sensors

    Sensors will be needed for the robot to determine how close it to a wall so it canadjust its position when necessary. Also, it will need to be able to tell when thereis a gap in the wall so it will know when a room is present, or if it needs to turn a

    certain direction. To accomplish this, the following options were considered.

    Ultrasonic

    Using sonar is a technique that will be useful when detecting distances thatare directly in front of the sensor. Most of the ultrasonic sensors looked atare able to detect distances a minimum of 3cm to a maximum of 4m.Also, they are less sensitive to ambient noise, such as lighting or radiation.

    Infrared

    Infrared rangers that use triangulation as a means of sensing a distancewould be very useful. First of all, it would provide data that could quicklybe calculated to determine how far away an object is. Along with that, theangle of reflection created by the IR beam and the object is also known.Minimum detection distances range from 0cm to approximately 10cm.Maximum detection distances range from 80cm to approximately 151cm.These IR sensors are also fairly inexpensive, but can be susceptible to

    7

  • 8/9/2019 DT03 Design Report

    13/67

    ambient lighting and radiation, such as that emitted by a camera, whichmay be filming the robots run.

    Method Selected

    Using IR rangers posted at various points on the robot body seemed likethe most cost effective method for the robot to detect its surroundings. But because of the surrounding environment, these would be best suited forclose range detection. Therefore, they will be used to keep the robotaligned properly while navigating hallways and from coming into directcontact with walls. Additionally, the use of sonar will be most efficient indetermining when there is adequate space in front of the robot for it tomove forward. Hence, an ultrasonic ranger will be mounted on the frontof the robot, with IR sensors on each side and also on the front of therobot.

    Line Detector

    At the entrance of every room in the arena, there is a line of white tape that 2.5cmwide. The robot will be able to detect this line, and enter its algorithm ofsweeping the room for the candle. To allow for this, the following options wereconsidered.

    Line Detector Package

    The Lynxmotion single-line detector is a reflective IR sensor that outputsa high or low voltage signal depending on the shade of the surface it is positioned over. It is made with an 8 connector that can plug directlyinto digital I/O ports of most microcontrollers. Its minimum range isapproximately 3mm with a maximum range of 12.7mm. These distancesare taken from the floor to the sensor.

    Photodiode and LED

    Using a photodiode with a LED is another option. A photodiode and aLED can be mounted next to each other so the photodiode is constantly

    measuring the wavelength of the reflection the surface provides from theLED. The photodiode would have to be shielded such that no ambientlight interferes with the photodiode.

    Method Selected

    In looking at cost and complexity of the circuit needed for the robot todetect a white line, implementing a custom circuit and allowing the

    8

  • 8/9/2019 DT03 Design Report

    14/67

    microcontroller to process the readings is the better option. It can becalibrated to tell the difference in color of the floor (black) as compared tothe white line. It will be much less expensive than buying the circuit pre-made in a package.

    Flame Detector

    The robot must be able to locate the candle and extinguish it when it is found.The following methods of accomplishing this have been examined.

    Camera

    An IR camera would be able to take a picture of the robots surroundingsin terms of IR radiation. This would require real-time image processing to be able to tell the difference between readings on the image. Theadvantage of using an IR camera is it would allow the robot to take into

    consideration the entire environment, although it may be sensitive toambient radiation such as sunlight and temperature.

    Infrared

    A pyroelectric sensor is specifically sensitive to heat in the form of IRradiation. It has two sensing elements such that the arrangement cancancel signals caused by vibration, temperature changes and sunlight. Abody passing in front of the sensor will activate first one and then the otherelement whereas other sources will affect both elements simultaneouslyand be cancelled. To focus the radiation coming into the sensor, a lens canbe used as well.

    There are also phototransistors which are specifically sensitive to theradiation given off by fire. This is approximately 940nm in the lowinfrared. Implementing these types of phototransistors provides anotheroption to detect the flame.

    Ultraviolet Detector

    A flame detector made by Hamamatsu is sensitive directly to a 185-260nmrange, which is given off by a flame. With this range, it is insensitive tosolar UV radiation. It also has a wide conical range of detection, whichcan be focused using shielding devices.

    Method Selected

    Using an IR camera seems like a very logical choice, but it also seems to be outside the scope of this project. The pyroelectric sensor is a goodchoice for determining the presence of IR radiation, but it works bestwhen the sensing elements are stationary. A phototransistor sensitive tothe low infrared, along with, along with the UV flame detector, can be

    9

  • 8/9/2019 DT03 Design Report

    15/67

    used to zero in on the flame so the robot will know precisely where to goto extinguish it. The method chosen will be a combinational system usinga phototransistors and the Hamamatsu UV flame detector.

    Audio Detector

    The option of starting the robot with a 3 to 4 kHz tone is given for the competitionwith a time reduction as an incentive. This tone represents a smoke detectorgoing off.

    Commercial Product

    Finding an audio detector circuit that is available as a unit and pre-madewould take a considerable amount of time. Anything availablecommercially would cost more since ordering one unit costs more thanbuying in bulk. Also, this would limit any options of modifying the unit

    as needed during testing.

    Custom Design

    Designing and building a band-pass filter tuned to 3-4 kHz with amicrophone input is another option. The values of circuit components canbe calculated and modified if needed to allow for appropriate tuning of thedetector. Also, the sampling rate can be controlled so the tone beingdetected isnt confused a hand clap, whistles or other random signals thathave a duration shorter than what is to be detected. This will allow therobot to self-start given the correct signal.

    Method Selected

    Designing and building an audio detector circuit will be the methodchosen for audio detection. The components are not very expensive(resistors, capacitors, op-amps), and ease of tuning during testing providesadditional incentive for choosing this option.

    Flame Extinguisher System

    After detecting the flame, the goal is to have it extinguished. In order to do this,

    the method chosen must be able to put the flame out in an efficient and repeatablemanner. A fan may be used but a penalty is given since it is not a practical way ofputting out a fire in the real world.

    Water Pump Bottle and Linear Actuator

    This option uses a bottle with a pump spray similar to that of a hairspraybottle. A fixture would then hold the bottle in place with a linear actuator

    10

  • 8/9/2019 DT03 Design Report

    16/67

    mounted on top to compress the pump. A downfall of this option may bethe reliability and consistency of the water coming out of the nozzle.

    Pressured 12 Ounce CO2 Tank and Linear Actuator

    This method would involve taking a commercial product such as a bikepump or air duster that uses the 12 Ounce CO2 cartridges and adding anActuator to activate the commercial product.

    Air Compressor, Water and Solenoid Valve

    This option would use a miniature air compressor, water storage tank, asolenoid valve, and nozzle. This method is more complex than theprevious options but since the entire device would be custom designed, theamount of pressure, the amount of water storage, and the nozzle could bedesigned to desired specifications.

    Method Selected

    Although, the third method would give the most flexibility in its design italso would be more time consuming. Putting out the candle may not needto be that sophisticated. The first method would be the least expensive anda simpler design but would not always be reliable. The pressurized CO2canister method will be chosen since it is a simpler design and offers morereliability.

    Microcontroller

    The microcontroller will be the main computer for the robot. It will process alldata from sensors, apply algorithms to the data, and generate commands for theactuator and motors.

    Holocon

    The Holocon controller was offered as a donation from Western ReserveControls. The Holocon controller was designed for use in industrialapplications. The controller has configurable I/O card slots with manyoptions such as: a thermocouple card, analog I/O card, digital I/O card,

    high-speed counting, and more. It also offers up to 4 serial ports and anEthernet port. The controller is programmed with graphical function blocks. There are pre-made function block libraries that are offered butthere is also the option for custom-defined blocks that can be designed inJava code, Ladder Logic Diagrams, or Structured Text.

    11

  • 8/9/2019 DT03 Design Report

    17/67

    Other Microcontroller

    There are also many other microcontrollers that may be used such as the

    Basic Stamp or the inexpensive PICs. Separate PICs can be usedspecifically for the control over the motors.

    Method Selected

    The Holocon was selected for its ease in programming via the FunctionBlocks. Also Java is the programming language that the team software programmer is most proficient in. The Holocon also offers necessaryhardware onboard such as the ADC for analog inputs. Also in terms ofcost the donation is helpful in keeping the project budget down. Aseparate PIC, designated to only monitor the motors, will also be used.

    Accepted Technical Design

    Power System

    The Fire-Fighting Robot must be capable of performing multiple runs through anarena and be able to stay powered for at least one hour. This robot will not behard wired to a power supply, which is why batteries will be the best option forthis type of application. As described in the Alternative Design Analysis, usingtwo separate battery packs will result in the best performance. The robot would

    be able to perform with only one battery supplying the entire system; howeverthere would be a considerable amount of noise generated from the motors. Thisnoise could and would affect the performance of the sensors used on the robot.

    Lithium-Ion (Li-Ion) batteries will be used as the separate supply specificallydesigned for the motors. Since there will be a supply just for the motor, noiseshould not be a factor in the sensors performance. Each of the two motors willbe controlled by an H-Bridge, described in detail later, and estimated to be pullinga maximum of 5 amps each. Searching for a suitable battery, a 14.8V Li-Ionbattery pack with a 4400mAh rating was determined to be the best option. Twoof these packs will be purchased, one pack for each motor, and an LD1084 5A

    low drop positive voltage regulator will be used to regulate the 14.8V down to12V, since the motors are rated at 12V. Even though the specifications requirethe robot to run for an hour and the motors have the tendency to pull a maximumof 5A, this 4400mAh battery pack will come very close to meeting therequirements. Size of the battery as well as cost must be taken into considerationand this battery met both of those requirements.

    12

  • 8/9/2019 DT03 Design Report

    18/67

    Another 14.8V Li-Ion battery will be used to supply the sensors, microcontrollers,and actuator. However, this battery does not need the same capacity as thesupplies for the motors. The battery that is well capable of supplying thesecomponents the correct amount of power has a capacity of 2600mAh. Again, sizeand cost was considered and this type of battery met these specifications. As seen

    in Table 1, the current drawn by all the sensors, microcontrollers, and actuator isvery small, approximately 1700mA. With the supply being used for thesecomponents, this supply would last close to two hours which meets thespecifications. Since all the sensors have an input rating of 5V, a voltageregulator must be used to step down the 14.8V from the power supply. Anothervoltage regulator must be used to step down the voltage to 3.3V because that iswhat the dsPIC33F microcontroller takes.

    Table 1: Power calculations for all components

    Motor Specifications

    In order to determine what kind of motors would be suitable for the robot,estimations and calculations were performed. The main quantities that must beconsidered are the minimum torque the motors need to produce, the minimumspeed of the shaft, and the power that the motors need to produce. Theestimations that were made were the overall weight of the robot (max 20 lbs), the

    coefficient of rolling friction (on pavement R = 0.015), the desired maximum

    speed of the robot (5ft/sec), and the size of the wheels (4 inch diameter).

    With the numbers given above, the power that the motors would need to producewas calculated to be about 2 W. In order to determine the torque, the angularspeed of the shaft must be known. Using the maximum speed with a 4 inchdiameter wheel, it was found to be 30 radians per second, which results in a speedof about 290 rotations per minute. Taking these numbers, the torque wasdetermined to be 0.05 foot-pounds which is close to 700 gram-centimeters. If the

    13

  • 8/9/2019 DT03 Design Report

    19/67

    wheel size increases, likewise the torque will increase, while the speed of themotor shaft will decrease. These calculations were based on only one motor performing the task of moving the robot. Since two motors will be used, theoverall load will be distributed between the motors cutting the torque in half.This results in a torque of approximately 350 gram-centimeters that each motor

    must be capable of overcoming. Using the numbers calculated for the torque andspeed, a motor capable of these specifications was selected. To obtain the desiredtorque and speed, a geared motor seemed to be the best choice. The motorcharacteristics curve can be seen in Figure 1 obtained from the TransmotecSD3729 datasheet. This graph only depicts the motors characteristics, not themotor with the gears attached. From the SD3729 datasheet, a gear reduction ratioof 1:18 resulted in a rated torque of 680 g-cm and a rated speed of 310 rpmcompared to the rated speed of the motor without the gears, 5100 rpm, and thecorresponding rated torque, 60 g-cm. Choosing a speed relatively close to thespecification of 290 rpm resulted in a rated torque that is about twice the amountneeded. This is an acceptable factor since the motor only needs to be capable of

    producing a minimum torque of 350 g-cm.

    Figure 1: Different curve relationships for the Transmotec 12V motor

    Below, Figure 2 depicts the actual picture of the motor with an encoder optionattached to the backside of it. The main reason that the encoder will be used is inorder to determine the position of the motor. The encoder is an essentialcomponent to the motors because this will communicate with the microcontroller,

    which will keep track of the motors position. It is based on the method ofquadrature encoding, which basically produces two sinusoidal signals usingmagnetic Hall sensors. One signal will lag the other signal by 90 1/6T where Tis the period of the waves. The frequency of these signals is proportional to thespeed of the motor. Inside the encoder is sinusoidal squaring circuitry whichconverts the sine waves to square waves that have the same phase difference asthe analog signals[1]. Figure 3 displays the digital waveforms from the motorsencoder with one signal lagging the other.

    14

  • 8/9/2019 DT03 Design Report

    20/67

    Figure 2: TransmotoecSD3729 spur DC gear motor with encoder option

    Figure 3: Output waveform of the motor's encoders in digital form

    Motor Control

    Motor control is one of the most important concepts that must be considered for

    the robot. Without excellent control over the motors, the robot would not be ableto stop itself once it detects a wall is too close. There are many different methodsto go about controlling the motors, like purchasing pre-made motor controllers.However, it was decided that designing and constructing an H-Bridge would bestbenefit the robot. This option is much cheaper and more reliable and consists oftwo pair of Darlington BJT transistors; NPN and PNP. Below, in Figure 4, is theschematic of the H-Bridge that will control the direction of the motors.

    15

  • 8/9/2019 DT03 Design Report

    21/67

    Q3 Q4

    Q5 Q6

    D1 D2

    D3 D4

    12VDC

    R1

    33k

    R2

    33k

    R3

    1k

    R4

    1k

    Q1 Q2PWM2

    PWM1

    PWM1

    PWM2

    MG1

    DC Motor

    1 2

    Figure 4: H-Bridge Schematic for control of DC motors

    With the estimations of the weight of the entire robot, and the above calculationsfor the torque (350 g-cm), it can be seen in Figure 1 that the current pulled by theSD3729 DC gear motors will be around 2 amps maximum. However, with thegear option, the torque is higher and therefore the current will increase. As aprecaution, the H-Bridge was designed for a maximum of 5 amps being drawn bythe motors. Knowing this, proper Darlington pairs were chosen for the H-Bridge.The PNP Darlington pair that will be used is the TIP147 while the NPNDarlington transistors will be the TIP142. These types of Darlington pairs canwithstand up to 10 amps while dissipating a good amount of heat in the process.That is why a heat sink must be used for all of the Darlington pairs. The resistor

    values at the bases of all the transistors were determined with the assumption that5 amps would be the maximum current flowing through the respective collectors.

    As seen in Figure 4, the PNP Darlington transistors are being controlled by asingle NPN transistor with its collector connected to the base of the PNP. Thisconfiguration allows for only two Pulse Width Modulation (PWM) signals to beapplied to the bases of all the NPN type transistors. As shown, the similar PWMsignals are being applied to the transistors at diagonals to each other. This willallow the current to flow from the 12V supply through the motor and to ground.Applying a PWM signal to corresponding diagonal transistors will allow themotor to spin either clockwise or counterclockwise. Also, it is shown that the

    Darlington pairs all have diodes across their collector-emitter junctions. Whenone of the PWM signals seizes, stored energy in the motors coils will want tocontinue flowing through the circuit. The diodes allow for this current to continueflowing without damaging the transistors in any way. Two of the diagonal diodesbasically act as a free-wheeling diode, circulating the current until it has all beendissipated.?

    16

  • 8/9/2019 DT03 Design Report

    22/67

    The H-Bridge of the motors will be controlled by the dsPIC33F microcontroller,which will be supplying the PWM signals to the bases of the appropriatetransistors. The speed of the motor will be dependent upon the duty cycle of the pulses. As seen in Figure 5, the duty cycle is not the only important factor. The period, T, also plays a role in the motors performance. With too large of a

    period, or too low of frequency, there will be noise generated due to the clashingof the transistor switching frequency with the PWM signals frequency. At higherfrequencies, the motors winding inductance can potentially distort its own speedresponse characteristics. Also, as the frequency goes up, the switching losses ofthe transistors will rise. Taking this into account, a frequency in the range of 20 30 kHz of the PWM signals is desirable [2].

    Figure 5: One cycle of a Pulse Width Modulation (PWM) signal

    Sensors

    Audio Detector

    +5V

    R2

    1k

    R665

    0

    R9

    3kR7

    3

    1

    2

    C50.1u

    0

    0

    D1

    0

    0V

    U1A

    LM324

    1

    3

    2

    4

    11

    OUT

    +

    -

    V+

    V-

    0V

    +5V

    U1BLM324

    7

    5

    6

    4

    11

    OUT

    +

    -

    V+

    V-

    +5V

    R3330

    U1DLM324

    14

    12

    13

    4

    11

    OUT

    +

    -

    V+

    V-

    0V

    +5V

    +5V

    R14.7k

    C6

    0.01

    C3

    1nU1CLM324

    8

    10

    9

    4

    11

    OUT

    +

    -

    V+

    V-

    R11

    100k

    C1

    .01u

    R4

    470k

    R8

    1k

    R10100k

    0V

    R5

    200

    C2

    .01u

    C4

    1n

    0

    MK1

    MICROPHONE

    12

    Figure 6: Circuit used for detecting tone between 3-4kHz to start robot

    The circuit in Figure 6 above is used to detect a 3-4 KHz tone that simulates asmoke alarm in order for the robot to start moving [3]. It is the circuit internal tothe block U12 in the schematic shown in Figure 34. The four op-amps shown areinternal to the LM324 quad op-amp. The numbers under the input pins to the op-

    17

  • 8/9/2019 DT03 Design Report

    23/67

    amps are the pin numbers used in connecting the circuitry to the relevant op-amps. The hemisphere on the left is a schematic symbol for the microphone used,which is an electret condenser microphone. R11 = 4.7k is used as the load forthe microphone, as this is a standard load as referred to by the microphones datasheet. R12 and R13 form a voltage divider to supply a reference voltage for the

    positive inputs to each of the op-amps as these inputs cannot be connecteddirectly to ground. The voltage is obtained from Equation 1 below, with R12 =1k and R13 = 330,

    mVRR

    RVV DD 25

    3301000

    3305

    1312

    13 +

    =+

    =+ [1]

    Each of the sub-circuits are discussed below.

    First Gain Stage

    The input signal to the first stage generated by the microphone is coupled throughC5 = 0.01uF to rid the signal of the DC level provided by the power supply.Since the signal generated by the microphone is on the level of millivolts, it isamplified by U1A by the ratio of R14 to R11. With R14 = 470k and R11 =4.7k, the gain introduced by U1A is 100V/V.

    Bandpass Filter

    U1B is the op-amp associated with the bandpass filter section of this circuit.Signals of frequencies below 3kHz or above 4kHz are not to be considered as a

    viable input to start the robot. To do this, the sub-circuit composed of R15, R16,R17, C6 and C7=C6 is designed to form such a bandpass filter. Using a methodsuggested by Texas Instruments [4], the bandwidth, center frequency of the filter,capacitance, and R5 values are defined by the requirements. The following valueswere chosen:

    =

    ===

    =

    =

    25015

    01.076

    3500

    500

    R

    uFCCC

    Hzf

    B

    o

    Based off these values, the center frequency in rad/s, bandwidth in rad/s, R16, and

    R17 were determined based off the following equations:

    18

  • 8/9/2019 DT03 Design Report

    24/67

    1617

    116||15

    217

    2

    2

    22R

    CRRR

    CR

    B

    f

    o

    oo

    =

    =

    =

    =

    Using the above equations, the values calculated are shown below in Table 2.

    Table 2: Values for bandpass filter sub-circuit

    B 750

    fo 3500

    wo 21991.15

    Brad 4712.389

    C 1.00E-07

    R17 4244.132

    R15||R16 48.7209

    pick

    R15 200

    givesR16 64.41194

    To verify these values provide the necessary frequency response, the sub-circuitwas analyzed to determine its transfer function. After such analysis, thefrequency transfer function was determined to be

    171615

    1615

    17

    2

    15

    1

    )(

    )(

    2

    2

    RRRC

    RR

    RCss

    RCs

    sV

    sV

    i

    o

    +

    +

    +

    = [2]

    This transfer function was plotted in MATLAB and produced the frequencyresponse shown below in Figure 7.

    19

  • 8/9/2019 DT03 Design Report

    25/67

    Figure 7: Frequency response for bandpass filter sub-circuit

    The peak response of the filter is shown to be at a frequency of 2.2e+004 rad/s,which corresponds to 3501.41Hz, which is extremely close to 3.5 kHz. The other2 points marked are at 1.88e+004 and 2.51e+004, which correspond to 2992.11Hz and 4090.28 Hz, respectively. This provides a bandpass filter with centerfrequency 3.5 kHz and a bandwidth of 1 kHz which will pass signals of frequencyranging from 3 kHz to 4 kHz without significant attenuation.

    Second Gain Stage

    The next stage is another gain stage, provided by U1C, R18, and R19. This is to

    make sure the signal has a large enough peak to peak value to be detected by themicrocontroller. This gain does not need to be as large as the first gain stage; theratio of R19 to R18 is decided to be 3, thus the resistors used were 3k and 1k,respectively. Thus U1C inverts the signal and amplifies it by 3 V/V.

    Peak Detector

    20

  • 8/9/2019 DT03 Design Report

    26/67

    The last stage of this circuit is a peak detector circuit. The AC signal from the previous stage is coupled into the positive input of U1D. The diode in thefeedback path conducts only during the positive half-cycles of the signal. Thishalf-rectified signal is passed through an RC filter with a time constant sufficientenough for the peak values of the signal to be held at a readable value for the

    microcontroller. The waveform shown below in Figure 8 is a 3.5 kHz +3V peak-to-peak tone with the peak of +3V being held by C9. This in turn will be sampled by an A/D pin on the Holocon microcontroller every 10ms, and a string of 5consecutive samples within the range 2.7

  • 8/9/2019 DT03 Design Report

    27/67

    Figure 9: SRF05 Timing Diagram with Trigger and Echo on the same line,courtesy of Robot Electronics

    The SRF05 has two modes to accomplish this. In the first mode, the echo and

    trigger lines are separate, and thus requires 2 pins from the microcontroller tooperate. To use this mode, the Mode pin on the SRF05 is left unconnected.There is an internal pull-up resistor connected to this pin for use in this mode.

    In the other mode, the trigger and echo lines share a line, cutting the number ofpins needed from the microcontroller in half. The Mode pin on the SRF05 isconnected directly to ground, or the 0V ground pin directly below it. SeeFigure 10 below.

    Figure 10 Pinout for Devantech SRF05 Ultrasonic Ranger, courtesy of RobotElectronics

    What is nice about the SRF05 is the trigger and echo lines both operate on digitalsignals. This allows for direct communication between the Holoconmicrocontroller and each ultrasonic ranger individually. On the other hand, since

    22

  • 8/9/2019 DT03 Design Report

    28/67

    the communication lines are digital, the rangers will not be able to firesimultaneously. They will have to be fired one after the other. To ensure thateach rangers pulses dont interfere with each other, they will be firedsequentially. As a consequence, the Holocon will also need to sequentially readthe echoed pulses.

    Timing is also an issue in firing the rangers sequentially. Using the second modeof operation, the SRF05 waits 700s before raising the echo line high afterreception of the trigger signal. Assuming worst case scenario, the largest distancethese sensors would detect within the competition arena is 3m. Using the givenconversion factor, the longest pulse the echo line would produce is

    or 17.4ms. Thus, the maximum total time, including the wait time between

    trigger and echo mode for the transmission line and the 10s trigger pulse, comesto be 18.11ms. This is the amount of time that needs to be allotted per SRF05.With 4 of these sensors (one mounted on the front, back, and either side) themaximum time to complete one sequence is 72.44ms. During this time, assumingthe robot is moving at a constant speed of 3ft/s, the robot will have moved 2.6inches.

    Infrared Rangers

    To complement the ultrasonic rangers in determining how far away the robot isfrom the walls in the arena, IR rangers will be used. Sharp produces a family ofsuch devices with detection distances encompassing, at a minimum, of 1.5 andup to a maximum of 5 (obviously not the same device). The device chosen forthis project is the Sharp GP2D120, which has a minimum detection distance of1.5 and a maximum of approximately 12. Since the widths of the hallways inthe arena are approximately 18 and the diameter of the robot will be 8, theGP2D120 is an appropriate choice since it will be mounted on the periphery of therobot.

    The sensor takes a continuous distance reading and outputs an analog voltagewhich corresponds to this distance. The output voltage ranges from -0.3V to 0.3Vover the supply voltage. With a supply voltage of +5V, this gives an output rangefrom -0.3V to 5.3V. Typically, the output voltage will really only be in the range0V to 3.2V. A graph, which was obtained from the device datasheet, is shownbelow in Figure 11 [6].

    23

  • 8/9/2019 DT03 Design Report

    29/67

    Figure 11: Output voltage characteristic of Sharp GP2D120, courtesy ofAcroname.

    White Line Detector

    As the contest rules dictate, the entrance to each room is marked by a white lineacross the entrance way and the candle is located in the center of a solid whitecircle 30cm in diameter. Certain algorithms will be dependent upon whether therobot is in a room or a hallway, or if it is close enough to the candle to extinguish

    24

  • 8/9/2019 DT03 Design Report

    30/67

    it. Since the floor of the arena is solid black, a white line should be easy enoughto detect by measuring light being reflected off the surface of the floor.

    The circuit that will be used to accomplish this will consist of a light emitter anddetector. It will be powered by a +5V power supply. This will be done using an

    ultra-bright LED as the emitter. The detector in this circuit will be an ICconsisting of a photodiode and an amplifier. This is the TSL257 made by TexasAdvanced Optoelectronics Solutions. A schematic for this circuit is shown inFigure 12 below [7].

    Figure 12: Circuit schematic for detecting a white line

    To ensure a white surface is being detected, more than one of these circuits willbe implemented so the microcontroller has data to compare from both the left andright side of the robot. A rough drawing of this layout is shown in Figure 13below. To block ambient light from interfering with the detector, the layout will be shielded. The resistor R in Figure 12 above is a current limiting resistor toensure the diode does not burn itself out if the potentiometer is adjusted to itsminimum value. This will be a 100 resistor. The potentiometer is a 10kvariable resistor. The TSL257 outputs a voltage that is directly proportional to

    the light being measured, and this voltage will be sampled by the Holoconmicrocontroller to determine if the robot is passing over a white surface. Sincethe TSL257 is most sensitive to light wavelengths of approximately 700nm, redLEDs will be used since red light has wavelengths that vary from 650-720nm.See Figure 14 below. The output voltage that will be sampled by themicrocontroller will be in the range of Vo=0.1V to 4.5V [

    8].

    25

  • 8/9/2019 DT03 Design Report

    31/67

    Figure 13: White line detector layout on bottom of robot

    Figure 14: Photodiode Spectral Responsivity, courtesy of Texas AdvancedOptical Solutions

    26

  • 8/9/2019 DT03 Design Report

    32/67

    Flame Detection Sensors

    Ultraviolet

    As the robot is navigating its way through the arena, it will be moving past

    entrances to different rooms. To avoid wasting time by moving through eachroom individually, the robot will pause when it detects a room entrance on eitherside of it. It will then receive information from the Hamamatsu UVTRON R2868Flame Sensor as to whether or not a flame is in the periphery of the sensor. Theangular sensitivity of the UVTRON is shown in Figure 15 below [9].

    Figure 15: Sensitivity pattern for Hamamatsu UVTRON Flame Sensor, courtesyof Hamamatsu

    The R2868 itself requires a very high input voltage to operate correctly, on theorder of +350V. Also available from Hamamatsu is a drive circuit that only needs+5V to operate. Internal to this drive circuit is a high voltage DC/DC converterthat supplies the R2868 with the +350V it needs. This voltage will remain

    constant as long as the +5V source used to drive the circuit is constant. Asimplified block diagram of this drive circuit is shown in Figure 16 below [10

    ].

    Figure 16: Simplified block diagram of drive circuit used to implementHamamatsu UVTRON R2868 Flame Detector, courtesy of Hamamatsu

    The output of this circuit will be connected directly to one of the Holoconmicrocontrollers input pins. Since the output signal is already a digital signal,there is no need for A/D conversion. With the output signal being a pulse of

    27

  • 8/9/2019 DT03 Design Report

    33/67

    duration 10ms, the Holocon can count the number of pulses it receives. Whenthis number falls in a defined range, this will tell the controller that the candle ispresent in a nearby room.

    Infrared

    To determine the exact location of the flame once inside the room as decided bythe Hamamatsu UVTRON Flame Detector, three IR sensors will be used. Theseare the VIRFL InfraRed Flame Sensors. Each one is powered by a +5V supplywhich is fed through a 1M potentiometer. The collector of an NPN phototransistor is connected to the pot and the output pin. The emitter isconnected to ground. The output pin is pulled up to +5 volts, and is tied to groundthrough the phototransistor. Output voltage depends on the current through the phototransistor. When the sensor is energized and the potentiometer is fullyturned counterclockwise (allowing for greater sensitivity), the output voltage restsat +2.8V. If a flame is passed in front of the sensor, the output voltage drops to

    the range of +125mV to +200mV. The lowest value is output when the flame isdirectly in front of the sensor. The Holocon microcontroller will be takingconsecutive readings from the sensor, and will compare past and present values.When it reads three values and sees that there is a minimum voltage level, thiswill tell the Holocon that the flame is directly in front of the sensor.

    These sensors have a stable sensing range of 1 to approximately 4, so usingthem exclusively in a room will provide accurate readings. Also, thephototransistors being used have a rather narrow range of sensitivity as can beseen in Figure 17 below [11].

    Figure 17: Sensitivity Diagram for LTR-4206E NPN phototransistor, courtesy ofLite-On Electronics

    Since the field of vision of these infrared sensors is narrow, three of them will be positioned on the front of the robot to allow for a wider field of vision. Thedrawing in Figure 18 below illustrates this.

    28

  • 8/9/2019 DT03 Design Report

    34/67

    Figure 18: Layout of 3 VIRFL flame detectors on second level of robot

    If the leftmost sensor is giving the microcontroller the lowest reading, the robotwill rotate to the left until the middle sensor is giving the lowest reading, and viceversa for the rightmost sensor. When the robot is positioned such that the middlesensor is outputting its lowest voltage, this will tell the robot the flame is directlyin front of it. The robot will move forward towards the flame, and will stop onceit realizes it is inside the white circle which the candle is in the center of. This

    then gives a command to the microcontroller to actuate the flame extinguisher.

    Digital Compass

    To help ensure the robot does not veer too far away from a straight line path, adigital compass will be implemented as an additional sensor unit. This will be theHoneywell HMC6352. It contains two magneto-resistive sensors orientedorthogonally to detect horizontal components of the earths magnetic field, twoamplifiers, a drive circuit, and an internal microprocessor.

    The compass responds to a certain set of command bytes, sent in hexadecimal

    ASCII characters. These are summarized in Table 3 below [

    12

    ].

    29

  • 8/9/2019 DT03 Design Report

    35/67

    Table 3: Summary of commands sent by host microcontroller to HMC6352,courtesy of Honeywell

    The HMC6352 has several operating modes the user can draw on. The operatingmode chosen for this application is continuous mode. The unit performscontinuous measurements and computations at a selected rate of 1 Hz, 5Hz, 10Hz, or 20 Hz. In this particular application, a rate of 5 Hz will suffice for accuratereadings. After each measurement and computation, the output data bytes are alsoupdated. This means that on every READ command, the most recent data will beread by the Holocon microcontroller.

    There are also different output modes the data can be sent in. The mode that willbe used is Heading mode. In Heading mode, the output data is returned in binaryover two bytes. The output data value will be in tenths of degrees in the range of

    zero to 3599.

    The device also will need to be calibrated to reduce the impact of error fromvarious sources. Error can come from the device not being perfectly perpendicular to the gravitational field since it measures only horizontalcomponents of the earths magnetic fields. Also, materials in close proximity thatcan alter the near surrounding magnetic field can also be a viable source for errorin measurements. The DC motors on the robot also produce a magnetic field thatcan interfere with the HMC6352s ability to accurately measure the magneticfield around it. Instructions for calibrating the device to its surroundings areprovided in the device documentation.

    When the robot begins to move, it will be moving to the right and be situated suchthat it is in the middle of the hallway in the arena. The output data associatedwith this state will be defined as the RIGHT value, as it will be moving to theright in the gridded arena shown in Figure 25. The DOWN, LEFT, and UP valueswill correspond to the RIGHT value added with 900, 1800, and 2700 tenths ofdegrees, respectively. These values will then serve as the basis for comparison tothe values that will be read as the robot is moving. Based on what grid the robot

    30

  • 8/9/2019 DT03 Design Report

    36/67

    is going to be in, it will be moving in a certain direction. The HMC6352 willprovide enough data to help keep the robot moving in as close to a straight line aspossible. This is further discussed in the software section of the report.

    Fire Extinguisher

    One of the more important components to this Fire-Fighting Robot is theextinguisher. Without some form of extinguisher, the robot could not be a firefighter. The rules of the contest state that putting the flame out with airflow islegal, but the team will not receive any time reduction with this technique since itis not that practical. Any other form of snuffing the flame will receive a 15%time reduction. The easiest and cleanest method to utilize would be to extinguishthe flame with carbon dioxide, or CO2. A device such as a handheld CO2 bikepump shown in Figure 19 will work very well in this case.

    Figure 19: Example of a CO2 bike pump to be used as the flame extinguisher courtesyof www.cyclesense.co.uk

    In order to pull the trigger of this CO2 bike pump, a linear actuator will be used.A linear DC solenoid attached to one end of a wire with the other end tied to thetrigger of the pump is a simple, but useful solution. A basic drawing of thisconfiguration is shown below in Figure 20. The solenoid will have a wireattached to it as shown and will initiate when the microcontroller sends theextinguish signal. The signal will be applied to the excitation coil of a relay,which will switch in the 12VDC supply to the solenoid. The bike pump will beactive for approximately 1 second allowing enough time duration for the CO2 toextinguish the flame.

    31

  • 8/9/2019 DT03 Design Report

    37/67

    Figure 20: General picture of actuator and bike pump configuration

    As stated above, a relay will be used to switch in 12VDC to the linear DCsolenoid. The schematic for the flame extinguishing actuator can be seen below

    in Figure 21. This is just a model of how the relay will switch in the 12V supplyto the solenoid. Figure 22 displays the actual internal circuitry of the WRC4-OB5S relay. This relay is a solid-state relay in that it has no mechanicalswitching device; no moving parts. The switching occurs through the use oftransistors as shown. Comparing the two figures, Figure 21 and Figure 22, the pinnumbers do not exactly match up. Logic pins 3 and 4 of the WRC4 relay are thesame pins as 1 and 2 of the relay model in Figure 21. Those pins initiate theswitching action. The positive terminal of the solenoid would be connected to pin2 of the WRC4 relay, while the 12V supply would be connected to pin 1. Bothfigures perform the same task but the WRC4 relay is much faster because it is asolid-state relay. The microcontroller that is being used on this robot is aHolocon, which will be supplied by the same company that makes the relay. TheHolocon microcontroller contains this type of relay on one of its breakout boards,which is very convenient.

    U2

    DC Linear Solenoid

    +

    -

    Input f rom Microcontroller U1

    Relay Model

    3

    2

    1

    4

    5

    12VDC

    Figure 21: Actuator schematic displaying relay model and DC solenoid

    32

  • 8/9/2019 DT03 Design Report

    38/67

    Vdc

    LOGIC

    Figure 22: Internal schematic of the WRC4-OB5S relay courtesy ofwww.wrcakron.com

    Software

    The software architecture will be based upon three microcontroller systems aHolocon and two PIC33F processors. The Holocon controller will be the maincontroller for the Robots system and will be used for the robot navigation andreading the various sensors. The two PIC microcontrollers will be used as speedcontrollers, one PIC33F for each of the DC motors. Each motor has an encodersignal coming from it that will be monitored using the Quadrature EncoderInterface (QEI) modules available on the PIC33F parts. Ideally, one PIC33Fwould have been used to control both motors but there were no available singlePIC microprocessors that supported two QEI modules. The PIC33F parts alsohave modules specifically for pulse-width modulated motor control. Using thesemodules as well as the QEI modules will save design time that would have beenspent developing these functions. The second benefit is that the PIC parts willtake the care of the generation of the motor signals and allow the Holocon tofocus more on the navigation algorithms.

    A special serial configuration will be used for communication between the threedevices. In order to simplify the communication between the Holocon and the twoPIC33F parts, the transmit line of the Holocons UART will be connected to eachof the two PIC33F parts UART receive line. The way this configuration works isthat each PIC33F part will receive the same command from the Holocon, but thecommand will be split into two sections, each corresponding with only one of the

    PIC33F parts. In other words, each PIC33F part will look at only one section of acommand and disregard the other. The Holocon will have two receive lines, onefor each UART transmit lines coming from each of the two PIC devices. Everymessage or command between each device will be prefixed with a flag characterfollowed by the actual message.

    The intended operation of the system will be as follows, the Holocon willgenerate new position headings based off of sensor readings (A more detailed

    33

  • 8/9/2019 DT03 Design Report

    39/67

    explanation on how the position headings are calculated will be covered later on).Then the Holocon will give direction and distance commands to each PIC33F in a pre-determined packet format. The packet will consist of: a flag characterrepresented by a ! symbol followed by a byte for direction, and then two more bytes for distance. This can be seen visually in Figure 23. The direction

    commands are assigned values shown in Table 4.

    ! XXXXXXXX XXXXXXXX XXXXXXXX

    Flag Direction Byte Distance MSB Distance LSB

    Figure 23: Message format from Holocon to PIC33F that contains a direction and distancecommand.

    Table 4: Direction commands with corresponding values given from Holocon to PIC33F.

    Direction Command Value

    Forward and Left 0

    Forward and Right 1

    Forward 2

    Reverse and Left 3

    Reverse and Right 4

    Reverse 5

    CCW 6

    CW 7

    Coast Stop 8

    Next, each PIC33F will then parse the incoming serial data command and read only the

    section of the command that belongs to it. It will take this section and parse it further intothe separate direction and distance information. The direction information will beinterpreted and generate the H-bridge logic required to drive the motor in the properdirection. Similarly, the distance information will be interpreted and a pulse widthmodulated signal will be generated for the motor speed. Each motors encoders will bemonitored through the QEI module to provide feedback on the estimated distancetraveled. Each PIC33F will then send a message back to the Holocon to tell it when it iscomplete with the command. The return message to the Holocon will be the same

    34

  • 8/9/2019 DT03 Design Report

    40/67

    distance given to the PIC33F from the Holocon just for confirmation the proper signalwas received. The generalized packet can be seen in Figure 24.

    ! XXXXXXXX XXXXXXXX

    Flag Distance MSB Distance LSB

    Figure 24: Message format from PIC33F to Holocon that confirms that given distance and direction havebeen traveled.

    In order to navigate through the arena, the design team chose to divide the arena intogrids. The grids mapped onto the arena schematic can be seen in Figure 25. Using thegrids concept and the digital compass, ultrasonic sensors, and motor encoders the robotwill be able to determine its location within the arena. Information about each grid will beinput into the robots memory that will include adjacent grids, whether or not that gridcontains a room entrance, or any possible turns it can make. By keeping track of wherethe robot currently is and which direction and the position it is heading, the robot will be

    able to determine which grid that it is in.

    Up

    Down

    RiLeft

    Figure 25: House model arena divided into grids.

    35

  • 8/9/2019 DT03 Design Report

    41/67

    The robot will begin by being placed within grid 1 facing towards grid 2. The Holoconwill be in an initial starting state waiting for the 3-4 kHz signal to activate. Uponactivation the Holocon will first determine the robots starting heading using the digitalcompass from which it will record as the Right direction for the rest of the run. The threeother directions Up, Down and Left will be derived from this initial direction as well. The

    Holocon will measure the robots distance from each wall in the Up, Down, Left andRight directions. Knowing these four values, the Holocon will then calculate the distanceand direction the robot will need to move to the center of grid 2. This information will besent to each PIC33F as mentioned previously. The robot will continue to move from gridto grid in the same manner until it reaches a grid containing a room entrance which willbe grid 7. At this point, denoted by the star in grid 7 ofFigure 25, the front of the robotwill be facing towards the Left direction. The robot will be using the side mountedUVTron Sensor, which at this point will facing in the Up direction, and will quickly scanthe room for ultraviolet rays given off by the candle. If a candle is detected the robot willcontinue with the Entering Room Algorithm, which will be covered later on. If a candleis not detected, the robot will continue on to grid-to-grid as shown by the path shown in

    Figure 25, stopping and checking for a flame at each star icon. If a flame is detected inany room, the robot will go into the Entering Room Algorithm.

    Pseudo Code

    Main Loop

    1. Wait here until a 3-4 kHz signal is detected.2. Right = Get current heading from compass();3. Derive the other directions

    a. Left = Right + 180 degrees;b. Up = Right 90 degrees;c. Down = Right + 90 degrees;

    4. Start the Navigation Loop until robot finds room with flame.5. Measure distance from walls

    a. Measure distance from Up direction wall.b. Measure distance from Down direction wall.c. Measure distance from Left direction wall.d. Measure distance from Right direction wall.

    6. Determine the next grid to travel to from pre-determined path usingcurrent grid location and the previous steps measured distances.

    7. Calculate the distance that will need to be covered from the currentgrid to the position desired in the next grid.

    8. Send this information to each of the two PIC33F ports via UART1Transmit.

    9. Wait for the confirmation by the PIC33F parts that this is complete.10.Check whether or not the current grid contains a room that should be

    scanned by the flame.a. If it does scan the room.

    36

  • 8/9/2019 DT03 Design Report

    42/67

    i. If a flame is detected go to the Entering RoomAlgorithm.

    ii. Else, a flame is not detected continue to next grid.b. Else, continue onwards to next grid.

    11.Start over at step 4.

    Entering Room Algorithm

    This algorithm will be called only if the robot has looked into room and detectedinfrared radiation with the UVtron Sensor.

    1. Navigate robot into room entrance.

    2. Continually read TSL257 output, searching for white line that denotes a

    room entrance.

    3. Once inside the room the robot will verify that a high intensity light source

    (the flame) is in the room using VIRFL sensors and rotating its body.i. If the robot does not detect a flame in the room

    a.It has gone in the room by error continue and call the Leave

    Room Algorithm.

    ii. Else, the robot will call the Locate Flame and Extinguish Algorithm.

    Leave Room Algorithm

    1. Find the entrance of the room based off of the:

    i. Heading given by the digital compass.

    ii. Current room the robot is in.iii. Measure distances measured from room walls.

    2. Provide the distance and direction based off the calculations to each of the

    PIC33F parts.

    3. Constantly scan for the white line using TSL257 output to verify when the

    robot has left the room.

    4. Check flame has been found flag:

    i. If it has not, navigate to the next Grid based off of current grid

    information and distance from measuring four walls.

    ii. If it has call the Return Home Algorithm.

    Flame Locate and Extinguish Algorithm

    1. The robot will find the general direction of the flame and position the robot to

    center the flame between the two outside flame detectors with the middle flame

    detector with the brightest intensity.

    2. This will be done calling the motor algorithms with either clockwise or counter

    clockwise commands based off of the flame sensor data readings.

    37

  • 8/9/2019 DT03 Design Report

    43/67

    3. The robot will move in the flame direction until the white line around the candle

    is detected. The white line around the candle indicates the robot is within the

    correct range to put out the flame.

    4. The flame extinguisher (CO2) bike pump actuator will be triggered for a pre-

    determined amount of time that ensures the flame is extinguished.

    5. Each flame sensor will check for any indication of the flame once theextinguisher has gone off.

    a. If a flame is still detected, the robot will attempt to re-center on the flame

    and restart the algorithm at step 3.

    b. If no flame is detected by the sensors the algorithm is complete.

    6. Set the fire has been found flag to true.

    7. Call the Leave Room Algorithm

    Return Home Algorithm

    1. Based off the current grid the robot is in, it will obtain the quickest

    pre-determined path from memory from the current grid to reachhome.

    2. Obtain the current compass direction.3. Face the robot in the correct direction based off of the compass

    direction by generating the required distance to spin the robot to eachof the PIC33F parts.

    4. Once the correct direction has been validated, the distances from eachwall in all four directions are measured.

    5. Calculate the distance to travel required to get to the next grid in thepre-determined path .

    6. Provide the commands to the PIC33F parts and looking for verification

    from each of the parts.7. Continue moving grid to grid until the number grid is reached.8. Move to the center of the grid while continuously searching for the

    white line that represents the home circle.9. Stop once it has been determined the robot is within the home circle.

    Robot Body Construction and Layout

    Now that all of the physical components of the robot have been discussed, thelocation of these parts on the robot must be considered. This is a very importantaspect because if the motors, sensors, and actuator are not placed properly, then

    the robot will not perform the desired functions accurately.

    There will be two main platforms used to contain all the required components ofthe robot. Since the robot has a size constraint, capable of fitting inside a 31 cmlong by 31 cm wide by 27 cm high box, the platforms will be circular in shapeand measure 22 cm in diameter. This diameter was chosen by considering thelength of the motors, 10 cm, and wheel width, 7/8 inch equivalent to 2.2 cm.Choosing the platform to be 22 cm allows the robot to have 9 cm to spare on the

    38

  • 8/9/2019 DT03 Design Report

    44/67

    width and length. The wheels will be mounted on the outside of the 22 cm discand since the wheels will only be 2.2 cm wide, the size constraint will not be anissue.

    The wheels and how they are to be mounted is a separate, but important issue to

    consider. Below in Figure 26 is a picture of a Colson wheel that will be used forthe robot. Table 5 displays the specifications for this wheel in both English andMetric units.

    Figure 26: Wheel to be used on robot courtesy of www.trossenrobotics.com

    Table 5: Wheel Specifications

    Specifications Dimensions (English) Dimensions (Metric)

    Outside Diameter 4 in 102 mm

    Width 7/8 in 22 mmBore 39/64 in 15 mm

    Length Through Bore 1-1/32 in 26 mm

    Capacity 135 lbs 61 kg

    Weight 4.05 oz 114.8 g

    Color Grey Grey

    The most important parameter to take into consideration for mounting this wheelon a motors shaft is the bore size. The diameter of the Transmotec SD3729 spurgear motor shaft is 6 mm. As seen in Table 5, the diameter of the bore is 15 mm,which is larger than the motor shaft. Also, the length through the bore is 26 mm

    w