dt03 final

67
Fire-Fighting Robot Senior Project Final Report Design Team 3 Joseph M. McGlinchy Matthew J. Taschner Thomas V. Vo Faculty Advisor Dr. Tom Hartley April 28, 2008

Upload: muhamad-rizal-ibnu-abdulah

Post on 10-Apr-2015

152 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: DT03 Final

Fire-Fighting Robot

Senior Project Final Report

Design Team 3

Joseph M. McGlinchy

Matthew J. Taschner

Thomas V. Vo

Faculty Advisor

Dr. Tom Hartley

April 28, 2008

Page 2: DT03 Final

Table of Contents Table of Contents................................................................................................................ ii Table of Figures ................................................................................................................. iii Table of Tables .................................................................................................................. iv Abstract ............................................................................................................................... 1 Introduction......................................................................................................................... 1

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

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

Accepted Technical Design ................................................................................................ 3 Power System.................................................................................................................. 3 Motor Specifications....................................................................................................... 4 Motor Control ................................................................................................................. 6 Sensors .......................................................................................................................... 10 Ultrasonic Sensors ........................................................................................................ 11 Infrared Rangers............................................................................................................ 12 White Line Detector...................................................................................................... 15 Flame Detection Sensors............................................................................................... 17 Digital Compass............................................................................................................ 19 Fire Extinguisher........................................................................................................... 20 Controllers..................................................................................................................... 21 Software ........................................................................................................................ 23 Pseudo Code.................................................................................................................. 24

Initial State ................................................................................................................ 24 Finding Room 1 ........................................................................................................ 25 Finding Room 2 ........................................................................................................ 25 Finding Room 3 ........................................................................................................ 25 Finding Room 4 ........................................................................................................ 26 Follow Left Wall Algorithm ..................................................................................... 26 Follow Right Wall Algorithm................................................................................... 27 Entering Room Algorithm ........................................................................................ 27 Flame Locate and Extinguish Algorithm.................................................................. 28 Main Loop................................................................................................................. 29

Robot Body Construction and Layout .......................................................................... 31 Testing Procedures............................................................................................................ 39

Drive System................................................................................................................. 39 Audio Signal Detection................................................................................................. 41 Linear Actuator Testing ................................................................................................ 42

ii

Page 3: DT03 Final

White Line Detection.................................................................................................... 42 Flame Detection ............................................................................................................ 43 Digital Compass............................................................................................................ 47 Ultrasonic Rangers........................................................................................................ 48 Infrared.......................................................................................................................... 48 System Testing.............................................................................................................. 50 Schematics .................................................................................................................... 50

Financial Budget ............................................................................................................... 52 Original Labor Cost ...................................................................................................... 52 Actual Labor Cost ......................................................................................................... 52 Material Cost................................................................................................................. 53

Project Schedule................................................................................................................ 56 Design Team Information ................................................................................................. 60 Conclusions and Recommendations ................................................................................. 60 References and Acknowledgments ................................................................................... 61 Table of Figures Figure 1: Different curve relationships for the Transmotec 12V motor ............................ 5 Figure 2: Transmotoec SD3729 spur DC gear motor with encoder option ....................... 6 Figure 3: Output waveform of the motor's encoders in digital form ................................. 6 Figure 4: H-Bridge Schematic for control of DC motors .................................................. 7 Figure 5: One cycle of a Pulse Width Modulation (PWM) signal..................................... 8 Figure 6: H-Bridge schematic for the PCB layout design ................................................. 9 Figure 7: H-Bridge PCB schematic populated with the appropriate components ........... 10 Figure 8: Audio Detection Circuit .................................................................................... 11 Figure 9: SRF05 Timing Diagram with Trigger and Echo on the same line, courtesy of Robot Electronics.............................................................................................................. 11 Figure 10: Pinout for Devantech SRF05 Ultrasonic Ranger, courtesy of Robot Electronics........................................................................................................................................... 12 Figure 11 Output voltage characteristic of Sharp GP2D120, courtesy of Acroname....... 14 Figure 12 Circuit schematic for detecting a white line ..................................................... 15 Figure 13 White line detector layout on bottom of robot ................................................. 16 Figure 14 Photodiode Spectral Responsivity, courtesy of Texas Advanced Optical Solutions ........................................................................................................................... 16 Figure 15: Sensitivity pattern for Hamamatsu UVTRON Flame Sensor, courtesy of Hamamatsu ....................................................................................................................... 17 Figure 16: Simplified block diagram of drive circuit used to implement Hamamatsu UVTRON R2868 Flame Detector, courtesy of Hamamatsu ............................................ 17 Figure 17: Sensitivity Diagram for LTR-4206E NPN phototransistor, courtesy of Lite-On Electronics......................................................................................................................... 18 Figure 18: Layout of 3 VIRFL flame detectors on second level of robot......................... 19 Figure 19: Example of a CO2 bike pump to be used as the flame extinguisher courtesy of www.cyclesense.co.uk ...................................................................................................... 20 Figure 20: General picture of actuator and bike pump configuration.............................. 21 Figure 21: Actuator schematic displaying relay model and DC solenoid ....................... 21

iii

Page 4: DT03 Final

Figure 22: Message format from Holocon to PIC33F that contains a direction and distance command............................................................................................................. 23 Figure 23: House model arena divided into grids............................................................. 24 Figure 24: Wheel to be used on robot courtesy of www.trossenrobotics.com ................ 32 Figure 25: Hub insert for wheel bore with 1/8" keyway courtesy of www.trossenrobotics.com................................................................................................. 33 Figure 26: Physical design of H-Bridge on heat sink ...................................................... 33 Figure 27: Overall 3-D View of robot. ............................................................................. 35 Figure 28: Robot after full construction........................................................................... 36 Figure 29: View of robot from the front of robot ............................................................. 37 Figure 30: View of robot from the side with typical candle length. ................................. 38 Figure 31: View of robot from the top.............................................................................. 38 Figure 32: View from bottom of robot ............................................................................. 39 Figure 33: Quadrature encoder output waveform............................................................ 40 Figure 34: 3-4kHz tone detected by the microphone, and 5VDC signal output of NAND gate.................................................................................................................................... 41 Figure 35: White Line Detector screen captures (CW from top right). (a)Both detectors over black surface. (b)Both detectors over white surface. (c)Left detector over white surface. (d) Right detector over white surface. ................................................................. 43 Figure 36: Output waveform of UVTRON sensor's drive circuit..................................... 44 Figure 37: Testing set-up for VIRFL sensors ................................................................... 45 Figure 38: Ultrasonic Sensor image obtained from testing. ............................................. 48 Figure 39: Linearized Sharp IR data for GP2D120. ......................................................... 49 Figure 40: Higher level schematic for sensor connections ............................................... 50 Figure 41: Higher level schematic for sensor/actuator connections to microcontrollers.. 51 Figure 42: Circuit Diagram for H-Bridge ......................................................................... 51 Figure 43: Circuit Diagram for Audio Detection Circuit.................................................. 52 Figure 44: Design Gantt Chart for project. ....................................................................... 57 Figure 45: Implementation Gantt Chart for project ......................................................... 58 Figure 46: Actual Gantt Chart for project........................................................................ 59 Table of Tables Table 1: Power calculations for all components ................................................................ 4 Table 2: Direction commands with corresponding values given from Holocon to PIC33F............................................................................................................................................ 23 Table 3: Wheel Specifications ......................................................................................... 32 Table 4: Data for candle flame further away from robot. ................................................. 45 Table 5: Data for candle flame close to robot................................................................... 46 Table 6: Table of A/D values found based off above graph ............................................. 49

iv

Page 5: DT03 Final

v

Page 6: DT03 Final

Abstract Trinity College hosts an annual Robot Fire-Fighting contest drawing participants from around the world. The contestants vary in age, skill level, and experience, ranging from middle school students, college students, professors and all other robot enthusiasts. The purpose of this contest is to simulate the real-world operation of an autonomous robot providing a fire protection function in a house. The situation being simulated is a robot inside a home responding to a smoke detector going off by searching the house for a fire and putting it out as fast as possible. The contest is used as an educational tool while simultaneously promoting advancements in the field of robotics. This robot will first be activated by a smoke alarm signal, which then will proceed throughout the mock household and search for a flame. Upon finding the flame, the robot will extinguish it by actuating a pressurized CO2 cartridge. Once the flame is out, the robot will return to its original starting position in the quickest amount of time possible. There is no weight restriction 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 with new innovative ideas to provide a fire fighting protection function to a home or warehouse through the use of robotics. A robot must be constructed to navigate through a mock household and extinguish a flame.

Problem Definition Goals

A robot that will have the capabilities of locating a flame in a mock household (represented by a 248 cm by 248 cm maze-like arena), extinguish the flame, and then return to the starting position. The robot will 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 a flame in a random room. Upon locating the flame, the robot must be able to put it out using some type of extinguishing device and then return to its original starting location in the arena. Size of the robot must be of consideration, but weight is not an issue.

1

Page 7: DT03 Final

Constraints The robot must be capable of performing these actions within the shortest amount of time possible. It has a maximum of 5 minutes to perform a run in 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. The robot has no weight restriction, but it must be capable of fitting into a 31 cm long by 31 cm wide by 27 cm high box.

Design Specifications Power System

The entire robot will be supplied by 2 packs of rechargeable Lithium Ion batteries. All of these power supplies will be at a potential of 14.8V. The motors being used are rated for 12VDC, however using the 14.8V supply will suffice. The 14.8V must be stepped down to 3.3V for the controller of the motors as well as to 5V for the sensors. One supply will be used for both of the motors while the other supply will be used for the rest of the components. The robot must be capable of performing all of its actions for up to an hour. This means the supplies must have a total capacity to support this specification.

Mechanical Specifications

Since there is a time limit (5 minutes) to each run in the arena, the robot must be able to move quickly and efficiently. The maximum speed that the robot will be designed to move will be 5 ft/sec. The robot will be constructed with the thought in mind that the arena has corners in which the robot has the potential to get stuck in. Therefore, the body will be circular and the robot will have a zero degree turning radius. There is no weight limit for the competition, but keeping the robot light will give the robot more speed and agility. The size of the robot must also be considered since it must be able to fit in a box measuring 31 cm long by 31 cm wide by 27 cm high.

Sensors

To determine how far away a wall or object is from the robot, ultrasonic and infrared rangers will be employed. Ultrasonic range finders will be used on the four sides of the robot and will have a distance sensing range of 8cm to 4m. The infrared range finders will be used on the left, right, and front of the robot in order to detect the presence of a wall. The infrared range finders will have a distance sensing range of 3cm – 40cm. To detect the presence and location of the lit candle, three IR flame sensors will be mounted on the front of the robot and one UV sensor will be mounted on each side of the robot in order to detect the presence of a flame. The range of detection

2

Page 8: DT03 Final

of the IR sensors needs to be from 1cm to 1m. The range of detection of the UV sensor needs to be 1cm to 2m. A photodiode and LED circuit will be placed on the underside of the robot so that it can detect the white lines marking the entrance to each room of the arena as well as the white 30 cm radius solid circle surrounding the candle.

Actuator There will be only one actuator on the robot so it can extinguish the flame. Since there are time reductions given to robots that do not use air flow to put out the flame, 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. The weight of the robot is estimated to be about 20 pounds. With this in mind, as well as 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 to produce speeds up to 290 RPM.

Accepted Technical Design Power System

The Fire-Fighting Robot must be capable of performing multiple runs through an arena and be able to stay powered for at least one hour. This robot will not be hard wired to a power supply, which is why batteries will be the best option for this type of application. As described in the Design Specifications, using two separate battery packs will result in the best performance. The robot would be able to perform with only one battery supplying the entire system; however there would be a considerable amount of noise generated from the motors. This noise could and would affect the performance of the sensors used on the robot. A Lithium-Ion (Li-Ion) battery will be used as the separate supply specifically designed for the motors. Since there will be a supply just for the motor, noise should not be a factor in the sensor’s performance. Each of the two motors will be controlled by an H-Bridge, described in detail later, and estimated to be pulling a maximum of 2 amps each. Searching for a suitable battery, a 14.8V Li-Ion battery pack with a 4400mAh rating was determined to be the best option. Two of these packs will be purchased, one pack for both motors, and another pack for the rest of the components of the robot. Even though the specifications require the robot to run for an hour and the motors have the tendency to pull a maximum

3

Page 9: DT03 Final

of 2A, this 4400mAh battery pack is well suited to actually exceed the requirements. Size of the battery as well as cost must be taken into consideration and this battery meets both of these requirements. As mentioned, a separate 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 the supplies for the motors, but using the same type of battery allows the robot to be consistent and symmetrical. Again, size and 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 is very small, approximately 1700mA. With the supply being used for these components, this supply lasts more than three hours which well exceeds the specifications. Since all the sensors have an input rating of 5V, a voltage regulator must be used to step down the 14.8V from the power supply. Another voltage regulator must be used to step down the voltage to 3.3V for the dsPIC33F microcontroller.

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 be considered are the minimum torque the motors need to produce, the minimum speed of the shaft, and the power that the motors need to produce. The overall weight of the robot was estimated at 20 pounds and the actual weight was less than 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) were used to aid in the determination of the appropriate motor. With the numbers given above, the power that the motors would need to produce was calculated to be about 2 W. In order to determine the torque, the angular

4

Page 10: DT03 Final

speed of the shaft must be known. Using the maximum speed with a 4 inch diameter wheel, it was found to be 30 radians per second, which results in a speed of about 290 rotations per minute. Taking these numbers, the torque was determined to be 0.05 foot-pounds which is close to 700 gram-centimeters. If the wheel size increases, likewise the torque will increase, while the speed of the motor shaft will decrease. These calculations were based on only one motor performing the task of moving the robot. Since two motors will be used, the overall 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 and speed, a motor capable of these specifications was selected. To obtain the desired torque and speed, a geared DC motor seemed to be the best choice. The motor characteristics curve can be seen in Figure 1 obtained from the Transmotec SD3729 datasheet. This graph only depicts the motor’s characteristics itself, not the motor with the desired gear ratio. From the SD3729 datasheet, a gear reduction ratio of 1:18 resulted in a rated torque of 680 g-cm and a rated speed of 310 rpm compared to the rated speed of the motor without the gears, 5100 rpm, and the corresponding rated torque, 60 g-cm. Choosing a speed relatively close to the specification of 290 rpm resulted in a rated torque that is about twice the amount needed. 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 attached to the backside of it. The main reason that the encoder is needed, is to determine the position and distance that the motor has moved. The encoder is an essential component to the motors because this will communicate with the dsPIC33F microcontroller, which will keep track of the motor’s position. It is based on the method of quadrature encoding, which basically produces two sinusoidal signals using magnetic Hall sensors. One signal will lag the other signal by 90˚ ± 1/6T where T is the period of the waves. The frequency of these signals is proportional

5

Page 11: DT03 Final

to the speed of the motor. Inside the encoder is sinusoidal squaring circuitry which converts the sine waves to square waves that have the same phase difference as the analog signals[1]. Figure 3 displays the digital waveforms from the motor’s encoder with one signal lagging the other.

Figure 2: Transmotoec SD3729 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 able to stop itself once it detects a wall is too close. There are many different methods to go about controlling the motors, like purchasing pre-made motor controllers. However, it was decided that designing and constructing an H-Bridge would be the best option for the robot. This alternative is much cheaper and more reliable and consists of two pairs of Darlington BJT transistors; NPN and PNP. Below, in Figure 4, is the schematic of the H-Bridge that will control the direction of the motors.

6

Page 12: DT03 Final

Q3 Q4

Q5 Q6

D1 D2

D3 D4

14.8VDC

R1

33k

R2

33k

R3

1k

R4

1k

Q1 Q2PWM1

PWM1

PWM2

PWM2

MG1

DC Motor

1 2

Q8Q7

Dy namic Brake SignalDy namic Brake Signal

R5

1k

R6

1kD5 D6

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

With the estimations of the weight of the entire robot, and the above calculations for the torque (350 g-cm), it can be seen in Figure 1 that the current pulled by the SD3729 DC gear motors will be around 2 amps maximum. However, with the gear option, the torque is higher and therefore the current will increase. As a precaution, the H-Bridge was designed for a maximum of 5 amps being drawn by the 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 NPN Darlington transistors will be the TIP142. These types of Darlington pairs can withstand 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. It is also noted that each H-Bridge will be implemented with dynamic braking. The purpose of braking is so that the robot will be capable of moving an exact distance and being able to stop without much coasting. This will allow the robot to be very accurate when navigating throughout the arena. TIP142 Darlington pairs were used for the braking to short out the motor once its encoder produced enough pulses for the required distance. Shorting the motor allows the energy from the motor’s coil to be dissipated very rapidly causing it to stop rotating. As seen in Figure 4, the PNP Darlington transistors are being controlled by a single NPN transistor with its collector connected to the base of the PNP. This configuration allows for only two Pulse Width Modulation (PWM) signals to be applied to the bases of all the NPN type transistors. As shown, the similar PWM signals are being applied to the transistors at diagonals to each other. This will allow the current to flow from the 14.8V supply through the motor and to ground. Applying a PWM signal to corresponding diagonal transistors will allow the motor to spin either clockwise or counterclockwise. Also, it is shown that the Darlington pairs all have diodes across their collector-emitter junctions. When one of the PWM signals seizes, stored energy in the motors coils will want to continue flowing through the circuit and these diodes will protect the transistors. Since the H-Bridge is capable of dynamic braking, the motor’s energy will be

7

Page 13: DT03 Final

dissipated through Q7 and Q8 of Figure 4 rather than through the free-wheeling protection diodes. 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 appropriate transistors. 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 motor’s performance. With too large of a period, or too low of frequency, there will be noise generated due to the clashing of the transistor switching frequency with the PWM signal’s frequency. At higher frequencies, the motor’s winding inductance can potentially distort its own speed response characteristics. Also, as the frequency goes up, the switching losses of the 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

In order to save space on the robot, a printed circuit board was created for each H-Bridge. Unlike the schematic in Figure 4, a separate PCB schematic was created involving all of the components rather than just the H-Bridge components. Pictured below in Figure 6 is the schematic design for the H-Bridge PCB layout including all components and connectors. Connector J1 is specifically used for programming the dsPIC33F that allows for convenient access to the appropriate pins on the PIC. Connector J2 has 14.8V coming into the H-Bridge to supply the motors as well as bring a common ground to the entire circuit. J3 is used for three specific reasons. The 3.3V needed for the PIC comes in on pin 1 of J3, which also serves as the power rail for the encoder, pins 4 and 5, where two 10kΩ resistors are used to pull up the “open-collector” on the encoder. These pull-up resistors are essential to obtaining a square-wave signal from the quadrature encoder. The last two pins of J3, 2 and 3, are used for the receiving and transmitting of the data from the Holocon controller. Since there are two motors, two encoders, and two H-Bridges, there needs to be some communication between each side. It is not shown below in Figure 6, but pins 9 and 11 of the dsPIC33F are used for the communication between the PICs for each H-Bridge. It was decided that the PIC controlling the right side H-Bridge

8

Page 14: DT03 Final

would be the master and the left side PIC would be the slave. Pins 9 and 11 are used for a “handshake” between the right and left PICs. Once the handshake was complete, the master PIC would send an acknowledgement to the Holocon which signals that the PICs are ready for a new command. This concept will be discussed again later in the controller portion of this report.

Figure 6: H-Bridge schematic for the PCB layout design

Using the ExpressPCB software, a Printed Circuit Board was laid out and is illustrated in Figure 7. The schematic below is missing the two NPN Darlington transistors Q7 and Q8, which are used as the dynamic brakes, because this concept was not part of the original design. It was decided that dynamic brakes would greatly increase the accuracy and controllability of the motors so adding the two NPN Darlingtons in parallel to the other NPN Darlingtons of the H-Bridge (Q5 and Q6) turned out to be a critical solution. Inspecting both Figure 6 and Figure 7, the reader can see that there is an IC designated U2 that appears in Figure 7 but not in Figure 6. Originally the encoder output did not have the two pull-up resistors to 3.3V causing the signal to be distorted and very low in amplitude. Realizing that the encoders initially have an open-collector, the pull-up resistors were added (R6 and R8) and the signal was much cleaner and square with a peak amplitude of 3.3V, so the amplifier was removed.

9

Page 15: DT03 Final

Figure 7: H-Bridge PCB schematic populated with the appropriate components

Sensors

Audio Detector To detect a 3-4 kHz tone that can start the robot, there will be a tone detection circuit capable of performing such a task. The circuit will consist of an NTE832 IC Tone Decoder chip with appropriate external components to create a pass band of 3-4 kHz for the chip. The output of the chip will act as a switch to ground when a signal in the pass band is present. To ensure the tone is detected, an amplifier circuit will be built to feed the signal in from a microphone. The values for the components of the first amplifier and the NTE832 were determined from a tone detector website and the part datasheet, respectively [3,4].A schematic is shown below for the audio detection circuit in Figure 8.

The output of the decoder will be fed through a NAND gate to bring the signal to +5V, and fed through a NOR gate along with a push button signal which will be at +5V. The purpose of this is that in case the tone decoder does not provide an adequate signal to start the robot, a push button can easily be used instead. The output signal of +5V fed into the digital I/O of the Holocon will provide the necessary signal to start the robot.

10

Page 16: DT03 Final

R3010k

U35

01 2

+5V

R31470k

+5V

U33A

74AC04

1 2

U27

NTE832

LPFLTR2

OUTFLTR1

OUT8

Vcc4

R5

RC6

IN3

U34A

LM358

+3

-2

V+

V-

OUT1

R26100k

R27100k

MK1

mic

12

C4

0.01u

+5V R28

1M

+5V

C5

0.01u

C6

0.15u C7

0.22u

+5VR2920k

C8

.022u

TO HOLOCON

U36A

7432

12 3

Figure 8: Audio Detection Circuit

Ultrasonic Sensors To detect hallways and room openings a total of four Devantech SRF05 Ultrasonic Rangers were used. These sensors are capable of reading up to 4 meter distances. The maximum distance the robot needed to measure was approximately 3 meters which is well within the maximum limits. In order to use a SRF05 Ultrasonic sensor a 10µs pulse is applied to the trigger line of the SRF05. At the end of this pulse, the SRF05 sends a series of 8 ultrasonic bursts. At this point, the echo line of the SRF05 raises high, and when a reflected pulse is received it will the echo line low. The width of this pulse on the echo line is directly proportional to the distance of the object the ultrasonic burst was reflected from. See Figure 9 below [5].

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 to operate. 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.

11

Page 17: DT03 Final

In the other mode, the trigger and echo lines share a line, cutting the number of pins needed from the microcontroller in half. For this reason this mode was chosen in order to reduce the wiring required to connect four of these modules. In order to select this mode, the “Mode” pin on the SRF05 is connected directly to ground, or the “0V ground” pin directly below it. See Figure 10 below.

Figure 10: Pinout for Devantech SRF05 Ultrasonic Ranger, courtesy of Robot

Electronics

To save the Holocon processing time required to count the pulse width for these devices a dsPIC33FJ12MC201 was used to interface to the four Ultrasonic sensors. The four input capture modules available on the PIC device allowed for easy calculation between the rise and fall of the echo pulse from the sensor. The interface between the PIC33F and Holocon will be covered in more detail in the software section. An important application note in the use of the ultrasonic sensors was that a 50ms time period between each trigger was required to ensure that all sonic waves from the current measurement was fully attenuated. Attempting to get a new reading in less than 50ms could result in an inaccurate reading. This also implied that multiple sensors could not be used simultaneously. This could also cause inaccurate readings in the event a sonic wave from one sensor was detected by another sensor. Infrared Rangers To complement the ultrasonic rangers in determining how far away the robot is from the walls in the arena, IR rangers will be used. Sharp produces a family of such devices with detection distances encompassing, at a minimum, of 3cm and

12

Page 18: DT03 Final

up to a maximum of 1.5m (obviously not the same device). The device chosen for this project is the Sharp GP2D120, which has a minimum detection distance of 3cm and a maximum of approximately 40cm. Since the widths of the hallways in the arena are approximately 46cm and the diameter of the robot will be 22cm, the GP2D120 is an appropriate choice since it will be mounted on the periphery of the robot.

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

13

Page 19: DT03 Final

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

To allow the robot to be capable of following either the right or left wall throughout the arena, there will be two GP2D120 sensors on the left and the right of the robot. This will allow the robot to both determine how far away it is from a wall on either side and to keep the robot parallel to the wall while it is moving.

14

Page 20: DT03 Final

Another GP2D120 will be placed on the front of the robot to keep it from moving directly into a wall. White Line Detector As the contest rules dictate, the entrance to each room is marked by a white line across the entrance way and the candle is located in the center of a solid white circle 30cm in diameter. Certain algorithms will be dependent upon whether the robot is in a room or a hallway, or if it is close enough to the candle to extinguish it. Since the floor of the arena is solid black, a white line should be easy enough to 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 and detector. 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 IC consisting of a photodiode and an amplifier. This is the TSL257 made by Texas Advanced Optoelectronics Solutions. A schematic for this circuit is shown in Figure 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 will be implemented so the microcontroller has data to compare from both the left and right side of the robot. A rough drawing of this layout is shown in Figure 13 below. 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 to ensure the diode does not burn itself out if the potentiometer is adjusted to its minimum value. This will be a 100Ω resistor. The potentiometer is a 10kΩ variable resistor. The TSL257 outputs a voltage that is directly proportional to the light being measured, and this voltage will be sampled by the Holocon microcontroller to determine if the robot is passing over a white surface. Since the TSL257 is most sensitive to light wavelengths of approximately 700nm, red LEDs 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 the microcontroller will be in the range of Vo=0.1V to 4.5V [8].

15

Page 21: DT03 Final

Figure 13: White line detector layout on bottom of robot

Figure 14: Photodiode Spectral Responsivity, courtesy of Texas Advanced Optical

Solutions

16

Page 22: DT03 Final

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 each room individually, the robot will pause when it detects a room entrance on either side of it. It will then receive information from the Hamamatsu UVTRON R2868 Flame Sensor as to whether or not a flame is in the periphery of the sensor. The angular sensitivity of the UVTRON is shown in Figure 15 below [9].

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

of Hamamatsu

The R2868 itself requires a very high input voltage to operate correctly, on the order 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 converter that 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. A simplified block diagram of this drive circuit is shown in Figure 16 below [10].

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

The output of this circuit will be connected directly to one of the Holocon microcontroller’s input pins. Since the output signal is already a digital signal,

17

Page 23: DT03 Final

there is no need for A/D conversion. With the output signal being a pulse of duration 10ms, the Holocon can count the number of pulses it receives. When this number falls in a defined range, this will tell the controller that the candle is present in a nearby room. Infrared To determine the exact location of the flame once inside the room as decided by the Hamamatsu UVTRON Flame Detector, three IR sensors will be used. These are the VIRFL InfraRed Flame Sensors. Each one is powered by a +5V supply which is fed through a 1MΩ potentiometer. The collector of an NPN phototransistor is connected to the pot and the output pin. The emitter is connected to ground. The output pin is pulled up to +5 volts, and is tied to ground through the phototransistor. Output voltage depends on the current through the phototransistor. When the sensor is energized and the potentiometer is fully turned counterclockwise (allowing for greater sensitivity), the output voltage rests at +4.7V. 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 is directly in front of the sensor. The Holocon microcontroller will be taking consecutive 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 on the center sensor, this will tell the Holocon that the flame is directly in front of the robot.

These sensors have a stable sensing range of 1cm to approximately 1m, so using them exclusively in a room will provide accurate readings. Also, the phototransistors being used have a rather narrow range of sensitivity as can be seen in Figure 17 below [11].

Figure 17: Sensitivity Diagram for LTR-4206E NPN phototransistor, courtesy of

Lite-On Electronics

18

Page 24: DT03 Final

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. The drawing in Figure 18 below illustrates this.

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 robot will rotate to the left until the middle sensor is giving the lowest reading, and vice versa for the rightmost sensor. When the robot is positioned such that the middle sensor is outputting its lowest voltage, this will tell the robot the flame is directly in front of it. The robot will move forward towards the flame, and will stop once it 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, a digital compass will be implemented as an additional sensor unit. This will be the Honeywell HMC6352. It contains two magneto-resistive sensors oriented orthogonally to detect horizontal components of the earth’s magnetic field, two amplifiers, a drive circuit, and an internal microprocessor.

Unfortunately, the Honeywell HMC6352 was not implemented in the final design. It would have been a very nice piece of hardware to use as it provides very accurate readings. When the device was mounted on the robot, it was determined there was far too much ferrous interference for the device to operate accurately while the robot was in motion. When researching other robotic designs that used

19

Page 25: DT03 Final

a digital compass for navigation purposes, the compass was mounted on top of a mast far away from any magnetic fields that would interfere. Our design did not account for this, as the height was limited to the height of the arena walls (about 27-30cm). To accomplish this, the design would need to have the majority of the robot at a very low height. The design presented results in a robot height of approximately 25cm, so the digital compass was not implemented.

Fire Extinguisher

One of the more important components to this Fire-Fighting Robot is the extinguisher. Without some form of extinguisher, the robot could not be a fire fighter. The rules of the contest state that putting the flame out with airflow is legal, but the team will not receive any time reduction with this technique since it is 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 extinguish the flame with carbon dioxide, or CO2. A device such as a handheld CO2 bike pump 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 courtesy

of 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 will be utilized by attaching a thin strong cable to its plunger and the other end to the trigger of the pump. A basic drawing of this configuration is shown below in Figure 20. The solenoid will have a wire attached to it as shown and will initiate when the microcontroller sends the extinguish signal. The signal will be applied to the excitation coil of a relay, which will switch in the 14.8V supply to the solenoid. The bike pump actuator will be active for 300ms, which allows for a quick spurt of CO2 to be expelled. If the flame is still present, the robot will readjust itself and activate the bike pump again for 300ms. It will repeat this process until the flame is extinguished.

20

Page 26: DT03 Final

Figure 20: General picture of actuator and bike pump configuration

As stated above, a relay will be used to switch in 14.8V to the linear DC solenoid. The schematic for the flame extinguishing actuator can be seen below in Figure 21. It is a simple Single Pole Double Throw Relay with the normally open pin connected to the power supply.

U2

DC Linear Solenoid

+

-

Input f rom Microcontroller U1

SPDT Realy

3

2

1

4

5

14.8V

Figure 21: Actuator schematic displaying relay model and DC solenoid

Controllers

The software architecture will be based upon four controllers, a Holocon and three PIC33F processors. The Holocon controller will be the main controller for the Robot’s system and will be used for the robot navigation and reading the various sensors. One of the PIC33F parts, as mentioned earlier, was used for converting the signals from the four ultrasonic sensors into distance values. Whenever the Holocon needed an ultrasonic measurement it would serially transmit an L, F, R, or B to get a reading from the left, front, right, or back ultrasonic respectively. The maximum transmission rate of 115 kbps was used in order to minimize any

21

Page 27: DT03 Final

delays. The PIC would then generate the 10 microsecond trigger and then find the time period between the rise and fall of the echo line. This was then converted to a distance based off of the conversion factor of 58 microseconds per centimeter on the PIC33F device. Upon completing the conversion the PIC would then serially transmit the desired distance data to the Holocon for the desired ultrasonic sensor reading. Two of the PIC33F microcontrollers were used as speed controllers, one PIC33F for each of the DC motors. Each motor had an encoder signal coming from it that was monitored using the Quadrature Encoder Interface (QEI) modules available on the PIC33F parts. Ideally, one PIC33F would have been used to control both motors but there were no available single PIC microprocessors that supported two QEI modules. The PIC33F parts also had modules specifically for pulse-width modulated motor control. Using these modules as well as the QEI modules saved design time that would have been spent developing these functions. The second benefit was that the PIC parts generated the signals required to drive the H-Bridge circuit and allow the Holocon’s resources to be focused more on the navigation algorithms. A special serial configuration was used for communication between the Holocon and the two PIC33F devices driving the H-Bridges. In order to simplify the communication between the Holocon and the two PIC33F parts, the transmit line of one of the Holocon’s UARTs was connected to each of the two PIC33F parts’ UART receive line. The way this configuration worked is that each PIC33F part received the same command from the Holocon, but the command was split into two sections, each corresponding with only one of the PIC33F parts. In other words, each PIC33F part looked at only its designated section of a command and disregarded the other. Every message or command between each device was prefixed with a flag character followed by the actual message. The intended operation of the system was as follows, the Holocon generated new motor commands based off of sensor readings (A more detailed explanation on how the commands were generated will be covered later on). Then the Holocon gave direction and distance commands to each of the PIC33Fs in a pre-determined packet format. The packet will consist of: a flag character represented by a ‘$’ symbol followed by a byte for direction, three bytes for the distance the right motor should move, two bytes for the speed it should travel at, and the next three bytes, followed by the last two are for the left motor distance and speed, respectively. This can be seen visually in Figure 22. The direction commands are assigned values shown in Table 2.

22

Page 28: DT03 Final

‘$’ 1 Byte 3 Bytes 2 Bytes 3 Bytes 2 Bytes

Flag Direction

Right Motor Distance

Right Motor Speed

Left Motor Distance

Left Motor Speed

Figure 22: Message format from Holocon to PIC33F that contains a direction and distance command.

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

Direction Command Value

CW 1

CCW 2

FORWARD 3

REVERSE 4

Next, each PIC33F parsed the incoming serial data command and read only the section of the command that belonged to it. It then took this section and parsed it further into the separate direction and distance information. The direction information was interpreted and the H-bridge logic required to drive the motor in the specific direction was applied. Similarly, the distance information was interpreted and a pulse width modulated signal was generated for the motor speed. Each motor’s encoders were monitored through the QEI module to provide feedback on when to remove the pulse width modulate signal once the distance desired was traveled. To save on the number of UARTs used on the Holocon, only one of the PIC33F’s transmit were connected to the Holocon’s receive UART. In order to keep the system synchronized, a handshake was completed between the two PIC devices when each of them has completed their given commands. The designated PIC33F will then send a message back to the Holocon to tell it that both PICs have completed their given command. The return message back to the Holocon consists of a simple ‘$’. Software In order to navigate through the arena, the original method chosen was to divide the arena into grids. The grids were mapped onto the arena schematic as can be seen in Figure 23. Using the grids concept, the digital compass, ultrasonic sensors, and motor encoders the robot will be able to determine its location within the arena. Information about each grid would have been input into the robot’s memory that would include adjacent grids, whether or not that grid contained a room entrance, or any possible turns the robot would have been required to make. By keeping track of where the robot currently was and

23

Page 29: DT03 Final

which direction and the position it was heading, the robot would have been able to determine which grid that it was in. Unfortunately, due to the fact that consistent and accurate readings from the digital compass could not be achieved with the physical layout of the robot, another method for navigation had to be derived. The new method consists of following walls and searching for specific characteristics of the arena to determine the robot’s location.

Figure 23: House model arena divided into grids.

For ease in explanation the grid system will be referred to throughout the explanation. The following will be an explanation of how the robot navigated to the four rooms in the arena. The directions that will be mentioned will be in reference to the robot’s orientation. The robot will begin by being placed within grid 1 facing towards grid 2. Pseudo Code

Initial State The Holocon was in an initial starting state waiting for one of two events to occur, the detection of a 3-4 kHz signal or for the start push button to be pressed.

24

Page 30: DT03 Final

Finding Room 1 Upon activation, the Holocon followed the left wall while trying to keep itself parallel to the left wall as it was traveling. It continued moving in this manner until a wall was detected in front of it in grid 3. At this point it would attempt to make a 90 degrees clockwise turn. It did this by reading the left ultrasonic sensor once and turning clockwise in small increments while reading the back ultrasonic sensor. It continued to do this until the back ultrasonic sensor read a value within 1 cm of the value read by the left ultrasonic sensor. Upon finishing this, the robot continued following the left wall and repeats the same process until it saw a wall in front of it in grid 5. At this point the robot followed the left wall and attempted to find a wall on its right using the right infrared sensors. Once it found the wall on its right it looked for the opening in the room and then moved forward a predetermined distance to place it in the center of the room opening in grid 7. At this point the room was checked for a flame and if a flame was detected it would turn clockwise 90 degrees, keep track of which room was entered, and then go to the entering room algorithm. If no flame was detected the robot would continue on its path to finding room 2.

Finding Room 2 Starting at the center of grid 7 the robot would continue following the left wall until an open hallway was found in grids 11 and 12. At this point it turned down into grid 11 by turning its right wheel at a faster rate than the left wheel. It stopped when the two infrared sensors on the right side of the robot detected a wall to the right in grid 11. At this point the robot followed the right wall and obtained readings from the front ultrasonic sensor until the distance from the front wall was the predetermined distance that will center the robot in the entrance of room 2. The robot then read the left UVTron flame sensor to detect whether or not a flame was in the room. If a flame was found it would turn 90 degrees counter-clockwise, keep track of which room was entered, and then go to the entering room algorithm. If no flame was found in room 2 the robot would go onto finding room 3.

Finding Room 3 Starting from the center of grid 11 the robot would then continue following the right wall until the left wall was detected in grid 12. At this point the robot would follow the left wall until the front infrared sensor sensed a predetermined front distance that centered the robot in the opening of room 3. The robot would then check the room for a flame. If a flame was detected the robot would turn 90 degrees clockwise, keep track of which room was entered, and then go to the entering room algorithm. Otherwise, the robot would ontinue on to finding room 4.

25

Page 31: DT03 Final

Finding Room 4 Here the robot would start in grid 12 facing downward. The robot would then turn counter-clockwise until a large opening was sensed on the robot’s left and front and a wall on the robot’s right. This corresponded to the opening of room 3 and the hallway consisting of grids 12, 11 and 8, and the wall in grid 12, respectively. Once this condition had been met the robot would be in grid 12 facing grid 11. At this point it would follow the right wall until the left wall in grid 11 was detected. It would then follow the left wall until it saw the hallway consisting of grids 8, 9 and 11. At this point the right wheel would spin faster than the left wheel in order for the robot to make a turn down into that hallway. It will continue this until a wall was detected on its right in grid 9. Next, the robot would follow the left wall until the front wall was at a pre-determined distance away that would center the robot at the entrance of room 4. The robot would check the last room for a flame and upon finding the flame the robot would turn 90 degrees clockwise, keep track of which room was entered, and then go to the entering room algorithm. The condition of no flame should not occur because that would imply that robot would have missed detecting the flame in one of the rooms. The sensitivity and reliability of the UVTron sensors ensured that this condition did not occur.

Follow Left Wall Algorithm

This algorithm was called repeatedly usually until a condition was met (i.e. following a left wall until a front wall was detected)

//Get distances from left wall from both left infrared sensors LF = Get Left Front Infrared Sensor Value; LB = Get Left Back Infared Sensor Value; If (LF > =7 cm & absolute(LF-LB)< 1) Move robot forward small distance Else If(Left Front is further from wall than Left Back) //Too far from wall

Turn CCW 5 degrees Move forward a small distance towards wall

Turn CW until both left infrared sensors are about equal Else

//Too close to wall Turn CW 5 degrees Move forward a small distance away from wall

Turn CCW until both left infrared sensors are about equal

26

Page 32: DT03 Final

Follow Right Wall Algorithm

This algorithm was called repeatedly usually until a condition was met (i.e. following a right wall until a front wall was detected).

//Get distances from right wall from both right infrared sensors

RF = Get Right Front Infrared Sensor Value; RB = Get Right Back Infared Sensor Value; If (RF > =7 cm & absolute(RF-RB)< 1) Move robot forward small distance Else If(Right Front is further from wall than Right Back) //Too far from wall

Turn CW 5 degrees Move forward a small distance towards wall

Turn CCW until right infrared sensors are about equal Else

//Too close to wall Turn CCW 5 degrees Move forward a small distance away from wall

Turn CCW until right infrared sensors are about equal

Entering Room Algorithm

This algorithm was called once the robot had detected a flame with the UVtron Sensor and has turned to face toward the entrance of the room. This method attempts to find the white line at the entrance of the room and make the robot face perpendicular to the white line using the Left & Right White Line Detectors (WLD). While( Left WLD & Right WLD do not detect a line) If(Left WLD detects a line and Right WLD does not) Turn only right wheel until Right WLD detects line Break from while loop

Else If(Right WLD detects a line and Left WLD does not) Turn only left wheel until Left WLD detects line

Break from while loop Else

Move forward small distance

27

Page 33: DT03 Final

// At this point the robot is perpendicular to white line // It was determined that the following two commands places the robot in //an optimal spot to locate the flame to avoid getting stuck on walls Move forward 8 cm into room Turn CW 5 degrees. Call the Flame Locate and Extinguish Algorithm

Flame Locate and Extinguish Algorithm This algorithm was called once the robot had entered into a room and was away from the room entrance’s walls. The three VIRFL flame sensors were used to detect the direction of the flame. The two WLD sensors were used to detect the white circle around the flame. Lastly, the CO2 bike pump was activated with the solenoid to put out the flame once the white was detected.

While(center flame value does not meet flame present threshold)

Turn clockwise small increment While(Left WLD | Right WLD does not detect a line) if(center > left & center > right )

// Center reads strongest flame intensity Move forward small increment

else if(left > center & left > right) // Left reads strongest flame intensity Turn counter-clockwise small increment else

// Right reads strongest flame intensity Turn clockwise small increment

// At this point one of the white line detectors is over white circle around the candle If (Left WLD detects line) Move right wheel until Right WLD detects a line Else (Right WLD detects line) Move left wheel until Left WLD detects a line // At this point since the candle is at the center of the white circle the robot should be centered on the candle.

28

Page 34: DT03 Final

Activate CO2 bike pump for 300 milliseconds. While(center | left | right detect a flame)

If(center>left & center> right) Activate CO2 bike pump for 300 milliseconds. else if(left> center) Turn CCW small increment else Turn CW small increment

// The candle is extinguished Go to the Return Home Algorithm.

Main Loop While(running==true)

switch(mode) case INITIALIZATION: emic.say("I'm Norka welcome to my demonstration."); while((start button || audio signal) is not detected); case FOLLOW_LEFT_WALL: numberOfTurns++; if(numberOfTurns==2) mode = LOOK_FOR_ROOM_1; while(front wall is not too close)

followLeftWall(); //Make Right Turn

int left = ultrasonic left reading; while(ultrasonic back reading>left) motors.spinCW(2 degrees); break; case LOOK_FOR_ROOM_1:

while((right Back | right Front) infrared sensors see no wall) followLeftWall(); while(Right front infrared sensor sees a wall) followLeftWall();

motors.goForward(10 centimeters); if(isFlameInRightRoom()==true) int left = ultrasonic left reading;

while(ultrasonic back reading>left) motors.spinCW(2 degrees); roomNumber = 1; running = false; enterRoom(); findAndExtinguishCandle();

29

Page 35: DT03 Final

else mode = LOOK_FOR_ROOM_2; break; case LOOK_FOR_ROOM_2:

while(left front infrared sensor sees a wall) followLeftWall();

while(true) //Turn wheels and different rates motors.goFwdAndSlightTurn(small increments); if((right front & right back) infrared sensors see a wall) break;

while(front ultrasonic sensor reads < 68 centimeters) followRightWall();

if(isFlameInLeftRoom()) int right = rightUltrasonicReading(); //Turn Right 90 degrees while(backUltrasonicReading()>right) mot.spinCW (2 degrees); roomNumber = 2; running = false; enterRoom(); findAndExtinguishCandle(); else mode = LOOK_FOR_ROOM_3; break; case LOOK_FOR_ROOM_3:

// follow the right wall until left wall is found while(left front infrared sensor sees no wall) followRightWall(); // Keep moving forward until front distance from wall centers robot // at room 3’s entrance while(front infrared sensor is not close too front wall) followLeftWall();

if(isFlameInRightRoom()) int left = leftUltrasonicReading(); while(backUltrasonicReading()>left) spinCW(2 degrees); roomNumber = 3; running = false; enterRoom(); findAndExtinguishCandle(); else

// No candle found in room turn robot 180 degrees this // occurs when front and left infrared sensors of the robot // has a large opening and right infrared sensor sees a //wall while( (front & left infrared) sensors see no wall

& (right infrared sensor sees a wall) spinMotorsCW(2 degrees);

mode = LOOK_FOR_ROOM_4; break;

30

Page 36: DT03 Final

case LOOK_FOR_ROOM_4:

//After robot is turned around, follow Right Wall until right wall // is gone

while(right infrared sensor sees a wall) followRightWall();

while(left infrared sensor sees a wall) followLeftWall(); while(front infrared sensor is not close to wall)

followLeftWall();

if(isFlameInRightRoom()) int left = leftUltrasonicReading();

while(backUltrasonicReading()>left) spinMotorsCW(2 degrees); roomNumber = 4; running = false; enterRoom(); findAndExtinguishCandle();

break;

Return Home Algorithm Once the candle has been extinguished the robot will back away and turn CCW 90 degrees and go forward until a front wall is detected. At this point the robot will turn CCW 90 degrees again and then follow the wall that it detected. Based off the current room the robot is in, it will look for pre-determined conditions stored in memory to navigate from the current room. This consists mostly of following a right wall and turning 90 degrees CCW when a front wall is too close to the robot. It will 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, the location of these parts on the robot must be considered. This is a very important aspect 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 of the robot. Since the robot has a size constraint, capable of fitting inside a 31 cm long by 31 cm wide by 27 cm high box, the platforms will be circular in shape and measure 22 cm in diameter. This diameter was chosen by considering the length 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 width and length. The wheels will be mounted on the outer circumference of the

31

Page 37: DT03 Final

lower platform but placed so that they do not protrude beyond the 22 cm disc. This will help prevent the potential of the robot to get stuck in a corner or against a wall even. Exactly how the wheels will be mounted is a separate, but important issue to consider. Below in Figure 24 is a picture of a Colson wheel that will be used for the robot. Table 3 displays the specifications for this wheel in both English and Metric units.

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

Table 3: Wheel Specifications

Specifications Dimensions (English) Dimensions (Metric) Outside Diameter 4 in 102 mm Width 7/8 in 22 mm Bore 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 wheel on a motor’s shaft is the bore size. The diameter of the Transmotec SD3729 spur gear motor shaft is 6 mm. As seen in Table 3, the diameter of the bore is 15 mm, which is larger than the motor shaft. Also, the length through the bore is 26 mm while the motor’s shaft is only 15 mm long. This difference in length will not be an issue if a proper design and procedure are followed. The wheel in Figure 24 shows a plastic insert inside the bore. This will be removed and replaced by a metal hub, or bushing, so the shaft of the motor can be inserted into this hub and held in place with set screws. Figure 25 displays the hub used for mounting the motor’s shaft to the wheel. As seen, there is a 1/8” keyway where a small piece of metal was initially going to be inserted to lock the motor shaft in place. However, it was much easier of a solution to just drill holes in the hub and tap the

32

Page 38: DT03 Final

holes for set screws to be inserted. This hub, with the motor shaft secured, can then fit tightly in the bore of the wheel.

Figure 25: Hub insert for wheel bore with 1/8" keyway courtesy of

www.trossenrobotics.com

There will be two platforms, or levels, being utilized on the robot. Starting with the platform lowest to the ground, all of the heaviest components will be mounted on both sides of this platform. On the bottom, both of the Transmotoec SD3729 spur DC gear motors will be mounted using a handmade polycarbonate housings. The head of the motor will be inserted into the housing and held in place by three large set screws. These housings will be mounted to the underside of the bottom platform. Ball bearing casters must be mounted 90˚ from either motor so that the robot can balance and it must also be placed as close to the edge of the robot as possible because it must share room with the H-Bridge. On either side of the motors will be the H-Bridge that controls the proper motor. As stated earlier, the transistors of the H-Bridges will be mounted on a flat heat sink. This will measure 3-7/8” long, 1-5/8”wide and ½” high. The benefit to having a flat heat sink is that it saves space as well as absorbing a considerable amount of heat. The physical layout of the heat sink with the Darlington transistors can be seen in Figure 26. The PCB of the H-Bridge will go directly above this heat sink so that the transistor’s legs can be bent upwards to fit in the appropriate spot of the H-Bridge PCB seen in Figure 7.

Figure 26: Physical design of H-Bridge on heat sink

33

Page 39: DT03 Final

The upper side of the lowest platform will contain the main “brain” of the robot; the Holocon controller. Also, the two power supplies will be mounted next to the Holocon. Since the controller and the two power supplies together take up a considerable amount of space, the upper side of this platform will contain these three components as well as the small text to speech module. One can easily see that the lower platform contains the main bulk and weight of the robot. The upper platform will consist of the UVTRON, ultrasonic, and infrared sensors. All of these sensors do not weigh much in comparison to the components on the lower platform. These sensors will be mounted on the top side of the upper platform. This will allow each sensor enough space to take the appropriate reading. The UVTRON flame sensor will be positioned directly on the left and right sides of the robot so it will be able to stop at a room’s entrance and just scan this sensor to determine whether or not a flame is present. Mounting this sensor on the sides of the robot will save time during each run because the robot will not have to turn and face a room in order to scan it for a flame. As stated above, there will be three infrared sensors pointed towards the front of the robot. One will face dead center while the other two will be placed on either side of the center at an angle of 30˚. In the center of the upper platform will be a small square platform that will rest above the solenoid. On this smaller platform, the ultrasonic sensors will be mounted. One will face forward, one backwards, and one on each side. The reason that these sensors will be higher than the rest is because they will be acting as the eyes of the robot. If they would be at the same height as the UVTRON and infrared sensors, then these sensors would obstruct the line of sight of the ultrasonic sensors. This entire section described the whole layout and construction of the robot. Some of the explanations might be a bit confusing, which is why Figure 27 shows a model of the original design of the entire robot construction. Most all of the components described above can be seen here. The actual design of the robot can be seen immediately following the 3D model in Figure 28. Figure 29, Figure 30, Figure 31, and Figure 32 depict the original design of each platform layout separately from the front, side, top, and bottom, respectively.

34

Page 40: DT03 Final

Figure 27: Overall 3-D View of robot.

35

Page 41: DT03 Final

Figure 28: Robot after full construction

36

Page 42: DT03 Final

Figure 29: View of robot from the front of robot

37

Page 43: DT03 Final

Figure 30: View of robot from the side with typical candle length.

Figure 31: View of robot from the top.

38

Page 44: DT03 Final

Figure 32: View from bottom of robot

Testing Procedures

Drive System

To ensure the robot can move as efficiently as possible, extra care must be taken to be certain the wheels are on exactly opposite sides of the lowest platform and also that they are level with each other. This also means the motors must be mounted such that the motor shafts that will serve as the wheel axles are along the same line and level with each other. To make sure the lowest platform is lying flat, a level was used to determine if the motors and wheels are mounted correctly.

39

Page 45: DT03 Final

The H-bridge circuitry that will be controlling the direction of the motors and also the speed at which it moves was first bread boarded to work out any problems that might arise. There were no problems at all when the circuit was on a bread board, but once it was transferred to a PCB, some major problems occurred. The biggest issue had to do with bypass capacitors. The distance the capacitors are placed from the Vdd pin on the PIC makes a big difference, so the bypass capacitors were placed as close as possible so that there was minimal noise on the power supply line to the PIC. Also, the encoders for each motor need to be tested and calibrated so that a relationship between the number of pulses produced and the actual distance can be determined. This was tested by applying a voltage that would make the wheel rotate once per second. The pulses were recorded on an oscilloscope and the period of the signal was measured. A scope capture can be seen in Figure 33 displaying two waveforms, with one lagging by 90˚, having a period of 9.95ms. This value corresponds to about 2 cm of displacement.

Figure 33: Quadrature encoder output waveform

The only other part of the drive system is based on programming the PIC to output the PWM signals as needed. Each coding sequence (forward, backward, counterclockwise, clockwise) was written individually and simulated so that the correct waveforms being produced could be verified. Testing and modification to code ensued until the drive system performed properly.

40

Page 46: DT03 Final

Audio Signal Detection The audio detection circuit needs to respond to an audio signal in the 3-4 kHz range. To simulate a tone emitted from a smoke alarm, a small piezo siren with center frequency 3500Hz +/- 500Hz will be used. This was be used as the input to the microphone, and the signals at the output of the microphone and the output of the tone decoder chip was observed on the oscilloscope to be sure each stage was functioning properly. Signals with frequencies in the 3-4 kHz range were tested, as well as signals with frequencies above and below this range to verify the detection circuit was not passing these signals. The output signal of the OR gate (a push button switch will be the alternative method of starting the robot if the audio circuit does not perform correctly, which is the other input to the OR gate) was sampled by a Digital I/O pin on the Holocon controller. Code was written to simulate a counter, and when the counter reaches a certain value, the code will execute a command to switch the robot on. This simulation was observed to perform properly, and the audio detection circuit was interfaced to the controller for full-scale testing. After the circuit was connected and programmed to the Holocon, the signals were examined. The scope capture below in Figure 34 shows the tone detected by the microphone and the DC voltage produced at the output of the NAND gate.

Figure 34: 3-4kHz tone detected by the microphone, and 5VDC signal output of NAND

gate

41

Page 47: DT03 Final

Linear Actuator Testing The CO2 bike pump needs approximately 5 lbs. of force to fully release the CO2. The linear actuator that will be used to apply this force to the pump must be able to do so over and over again without fail. Once it was verified that the actuator circuitry operates the pump correctly, code was written to control the actuator. A string of 5 consecutive, successful sprays of CO2 indicated that the actuator was working properly and was not slipping out of contact with the CO2 bike pump trigger. Once the operation of the actuator and bike pump was verified, code was written to the Holocon microcontroller to produce a voltage signal that triggers the linear actuator. This voltage signal will give power to the actuator, thus operating the CO2 bike pump. It was determined after thorough testing that a time duration of 300ms was enough to allow a burst of CO2 to be expelled from the bike pump and extinguish the flame without wasting much CO2. White Line Detection For the white line detecting circuit to operate properly, the light emitted from the LED obviously must be bright enough, and this is controlled by adjusting the potentiometer in Figure 12. The circuit was constructed by soldering components together with the potentiometer being replaced by a fixed resistor, and was attached to a block of wood that simulated the underside of the robot. With the circuit active, this unit was passed over a black surface with a line of white tape across a section of it. The change in voltage of the TSL257 was observed; a considerable voltage change as the unit passed over the white line from the black surface indicated the circuit was working as specified. Once the operation of the TSL257 was observed to be working correctly, the output pin was connected to a Holocon microcontroller A/D pin. Code was written and the data being read in by the pin was examined to be sure it is a correct representation of the analog voltage produced by the TSL257. The screen captures below in Figure 35 show the conditions that call different algorithms when read by the Holocon. When both detectors are at approximately 5V, this tells the controller the robot has moved over a white line or circle.

42

Page 48: DT03 Final

Figure 35: White Line Detector screen captures (CW from top right). (a)Both detectors

over black surface. (b)Both detectors over white surface. (c)Left detector over white surface. (d) Right detector over white surface.

Flame Detection As can be seen in Figure 15, the UVTRON R2868 Flame Sensor has a wide range of detection. Unfortunately, this allows for various sources of UV radiation that are not coming from a flame (such as sunlight) to also be detected by the sensor. Depending on how intense the sources of interference are, pulses can enter the C3704 drive circuit more frequently. For this reason, the driving circuit contains a set of jumpers that allow for background radiation cancellation, and will only output a pulse when a decided number of pulses enter the circuit. The circuit will only output a pulse if the sensor produces 3, 5, 7, or 9 pulses, depending on the jumper used. Per the C3704 datasheet, the “3” jumper was connected for normal use. The sensor was tested thoroughly with different sources of UV radiation such as fluorescent lighting and sunlight in conjunction with the UV radiation given off by the flame to determine the appropriate cancellation level. The VIRFL flame sensors are also prone to interference. The potentiometer attached to the NPN phototransistor, however, helps to control the amount of current that runs through the phototransistor. Since the output voltage is dependent on this current, the potentiometer adjusts the sensitivity of the phototransistor. To see the level of interference the surrounding environment may introduce, the sensor was connected to a bread board and its output was measured on an oscilloscope. The sensor’s response to various sources of infrared radiation such as sunlight, infrared remote controls, incandescent lamps, and a flame were examined. The sensitivity of the sensor was adjusted to such a level that all sources of IR radiation besides the flame contribute as little as possible to the sensor output. External shielding also was considered to reduce the impact of undesirable sources. After calibration, code was written and programmed into the Holocon to measure the outputs of the flame detection sensors. The output of the Hamamatsu C3704

43

Page 49: DT03 Final

drive circuit was connected directly to a digital I/O pin. The code for this sensor counted the number of pulses output by the sensor. After a number of pulses were counted, that determined whether or not a flame is present in the area. Readings from the IR sensors were measured to determine threshold values of various scenarios in the room where the candle is present, such as the candle being directly in front of the center sensor, or if the candle is off at an angle to the robot. The UVTRON was tested under different sources of UV radiation, including sunlight, fluorescent lighting, and fire (candle and lighters). On the UVTRON drive circuit board, the ‘3’ jumper was being used. This proved to provide accurate readings. Since the UVTRON is sensitive exclusively to UV radiation given off by fire, no extra shielding was required. The output waveform is shown below in Figure 36.

Figure 36: Output waveform of UVTRON sensor's drive circuit.

The VIRFL sensors were tuned such that the potentiometer was turned all the way counterclockwise. This is the most sensitive setting for the device, allowing a ‘dark’ voltage of approximately 4.9V and a ‘flame’ voltage of approximately 150mV. Under the testing conditions, which can be seen below in Figure 37, reflections of IR waves off the walls provided ‘noisy’ results; readings varied in a sinusoidal fashion. To minimize this, a black IR shield was placed over the ‘eye’ of the sensor, and the output was fed through a low pass filter to hold the values if they were still varying. This proved to work very well.

44

Page 50: DT03 Final

Figure 37: Testing set-up for VIRFL sensors

To test different scenarios, the set-up was situated such that the center sensor was directly in front of the flame, off-center to the right, and off-center to the left. Values were taken to observe the behavior of this sensor network in these conditions. Also, this was performed at a location close to the candle (approximately 10cm away), and further away from the candle (approximately 40cm away, approaching extinguishing range). The values were recorded and tabulated in Table 4 and Table 5 below.

Table 4: Data for candle flame further away from robot.

Center, Far left center right difference LR 64 47 65 ‐1 68 48 67 1 66 47 65 1 65 49 65 0

avg 65.75 47.75 65.5 std 1.71 0.96 1 max 68 49 67 min 64 47 65

Off Center Left, Far left center right difference LR 65 46 58 7 65 48 60 5 69 46 58 11 67 48 57 10

avg 66.5 47 58.25 std 1.91 1.15 1.26

45

Page 51: DT03 Final

max 69 48 60 min 65 46 57

Off Center Right, Far left center right difference LR 54 52 73 ‐19 54 56 77 ‐23 58 56 75 ‐17 53 55 75 ‐22

avg 54.75 54.75 75 std 2.22 1.89 1.63 max 58 56 77 min 53 52 73

Table 5: Data for candle flame close to robot.

Center, Close left center right difference LR 57 40 59 ‐2 57 41 62 ‐5 56 42 59 ‐3 59 41 61 ‐2 avg 57.25 41 60.25 std 1.26 0.82 1.5 max 59 42 62 min 56 40 59

Off Center Left, Close left center right 61 44 46 15 61 44 45 16 63 43 45 18 61 48 45 16 avg 61.5 44.75 45.25 std 1 2.22 0.50 max 63 48 46 min 61 43 45

Off Center Right, Close left center right difference LR

46

Page 52: DT03 Final

45 50 67 ‐22 45 49 67 ‐22 47 49 70 ‐23 44 50 71 ‐27 avg 45.25 49.5 68.75 std 1.26 0.58 2.06 max 47 50 71 min 44 49 67

The data in the tables above was used to write code to account for the various conditions this sensor network might experience while moving through the room, and to adjust itself accordingly if the robot attempts to extinguish the flame and does not put it out on the first try. The values measured were A/D values as seen by the Holocon controller. Digital Compass To calibrate the HMC6352 digital compass, it first must be connected to the Holocon microcontroller’s I2C line. The microcontroller will then be programmed to send a “C” command per the device’s datasheet to enter calibration mode. When in this mode, the compass must be manually rotated in a circle on a flat surface slowly enough to acquire enough data points. For optimum calibration, the compass should be rotated 2 complete times, and the time for one complete rotation must be at a minimum 6 seconds and a maximum of 3 minutes. The calibration time depends on the application, or how exact the user wants the calibration to be. For this project, given the presence of the permanent magnets in the DC motors, the compass was calibrated while the motors were in operation. The compass needed to take into account the presence of all sources of magnetic interference to be properly calibrated. Once the compass was calibrated, the compass was rotated clockwise and counterclockwise. The data the compass collected and sent to the microcontroller was read to verify it was operating correctly. As stated previously, the digital compass was not implemented. A lot of time was spent trying to find a reliable calibration method to ensure the compass was receiving minimal interference. The compass was calibrated by first mounting the device on the robot, and rotating the robot while the compass was in calibration mode. It was also calibrated by having code written to make the robot use its motors and wheels to spin itself in a circle while the compass was in calibration mode (in the hope that all ferrous fields would be accounted for in the calibration with everything powered). Both methods proved to provide accurate readings while the robot was stationary, but if the robot was moved slightly the readings varied wildly.

47

Page 53: DT03 Final

Ultrasonic Rangers The Devantech SRF05 Ultrasonic Ranger was used to measure long hallways and perform 90 degree turns. To test the SRF05 sensors each one was connected to a +3.3V source and code was written and programmed into the PIC33F microcontroller to output the required 10µs pulse for the SRF05 to send out the ultrasonic bursts. The same pin was changed over from an output to an input and the time difference between the rise and fall of the echo pulse generated by the SRF05 was recorded. This value was converted by the code into a physical distance which will be used to measure how far the sensor is from a wall. Figure 38 is an example of a reading done during testing of the SRF05. The object was placed 54 centimeters away which corresponds with the period of the 3.130 ms measured in the figure.

Figure 38: Ultrasonic Sensor image obtained from testing.

Infrared The Sharp GP2D120 IR Ranger was used to complement the ultrasonic rangers in determining how far the robot is from a wall. To test the capabilities of the ranger, it was bread boarded and moved manually at various distances from a stationary object that will be used to represent a wall. The output voltage was observed as the distance changes, and code was developed in relation to how the voltage changed. At this point, the output pin of the GP2D120 was connected to an A/D pin on the Holocon microcontroller to experimentally determine if the

48

Page 54: DT03 Final

code is performing accurate distance calculations. The code was adjusted as need during testing. The characteristic of the output voltage of this sensor is highly non-linear; it follows a log pattern. A method of linearizing the output of the sensor to have an easier way to establish values to use in code based off of A/D values was examined. An equation used to linearize the data was found by adding a constant to the distance value (in cm) and taking it’s inverse. This provided a linear equation that corresponds to the inverse of the distance to voltage. Taking this voltage and converting it to the A/D value seen by the Holocon provided an easy way to set threshold values. A graph showing this line and data that comes from the equation is shown below in Figure 39 and Table 6, respectively.

Figure 39: Linearized Sharp IR data for GP2D120.

Table 6: Table of A/D values found based off above graph

dindistance v istance voltage AD value

4 0.2262443 2.775321267 1136.7725 0.1845018 2.286516605 936.55726 0.1557632 1.949987539 798.71497 0.1347709 1.704167116 698.02698 0.1187648 1.516736342 621.25529 0.1061571 1.369099788 560.7833

1 0 0.0959693 1.249800384 511.91821 1 0.0875657 1.151394046 471.6111 2 0.0805153 1.068834138 437.79451 3 0.0745156 0.998578241 409.0176

49

Page 55: DT03 Final

1 4 0.0693481 0.938066574 384.23211 5 0.0648508 0.885403372 362.66121 6 0.0609013 0.839154689 343.71781 7 0.0574053 0.798215844 326.9492

System Testing Once the robot was fully constructed as shown in Figure 27 and programmed, it entered full scale testing. To simulate the competition, a practice arena was built according to the dimensions specified by the contest rules. The walls were painted a glossy white per the contest rules, the floor painted black, and strips of white tape were placed at the room entrances. A candle was placed randomly in one of the four rooms and the code in the robot was tested to ensure that the candle was located regardless of what room it was placed in. Testing was conducted until the robot was successfully able to find the candle in each of the four rooms. Also, modifications in coding, sensor alignment, sensitivity settings, and sensor shielding were made until the design was robust enough to perform in the required environments. Schematics

U12

Audio Detection

OutVdd

Gnd

2

3

U1

VIRFL

VddOutGnd

U2

VIRFL

VddOutGnd

U3

VIRFL

VddOutGnd

4

U4

SRF05

VddNC

Trigger/EchoModeGnd

U5

SRF05

VddNC

Trigger/EchoModeGnd

U6

SRF05

VddNC

Trigger/EchoModeGnd

U7

SRF05

VddNC

Trigger/EchoModeGnd

U16DE-SW050

IN OUT

GN

D

5

U17

GP2D120

VddOutGnd

1

U18

GP2D120

VddOutGnd

U8

C3704

+-123KA

R321.5k

UVTRONR2868

R1

100

R2

10kSET = 0.5

C9.01u

D1LED

U9

TSL257

GndVddOut

V1

12V

U13

GP2D120

VddOutGnd

6

U14

GP2D120

VddOutGnd

Sheet 1 of 4

U15

GP2D120

VddOutGnd

7

15

R331.5k C10

.01u

17

9

R3

100

R4

10kSET = 0.5

D2LED

U10

TSL257

GndVddOut

8

R5

100

R6

10kSET = 0.5

D3LED

U11

TSL257

GndVddOut

10

C1.1u

11

C2.1u

C3.1u

12

13

14

16

R341.5k

C11

.01u

+5V

Figure 40: Higher level schematic for sensor connections

50

Page 56: DT03 Final

5

6

7

8

9

V312V

U19DE-SW050

INOUT

GN

D

+5V

10

U31

PIC33 UART, QEA

PWM3

PWM4

UART Tx

UART Rx

RP14

11

12

13

14

1

15

U20B

Holocon Digital I/O 0-23

Ch.635

Ch.537

Ch.439

Ch.341

Ch.243

Ch.231

Ch.223

Ch.215

Ch.207

Ch.199

Ch.1811

Ch.1713

Ch.1615

Ch.1517

Ch.1419

Ch.1321

Ch.1223

Ch.1125

Ch.1027

Ch.929

Ch.831

Ch.1 45

Ch.0 47

Vdd49

GND50

Ch.733

2

3

4

U26

PIC33 UART, QEA

PWM1

PWM2

UART Tx

UART Rx

RP15

U20C

Holocon UART

UART1 Rx

UART1 Tx

UART2 Tx

UART2 Rx

U22

DC Linear Solenoid

+

-

U23

Relay Model

3

2

1

4

5

12VDC

U20A

Holocon Analog I/O 0-15

Ch.01

GND2

Ch.13

Ch.24

GND5

Ch.36

Ch.47

GND8

Ch.59

Ch.11 18

Ch.12 20

Ch.1017

GND 16

Ch.915 Ch.814 GND13

GND 19

Ch.610

GND11

Ch.712

Ch.13 21

GND 22

Ch.14 23

Ch.15 24

GND 25

U29

H-Bridge

Vcc

GND

PWM1

PWM2

Motor+

Motor-

12VDC

U30

H-Bridge

Vcc

GND

PWM1

PWM2

Motor+

Motor-

-

+

MG5

DC Motor

12

-

+

MG6

DC Motor

12

Figure 41: Higher level schematic for sensor/actuator connections to microcontrollers

Q3 Q4

Q5 Q6

D1

D3

D2

D4

14.8VDC

R1

33k

R2

33k

R3

1k

R4

1k

Q1 Q2PWM1

PWM1

PWM2

PWM2

MG1

DC Motor

1 2

Q8Q7Dy namic Brake SignalDy namic Brake Signal

R5

1k

R6

1kD5 D6

Figure 42: Circuit Diagram for H-Bridge

51

Page 57: DT03 Final

R3010k

U35

01 2

+5V

R31470k

+5V

U33A

74AC04

1 2

U27

NTE832

LPFLTR2

OUTFLTR1

OUT 8

Vcc4

R5

RC6

IN3

U34A

LM358

+3

-2

V+

V-

OUT1

R26100k

R27100k

MK1

mic

12

C4

0.01u

+5V R28

1M

+5V

C5

0.01u

C6

0.15u C7

0.22u

+5VR2920k

C8

.022u

TO HOLOCON

U36A

7432

12 3

Figure 43: Circuit Diagram for Audio Detection Circuit

Financial Budget

Original Labor Cost Design Team Member

Hourly Rate Estimated Hours Total Estimated Cost

Joe McGlinchy $10.00 150 $1,500.00 Matt Taschner $10.00 150 $1,500.00 Tom Vo $10.00 150 $1,500.00

Actual Labor Cost Design Team Member

Hourly Rate Estimated Hours Total Estimated Cost

Joe McGlinchy $10.00 700 $7,000.00 Matt Taschner $10.00 700 $7,000.00 Tom Vo $10.00 700 $7,000.00

The original labor cost was determined from the design phase of the project and was estimated as seen above. The time spent in the design process was a good estimate because of all of the considerations of the robot that were made. Following the original labor costs is the actual labor costs. These values are considerably higher since this was the actual implementation phase of the robot. Many hours were spent in the full-scale testing making sure the robot behaved as it was designed.

52

Page 58: DT03 Final

Material Cost Qty. Part Num. Description Unit Cost Total Cost

1 Holocon Holocon Microcontroller donated donated

4 DSPIC33FJ12MC201-I/P-ND

IC DSPIC MCU/DSP 12K 20DIP $5.58 $22.32

3 VIRFL VIRFL IR flame sensor donated donated

4 TSL257-LF Light to Voltage optical converter $2.02 $8.08

2 C3704,R2868 Hamamatsu UVTRON Flame Detector Package $72.00 $144.00

4 LED-126

Special Ultra-bright Red LED, 5mm, water clear lens $0.45 $1.80

2 38-164

1MEG Ohm single turn cermet 3/8" square, 1/2 W, +/- 10% $0.75 $1.50

4 38-244

10k Ohm single turn cermet 3/8" square, 1/2 W, +/- 10% $0.75 $3.00

5 SRF05 Devantech SRF05 Ultrasonic Ranger $29.50 $147.50

5 EM6050P-443 Microphone Omni-direct 6.0X5.0MM $1.34 $6.70

3 526-NTE832 NTE832 Tone Decoder IC $4.08 $12.24

5 GPD2D120 Sharp IR Ranger 1.5"to 12" $12.50 $62.50

1 526-R40-11D2-5/6 General Purpose Relays

RELY 5/6VDC DPDT 2A $4.68 $4.68

2 DE-SW050 5V 1A Switching voltage regulator $15.00 $30.00

2 DE-SW033 3.3V 1A Switching voltage regulator $15.00 $30.00

1 HMC6352 Honeywell digital compass module $59.95 $59.95

1 F1578L-12V DC Linear Solenoid $72.90 $72.902 SD3729-12-18-FEC DC Motor with encoder $61.43 $122.86

10 1N4006 Diode $0.09 $0.87

8 TIP142 TRANS NPN DARL 100V 10A TO-218 $1.68 $13.44

4 TIP147 TRANS PNP DARL 100V 10A TO-218 $1.91 $7.64

4 2N4123BU IC TRANS NPN SS GP 200MA TO-92 $0.11 $0.44

3 A104K15X7RF5TAA .1uF capacitor $0.09 $0.27

53

Page 59: DT03 Final

1 C1608X8R1H103K .01F capacitor $0.12 $0.123 ECJ-1VB1E103K .01uF capacitor $0.03 $0.091 ECE-A1EKA4R7 4.7uF capacitor $0.14 $0.14

6 CFR-50JB-1K0 1k ohm resistor 1/2W 5% Carbon Film, min. 5 $0.05 $0.31

5 CFR-50JB-100R 100 ohm resistor 1/2W 5% Carbon Film, min. 5 $0.05 $0.26

5 CFR-50JB-33K 33k ohm resistor 1/2W 5% Carbon Film, min. 5 $0.05 $0.26

5 CFR-50JB-100K 100k ohm resistor 1/2W 5% Carbon Film, min. 5 $0.05 $0.26

5 CFR-50JB-3K0 3k ohm resistor 1/2W 5% Carbon Film, min. 5 $0.05 $0.26

5 CFR-50JB-68R

65 ohm resistor 1/2W 5% Carbon Film, min.5, closest is 68 ohm $0.05 $0.26

5 CFR-50JB-200R 200 ohm resistor 1/2W 5% Carbon Film, min. 5 $0.05 $0.26

5 CFR-50JB-470K 470k ohm resistor 1/2W 5% Carbon Film, min. 5 $0.05 $0.26

5 CFR-50JB-330R 330 ohm resistor 1/2W 5% Carbon Film, min.5 $0.05 $0.26

5 CFR-25JB-4K7 4.7k ohm resistor 1/2W 5% Carbon Film, min. 5 $0.05 $0.26

1 LCH4S4R1WR

Li-Ion 14.8 V 2600mah battery module ( Flat) with Protection IC $65.95 $65.95

1 CH-LI1418-4

Universal Smart Charger (1.5A) for 14.8V Li-Ion Battery Pack (4 cells ) with two pins universal connector $26.95 $26.95

2 LI18650-14.8V4400BL

Li-Ion 18650 14.8V 4400 mAh PCB Protected Rechargeable Battery with Bare Leads $59.99 $119.98

1 TLP_3000

Universal Fast Smart Charger for Li-Ion / Li-polymer battery Pack (14.8V, 4 cells) $23.99 $23.99

1 LD1084-12

Low Drop Voltage Regulators/Drivers 12V 5.0A Positive $1.74 $1.74

1 24028 Innovations Ultraflate CO2 Powered Inflation $13.98 $13.98

2 M-400-30-WC-2007 Colson Wheel 4” x 7/8” $4.15 $8.30

54

Page 60: DT03 Final

2 M-400-30-WH-WC002-B

Wheel Hub, Colson 7/8" Wheel, 6mm, 1/8" Broach $6.00 $12.00

1 CGSX-M06-36

S/S PRECISION SHAFT 6MM DIA TYPE 303 36" LONG $10.64 $10.64

1 CGSX-M12-24

S/S PRECISION SHAFT 12MM DIA TYPE 303 24" LONG $19.55 $19.55

1 ZPR-16-36

POLYCARBONATE ROUND 1" DIA 36" LONG $35.50 $35.50

2 6462K12

Type 303 SS Set Screw Shaft Collar 1/4" Bore, 1/2" Outside Diameter, 9/32" Width $2.47 $4.94

1 91313A116

Metric Knurled Cup Point Socket Set Screw 18-8 Stainless Steel, M3 Thread, 3 mm Length $7.50 $7.50

10 PC2501010 1/4" X 10" X 10" Polycarbonate Sheet $6.22 $62.20

1082 - Round Trip to Connecticut $0.13 $140.66

1 - Contest Registration $70.00 $70.002 - Lodging $130.00 $260.00 Total $1,639.57

55

Page 61: DT03 Final

56

Project Schedule ID Tas k Nam e Duration Start Finish Predecess ors Resource Names

1 Block Diagrams (hardware & software) 63.38 days Fri 8/31/07 Fri 11/2/07 Joe McGlinchy,Matt Taschner,Tom Vo2 Full Block Diagrams Pass 2 1.81 days Fri 8/31/07 Wed 9/5/07 Matt Taschner,Joe McGlinchy3 Individual Block Diagrams Pass 1 18.38 days Mon 9/3/07 Fri 9/21/07 2 Joe McGlinchy,Matt Taschner,Tom Vo4 Software Diagram 18.38 days Mon 9/3/07 Fri 9/21/07 Tom Vo5 Power Sys tem Diagram 18.38 days Mon 9/3/07 Fri 9/21/07 Matt Taschner6 Sensor Diagram 18.38 days Mon 9/3/07 Fri 9/21/07 Joe McGlinchy7 Motor Diagram 18.38 days Mon 9/3/07 Fri 9/21/07 Matt Taschner8 Actuator Diagram 18.38 days Mon 9/3/07 Fri 9/21/07 Joe McGlinchy9 Individual Block Diagrams Pass 2 18.38 days Mon 9/24/07 Fri 10/12/07 3 Joe McGlinchy,Matt Taschner,Tom Vo10 Software Diagram Pass 2 18.38 days Mon 9/24/07 Fri 10/12/07 Tom Vo11 Power Sys tem Diagram Pass 2 18.38 days Mon 9/24/07 Fri 10/12/07 Matt Taschner12 Sensor Diagram Pas s 2 18.38 days Mon 9/24/07 Fri 10/12/07 Joe McGlinchy13 Motor Diagram Pass 2 18.38 days Mon 9/24/07 Fri 10/12/07 Matt Taschner14 Actuator Diagram Pass 2 18.38 days Mon 9/24/07 Fri 10/12/07 Joe McGlinchy15 Completed Block Diagrams 18.38 days Mon 10/15/07 Fri 11/2/07 9 Joe McGlinchy,Matt Taschner,Tom Vo16 Software Diagram Final 18.38 days Mon 10/15/07 Fri 11/2/07 Tom Vo17 Power Sys tem Diagram Final 18.38 days Mon 10/15/07 Fri 11/2/07 Matt Taschner18 Sensor Diagram Final 18.38 days Mon 10/15/07 Fri 11/2/07 Joe McGlinchy19 Motor Diagram Final 18.38 days Mon 10/15/07 Fri 11/2/07 Matt Taschner20 Actuator Diagram Final 18.38 days Mon 10/15/07 Fri 11/2/07 Joe McGlinchy21 Design Specifications 5 days Mon 8/27/07 Sat 9/1/07 Joe McGlinchy,Matt Taschner,Tom Vo22 Mechanical 5 days Mon 8/27/07 Sat 9/1/07 Joe McGlinchy23 Material 5 days Mon 8/27/07 Sat 9/1/07 Tom Vo24 Power Sys tem 5 days Mon 8/27/07 Sat 9/1/07 Matt Taschner25 Control 5 days Mon 8/27/07 Sat 9/1/07 Tom Vo26 Radiation 5 days Mon 8/27/07 Sat 9/1/07 Joe McGlinchy27 Alternative Design Analysis 32 days Mon 8/27/07 Fri 9/28/07 Joe McGlinchy,Matt Taschner,Tom Vo28 NumericalAnalysis 25 days Mon 8/27/07 Fri 9/21/07 Joe McGlinchy,Matt Taschner,Tom Vo29 Electrical Design Calculations 2 days Mon 8/27/07 Wed 8/29/07 Joe McGlinchy,Matt Taschner,Tom Vo30 Communication 2 days Mon 8/27/07 Wed 8/29/07 Tom Vo31 Interface between PIC24 & Holocon 2 days Mon 8/27/07 Wed 8/29/07 Tom Vo32 Serial Com munication 2 days Mon 8/27/07 Wed 8/29/07 Tom Vo33 Digital Signal Lines 2 days Mon 8/27/07 Wed 8/29/07 Tom Vo34 Computing & Control System 2 days Mon 8/27/07 Wed 8/29/07 Tom Vo35 PIC 2 days Mon 8/27/07 Wed 8/29/07 Tom Vo36 Holocon 2 days Mon 8/27/07 Wed 8/29/07 Tom Vo37 Power, voltage, current 2 days Mon 8/27/07 Wed 8/29/07 Matt Taschner38 Batteries 2 days Mon 8/27/07 Wed 8/29/07 Matt Taschner39 Num ber (1, 2 or 3) 2 days Mon 8/27/07 Wed 8/29/07 Matt Taschner40 Type (L-Ion, NiMH, Lead Acid) 2 days Mon 8/27/07 Wed 8/29/07 Matt Taschner41 Thermal 2 days Mon 8/27/07 Wed 8/29/07 Matt Taschner42 Motors & H-Bridge Heat Diss ipation 2 days Mon 8/27/07 Wed 8/29/07 Matt Taschner43 Radiation 2 days Mon 8/27/07 Wed 8/29/07 Joe McGlinchy44 Sensors Sensistivity to Environment Noi 2 days Mon 8/27/07 Wed 8/29/0745 Infrared 2 days Mon 8/27/07 Wed 8/29/07 Joe McGlinchy46 Ultrasonic 2 days Mon 8/27/07 Wed 8/29/07 Joe McGlinchy47 Mechanical Design Calculations 2 days Mon 8/27/07 Wed 8/29/0748 Structual considerations 2 days Mon 8/27/07 Wed 8/29/0749 Body 2 days Mon 8/27/07 Wed 8/29/07 Tom Vo50 Poly-Carbonate 2 days Mon 8/27/07 Wed 8/29/07 Tom Vo51 Aluminum 2 days Mon 8/27/07 Wed 8/29/07 Tom Vo52 System Dynamics 2 days Mon 8/27/07 Wed 8/29/0753 Fire Extinguishing Method 2 days Mon 8/27/07 Wed 8/29/07 Tom Vo54 Water Spray Bottle 2 days Mon 8/27/07 Wed 8/29/07 Tom Vo55 Pres surized CO2 Cartridge 2 days Mon 8/27/07 Wed 8/29/07 Tom Vo56 Air Com press or, Valve, Water Tank 2 days Mon 8/27/07 Wed 8/29/07 Tom Vo57 Economic Calculations 25 days Mon 8/27/07 Fri 9/21/07 Joe McGlinchy58 Major Component Comparison 25 days Mon 8/27/07 Fri 9/21/0759 Hardware 25 days Mon 8/27/07 Fri 9/21/0760 Electrical 8.33 days Mon 8/27/07 Tue 9/4/07 Tom Vo,Joe McGlinchy,Matt Taschner61 Mechanical 25 days Mon 8/27/07 Fri 9/21/07 Tom Vo,Joe McGlinchy,Matt Taschner62 Software 8.33 days Mon 8/27/07 Tue 9/4/0763 Development Tools 8.33 days Mon 8/27/07 Tue 9/4/07 Tom Vo,Joe McGlinchy,Matt Taschner64 Learning Curve 8.33 days Mon 8/27/07 Tue 9/4/07 Tom Vo,Joe McGlinchy,Matt Taschner65 Alternatve Design Presentation 7 days Fri 9/21/07 Fri 9/28/0728 Joe McGlinchy,Matt Taschner,Tom Vo66 Progress Reports 56 days Fri 9/28/07 Fri 11/23/07 65 Matt Taschner67 Report #1 7.09 days Fri 9/28/07 Fri 10/5/0765 Matt Taschner68 Report #2 7 days Fri 10/5/07 Fri 10/12/0767 Matt Taschner69 Report #3 7 days Fri 10/12/07 Fri 10/19/0768 Matt Taschner70 Report #4 7 days Fri 10/19/07 Fri 10/26/0769 Matt Taschner71 Report #5 7 days Fri 10/26/07 Fri 11/2/0770 Matt Taschner72 Report #6 7 days Fri 11/2/07 Fri 11/9/0771 Matt Taschner73 Report #7 7 days Fri 11/9/07 Fri 11/16/0772 Matt Taschner74 Report #8 7 days Fri 11/16/07 Fri 11/23/0773 Matt Taschner75 Accepted Project Design 56 days Fri 11/23/07 Fri 1/18/08 74 Joe McGlinchy,Matt Taschner,Tom Vo76 Design Gantt Chart 7 days Fri 11/23/07 Fri 11/30/0767 Tom Vo

Page 62: DT03 Final

77 Software Design 3 days Fri 11/23/07 Mon 11/26/07 Tom Vo78 Psuedo Code 3 days Fri 11/23/07 Mon 11/26/07 Tom Vo79 Input Routine 3 days Fri 11/23/07 Mon 11/26/07 Tom Vo80 Hardware Design 56 days Fri 11/23/07 Fri 1/18/0881 Sim ulations 56 days Fri 11/23/07 Fri 1/18/0882 Schem atics 56 days Fri 11/23/07 Fri 1/18/0883 Parts Reques t Form 56 days Fri 11/23/07 Fri 1/18/0884 Budget (Estimated) 1 day Fri 11/23/07 Sat 11/24/07 Tom Vo85 Com petition Cos ts 1 day Fri 11/23/07 Sat 11/24/07 Tom Vo86 Robot Materials 1 day Fri 11/23/07 Sat 11/24/07 Tom Vo87 Tes ting Materials 1 day Fri 11/23/07 Sat 11/24/07 Tom Vo88 Testing Procedures 56 days Fri 11/23/07 Fri 1/18/0889 Hardware Procedures 2 days Fri 11/23/07 Sun 11/25/0790 Motor & H-Bridge Operation 2 days Fri 11/23/07 Sun 11/25/07 Matt Taschner91 Tes t Motor Speed w/PWM s ignal 2 days Fri 11/23/07 Sun 11/25/07 Matt Taschner92 Proper Motor Direction given H-Bridge Log 2 days Fri 11/23/07 Sun 11/25/07 Matt Taschner93 Actuator Operation 1 day Fri 11/23/07 Sat 11/24/07 Matt Taschner94 Capable of closing the CO2 pump lever 1 day Fri 11/23/07 Sat 11/24/07 Matt Taschner95 Verify Proper Sensor Outputs 2 days Fri 11/23/07 Sun 11/25/07 Joe McGlinchy96 Flame Sensors 2 days Fri 11/23/07 Sun 11/25/07 Joe McGlinchy97 Ultrasonic Sensors 2 days Fri 11/23/07 Sun 11/25/07 Joe McGlinchy98 Infrared Line Detectors 2 days Fri 11/23/07 Sun 11/25/07 Joe McGlinchy99 Software Procedures 56 days Fri 11/23/07 Fri 1/18/08 Tom Vo100 Motor Output 7 days Fri 11/23/07 Fri 11/30/07 Tom Vo101 Given direction, Proper H-Bridge Logic is prod 7 days Fri 11/23/07 Fri 11/30/07 Tom Vo102 Given s peed, Proper PWM s ignal is produced 7 days Fri 11/23/07 Fri 11/30/07 Tom Vo103 Sensors 2 days Fri 11/23/07 Sun 11/25/07 Tom Vo104 Verify expected values are read in properly 2 days Fri 11/23/07 Sun 11/25/07 Tom Vo105 Project Poster 7 days Fri 11/30/07 Fri 12/7/0776 Joe McGlinchy,Matt Tas chner,Tom Vo106 Implementation Gantt Chart 21 days Fri 12/7/07 Fri 12/28/07105 Joe McGlinchy,Matt Tas chner,Tom Vo107 Final Design Report 95 days Mon 8/27/07 Fri 11/30/07 Joe McGlinchy,Matt Tas chner,Tom Vo108 Final Design Presentation 7 days Fri 11/30/07 Fri 12/7/07107 Joe McGlinchy,Matt Tas chner,Tom Vo

Figure 44: Design Gantt Chart for project.

57

Page 63: DT03 Final

ID Task Name Duration Start Finish Prede Week Resource Names1 Revise Gantt Chart 22 days Mon 12/17/0 Tue 1/8/0 12 Implement Project Design 93 days Mon 12/17/07 Wed 3/19/083 Hardware Implementation 93 days Mon 12/17/07 Wed 3/19/084 Breadboard Components 28 days Mon 12/17/07 Mon 1/14/085 Li-Ion Power Suppl y 14 days Mon 12/24/0 Mon 1/7/0 Matt6 PIC and H-Bridge Circuit 5 days Mon 12/24/0 Sat 12/29/0 Matt,Tom7 DC Spur Gear Motors 7 days Mon 12/31/0 Mon 1/7/0 Matt8 Audio Detect ion Circuit 5 days Mon 12/17/0 Sat 12/22/0 Joe9 Ultrasonic Sensors 14 days Mon 12/31/0 Mon 1/14/0 Joe10 Infrared Sensors 14 days Mon 12/17/0 Mon 12/31/0 Joe11 UVTRON Flame Sensor 14 days Mon 12/17/0 Mon 12/31/0 Joe12 White Line Detection Circui t 10 days Mon 12/31/0 Thu 1/10/0 Joe13 Layout and Generate PCB(s) 30 days Mon 12/31/07 Wed 1/30/08 214 H-Bridge Heatsi nk PCB traces 7 days Wed 1/2/08 Wed 1/9/08 Matt15 Audio Detect ion PCB 5 days Mon 12/31/0 Sat 1/5/08 Joe16 dsPIC33F Layout and Connecti ons 14 days Mon 1/7/0 Mon 1/21/0 Tom17 Ultrasonic Sensors Overal l Layout PCB 9 days Mon 1/21/0 Wed 1/30/08 Joe18 IR Sensor Breakout Board 9 days Wed 1/2/08 Fri 1/11/08 Joe19 Digital Compass PCB 2 days Tue 1/1/0 Thu 1/3/0 Tom20 Assemble Hardware 79 days Mon 12/17/07 Wed 3/5/08 421 Electrical 29 days Sat 1/5/08 Sun 2/3/0822 Power connecti ons 14 days Sat 1/5/08 Sat 1/19/08 Matt23 H-Bridge and dsPIC33F PCB assembly 5 days Wed 1/9/08 Mon 1/14/0 14 Matt,Tom24 Audio Detect ion Circuit PCB assembly 5 days Sat 1/5/08 Thu 1/10/0 15 Joe25 dsPIC33F PCB assembl y 7 days Mon 1/21/0 Mon 1/28/0 16 Tom26 Ultrasonic Sensor PCB assembly 4 days Wed 1/30/08 Sun 2/3/08 17 Joe27 IR Breakout Board assembly 5 days Fri 1/11/08 Wed 1/16/08 18 Joe28 Digital Compass assembly 4 days Wed 1/9/08 Sun 1/13/0 Joe29 Mechanical 79 days Mon 12/17/07 Wed 3/5/0830 Mock Arena Construction 14 days Mon 12/17/0 Mon 12/31/0 Matt,Joe,Tom31 Pol ycarbonate Body Construction 14 days Mon 1/14/0 Mon 1/28/0 Matt,Joe,Tom32 Motor Mounti ng 8 days Tue 1/29/0 Wed 2/6/08 Matt33 Wheels, couplers, and hub attachments 8 days Tue 1/29/0 Wed 2/6/08 Tom,Matt34 H-Bridge and dsPIC33F PCB Placement 3 days Wed 2/6/08 Sat 2/9/08 33 Matt35 White Line Detection Circui t Orei entation 3 days Wed 2/6/08 Sat 2/9/08 Joe36 Caster Mounting and pl acement 5 days Wed 2/6/08 Mon 2/11/0 32 Tom37 Holocon ori entati on and mounting considerat ions 5 days Mon 2/18/0 Sat 2/23/08 Tom38 Power-Battery l ocations and mounti ng 5 days Mon 2/18/0 Sat 2/23/08 Matt39 Ultrasonic platform construction 5 days Sun 2/24/08 Fri 2/29/08 Joe40 Ultrasonic sensor mounting 5 days Sun 2/24/0 Fri 2/29/08 Joe41 Infrared sensor orientati on and mounting 4 days Mon 2/25/0 Fri 2/29/08 Joe42 UVTRON sensor placement 4 days Mon 2/25/0 Fri 2/29/08 Joe43 Extinguisher mounting 5 days Fri 2/29/08 Wed 3/5/08 Matt44 Test Hardware 27 days Mon 1/14/08 Sun 2/10/08 545 Audio Detect ion response to specifi c frequencies 5 days Wed 1/16/08 Mon 1/21/0 24 Joe46 H-Bridge, dsPIC33F, and motor synchroni zation 7 days Mon 1/14/0 Mon 1/21/0 23 Tom,Matt47 Ultrasonic Sensor range and response 7 days Sun 2/3/08 Sun 2/10/0 26 Joe48 IR Sensor range and response 7 days Wed 1/16/08 Wed 1/23/08 27 Joe49 UVTRON Sensor range and response 7 days Wed 1/16/08 Wed 1/23/08 Joe50 Power consumpti on and requirements 14 days Mon 1/14/0 Mon 1/28/0 Matt51 Actuator-CO2 bike pump performance 6 days Mon 1/14/0 Sun 1/20/0 Matt52 Revise Hardware 7 days Wed 3/5/08 Wed 3/12/08 2053 Demonstrate Hardware 7 days Wed 3/12/08 Wed 3/19/08 44,52 754 SDC & FA Hardware Approval 0 days Wed 3/19/08 Wed 3/19/08 5355 Software Implementation 75 days Mon 12/17/07 Sat 3/1/0856 Dev elop Software 54 days Mon 12/17/07 Sat 2/9/0857 H-Bridge and dsPIC33F Communicati on 5 days Wed 1/2/08 Mon 1/7/0 Tom,Matt58 Holocon communication wi th sensors 14 days Mon 12/17/0 Mon 12/31/0 Tom59 Holocon and dsPIC33F Interface 14 days Mon 1/7/0 Mon 1/21/0 Tom60 Holocon Algorithms 33 days Mon 1/7/08 Sat 2/9/08 Tom61 Arena navigating algorithm 14 days Mon 1/7/0 Mon 1/21/0 Tom62 Room navigating algorithm 7 days Mon 1/21/0 Mon 1/28/0 Tom63 Flame extingui shing al gorithm 5 days Mon 1/28/0 Sat 2/2/08 Tom64 Return Home Trip algorithm 7 days Sat 2/2/08 Sat 2/9/08 Tom65 Test Software 46 days Tue 1/1/08 Sat 2/16/0866 H-Bridge and dsPIC33F Communicati on 5 days Mon 1/7/0 Sat 1/12/08 Tom,Matt67 Holocon communication wi th sensors 10 days Tue 1/1/0 Fri 1/11/08 Tom68 Holocon and dsPIC33F Interface 10 days Mon 1/21/0 Thu 1/31/0 Tom69 Holocon Algorithms 26 days Mon 1/21/08 Sat 2/16/08 Tom70 Arena navigating algorithm 14 days Mon 1/21/0 Mon 2/4/0 Tom71 Room navigating algorithm 7 days Mon 1/28/0 Mon 2/4/0 Tom72 Flame extingui shing al gorithm 5 days Sat 2/2/08 Thu 2/7/0 Tom73 Return Home Trip algorithm 7 days Sat 2/9/08 Sat 2/16/08 Tom74 Revise Software 7 days Sat 2/16/08 Sat 2/23/08 6975 Demonstrate Software 7 days Sat 2/23/08 Sat 3/1/08 74 876 SDC & FA Software Approval 0 days Sat 3/1/08 Sat 3/1/08 75 977 System Integration 96 days Mon 1/21/08 Sat 4/26/0878 Assemble Complete System 28 days Mon 1/21/08 Mon 2/18/0879 Intergrate H-Bri dge, dsPIC33F, and motors wi th Holocon microcontroll 14 days Mon 1/21/0 Mon 2/4/0 Matt,Tom80 Integrate al l sensors with Holocon microcontroll er 14 days Mon 2/4/0 Mon 2/18/0 Joe,Tom81 Integrate al l alogrithms, have all components functi on at proper time 21 days Mon 1/21/0 Mon 2/11/082 Test Complete System 9 days Sat 3/8/08 Mon 3/17/08 1083 Power-Up 5 days Sat 3/8/08 Thu 3/13/0 Matt84 Locomoti on 7 days Sat 3/8/08 Sat 3/15/08 Matt85 3-4kHz Frequency Activation 5 days Sat 3/8/08 Thu 3/13/0 Joe86 Flame location accuracy 5 days Sat 3/8/08 Thu 3/13/0 Joe87 Flame extingui shing accuracy 5 days Sat 3/8/08 Thu 3/13/0 Matt88 Hal lway Navi gation 7 days Mon 3/10/0 Mon 3/17/0 Tom89 Room Navi gation 7 days Mon 3/10/0 Mon 3/17/0 Tom90 Return Home Trip 7 days Mon 3/10/0 Mon 3/17/0 Tom91 Revise Complete System 14 days Mon 2/18/0 Mon 3/3/0 7892 Demonstration of Complete System 0 days Sat 4/12/08 Sat 4/12/08 91 1293 Demonstration w/ 10 % Final Grade deduction 0 days Sat 4/26/08 Sat 4/26/08 1494 Dev elop Final Report 105 days Mon 1/14/08 Mon 4/28/0895 Wri te Final Report 105 days Mon 1/14/0 Mon 4/28/096 Submit Final Report 0 days Mon 4/28/0 Mon 4/28/0 95 1597 Marti n Luther King Day - Universi ty cl osed 0 days Mon 12/17/0 Mon 12/17/098 Spring Recess 6 days Mon 3/17/0 Sun 3/23/099 ECE Advi sory Counci l Presentation 0 days Mon 4/14/0 Mon 4/14/0 13100 Senior Desi gn Expo 0 days Wed 4/30/08 Wed 4/30/08 15

Figure 45: Implementation Gantt Chart for project

58

Page 64: DT03 Final

ID Task Name Duration Start Finish Prede Week Resource Names

1 Actual Gantt Chart 22 days Mon 12/17/0 Tue 1/8/0 12 Implement Project Design 110 days Mon 1/7/08 Sat 4/26/083 Hardware Implementation 75 days Mon 1/7/08 Sat 3/22/084 Breadboard Components 40 days Mon 1/7/08 Sat 2/16/085 Li-Ion Power Suppl y 14 days Mon 1/14/0 Mon 1/28/0 Matt6 PIC and H-Bridge Circuit 10 days Mon 2/4/0 Thu 2/14/0 7 Matt7 DC Spur Gear Motors 7 days Mon 1/28/0 Mon 2/4/0 Matt8 Audio Detection Ci rcuit 30 days Mon 1/7/0 Wed 2/6/08 Joe9 Ultrasonic Sensors 14 days Mon 1/7/0 Mon 1/21/0 Tom10 Infrared Sensors 7 days Mon 1/14/0 Mon 1/21/0 Matt,Joe11 UVTRON Flame Sensor 1 day Mon 1/21/0 Tue 1/22/0 Matt,Tom12 White Line Detection Circui t 8 days Mon 2/4/0 Tue 2/12/0 Joe13 EMIC Text-To-Speech and Ampli fier Ci rcui t 5 days Mon 2/11/0 Sat 2/16/08 Tom14 Layout and Generate PCB(s) 21 days Wed 2/6/08 Wed 2/27/08 2 Matt,Joe,Tom15 H-Bridge Heatsink PCB traces 13 days Thu 2/14/08 Wed 2/27/08 Matt16 dsPIC33F Layout and Connecti ons 7 days Thu 2/14/0 Thu 2/21/0 Tom,Matt17 Order board ExpressPCB 1 day Thu 2/21/0 Fri 2/22/08 16 Matt18 Populate H-Bridge PCB 5 days Fri 2/22/08 Wed 2/27/08 17 Matt19 Audio Detection PCB 2 days Wed 2/6/08 Fri 2/8/08 Joe20 Verify Layout Design 1 day Wed 2/6/08 Thu 2/7/0 Joe21 Etch new board 1 day Thu 2/7/0 Fri 2/8/08 20 Matt22 Dril l holes 1 day Thu 2/7/0 Fri 2/8/08 Matt23 Design PCB Layout Spkr Amplifier 3 days Sat 2/16/08 Tue 2/19/08 Tom24 Design layout of circuit 2 days Sat 2/16/08 Mon 2/18/0 Tom25 Populate Perf Board 1 day Mon 2/18/0 Tue 2/19/0 24 Tom26 Design Extra Slot for Holocon 3 days Thu 2/7/08 Sun 2/10/08 Tom,Matt27 Design and layout 2 days Thu 2/7/0 Sat 2/9/08 Matt,Tom28 Etch new board 1 day Sat 2/9/08 Sun 2/10/0 27 Matt,Tom29 Dril l holes 1 day Sat 2/9/08 Sun 2/10/0 Matt30 IR Sensor Filter Board 2 days Mon 2/18/0 Wed 2/20/08 Joe31 Mechanical Design & Hardware Layout 31 days Mon 2/11/08 Thu 3/13/08 432 Polycarbonate Body Construction 31 days Mon 2/11/08 Thu 3/13/08 Matt33 Design Base Platform Layout 21 days Mon 2/11/08 Mon 3/3/08 Matt34 Motor Mounti ng 8 days Mon 2/11/0 Tue 2/19/0 Matt35 Caster Mounting 3 days Mon 2/18/0 Thu 2/21/0 Matt36 Heatsink & PCB Mounti ng 3 days Mon 2/18/0 Thu 2/21/0 Matt37 Test H-Bridge Circuits w ith PICs 10 days Fri 2/22/08 Mon 3/3/08 Matt,Tom38 Verify Quadrature Encoder Interface 2 days Fri 2/22/08 Sun 2/24/0 Matt,Tom39 Verify H-Bri dge Functionali ty 5 days Wed 2/27/08 Mon 3/3/0 Matt,Tom40 Cal ibrate motor distances and encoders 10 days Fri 2/22/08 Mon 3/3/0 5 Matt,Tom41 Base Construction 21 days Mon 2/11/08 Mon 3/3/08 Matt42 Motor Mounti ng 8 days Mon 2/11/0 Tue 2/19/0 Matt43 Caster Mounting 3 days Mon 2/18/0 Thu 2/21/0 Matt44 Heatsink & PCB Mounti ng 3 days Mon 2/18/0 Thu 2/21/0 Matt45 Test H-Bridge Circuits w ith PICs 10 days Fri 2/22/08 Mon 3/3/08 Matt,Tom46 Verify Quadrature Encoder Interface 2 days Fri 2/22/08 Sun 2/24/0 Matt,Tom47 Verify H-Bri dge Functionali ty 5 days Wed 2/27/08 Mon 3/3/0 Matt48 Cal ibrate motor distances and encoders 10 days Fri 2/22/08 Mon 3/3/0 5 Tom,Matt49 Battery Mounting 1 day Mon 3/3/0 Tue 3/4/0 Matt50 Holocon Mounting 1 day Mon 3/3/0 Tue 3/4/0 Matt51 Actuator & Bike pump mount 3 days Wed 3/5/08 Sat 3/8/08 Matt52 Mount Solenoid 2 days Wed 3/5/08 Fri 3/7/08 Matt53 Dril l Hole for Placement of Pump 1 day Wed 3/5/08 Thu 3/6/0 Matt54 Make mount for Pump 2 days Wed 3/5/08 Fri 3/7/08 Matt55 Tap holes on mount and pl atform 3 days Wed 3/5/08 Sat 3/8/08 Matt56 Ultrasonic Sensor Mount 3 days Mon 3/10/08 Thu 3/13/08 Matt57 Create Pl atform for US sensors 3 days Mon 3/10/0 Thu 3/13/0 Matt58 IR Sensors Mount 3 days Mon 3/10/08 Thu 3/13/08 Matt59 Placement Consi deration 3 days Mon 3/10/0 Thu 3/13/0 Joe60 Revise Hardware 7 days Sat 3/8/08 Sat 3/15/08 5161 Demonstrate Hardware 7 days Sat 3/15/08 Sat 3/22/08 48,60 762 SDC & FA Hardware Approval 0 days Sat 3/22/08 Sat 3/22/08 6163 Software Implementation 56 days Sat 3/1/08 Sat 4/26/0864 Dev elop Software 16 days Sat 3/1/08 Mon 3/17/08 Tom65 Create JAVA Architecture for analog and digi tal channels 10 days Sat 3/1/08 Tue 3/11/0 Tom66 Write nav igation algorithm 10 days Mon 3/3/08 Thu 3/13/08 Tom67 Wri te wal l fol lowi ng algorithm 10 days Mon 3/3/0 Thu 3/13/0 Tom68 Wri te room enteri ng mechani sm 10 days Mon 3/3/0 Thu 3/13/0 Tom69 Write algorithm for when fire is detected in room 14 days Mon 3/3/08 Mon 3/17/08 Joe,Tom70 Wri te enteri ng room algorithm 14 days Mon 3/3/0 Mon 3/17/0 Joe71 Wri te zero i n on f lame algorithm 14 days Mon 3/3/0 Mon 3/17/0 Joe72 Wri te exti nguishing fl ame algorithm 14 days Mon 3/3/0 Mon 3/17/0 Joe73 Wri te leaving room al gori thm 14 days Mon 3/3/0 Mon 3/17/0 Tom74 Test Software 19 days Mon 3/24/0 Sat 4/12/08 Tom,Joe75 Revise Software 7 days Sat 4/12/08 Sat 4/19/08 7476 Demonstrate Software 7 days Sat 4/19/08 Sat 4/26/08 75 877 SDC & FA Software Approval 0 days Sat 4/26/08 Sat 4/26/08 76 978 System Integration 40 days Mon 3/17/08 Sat 4/26/0879 Assemble Complete System 7 days Mon 3/17/08 Mon 3/24/08 Matt,Joe,Tom80 Connections/ Connectors 7 days Mon 3/17/0 Mon 3/24/0 Matt81 Power Terminals 1 day Thu 3/20/08 Fri 3/21/0882 Obtai ni ng Terminals 1 day Thu 3/20/0 Fri 3/21/0883 Test Compl ete System 19 days Mon 3/24/0 Sat 4/12/08 10 Matt,Joe,Tom84 Revise Complete System 7 days Sat 4/12/08 Sat 4/19/08 8385 Demonstrat ion of Complete System 0 days Sat 4/19/08 Sat 4/19/08 84 1286 Demonstrat ion w/ 10 % Final Grade deduction 0 days Sat 4/26/08 Sat 4/26/08 148788 Dev elop Final Report 105 days Mon 1/14/08 Mon 4/28/0889 Wri te Final Report 105 days Mon 1/14/0 Mon 4/28/090 Submit Final Report 0 days Mon 4/28/0 Mon 4/28/0 89 159192 Spring Recess 6 days Mon 3/17/0 Sun 3/23/093 ECE Adv isory Council Presentation 0 days Mon 4/14/0 Mon 4/14/0 1394 Senior Design Expo 0 days Wed 4/30/08 Wed 4/30/08 15

Figure 46: Actual Gantt Chart for project

59

Page 65: DT03 Final

Design Team Information Design Team Member Email Discipline Responsibilities Joe McGlinchy [email protected] Electrical

Engineering Hardware Manager

Matt Taschner [email protected] Electrical Engineering

Archivist

Tom Vo [email protected] Electrical Engineering

Project Manager/ Software Manger

Conclusions and Recommendations In all, the construction and testing of the robot was completed by the time of the competition. The mechanical design of the robot proved to be a very daunting task, as this affected the manner in which the robot was able to move and where components were able to be placed. To improve upon this project, a different control method of locomotion might be examined. The main method for this robot to move was to send a command to the motor drivers indicating a duty cycle PWM signal and a distance for the wheel to move. One might consider continuous motion as opposed to stop and go motion. In other words, a PWM signal would be applied to each wheel and each motor’s individual PWM signal would be updated in response to detection of walls. This however, would require an increase in the complexity of the control of the motor drive system. Another place for improvement is in the sensor network of the robot. For instance, if Sharp GP2D120 sensors are used again, they should be placed further in from the base of the object whose distance they are measuring. Since any distance below 3-4 cm provides erroneous readings, placing the sensor more than 3-4 cm from the edge of the object they are attached to would provide more consistent readings. Also, determining a method to detect how close the robot is to the candle without relying on the white line detectors might also be advantageous in a real-world setting. Lastly, the entire implementation process could have been simplified if a single controller could have been used.

60

Page 66: DT03 Final

References and Acknowledgments References [1]Embedded.com, “Quadrature-Encoded Position and Beyond”, Don Morgan, 26 February 2001, http://embedded.com/columns/spectra/9900043 [2]”Pulse width modulation quietens fans and blowers”, Zetex Semiconductors, Laurence Armstrong, September 2004 [3] Tone Detect, http://members.cox.net/rbirac3/Snuffy/tone_detect.htm [4] NTE Electronics, Datasheet, NTE832, Integrated Circuit Tone Decoder [5]SRF05 Technical Documentation, http://www.robot-electronics.co.uk/htm/srf05tech.htm [6] Sharp, Datasheet, GP2D120, IR Ranger [7] Cook, David, Intermediate Robot Building. Apress, 2004. [8] Texas Advanced Optical Solutions, Datasheet, TSL257, High-Sensitivity Light-to-Voltage Converter. [9] Hamamatsu, Datasheet, R2868, Flame Sensor UVTRON R2868. [10] Hamamatsu, Datasheet, C3704, UVTRON Driving Circuit C3704 Series. [11] Lite-On Electronics, Inc., LTR-4206E, NPN Phototransistor Sensitive to 940nm Wavelength Acknowledgments Western Reserves Controls - Fred Billock, VP and Senior Head Engineer, Akron, Ohio Ametek - Alan Neal, Division VP Engineering, Kent, Ohio Rick Nemer - Electronics Engineer, University of Akron, Akron, Ohio Appendices RefDes Datasheet

http://www.wrc.cc/general/product_specs/HOLOCON%20Controller.pdfU20 http://ww1.microchip.com/downloads/en/DeviceDoc/70265B.pdfU26, U31 VIRFL Infrared Flame Sensor datasheetU1,U2,U3 http://www.mouser.com/catalog/632/156.pdfU9,U10,U11 http://acroname.com/robotics/parts/R66-R2868.pdfU8 http://www.allelectronics.com/spec/LED-126.pdfD1,D2,D3 http://www.robot-electronics.co.uk/htm/srf05tech.htmU4,U5,U6,U7 http://rocky.digikey.com/WebLib/Horn/WEB%20DATA/EM6050P-44.PDFMK1,MK2 http://www.radioshack.com/productU12 http://www.acroname.com/robotics/parts/GP2D120_SS.pdfU13,U14,U15,U17,U18

61

Page 67: DT03 Final

http://www.dimensionengineering.com/datasheets/DE-SW0XX.pdfU16,U19 http://www.dimensionengineering.com/datasheets/DE-SW0XX.pdfU18 http://www.sparkfun.com/datasheets/Components/HMC6352.pdfU17 http://www.transmotec.com/PDF/Solenoids_Open_Frame/F1578.pdfU22 http://www.transmotec.com/PDF/Motors_Spur_Gear_1W-40W/SD3729.pdfMG5,MG6 http://www.onsemi.com/pub/Collateral/1N4001-D.PDFD4,D5,D6,D7,D8,D9,D10,D11,D12http://www.st.com/stonline/books/pdf/docs/4132.pdfQ5,Q6,Q9,Q10 http://www.st.com/stonline/books/pdf/docs/4132.pdfQ3,Q4,Q7,Q8 http://www.fairchildsemi.com/ds/2N/2N4123.pdfQ1,Q2,Q11,Q12

62