Richardo Fourcand

AIRFA

r4cand@ eel.ufl.edu

(352) 335-8797

AIRFA is an autonomous agent that can detect movement using an ultrasonic motion detector and a heat source. AIRFA uses two M68HC11 processors communicating via the serial lines.

Airfa.wpd

Table of Contents

Table of Contents	2

Abstract	3

Executive Summary	4

Introduction	5

Integrated System	6

Mobile Platform	7

Actuation	9

Sensor	11

Behavior	15

Conclusion	16

Documentation	17

Appendix	18

Abstract

AIRFA is the name of my robot. AIRFA stands for Autonomous IR Firing Agent. The purpose of my robot is tho avoid various obstacles while a servo rotates to track a persons movement. My robot AIRFA is equipped with several sensors and actuators. There are 10 IR detectors and 14 IR emitters for basic obstacle avoidance. There are a set of 4 bump sensors to react to obstacles which cannot be detected by the IR senors. There are also 3 cadmium sulfide cell to help air react to changing lighting conditions. For tracking I added an ultrasonic motion detector to detect movement. There are also 3 PIR motion detectors to track the movement of a person. For actuation	I am using three servos. Two of the servos are hacked to move the wheels of the robot while the other is used to turn the disk to track someone. To program AIRFA I decided to use ICC11. This allows for more compact code and interrupt handling.

Executive Summary

For the project I decided to create a robot that I could use to play IR tag with. To do this I began with a basic platform starting from my M68HC11 EVBU board and an ME11 expansion board. I decided to use ¼ inch piece of airplane plywood for the main platform. For the secondary platform I used 1/8 inch piece of airplane plywood. The structure is supported by four 5 inch bolts.

For the sensors I began with 40 kHz IR generated by the ME11 board. Then I added cadmium sulfide cell and four normally open bump switched. These sensors are tied to the analog port of the first processor an are primarily used for the actuation of the motors. To get the various regarding from the analog ports I used IC. This allowed for basic data retrieval and movement for my robot.

For my primary sensor I am using two different motion detectors. The first is an ultrasonic motion detector and the second is a PIR motion detector. The former is used to detect motion when the robot is in a stationary position The latter is used to track the movement of a person while the robot is in motion.

AIRFA uses two separate controllers. The first controller controls the movement of the robot. Here is were the data from the IR, cadmium sulfide, and the bump sensor. The second processor is used for the control of the motion finding and tracking algorithm. To communicate the processors use their serial communication lines. For the purpose of this design the second processor will communicate when the robot can begin obstacle avoidance and tracking.

To code the robot I used both IC and ICC11. I wrote the first program using IC since it shows the fastest result also since it allow dynamic manipulation of the various ports and sensors I allowed me to look at the values from the various readings. I used ICC11 when I was writing the final set of code for the robot because of its versatility. It allows for the use of interrupts and one has more of the valid data types available for use.

Introduction

When take EEL 5934, the first question which I had to answer was what do I want my robot to do. After reading "Mobile Robots Inspiration to Implementation" and the "6.270 Robot Course", I decided to build a robot to play laser tag. I chose this design because it allows me to work on the robot in two distinct portions. For the purposes of the paper I will discuss the base of the robot and its tracking capabilities.

I will begin to talk about the total system of the robot. Here I plan to discuss what I did and why. From the overall description I plan to discuss the various part of the robot. I will begin by talking about the mobile platform and the reason for my choices. Then I plan to discuss the various actuators and their placement and purpose on the robot. After discussing the robots actuation, I will describe the 5 basic sensor types I used in the robot and the workings of each. The behaviors of the robot will be discussed and how they react together. After that the result of the work will be discussed. Finally in the closing the results from the robot will be discussed along with the documentation and appendices.

Integrated System

AIRFA is made up of two distinct parts the upper half and the lower half. The lower half of the robot is were the basic actuation for motion take place. It is here that the results from the various sensors are processed to produce the robots movement. Since ICC11 does not facilitate multitasking like IC the function which I implement are turn bases. The first state of the robot begin with a 60 degree rotation until a movement is detected by the ultrasonic motion detector. When motion is detected a signal is sent the lower micro controller via the serial data lines. After this communication the two processors application diverge.

The lower processor goes though for basic functions. The first is Avoid. When an object enter the range of the IR detectors is turn left or right to avoid the object. After the turning function, the bump function is called. It causes the robot to change direction from forward to backward or vise versa depending on whether or not the a hit has been detected. Final lower level sensor is the cadmium sulfide cells. These cells change the overall speed of the robot whether it is dark or bright so that it can go into a stacking mode. With the completion of this last function the list is looped again.

Simultaneously, the second processor is used to track someone. The top disk turn 360 degrees to keep a target on a person. This is done with out any knowledge to the lower processor. This works because the three PIR motion detectors react to changes of heat and detect the movement of people. When the middle one gets a signal the other two on the left and right cause the servo to turn so that there is a lock on to the object being tracked.

This structure allows of the integration of four of the sensors to work in unison while the final one works in the background. Each sensor is discussed further later in the paper.

Mobile Platform

The design of the mobile platform is seen if Figure 1. The 10 boxes on the outer sides denote the positioning of the IR sensor on AIRFA. The dark boxes in the front denote the positioning of the cadmium sulfide cells. The borders in the front and back of the platform are the bumpers which are on the robot. The large rectangle in the middle is the EVBU board and the small rectangle in at the end is the positioning of the battery pack. AIRFA is designed with an octagonal shape to facilitate the ease at which the sensors are placed. Also Scott noted that a rounded shape keeps the robot from becoming stuck on any edges and make maneuvering around objects somewhat easier. The placement of the wheel at the center of the robot keeps the turning rotation of the robot simple and easier to manage. Figure 2 is a picture of the robots upper platform. The four circles on the side is where the anchor screws are placed. The object in the center are the servo and sensors which go on to the top. The two light inner-circles are the gears used to give the servo more than 180 degrees of movement.

In designing the lower platform, I used ¼" piece of plywood. This material was used because it is light an sturdy. Also the wood is easy to modify and change if any situations should arise in the construction of the robot. The platform is 9" long and 10¼" wide.	When I was cutting the platform I found it helpful to draw various lines on the board to get a feel for the overall design instead of using a piece of paper or a CAD program. The only problem which occurred was that I initially had the wheel lopsided so that I had to cut an extra ½" on one side to make it even. For the upper platform I used on 1/8 in of the same type of wood since this platform supports less weight. For the rotating disk I an using a metal disk to mount the sensors. The platform design seems easy to manage and improve if a situation should arise. The only problems that came about was that the cutting and shaping is a bit lop sided at place.

A useful building tool since it was easy for me to add holes to support the various desgn changes that the robot went through as the semester rolled on.

Actuation

AIRFA's motor system was simple since is required very little hard wiring. To drive the 3" wheels of the robot I used two servos like the one in Figure 3. The servo has a torque of 42oz-in, operates at 5 volts, and has a speed of 0.22s per 60 degrees. The servo's had to be hacked to enable the use of them in the robot. This was done by removing a stopper tab on one of the gears and by removing the motor control board inside the box. I removed the yellow control wire since it was no longer necessary. To control the motor I used the ME11 board's built in motor controller. There is a schematic of it in Figure 4.

I also used an unhacked servo in the design of AIRFA. I geared down the servo 38 to 16 so that there will be more that 180 degree rotation of the servo. To gear it down I brought a set of gears used in remote control racing cars. The seem to work nicely.

In designing the diving system for the robot I found that getting the wheel straight was the most difficult task. Also for the servo hack, it was easier to use a soldering iron to smooth out the rough edges. For the servo the difficulty arose in putting the two gears together. The gears need to mesh closely to limit the amount of slipping that can occur.

The code for the various actuation appears in the appendix.

Sensor

There are five main sensor types which I used for AIRFA. For obstacle avoidance, I used IR and bump sensors. I also use three cadmium sulfide cells for light detection. And lastly I used an ultrasonic motion detector and a PIR motion detector to track a person.

The first sensor I used was the IR. The IR configuration for the detectors is seen in Figure 1 and a picture of the IR detector is seen in Figure 5. The IR detectors receive information from the 14 IR emitters which let out a 40 kHz IR beam. The IR emitters are tied in parallel. A parallel combination of 5 emitters, in the front and back, that draws on 2.5 mA of current and run on a 1 volt voltage. There is also a parallel combination of 4 emitters for the side which draw about 2 mA. I found that the difficult part came in hacking the sensor since there was a small space to work with. However, I did create a small system to test the IR detectors. This was done by wiring an IR LED to the 40 kHz J6 and the sharps were wired to power and ground. The LED was then waved in front of the device and I watched the oscilloscope to detect changes in the voltage. Only one of the ten detectors failed the test due to a badly cut trace.

After placing the IR detectors I began to write the obstacle avoidance code which is to be used. I found for the various positions of the sensors require different threshold voltages. For example a back sensor may have a threshold of 118 before it needs to turn to avoid an object while another may have a value of 131 before it needs to turn. Other than the various thresholds of the detectors IR seemed to be easier to use.

To help with obstacle avoidance I use a series of 4 bump sensors. The bump sensors are tied to a resistor network as seen in Figure 6, so that only one analog port is used to detect any bumps. When a bump is detected the voltage rises from 0 to larger depending in which of the switches is closed.

The main problem for the bump switches was in implementing the bumper structure which I would use on the robot. After several attempts I chose a design using a series of tubes to wrap around the from and serve as bump sensors.

The next sensor I built was for cadmium sulfide cells. This circuit design is just a simple resistor divider network. For the network I used 100K resistors. Depending on the light source the data would fluctuate for various amounts. After taking several reading I declared that anything below 20 was absolute dark and anything above 200 was absolute light. From there the coding and use of the sensor became very easy.

The ultrasonic sonic motion detector has two main parts a transmitter and a receiver. The transmitter circuit is shown in Figure 7. This is a crystal lock transmitter that causes the transmitter to generate a constant 40 kHz signal. The basic circuit on the printed circuit board was without the npn transistor seen in the figure. The circuit only contained a cmos gate oscillator to feeds a 40 kHz square wave to a cmos driver which is connected to drive the transmitter in anti-phase to get the maximum output. I added the transistor to short the 40 kHz crystal thus keeping the receiver from receiving the 40 kHz.

The receiver circuit is seen in Figure 8. This circuit is split into two figures to make it readable. The electrical signal is amplified by the transistor, then the two op-amps convert the signal into something that will be usable. The "to PE" signal is where I tied the output to A/D and the outputs are viewed. The POT is used to a sensitivity of the circuit.

As a basic motion detector the circuit works fine. It is able to reset its self in .3 seconds after being tripped so that there is no need for external inputs. The npn transistor which I added allows me to give the circuit an extra ability. That ability is to work as a sonar system to detect objects while AIRFA is moving. Since when the robot is moving the motion detector is useless since this detector measures the phase shift of the wave, I tied the npn to stop the transmitter from transmitting at 40 kHz. This is done by putting 5 volts to the base of the transistor. Then when I want to measure time of flight I put 0 volts to the base and note the time it takes for a signal to arrive. After watching the characteristics of the motor I found that when the npn is on the receiver output read a value of about 103. And when the detector detects motion the value can range from 41 to 193.

The final sensor I used are three PIR motion detectors. The output a digital signal when they receive a signal. This makes it on of the easier sensors to set up since there was no major rewiring. I did however calumniate the sensors so that there range would be limited. I did this by adding a piece of tubing inside to cut of the peripheral vision. This sensor serve to track a person while the robot is moving since this sensor is not dependent on motion but on heat.

The five sensors that I used help to create the behavior which will govern the operation of the robot AIRFA.

Behavior

There are a series of five behaviors which AIRFA is able to complete. The first behavior is obstacle avoidance through the use of IR. When the signal reached a certain value then the controller knows that there is an object up ahead so that means it is time to turn. The next behavior deals with those objects which are not avoided by the IR. When the bumpers hit an object the controller reacts by shifting the robot into reverse and continuing from there. The next behavior is caused by the cadmium sulfide cells. When a decrease in light is detected the motor slows down and when an increase in light is detected the motor speeds up. The next two behavior deal with the various motion detectors. The first behavior enable the robot when there is an initial movement signal received from the ultrasonic motion detector. The next on turns the servo to track a person using the PIR. These five behaviors are the basis of the robot abilities which can be expanded and fine tuned at any time.

Conclusion

I completed a lot of the basic work to my robot AIRFA. It is able to avoid and react to obstacles using the IR and bump sensors. I have it stalking or running depending on the lighting conditions by manipulating the values from the cadmium sulfide cells. The two motion detectors also help in the basic tracking of a person and the rotation of the servo. All in all I am extremely satisfied with what I accomplished.

I was extremely pleased with how well the bumper turned out in appearance and in functionality through the use of brass tubing. I am also pleased with the versatility of both of the motion detectors. I also liked the fact that ICC11 was not that much more difficult to use than IC while allowing for an increase in functionality and better code generation.

For the future I would like to mount an IR shotgun and several IR detectors so that the robot can shot a beam of IR at a target and register hits when shot at. This would increase the functionality of the robot and broaden the scope of its available behaviors.

The way the final project turned out there are very few thing which I would want to change. Although I was limited in the scope of my project by time and money, the robot seems to have accomplished everything which it set out to do. The only thing I would like to change is the mounds of wires around the robot which makes working inside of it rather difficult.

Documentation

Nova-Soft web site

6.270 LEGO Robot

Jones, Joseph L. and Flynn, Anita M.;Mobile Robots Inspiration to implementation; A K Peters; 1993

Appendix