wireless pet tracking and containment system project...

23
Wireless Pet Tracking and Containment System Project Proposal College of Engineering, Technology, and Computer Science Department of Electrical & Computer Engineering Technology & Information Systems and Technology Fall 2008 Scott McNamara Advisor: Professor Hack Senior Design Project

Upload: lamkhanh

Post on 15-Apr-2018

222 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Wireless Pet Tracking and Containment System Project Proposallin/490-Proposals/2008-Fall/CPET490-F08... · Wireless Pet Tracking and Containment System Project Proposal College of

Wireless Pet Tracking and Containment System

Project Proposal

College of Engineering, Technology, and Computer Science Department of Electrical & Computer Engineering Technology & Information Systems

and Technology

Fall 2008 Scott McNamara

Advisor: Professor Hack Senior Design Project

Page 2: Wireless Pet Tracking and Containment System Project Proposallin/490-Proposals/2008-Fall/CPET490-F08... · Wireless Pet Tracking and Containment System Project Proposal College of

2

Table of Contents

1. Statement of Problem……………………………………………………. 3 2. Market Analysis…………………………………………………………..4 3. Proposed Requirements and Specifications……………………………....5 4. Implementation Methods and Solutions……………………...……..........7 5. Regulatory Standards, Safety and Quality Issues…………...…………....9 6. System Description……………………………………………………...13 7. Block Diagrams………………………………………...……………….14 8. Data Flow Diagrams…………………………………...………………..15 9. Trade off Studies…………………………………………………...……20 10. Required Resources…………………………………...………….….…21 11. Project Schedule with Gantt chart……………………...……….…...…22 12. Estimated Cost…………………………………………...…………….22 13. Return of Investment/Potential benefits…..…………………….......….23 14. Risk Analysis…………………………………………...…….………..24 15. Resources………………………………………………………………25

Page 3: Wireless Pet Tracking and Containment System Project Proposallin/490-Proposals/2008-Fall/CPET490-F08... · Wireless Pet Tracking and Containment System Project Proposal College of

3

Statement of the Problem: Many families around the world enjoy the companionship, love and joy that dogs bring to their lives. Responsible pet owners understand that most dogs need plenty of exercise and attention. A fenced in yard allows a family dog to run around and enjoy life more fully, rather than being enclosed in a cage or inside the home all of the time. Many families, however, cannot afford the expense of a fully enclosed yard. In other cases the yard’s shape or local zoning restrictions prohibit the pet owner from constructing a fence around their property. For these families and their pets the results are often the dog is restricted to a chain or rope. In other cases the pets are simply kept in a cage and not allowed to roam about their yard. If the dog owners are unable to walk the dog regularly because of hectic work or school schedules, the family pet can suffer from a lack of exercise and interaction with their owners. Some dogs also have a tendency to run off when they see an opportunity. These dogs if they are not recovered have a good chance of being injured or killed. Figure 1 shows the many types of ways pets are killed when they escape, and roam freely throughout a community.

Figure 1 Unconfined Pet Death Causes

Chart from www.pet-abuse.com

I propose to solve this problem by designing, implementing and building a pet tracking and containment system. This system will benefit pet owners by providing a safe, reliable and efficient method to keep their pets in their yards, and in the event of an escape will provide tracking data so that the animal can be located and returned home. The system will allow those pet owners that for whatever reason, cannot have a fenced in yard to reap the benefits of a fence.

Page 4: Wireless Pet Tracking and Containment System Project Proposallin/490-Proposals/2008-Fall/CPET490-F08... · Wireless Pet Tracking and Containment System Project Proposal College of

4

Market Analysis: Several products exist for the homeowner that would like their dog to enjoy the freedom of the yard, without the need for a physical fence. Products like the invisible fence consist of a wire that is buried along the perimeter of the yard. A collar is attached to the pet. When the pet approached the fence induction of the buried fence is detected by the dog collar and the dog receives a mild electric shock. This product has been around for over 30 years and provides a great service at an affordable price. The system has certain drawbacks however.

• If the homeowner wants to plant new trees or add landscaping products, the fence may need to be dug up.

• Large obstructions are not conducive to burying a wire especially if there are concrete driveways, or patios or swimming pools that cannot be moved.

• Certain yards may be shaped in such a way that a complete loop cannot be created in the yard without having a large spot in the yard that is not monitored by the system

An improvement to the buried wire system is a completely wireless system that uses a radio transmitter and receiver base station, and a small transceiver on the dog’s collar. The base stations monitors how far the dog is away by measuring the time it takes for a signal that is sent to the dog’s collar to return. The time it takes for the signal to return is computed and the distance the dog is away from the base station is calculated. Benefits of these systems are:

• They are portable and can be used in more than just the home. • Easier to install, no need to bury a wire and plant the flags the dog needs for

training purposes • Can easily provide a set amount of distance the dog can be away from the base

station

The wireless fence pet systems have certain limitations that can affect overall performance, these systems are not ideal for some homeowners because of these shortcomings:

• The boundary is strictly limited to a circle surrounding the base station. If the base station is inside a home that is on a property line it is likely that the pet can stray into the neighbors yard or worse onto a road

• The initial cost of purchase is much higher with the wireless radio fence compared to the buried wire fence.

• The range of the system can be accidently changed and without visual cues to the boundary the dog could be subjected to unnecessary electrical correction.

Page 5: Wireless Pet Tracking and Containment System Project Proposallin/490-Proposals/2008-Fall/CPET490-F08... · Wireless Pet Tracking and Containment System Project Proposal College of

5

A more robust solution that takes the best properties of both systems, without the limitations of each is to implement a wireless fence that is radio controlled with the fence boundaries established by GPS coordinates. This is the model the wireless pet tracking and containment system provides. Advances in GPS technology and low power radio systems make this a viable solution. Specifically, a GPS based radio system that indicates the position of the dog in a yard that has had boundaries established by GPS coordinates. This combined with the use of an audible correction application, and training by dog owner can establish a safe contained area for the dog to enjoy. The benefits of this system include:

• The homeowner can establish exactly where the exact yard boundaries are • Boundaries can be changed rapidly and zones established within a yard to keep

flowerbeds, plants, etc to be off limit areas • If the dog does escape using a radio system allows the animal to be tracked

until the radio range is exceeded Similar products provide the same benefits as that this design proposes, however, the existing systems do not provide correction to the pet if the dog escapes, so there is no incentive for the dog to stay in the yard. Products that currently exist also require a monthly subscription fee. The wireless pet tracking and containment system seek to rectify these shortcomings in current products. Proposed Requirements and Specifications:

The basic idea of the wireless pet tracking and containment system is to allow a pet, specifically a dog to enjoy the freedom of a yard, understand that the yard has boundaries that must not be encroached upon by providing a correction stimulus with an audible signal that the dog has been trained to understand means the dog is near the boundary. The system, therefore will need to satisfy several requirements in order to operate correctly.

• A high resolution GPS receiver to track the pet • An efficient way to communicate information to the user • A method to transfer information from the pet’s location to a base unit to compare

if the pet in inside the allowed area. The containment portion of the system must be reliable, accurate and easily configurable by the user. The accuracy will depend on the GPS receiver that the system is designed around. A GPS receiver that can track more satellites will be able to provide a higher level of accuracy for the project. Currently most GPS receivers are able to track 20 satellites simultaneously. This provides a resolution of 3-5 meters. In addition to tracking the GPS satellites, additional accuracy can be gained from a different geostationary satellite through the Wide Area Augmentation System (WAAS).

Page 6: Wireless Pet Tracking and Containment System Project Proposallin/490-Proposals/2008-Fall/CPET490-F08... · Wireless Pet Tracking and Containment System Project Proposal College of

6

The WAAS system is a ground reference data collection system that tracks the orbital drift and signal delays to provide error correction information for the GPS system. Using a GPS WAAS enabled GPS receiver resolution is less than 3 meters. Because position accuracy is vital to this project a WAAS enabled GPS receiver is required. The system must be able to provide information quickly to the user in a format that is easily readable and configurable. The best way to present information to the pet owner is via a graphical LCD with touch screen features. The screen can show information in a much more user friendly GUI type interface than a character only LCD display can. Information that is required for the user to have in order to effectively track their pet’s position is:

• Pet’s current location • Pet’s relative direction from the base unit • Direction and speed that the pet is traveling • If the pet has left the yard • If the pet has received an electrical correction • If pet is beyond the range of the radio system the pets last known location • A clearly defined yard border shown on the screen

A graphic LCD provides the ability to make all of these requirements easily known to the user that is a required. A color LCD will also relieve eyestrain and generally provides a more pleasing quality. The system must also be able to be configured easily by the user, a graphic LCD that shows the user the options they have for setting the correction level, yard boundaries, and other tracking information can also be built into the package. Providing these abilities on a touch screen makes the item more user friendly and easier to setup and use. Therefore the graphic LCD shall also make use of touch screen abilities. The system is designed to provide peace of mind to the owner and safety to the animal. Because of this the design must be safe for the animal and at the same time deliver a corrective audible impulse that is intense enough to deter the pet from seeking the yard boundary. The impulse should also not cause pain to the animal, but only to get the dog’s attention. The containment portion of the system must be reliable, accurate and easily configurable by the user. The intensity, range and duration of the audible signal will be user set, again by selecting the option within the program displayed on the LCD The pet wireless tracking and containment system is at its heart a radio system, therefore issues of EMI and EMC will be a top concern. To cut down on the design and implementation design, prebuilt radio transmitters and receivers will be incorporated; these products have already passed regulatory agency requirements and will be used as intended. The issue of EMI will have to be looked at later during actual circuit board design to combat the interference that is sure to occur with so many electrical components and various radio spectra being utilized.

Page 7: Wireless Pet Tracking and Containment System Project Proposallin/490-Proposals/2008-Fall/CPET490-F08... · Wireless Pet Tracking and Containment System Project Proposal College of

7

Implementation Methods and Solutions: The wireless pet tracking and containment system has several sections that are modular in design but work together to create the entire project, and there are two parts to this system a base unit which the owner controls and a collar unit which is attached to the pet. A centralized approach to controlling these different components is required in order to make this project work. The core of the system will be a robust microcontroller. The microcontroller will be responsible for coordinating each separate component and allowing a time for the component to work. A microcontroller that will be powerful enough to handle all I/O and provide time sharing for each function will be used. There are two approaches to handling the operation, using interrupts or using a RTOS. Because RTOS are expensive this approach will not be used. What this means is that a microcontroller with enough I/O and buses must be used for the project. Electrical power is the first step in each system; the system must have enough electrical power to supply the base unit if it is unplugged an ample time to monitor the pet collar. A Lithium-Ion battery that has a slim profile, similar to the ones used in digital cameras will provide the power for the circuit. The microcontroller is the next step in the project, the next phase will consist of providing a means for active control of the project and to visualize what is occurring in the system. The graphics system will be connected to the microcontroller, along with pushbutton, and or rotary dials that will be used to control the data that is being generated. After the graphics system is in place on the base unit, the GPS module is the next part to be added. Before the base unit can understand where the pet is in relation to it, the base unit must know its own location. Therefore programming of the microcontroller to extract the data from the GPS so that it can be compared to the GPS data from the pet’s unit is vital. A digital compass that compares the relative bearing of the base unit to the pet unit is implemented into the design next. This allows the base unit to know exactly what direction the dog is located relative to the direction that the base unit is facing. If this is not included, no matter what direction the base unit is it will only know the location of the animal and not which direction from the unit the animal is. This is vital if the pet does happen to escape from the yard. The base unit can be picked up and carried around and will continue to show the direction that the dog is headed. The radio system will be designed and implemented next. This will communicate with the pet unit to provide all the data and instructions. This system will operate on a half duplex system utilizing Manchester encoding to transfer the information to and from each unit. It is important that the radios do not step on each other; therefore the base unit will act as a master and will transmit commands to the pet collar. When the pet collar receiver picks up the commands it will send all the current location information back to the base unit receiver.

Page 8: Wireless Pet Tracking and Containment System Project Proposallin/490-Proposals/2008-Fall/CPET490-F08... · Wireless Pet Tracking and Containment System Project Proposal College of

8

The base unit receiver will send this information to the microcontroller which will then parse the information, make the appropriate calculations display it to the user. The microcontroller will also determine if an audible alarm is necessary, if so then a signal is transmitted to the dog collar, and the dog receives an audible alarm if it is approaching the boundary. These units will also require antennas to gather and send the signal out, however, the antennas must be compact enough not to be bulky, and they must also be resistant to damage especially on the dog’s collar. Before the system is up and running a second system has to be constructed that is attached to the dog’s collar. This collar system consists of the following parts that are identical to the base unit in design and construction:

• Microcontroller to operate the system overall • GPS unit to detect current location • Radio system to transmit and receive data to the base unit

Again consideration must be given to the electrical power needed for the circuit, before any of other devices are built into it. Several of the components require a significant amount of current, but very low voltage in order to function. This may require a more substantial battery than the base unit has, while also requiring a high quality voltage regulation system. Field tests will be done utilizing audible measurement devices to determine how loud the audible alarm will be, and to ensure it does not injure the animal. The accuracy of the system for determining the location of the pet especially if the pet leaves the pre-set boundary area will also need to be measured. Finally the set points for the boundaries will need to be established several times in order to ensure an accurate system. After all tests have been conducted to ensure that the product is safe for animal use a human subject, specifically me, will carry the dog collar around the yard and test for the audible alarm that the pet will be subjected to if they are given a correction signal from the collar. When all tests have been satisfied that the collar works, that it is accurate and most importantly safe, the collar will be put on the test animal and who will be trained to recognize that approaching the yard boundary will result in an audible alarm.

Page 9: Wireless Pet Tracking and Containment System Project Proposallin/490-Proposals/2008-Fall/CPET490-F08... · Wireless Pet Tracking and Containment System Project Proposal College of

9

Regulatory Standards, Safety and Quality Issues: The United States has very defined and enforced standards for radio systems. To ensure that the wireless system is compliant to these laws only components that have been previously identified to comply with the regulations will be utilized. In the U.S., the FCC is the agency primarily in charge of regulating the airwaves. Specifically CFR47 Part 15 deals with radio transmissions. The project will operate in the 902 to 928 MHz range. In order to do so the following requirements must be followed as describe in CFR47 Part 15.249

1. Maximum fundamental field strength of 50,000 microvolts and 500 microvolts harmonics measured at 3 meters

2. Spurious radiation attenuated to 50dB below fundamental harmonic or 200

microvolts below 960Mhz or 500 microvolts above Linx technologies provides products that meet these criteria, however, a matching antenna must also be applied to the circuit so that the any harmonics do not exceed the regulations. There are several reasons to work within the 900 MHz range. The first is that it is free it does not require any license to transmit in the 900 MHz range. Second, because of the high field strength limitations signals can be sent further. Finally the propagation range of the 900 MHz range is longer than the higher frequencies like 2.4 GHz The GPS standard throughout the world is set by NEMA (National Electrical Marine Association) protocol 183 This standard establishes a protocol similar to other communication protocols like TCP/IP in that it has layers that are built upon each to facilitate the communication. Communication talkers are generally satellites that operate in geosynchronous orbit 22,500 The important parts for this project are the electrical characteristics layer that the GPS receiver must be able to run on 2.0V and use no more than 2.0mA of current. The data link layer provides that communication signal is sent at 4800 baud rate The application layer directs that each GPS sentence:

1. Is in ASCII form 2. is prefixed with a $ 3. has comma delimiters to separate data fields 4. the first 5 characters of the sentence identify which sentence type it is 5. the first characters following the last data field is an asterisk 6. the asterisk is followed by a two digit checksum that is an XOR of the hex

values of all the characters in the sentence

Page 10: Wireless Pet Tracking and Containment System Project Proposallin/490-Proposals/2008-Fall/CPET490-F08... · Wireless Pet Tracking and Containment System Project Proposal College of

10

There are several sentences in a GPS broadcast, for this project the ones that will be used are the RMC (Recommended Minimum Sentence) and GGA (Global Positioning System Fix) The reason these two are used are to provide the comparison between the base unit and pet collar and to provide tracking data to indicate the pet’s speed and direction As an example the following GPS sentence is provided $GPRMC,020922,A,4307.5239,N,07742.8355,W,008.7,281.8,111208,,*09 Interpreted as follows:

RMC Recommended Minimum sentence 020922 Fix taken at 02:09:22 UTC A Status A=active (the data status. [A] for valid data, [V] for invalid) 4307.5239,N Latitude 43 deg 07.5239' N 07742.8355,W Longitude 77 deg 42.8355' W 008.7 Speed over the ground in knots 281.8 Track angle in degrees True 111108 Date - 12th of November 2008 *09 The checksum data, always begins with *

The information from this sentence will be extracted and then sent into a buffer that can be used to compare the position to the other unit. Although there are literally dozens of GPS sentences types only a few have any significant meaning and are needed for this project to work. Safety is paramount to the project for the user and for the pet, as described in the implementation procedure a large amount of testing and though will be put into the project to ensure that it is safe and reliable. This project is designed for the welfare of pets and to provide peace of mind to their owners and due diligence will be paid to ensure that no part of this project provides any pain to the animal. Indiana regulations that concern this project are listed below and will be strictly followed, to ensure that no animals are hurt in any manner during the course of this project, Indiana code 35-46-3 apply to animal cruelty in the state. Specifically the following regulations are to be adhered to.

Page 11: Wireless Pet Tracking and Containment System Project Proposallin/490-Proposals/2008-Fall/CPET490-F08... · Wireless Pet Tracking and Containment System Project Proposal College of

11

IC 35-46-3-0.5 Definitions Sec. 0.5. The following definitions apply throughout this chapter: (1) "Abandon" means to desert an animal or to leave the animal permanently in a place without making provision for adequate long term care of the animal. The term does not include leaving an animal in a place that is temporarily vacated for the protection of human life during a disaster. (2) "Beat" means to unnecessarily or cruelly strike an animal, or to throw the animal against an object causing the animal to suffer severe pain or injury. The term does not include reasonable training or disciplinary techniques. (3) "Mutilate" means to wound, injure, maim, or disfigure an animal by irreparably damaging the animal's body parts or to render any part of the animal's body useless. The term includes bodily injury involving: (A) serious permanent disfigurement; (B) serious temporary disfigurement; (C) permanent or protracted loss or impairment of the function of a bodily part or organ; or (D) a fracture. (4) "Neglect" means to: (A) endanger an animal's health by failing to provide the animal with food or drink, if the animal is dependent upon the person for the provision of food or drink; or (B) restrain an animal for more than a brief period by the use of a rope, chain, or tether that: (i) is less than three (3) times the length of the animal; (ii) is too heavy to permit the animal to move freely; or (iii) causes the animal to choke. (5) "Torture" means: (A) to inflict extreme physical pain or injury on an animal with the sole intent of increasing or prolonging the animal's pain; or (B) to administer poison to a cat or dog, or expose a cat or dog to a poisonous substance with the intent that the cat or dog ingest the substance and suffer harm, pain, or physical injury. IC 35-46-3-12 Torture or mutilation of a vertebrate animal Sec. 12. (a) This section does not apply to a person who euthanizes an injured, a sick, a homeless, or an unwanted domestic animal if: (1) the person is employed by a humane society, an animal control agency, or a governmental entity operating an animal shelter or other animal impounding facility; and (2) the person euthanizes the domestic animal in accordance with guidelines adopted by the humane society, animal control agency, or governmental entity operating the animal shelter or other animal impounding facility. (b) A person who knowingly or intentionally beats a vertebrate animal commits cruelty to an animal, a Class A misdemeanor. However, the offense is a Class D felony if: (1) the person has a previous, unrelated conviction under this section; (2) the person knowingly or intentionally tortures or mutilates a vertebrate animal;

Page 12: Wireless Pet Tracking and Containment System Project Proposallin/490-Proposals/2008-Fall/CPET490-F08... · Wireless Pet Tracking and Containment System Project Proposal College of

12

or (3) the person committed the offense with the intent to threaten, intimidate, coerce, harass, or terrorize a family or household member. (c) It is a defense to a prosecution under this section that the accused person: (1) reasonably believes the conduct was necessary to: (A) prevent injury to the accused person or another person; (B) protect the property of the accused person from destruction or substantial damage; or (C) prevent a seriously injured vertebrate animal from prolonged suffering; or (2) engaged in a reasonable and recognized act of training, handling, or disciplining the vertebrate animal. IC-35-46-3-15 Electrocution or decompression of animals Sec. 15. (a) This section does not apply to the following: (1) A state or federally inspected livestock slaughtering facility (for conduct authorized by IC 15-17-5 and rules adopted under that chapter). (2) An animal disease diagnostic laboratory established under IC 21-46-3-1. (3) A postsecondary educational institution. (4) A research facility licensed by the United States Department of Agriculture. (b) As used in this section, "animal" has the meaning set forth in IC 35-46-3-3. (c) A person who knowingly or intentionally destroys or authorizes the destruction of an animal by: (1) placing the animal in a decompression chamber and lowering the pressure of or the oxygen content in the air surrounding the animal; or (2) electrocution; commits a Class B misdemeanor. As added by P.L.2-2008, SEC.13.

Page 13: Wireless Pet Tracking and Containment System Project Proposallin/490-Proposals/2008-Fall/CPET490-F08... · Wireless Pet Tracking and Containment System Project Proposal College of

13

System Description with Block Diagrams: The project operates with several different components tied into a central microcontroller. The microcontroller is responsible for ensuring that each components is allowed to perform its function, send its information to the microcontroller and then gather more information or follow a directive given by the microcontroller Parts-Base Unit 1. Microcontroller- Runs the system by acting as a central repository of commands and

data gathering. Different components will send information to the microcontroller which will buffer and parse the data. The data will then be acted upon and instructions given to other components

2. GPS-Gathers data from GPS satellite. It is important to note that the GPS does not

do any processing it merely receives an ASCII character stream from the satellite and sends it to the microcontroller where the information is parsed and data is disseminated.

3. Digital Compass- The digital compass is used to provide direction to the base unit on

its relative direction to the pet collar. Again there is no processing done by the compass it merely sends out a number to the microcontroller which uses the number to identify what direction it is facing and what direction to show on the LCD the pet is relative to the base unit.

4. GLCD-The graphical LCD provides a user interface that allows information to be

presented to the user in a friendly way that provides what the pet owner needs to know about their pet location, speed, and direction. The LCD also incorporates touch screen features that allow even more ease of use.

5. Radio System-The radio system is responsible for sending the data that the

microcontroller wants to the pet collar, for instance to activate the audible warning. The radio system also receives the data from the pet collar transmitter and passes that information to the base unit microcontroller.

The pet collar unit incorporates the same modules as the base unit; however, it lacks the compass, and GLCD.

Page 14: Wireless Pet Tracking and Containment System Project Proposallin/490-Proposals/2008-Fall/CPET490-F08... · Wireless Pet Tracking and Containment System Project Proposal College of

14

Microcontroller

GPS Reciever

Graphic LCD with Touch Screen Properties

Digital Compass

Transmitter

Receiver

Figure 2 Base Unit Block Diagram

Figure 3 Pet Collar Unit

Page 15: Wireless Pet Tracking and Containment System Project Proposallin/490-Proposals/2008-Fall/CPET490-F08... · Wireless Pet Tracking and Containment System Project Proposal College of

15

Main Screen

User selects mode

Monitor Animal Go to Options Submode

Go to Animal Monitor Submode

Figure 4 Program flow-power on

Choose Options Yes/

No

Yard Boundary Screen

Zone Setup Screen

Audible Alarm Options Screen

Options Submode

NO

Choose Options

YES

Return to main screen

Figure 5 Program flow-options select mode

Page 16: Wireless Pet Tracking and Containment System Project Proposallin/490-Proposals/2008-Fall/CPET490-F08... · Wireless Pet Tracking and Containment System Project Proposal College of

16

Yard Boundary Select

Select a new boundary?

YES NO Return to Options Screen

Aquire GPS location of corner

Write corner GPS data to EEPROM

Go to first corner

Are all corners in EEPROM? YES

Go to second corner Go to third corner Go to fourth corner

Aquire GPS location of corner

Aquire GPS location of corner

Aquire GPS location of corner

Write corner GPS data to EEPROM

Write corner GPS data to EEPROM

Write corner GPS data to EEPROM

Figure 6 Yard boundary setup flow diagram

Page 17: Wireless Pet Tracking and Containment System Project Proposallin/490-Proposals/2008-Fall/CPET490-F08... · Wireless Pet Tracking and Containment System Project Proposal College of

17

Zone Boundary Setup screen

Select a new zone?

YES NO Return to Options Screen

Aquire GPS location of corner

Write corner GPS data to EEPROM

Go to first corner

Are all corners in EEPROM? YES

Go to second corner Go to third corner Go to fourth corner

Aquire GPS location of corner

Aquire GPS location of corner

Aquire GPS location of corner

Write corner GPS data to EEPROM

Write corner GPS data to EEPROM

Write corner GPS data to EEPROM

Figure 7 Zone boundary setup flow diagram

Page 18: Wireless Pet Tracking and Containment System Project Proposallin/490-Proposals/2008-Fall/CPET490-F08... · Wireless Pet Tracking and Containment System Project Proposal College of

18

Audible Alarm Options Mode

Turn alarm on/off

Change alarm intensity

Change alarm duration

Turn Alarm ON/OFF

Change Alarm Intensity

Change Alarm Duration

Turn Alarm power pin ON/OFF

Return to Option Screen

Return to Options

Higher/Lower

Higher Lower

Finished?

NOYES

Longer/Shorter

Longer Shorter

Finished

YES NO

Figure 8 Options flow diagram

Page 19: Wireless Pet Tracking and Containment System Project Proposallin/490-Proposals/2008-Fall/CPET490-F08... · Wireless Pet Tracking and Containment System Project Proposal College of

19

NO then Aquire GPS location

Aquire Direction from Compass

Compare pet location to pre-set GPS coordinates

Acquire pet GPS location

Display pet range and direction

relative to base unit

YES Is pet inside yard?

Are any zones set in the yard?

Is pet near a zone

boundary?

NO Send an alarm to base unit

YES NO

NOIs pet near boundary?

YES NO

Send pet an alarm

Stop Monitoring

button pressed?

Return to Main Screen

YES

YES

Send pet an alarm

Figure 9 Pet monitoring mode flow

Page 20: Wireless Pet Tracking and Containment System Project Proposallin/490-Proposals/2008-Fall/CPET490-F08... · Wireless Pet Tracking and Containment System Project Proposal College of

20

Required Resources: Most of the project resources are tied into the components. The programming of the microcontrollers is also a factor in determining the cost of the project. All products that are needed for the project are easily purchased through online vendors such as Digi-key, Sparkfun or Mouser Project Components: Price: 2 x Microchip PIC24FJ256GA110 $50.00 1 x Hitachi HM55B digital compass $36.47 1 x 2.8” QVGA LCD $56.00 2 x Linx HP3 Transmitters $42.00 2 x Linx HP3 Receivers $72.00 2 x EM-402 GPS Receivers $140.00 16-Bit compiler Free Extra wiring Unknown PCB design Free PCB cost Unknown MPLAB programming environment free Microchip ICD2 $175.00 Proteus 7.2 Microcontroller circuit simulator free

Page 21: Wireless Pet Tracking and Containment System Project Proposallin/490-Proposals/2008-Fall/CPET490-F08... · Wireless Pet Tracking and Containment System Project Proposal College of

21

Project Schedule with Gantt chart: The project schedule originally proposed still applies, no tasks have fallen behind so far. Most all parts have been received from supplies and final circuit design is being implemented with Multisim.

Page 22: Wireless Pet Tracking and Containment System Project Proposallin/490-Proposals/2008-Fall/CPET490-F08... · Wireless Pet Tracking and Containment System Project Proposal College of

22

Tasks: This project requires several tasks to be performed with the software talking to each component. Tasks that must be implemented by the software during several phases of the program execution: Task 1. Set up the GPS coordinates 1. Read the GPS coordinates from the GPS receiver 2. Store the coordinates in a buffer for each corner of the yard 3. Read the buffer coordinates and store them into EEPROM Task 2. Compare the pet GPS coordinates to the stored boundaries 1. Receive the gps coordinates from the pet collar 2. put the pet gps coordinates in a buffer 3. mathematically calculate the pet gps coordinates to the boundary gps coordinates 4. Calculate the pet compass direction relative to the base units direction 5 determine if the pet is inside the buffer zone 6 if the pet is near the buffer zone transmit a message to the pet collar to alert the dog Task 3. Update the LCD 1. Draw the LCD screen 2. Draw the distance the pet is away from the base unit 3. Draw the the compass bearing the pet is relative to the base unit 4. Draw if pet has escaped draw a warning screen to inform the user Estimated Project Cost: Equipment resources: approximately $600 Engineering@ $25/hr 200 hours estimated approximately $5,600 Total estimated cost of the project approximately $5,600 Resources: 1. Tom Cantrell, “Direction Finder”, Circuit Cellar Magazine, October 2005

Page 23: Wireless Pet Tracking and Containment System Project Proposallin/490-Proposals/2008-Fall/CPET490-F08... · Wireless Pet Tracking and Containment System Project Proposal College of

23

2. John Caruana, Doug Irvine, Matthew Quenet, & Chris Cheng “Modular Wireless Tracking System”, Circuit Cellar Magazine, February 2007

3. Michael Simpson, “Control your World”, Nuts and Volts Magazine, June 2007 4. Miguel Rusch, “Where Analog and Digital Collide, Circuit Cellar Magazine, May 2008 5. http://www.mypic32.com/web/guest/contestantsprofiles?profileID=50331 6. http://www.interq.or.jp/japan/se-inoue/e_pic7_7.htm 7. http://www.geoframeworks.com./Default.aspx 8. http://www.circellar.com/library/print/1000/Stefan123/6.htm 9. http://www.codeproject.com/KB/mobile/WritingGPSApplications2.aspx 10. http://www.rabbit.com/documentation/docs/refs/TN214/TN214.htm 11.http://mesl.ucsd.edu/gupta/cse237bf07/PastProjects/LocationAwareProgrammingApurva.pdf 12. http://dcg.ethz.ch/theses/ws0405/gps_ipaq_report.pdf 13. http://bdml.stanford.edu/twiki/pub/Haptics/ControllerDetail/Torque_Control.c 14. http://my.fit.edu/~swood/C18_3%20GPS%20Reader.pdf 15. http://cmclab.rice.edu/projects/sensors/GPS.h 16. http://cmclab.rice.edu/projects/sensors/GPS.c 17. http://code.google.com/p/pic-ethernut/source/browse/trunk/Include/Delay.h?r=6 18.http://www.techtoys.com.hk/Displays/TY280T240320/User_Guide%20Preliminary_03092008.pdf 19. http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=64