Senior Design Report
IoT Smart Doggy Door
Figure 1: Doggy Door
Reprinted with permission pending, from [1]
University of Central Florida
Department of Electrical Engineering and Computer Science
Dr. Lei Wei
Senior Design 1
Group 15
Jordan Carraway - Electrical Engineering
Hunter Herrold - Electrical Engineering
Alexis Quintana - Electrical/Computer Engineering
Logan Waln - Computer Engineering
TABLE OF CONTENTS
1. Executive Summary………………………………………………….…..……1
2. Project Description……………………………………………………………2
2.1 Project Motivation……………………………………………….2
2.2 Project Objectives……………………………………………….3
2.3 Requirement Specifications……………………………...…….4
2.3.1 Safety Specifications……………………………………5
2.3.2 Power Specifications…………………………………....5
2.3.3 Design Specifications………………………………...…7
2.3.4 Mobile Application Specifications…………………...…7
2.3.5 Database Specifications……………………………..…7
2.3.6 Environmental Specifications………………………..…8
2.4 Hardware Block Diagram……………………………………....8
2.5 Software Block Diagram…………………….………………….9
2.6 House of Quality Analysis…………………………………….10
3. Research…………………………………………………………………….…12
3.1 Similar Existing Products and Projects…………………...…12
3.1.1 Model PX-2 Large Standard Power Pet Door………12
3.1.2 PetSafe Electronic Smart Door (Petco)....................12
3.1.3 myQ Pet Portal…………………………………………13
3.1.4 POE Powered UHF Doggy Door……………….…….13
3.1.5 SureFlap Microchip Cat Door……………………...…14
3.2 Relevant Technologies……………………………………..…14
3.2.1 Radio Frequency Identification……………………….15
3.2.2 WiFi…………………………………………………...…17
3.2.3 Bluetooth……………………………………………..…19
3.2.4 Ultrasonic Sensing……………………………….……20
3.2.5 Local Storage……………………………………..……21
3.2.6 Security…………………………………………………22
3.2.7 Databases………………………………………………23
3.2.8 Programming Languages………………………..……25
3.2.9 Doggy Door Damping Mechanisms……………….…26
3.2.9.1 Rotary Dampers…………………..……26
3.2.9.2 Soft Closing Spring Door Closer……..27
3.2.9.3 Door Magnets………………………..…28
3.2.9.4 Door Hinges………………………….…28
3.2.9.5 Solenoids…………………………….…29
3.3 Core Components and Part Selection………………….……30
3.3.1 Raspberry Pi……………………………………………30
3.3.2 RFID Technology………………………………………34
3.3.2.1 RFID Reader……………………...……34
3.3.2.2 Tags………………………………..……37
3.3.2.3 Antenna…………………………………40
3.3.3 Camera…………………………………….……………43
3.3.4 Infrared Sensor……………………………...…………45
3.3.5 Locks……………………………………………………47
3.3.6 Buzzer…………………………………………..………58
3.3.7 Power……………………………………………………59
3.3.8 3D Printing Filament Material………………...………60
3.4 Part Selection Summary………………………………………61
3.5 Weatherproofing and Enclosure Design………………….…62
3.5.1 Door Materials……………………………………….…63
3.5.2 Weather Resilience……………………………………64
3.5.3 House Installation………………………………...……66
3.6 Mobile Application………………………………………..……66
3.7 Database Design………………………………………………67
4. Related Standards and Design Constraints…………………….….……69
4.1 Related Standards…………………………………….….……69
4.1.1 ISO 18000-6C………………………………….………69
4.1.2 IPC-2221……………………………………………..…71
4.1.3 Serial Peripheral Interface (SPI)...............................71
4.1.4 Universal Serial Bus (USB).......................................72
4.1.5 Doggy Door Standards…………………………..……72
4.2 Design Constraints……………………………………….……73
4.2.1 RFID Constraints………………………………………73
4.2.2 Internet Constraints……………………………………73
4.2.3 Time Constraints…………………………………….…74
4.2.4 Safety Constraints………………………………..……75
4.2.5 Physical Constraints……………………………..……76
4.2.6 Doggy Door Constraints………………………………76
5. System Designs………………………………………………………………82
5.1 Hardware Design………………………………………………82
5.1.1 Antenna…………………………………………………82
5.1.2 RFID Reader……………………………………...……83
5.2 Software Designs………………………………………………84
5.2.1 Software Environments………………………….……85
5.2.2 Software Integration with Hardware…………………86
5.2.3 User and System Integration…………………………86
5.2.4 Offline Operation…………………………………….…87
5.2.5 Programming Languages……………………….….…87
5.2.6 Reading an RFID Tag…………………………………88
5.2.7 RFID Reader Interrupts………………………….……89
5.2.8 Motion Sensor……………………………………….…90
5.2.9 Locking and Unlocking……………………………..…90
5.2.10 Background Scripts……………………………………91
5.2.11 Mobile Application………………………………..……91
5.3 Door Construction Designs………………………………...…92
5.3.1 Initial Door Design Concepts…………………………92
5.3.2 How to Install………………………………..….………98
6. System Fabrication…………………………………………….…….………99
6.1 PCB Design……………………………………….……..……100
6.1.1 Power Requirements……………………………..…100
6.1.2 AC to DC Converter…………………………….……101
6.1.3 Voltage Regulators………………………………...…105
6.1.4 Converter Selection……………………………….…106
6.1.5 PCB Design Software……………………………..…108
7. Prototype System Testing…………………………………………………110
7.1 RFID Reader Testing (3db)................................................110
7.2 RFID Reader Testing (27db)..............................................111
7.3 Door Testing………………………………………………..…113
7.4 Initial Raspberry Pi Testing………………………………..…114
7.4.1 SD card setup……………………………………..….115
7.4.2 SSH setup………………………………………….....115
7.4.3 Hotspot setup………………………………………....116
7.4.4 VNC viewer setup………………………………….....116
7.4.5 LED setup…………………………………………..…117
7.4.6 Motion sensor setup……………………………...…..118
8. Administrative Content………………………………………………..…..120
8.1 Project Milestones………………………………………...….120
8.2 Project Budget……………………………………………..…122
9. Appendix…………………………..…………………………………...…….123
9.1 References………………………………………………………...….123
9.2 Permissions……………………………………………………...……128
LIST OF FIGURES
Figure 1: Doggy Door…………………………………………………………………....i
Figure 2: Hardware Block Diagram for Doggy Door…………………………………9
Figure 3: Software Block Diagram for Doggy Door………………………………...10
Figure 4: Rotary Dampers…………………………………………………………….27
Figure 5: Soft Closing Spring Door Closer………………………………………….27
Figure 6: Sparkfun Simultaneous RFID Reader - M6E Nano…………………….35
Figure 7: Current Draw vs. DC Voltage and RF Output Level of onboard antenna…………………………………………………………………………………36
Figure 8: Anatomy of an RFID Tag…………………………………………………..37
Figure 9: Visualization of different frequencies……………………………………..38
Figure 10: Different Tag Form Factors………………………………………………39
Figure 11: Beamwidth for Times-7 SlimLine A5020 Circularly Polarized Antenna………………………………………………………………………………....40
Figure 12: Times-7 SlimLine A5020 Circularly Polarized Antenna……………….41
Figure 13: Push Solenoid……………………………………………………………..48
Figure 14: Sketch of the how the solenoid and rectangular locking mechanism will be implemented…..……………………………………………………………….49
Figure 15: Electromagnet……………………………………………………………..50
Figure 16: Electromagnet Force……………………………………………………..52
Figure 17: Locking Pin Mechanism………………………………………………….53
Figure 18: 3D Design of the Locking Pin (Left) and Knob Mechanisms (Right)..54
Figure 19: 3D Design of the Shaft Mechanisms…………………………………....55
Figure 20: 3D Design of Prototype 2 Locking Pin………………………………….55
Figure 21: 3D Design of the Prototype 2 of the Shaft Mechanism……………….56
Figure 22: 3D Design of the Prototype 2 of the Knob Mechanism……………….57
Figure 23: (a) u.FL to RP-SMA female; (b) SMA male to SMA female………….83
Figure 24: SMA female to SMA male adapter……………………………………...83
Figure 25: Antenna selection to the Times-7 Slimline……………………………..84
Figure 26: EPC Gen2 Memory…………………………………………………….…89
Figure 27: Mobile Application Designs………………………………………………92
Figure 28: Sketch of the initial doggy door designs that illustrates their concepts………………………………………………………………………………...94
Figure 29: Picture of the first (left) and second (right) prototype of the doggy door……………………………………………………………………………………...96
Figure 30: DIagram of the Installation Process………………………………….…98
Figure 31: PCB Converter schematic………………………………………………100
Figure 32: PMP7170.1 efficiency graph……………………………………………107
Figure 33: PMP10335 efficiency……………………………………………………108
Figure 34: RFID reader testing……………………………………………………...111
Figure 35: Onboard vs external antenna…………………………………………..112
Figure 36: Reed switch prototype on and off state………………………………..114
Figure 37: Passive Infrared Sensor………………………………………………...118
LIST OF TABLES
Table 1: Requirement Specifications………………………………………………...4
Table 2: House of Quality Analysis………………………………………………....11
Table 3: Wi-Fi………………………………………………………………………....18
Table 4: Databases…………………………………………………………………...24
Table 5: Damping Mechanisms…………………………………………………..….29
Table 6: Microcontroller vs Microprocessor…………………………………..…….31
Table 7: Raspberry Pi Models…………………………………………………….....33
Table 8: Antenna Comparisons…………………………………………………..….43
Table 9: Camera Module Comparisons…………………………………………..…44
Table 10: Infrared Sensor Comparisons………………………………………....…46
Table 11: Comparisons of the Different Locking Mechanisms……………..…….57
Table 12: Comparisons of the Different Printing Filaments…………………..…..61
Table 13: Communication Comparisons……………………………………..…….62
Table 14: Compares the Different Weather Resilient Products……………….....65
Table 15: Application Development………………………………………………....67
Table 16: Common Door Sizes…………………………………………………..….72
Table 17: Times-7 SlimLine Antenna Input Power vs RF Output Power……..…75
Table 18: Software Environments…………………………………………………...85
Table 19: Software Design Considerations……………………………………..….88
Table 20: Door Design Considerations…………………………………..…...…….97
Table 21: Power Requirements…………………………………………….…..…..102
Table 22: AC to DC Converter Topologies Advantages vs Disadvantages…....104
Table 23: Onboard vs External Antenna………………………………………......113
Table 24: Senior Design 1 and 2 Project Milestones………………………..…..121
Table 25: Project Budget…………………………………………………………....122
1 Executive Summary
The need to simplify everyday, repetitive activities is becoming more desirable as technology advances. All pet owners can attest to the fact that pets can take up a lot of time, especially in an already busy schedule. Reducing the time spent on simple activities, such as letting animals both inside and outside, can save pet owners a lot of time. This is now possible. Part of technology advancing is the introduction of the well-known and very popular architecture: Internet of Things (IoT). This architecture is meant to make everyday devices communicate to other devices via the internet or some other communication network. Using data acquisition in the form of sensors, actions can be performed to make the lives of everyday users more efficient and less repetitive.
While existing technologies aim to reduce the time spent on letting animals both in and out, these products leave a lot to be desired. To configure the settings for the system, the user must approach the system on the door itself, the problem that is trying to be reduced. This could be remedied by implementing the IoT architecture.
Our IoT Smart Lock Doggy Door is primarily intended to automate and remotely control the need to let animals both inside and outside. Users will have full control over their animal entry and exit habits through the use of a smartphone application. Our door is designed to remain secure with a collar that must first be registered to the system, an advanced locking mechanism, and a camera that captures movement outside the door. Many concerns regarding IoT involve the loss of power or internet. Our solution addresses these concerns by providing both an external power supply if the power goes out and local storage to maintain key information to keep the system operating if the internet goes out.
This paper documents the design process of our IoT Smart Lock Doggy Door to ensure that safety, efficiency, and ease of use is maximized. First, the project’s motivation and objectives will be discussed with the required specifications following shortly after. An overview of the whole system will be provided in the form of both a hardware and software block diagram. Research into existing products will be performed to help determine which relevant, cutting edge technologies will be best for this application. With meticulous research, parts will be discussed and compared to find the best part for the job. Related standards will be discussed to keep our system aligned with existing technologies. After discussing the project's constraints, initial designs will be presented. After weighing several design considerations, a decision will be made on the best implementation for the system. This implementation will include a printed circuit board (PCB) as well as some way to communicate to the internet, while maintaining a low profile. Finally, the project’s budget will be discussed alongside the project’s milestones. All referenced figures and materials can be found at the end, inside the appendixes, providing permission to use copyrighted material.
2 Project Description
In the project description, the motivations, objectives, and requirement specifications for this paper will be discussed. The motivations will include why this project is important and include motivations behind some of the features that will be used. The objective section will explain what should be achieved once the project is complete. The requirement specifications will discuss what the system should be capable of to ensure that the objectives are reached. Further analysis of the requirement specifications will be found in the House of Quality diagram.
2.1 Project Motivation and Goals
Our motivation behind this project is to make a smart lock doggy door that is advanced and changes the way dog doors are currently being used. We have found that most “smart” systems are not truly smart as they lack a lot of features found in a lot of smart systems. Some missing features include remote control, customizability, and internet connectivity. To do this, we believe that adding IoT to our system will allow us to revolutionize the approach that is already being taken to doggy doors. To incorporate IoT into our design, the system will have both a database and a mobile application which will not only allow for the system to have more utility, but also remote control too. Our motivation behind radio frequency identification (RFID) is to create a responsive system that is scalable to many animals. With passive RFID, the consumer does not have to worry about the collar dying because it will not operate with any batteries. Finally, security can be a major pitfall for many door designs. Whether it be an intruder trying to force entry or even just a stray animal trying to sneak in, our motivation is to prevent any unwanted being from coming in. Our locking mechanism will be accompanied by both an infrared sensor and a camera. If the sensor detects any movement, a picture will be taken which can then be viewed on the smartphone application.
Technology is everywhere nowadays and it is here to make our lives better and more efficient. We are motivated to extend technology in areas that affect most people. Seeing that most people have at least one animal, we believe we can improve the quality of life with regards to pet maintenance.
We have many goals that we would like to achieve with this project. Because the system is largely software oriented, there will always be more goals to work towards and features to implement. To not overload our schedule, we broke down our goals into three separate categories. The first category being basic goals, the second being advanced goals, and the third being stretch goals.
The basic goals are the bare minimum goals that must be achieved by the completion of the system. The first goal includes the ability to detect and read a tag (or collar) from half a meter up to 1 meter away. This is important because the animal should not have to be touching the door for it to open. The second goal is that the user should be able to change permissions for each animal on the mobile application. This is necessary because this will allow for both uniqueness among each animal and more user control. For the last basic goal, the time it takes to detect a tag, process it, and unlock the door should all happen in under 4.5 seconds. If this time is too long, there is a chance the animal may not be able to be adequately trained to use the door. The association the animal makes with initially approaching the door and the capability of being let outside after hearing a buzzer diminishes as time increases.
Our advanced goals are the goals that we aim to achieve by the completion of the project. Our first advanced goal is being able to detect the presence of an animal that has been waiting at the door for an extended period of time. From there, the user will have the option to manually override the locks and let the animal in. This allows the user to not have to change permissions temporarily to let the animal in. This is also useful for animals that are not registered in the system, but still want to enter or exit. The second goal is being able to keep record if the animal is inside or outside. This can easily be solved by using two separate antennas or readers, however, to keep costs to a minimum, we are only using one of each. Therefore, sensors must be implemented in such a way that will be able to keep track of the state of the dog. The final advanced goal is to create a local storage for caching database results. This storage will be used to record the latest permissions for each animal. This will improve the speed of the system and also allow the system to still work if the internet goes out.
Stretch goals are the goals we would like to achieve if we still have time after accomplishing all the basic and advanced goals. The first stretch goal is to allow the user to create custom permissions for each animal instead of choosing between a predefined set of permissions. This will provide the user with even more control and flexibility over the system. The second goal is to have a user grant temporary access to a guest user without having to reveal the user’s login credentials. If the user has someone babysitting their animal(s), the user can give the guest access to the system and allow the guest to change permissions for a certain period of time. The final stretch goal is to implement live video streaming with the camera. Currently, the camera is able to take snapshots when movement is detected with an infrared sensor for additional security, but with a live video, the user can always check the current state outside of the door.
2.2 Project Objectives
Our objective is to make an advanced doggy door system that works with not only dogs, but similarly sized animals that can also be trained. Though there are many existing solutions on the market, they are not very innovative. We want to change that while still maintaining an easy to use, feature rich, and smart system. Other objectives include making the system have a small footprint and making it easy to install. Our team has a wide range of knowledge that can be applied to make the best of both the software and hardware required for this project.
2.3 Requirement Specifications
This section is dedicated to listing all the engineering requirements that must be met with the completion of the system. A list containing all of the quantitative specifications relevant to the project can be found within the contents of the table located below:
Description | Parameter | Specification |
Door flap dimensions | Dimensions of the door flap | W: 0.25” L: 12” H: 19” |
Door frame dimensions | Dimensions of the whole door setup | W: 8”, L: 12”, H: 22” |
Durability of flap | How much force the door flap can withstand | 63 N/mm2 |
Tag/collar reading distance | How far the tag should be read from the door | 0.5 m - 1 m |
Infrared detection distance | How far the infrared sensor detects movement | 0.5 m - 1.5 m |
Tag process and door unlock time | The duration at which the tag should be read, processed, and the door unlocked | < 4.5 seconds |
Door flap locking distance | How far the locks should be placed from the door flaps resting position | < 4” |
Sound pressure level of buzzer | How loud the buzzer should be | 70 dB - 90 dB |
External battery life | Duration of the battery life | 1 hour - 1.5 hour |
Table 1: Requirement Specifications
By meeting these specifications, the stated objectives for this project will be met. Most of these specifications have a value that can be measured. If the value is met, the objectives should be met. Should the values be positively exceeded, the system may be smaller in size or read tags at larger distances. However, in some cases, a reduced value will be better, like in the case of reducing a system's response time or hardware protrusion from the wall.
Other types of specifications may also exist that do not rely solely on measurable values, but rather design and system configuration. A list of these specifications can be found below.
2.3.1 Safety Specification
This system must be carefully designed to prevent any risk of injury to either animal or human. This system must be kept as low profile as possible with minimal protrusions. The fewer the parts that stick out, the least likely that the system will be hit by someone or something. This also makes the system less prone to taking any damage. The hardware, like the reader, antenna, and other electrical components, must also be carefully concealed. Doors are taller than they are wide, so most components can be safely tucked above or below the system itself. The closing part of the door is probably the biggest concern that most people would have. Implementing a sliding type of door was a consideration, however, object detection must be taken into consideration. If an animal tries to walk through the door as it is closing, the door must be able to detect if an animal were in the way. This type of setup also required more components and more work to open the door too. Therefore, the door will adopt the traditional doggy door flap where the opening sequence is controlled by the push of a dog and the closing sequence is controlled by gravity. The material will be light enough so that no damage will be done to any animal passing through the door when the flap falls back to its original position. This reduces the amount of components that can cause injury and keeps the door from becoming too complex.
Another safety specification is how far an organism will be from the antenna of the reader module. If the antenna has a gain of 8.15dBi and has an output power of 27dBm, the organism must be more than 21cm away to not be exposed to the radiation beam being produced [2, p. 63]. Our antenna, however, has a gain of 5.5dBic and will be operated at 27dBm or lower. Therefore, the minimum spacing required is reduced from 21cm.
2.3.2 Power Specification
Our design will largely be powered around a standard American wall outlet; that is, powered at 120 V with a frequency of 60 Hz. Our components, however, will need to be powered with a DC supply voltage, not an AC supply voltage, and at a much lower value. These values will vary between 3.3 V up to 12 V. Some components, like the buzzer and passive infrared sensor may require lower voltages, whereas components like the RFID reader and solenoids may require higher voltages. If power is not supplied (like a power outage for example), our system will no longer work and may trap animals either inside or outside. Therefore, an external battery will also be attached to the system. The ideal battery life of the battery will be about an hour. The usefulness of this addition is seen when there is a power outage. If the power goes out, the door will continue to operate like normal. In minor outages, this should allow enough time for power to be restored. To help with power consumption, the RFID reader can operate at low power modes. Though this is not a major selling point of the system, this will allow our system to be more environmentally friendly.
Our system requires complex power operation, therefore, our printed circuit board (PCB) will be dedicated for this operation. The PCB will allow for the conversions from AC to DC and at the correct voltages. Because high voltages will be present, it is important to work with extreme caution. Some other constraints to look out for are heat generation, noise, overload, overcurrent, undervoltage, and overvoltage. After converting to DC from AC, a voltage regulator will be required to step down the voltage. Either a linear or switching voltage regulator can be used, however, depending on which regulator is used, both heat and noise will be variable. Overload occurs when a system receives more current than it is rated for. This can then lead to overcurrent. Overcurrent is when a system has too much current flow, via a short or overload, which can lead to failure of components, fire, and more. Undervoltage is when the system operates at a lower voltage than expected. This behavior can lead to a Brownout, where voltage drops lower than required and the system continues to operate at this new voltage. This may produce unusual behavior, like components failing to operate as desired. While damage may occur with undervoltage, overvoltage is more likely to permanently harm components if the voltage is higher than a part’s absolute maximum ratings.
The external battery is an electrical constituent of our PCB. With this necessity, we will need to find a way to connect it to the rest of the power supply. More specifically, we will need to design some sort of circuit that will act as a switching circuit, where the external battery is electrically disconnected from the circuit until the 12 Volt rail produced from the AC/DC converter falls significantly beneath 12 Volts. Once this occurs, we wish for the external battery to be the source of power. In order to achieve such a function, the switching design desired the functionality of a solid state relay. There are many types of relays that could be used, but ultimately we wanted to create two circuits that were electrically isolated from one another, but would always have one of them active at a time. The implementation of an optocoupler would be perfect for our design. Essentially, when one circuit is on, it will excite the presence of a diode within the IC. Once this LED turns on, a photoreceptive material will then be activated, and with this IC configuration, electrical isolation is achievable, as well as the secured switching of two different circuits.
2.3.3 Design Specification
Design must be taken into careful consideration when building the door. No matter if the door is installed into a pre-existing track for a sliding door or inside of a wall, the presence of this door should be kept to a minimum. Along with a low profile, the system should also be easy to install for maximum convenience. The door will be heavily used by animals and will need to have the endurance to support long time utility. Both the locking mechanism and electrical components must be out of reach to prevent either human or animal interference. The electronics also need to be protected in such a way to prevent tampering, damage by external forces, and weather related problems (such as shorting a circuit due to rain). Finally, the system needs to be designed with fewer components to not only keep both the cost and complexity down, but to also improve how efficiently the system responds to commands from the system controller.
2.3.4 Mobile Application Specification
The mobile application is how the user can access and control the settings of the door and each profile. Through the application, the user can generate requests to a database. From the database, results will be sent to and processed by the Raspberry Pi Zero W. Some of the features include adding (or pairing) a new tag, editing permissions for each tag, and viewing pictures taken by the door. The application must be able to connect to the internet whether it be through Wi-Fi, mobile data, or some other form of communication.
2.3.5 Database Specification
The database plays an important role as it will tie the whole system together. Both the Raspberry Pi and the mobile application will be in communication with the database, via an application programming interface (API). The database will act as a middle man and will allow the Raspberry Pi and the mobile application to communicate with each other. The database must be flexible as it should support multiple systems, accounts, the creation and deletion of permissions, and be able to store photos for a short period of time. In order for the system to stay in communication with one another, an internet connection is required.
Querying the database every time a tag is read by the door will take too long to process. Therefore, a local storage (or onboard database) will also be implemented on the door. Using a realtime database will allow results to be updated across the clients (or the registered systems) as soon as the database gets updated. Accessing the database results that are cached will not only reduce the system read times but will also allow the system to continue to function without the presence of an internet connection. This means that the database must be capable of updating the system whenever a change occurs on the database through the mobile application.
2.3.6 Environmental Specifications
When operating the reader, several considerations have to be accounted for. Firstly, thermal considerations. The reader can operate between -40°C and +60°C [2, p. 15]. Though it is very unlikely this door will be placed under such thermal stress, it is important to be mindful of these constraints to ensure that the device will operate as expected.
Duty cycles and heat-sinking considerations must also be accounted for. As seen in [2, p.15], high duty cycles may result in overheating if heat-sinking precautions are not properly managed. It is possible, however, to have a low enough duty cycle where heat-sinking is not a concern. If high enough duty cycles are being used, a surface mount configuration must be used where a ground plane will distribute and release the to a larger ground plane as necessary.
2.4 Hardware Block Diagram
The block diagram is a useful representation to get a quick understanding of how a project will be built, the flow of data between components, as well as getting an idea for the components that will be used. Before creating the block diagram, we had to have a general idea of what we wanted the project to do. Without any direction, the block diagram would constantly be revised. After discussing the features of the project, we were able to compartmentalize components into individual blocks. When designing the block diagram, we wanted to reduce the number of components while maintaining functionality and speed. Our system controller would be doing the most work as it will host the local storage, implement WiFi, manage peripherals, and will be at the center of almost all data transmission. Due to intense computations and processing images, we were able to decide early on that our system controller must have a lot of processing power.
While designating roles for the block diagram, we wanted to be as fair as possible. We made a list of what people would prefer and assigned roles accordingly while playing into each member’s strength. In the block diagram, each part is split up into a primary and a secondary role. This was to ensure that each member would be accountable for a part in the project while being able to bounce ideas off another member. We made sure that everybody had a primary role first before assigning a secondary role. While some members may have more primary roles, other members may have more secondary roles. We all agreed that the distribution of work was fair before proceeding. Alexis Quintana and Logan Waln will focus mostly on software aspects to each of the blocks, while Hunter Herrold and Jordan Carraway will mainly focus on electrical/hardware aspects to each of the blocks.
Figure 2: Hardware Block Diagram for Doggy Door
2.5 Software Block Diagram
While the software block diagram functions similarly to the hardware block diagram (division of parts and structure of system), this diagram focuses solely on higher level software for the project. Because our system is a IoT Smart Doggy Door, it must be able to connect to the internet and the user must be able to control the system. To control the system, a smartphone application will be used to create an account, register the doggy door, add and remove animals, and allow the user to change permissions. Most actions performed on the application will update values in the database. The database will be the centerpiece between the application and the system controller.
The software block diagram was created in such a way to track the flow of logic and data. The logistical flow, represented by a black arrow, is how blocks will communicate with one another. The data trail, represented by a dotted line, will show at what points data will be collected and processed in the database. Logan Waln and Alexis Quintana will divide the software aspects of the project between each other. Because there are only two members, one will have a primary role and the other member will be guaranteed to have the secondary role.
Figure 3: Software Block Diagram for Doggy Door
2.6 House of Quality Analysis
In order to provide this well thought out project that we strive for and to be able to implement those ideas, we will examine the tradeoffs between the marketing and engineering requirements. This section will give a look into the house of quality diagram, depicting the correlations and relationships that each one will see.
Correlations | Relationships | |||
Positive | + | Strong Positive | ▲ | |
Negative | - | Positive | △ | |
No Correlations | Neutral | ○ | ||
Negative | ▽ | |||
Strong Negative | ▼ | |||
Table 2: House of Quality Analysis
3 Research
In section 3, the different technologies and similar existing products will be discussed. It is important to know the current solutions to justify and validate the choices made for the architecture of the IoT smart doggy door. The first topic to discuss is the presence of products or projects that have been already realized or are currently on the market. Once this is discussed, an in-depth analysis of the technologies that are currently available will be done in order to weigh the pros and cons of each, eventually identifying what our design would benefit most from.
3.1 Similar Existing Products and Projects
A doggy door has many applications, and each different design has a uniqueness in its approach. The various techniques and applications on the market demand a definition for our product. This section is included to address this definition by first establishing a foundation of our design: the basic doggy door functionality.
3.1.1 Model PX-2 Large Standard Power Pet Door
The Model PX-2 Large Standard Power Pet Door by High Tech Pet is an automatic doggy door. A DC motor is used to vertically pull the sliding door open. Once the door closes, a steel bolt locks it in place. This system uses ultrasonic sensing technology embedded into a smart collar in order to sense the dog’s distance from the door. The door mainly checks for the sensor’s path directly aimed at the door, preventing accidental/unwanted opening. The utilization of such a sensor keeps out stray animals, giving pets personal, direct access to the outside. The PX-2 model also ensures safety with an air-tight seal as well as bullet-proof polycarbonate panel.
This door also comes with a control panel that is used to customize or identify the status of four features: Power, sensors, battery, and range. The PX-2 Model allows for the flexibility of using either an AC adaptor or a rechargeable battery, and allows for the user to turn the door on, off, or to manually open the door. The sensors establish a four-way access system, giving the user freedom to configure the pet’s access to being only in, only out, in and out, or neither in nor out. If a battery is used, then green and red LEDs will indicate if the battery is low or not. The read range of the collar is able to be configured via knobs located on the control panel as well, allowing for customization of indoor and outdoor read range, independently [3].
3.1.2 PetSafe Electronic Smart Door
The PetSafe Electronic Smart Door by PetSafe is also an automatic doggy door, with an electronic locking mechanism as well. This door consists of a doggy flap made of plastic. Using radio frequency identification (RFID) in order to sense the dog’s presence, the smart door requires a tag. The RFID tag is located within the dog's collar, and is read by an antenna located within the door itself. This battery powered door has a maximum of 5 smart collars that are able to be programmed to one door. The control panel of this door has three options: Locked, unlocked, and automatic. The user is able to change the settings manually at any time by pressing on the “mode” button, switching between the three modes. When the door is in locked mode, access to the other side of the door for the dog is denied. When it is in unlocked mode, the dog has the ability and freedom to go in and out as it pleases. In automatic mode, the RFID technology will be utilized to unlock the door when the dog is in range. The door will then promptly lock when it is out of range. At 11 x 16 inches, this door is compatible with surfaces such as metal, wood, PVC, and other materials [4].
3.1.3 myQ Pet Portal
The myQ Pet Portal is an automatic doggy door developed by Smart Dog Door Technology. The opening mechanism to this door in particular is rather unique. As opposed to the traditional “flap” design or the vertically opening doors, this door employs a horizontal opening method that closely resembles an elevator door. This elevator-like door comes with a few features of interest that bears a resemblance to the IoT Smart Doggy Door design as well. This door design includes a smartphone mobile app as well that has many uses. The myQ Pet Portal includes multiple sensors to ensure proper operation. Via bluetooth technology built within the collar, the door is able to sense when the dog has come within range and open the door. The door includes sensors as well in order to detect when the dog has successfully traversed the length of the doggy door so as to avoid any potential harm to the animal. The application has a few customizable features for the door. It has the option to customize whether or not notifications will be sent to the smartphone when the dog is within range. Through the mobile app, using such features, the user is able to customize what “mode” the door is in. The door can either be set to automatic, where the dog has the freedom to come and go as they please, or it could be set to “By Request” mode, where notifications will be sent to the user in order to open the door or keep it closed. With one camera each located on the inside and outside of the doggy door, the mobile app will also allow for the user to visually check on their pets near the door as well as communicate with them via two-way communication audio [5].
3.1.4 POE Powered UHF Doggy Door
There are many independent projects that tackle the issue of an automatic doggy door. One such project that was particularly impressive was done by a youtuber named “Mack Tech.” This door design used a POE (powered over ethernet) powered doggy door that utilized RFID technology in order to achieve an automatic doggy door. The design consists of a pneumatically driven door that opens vertically when a tag is within range of the antenna located underneath the molding of the door, where the tag is defined to be located within the collar. Once the door opens vertically, then the LED within the acrylic of the baseboard changes color. This color will change depending on the status of the door. The three statuses are open, searching for a tag, and closed. In order to ensure safety, the sides of the door have infrared sensors that will detect if a dog or other object is caught in the doorway while it is closing. On top of this, the opening/closing mechanism contains a muffler that slows the closing speed of the door, so as to avoid injury or potential damage to the door.
This independent project neatly packs all of its hardware components behind a clock located above the door. A solenoid valve was used to control the opening and locking mechanisms for the door. For the reader, a TR-65 reader module is used, coupled with an antenna that was not specified, and the tags operate on UHF. As far as the types of infrared sensor that was used, it was also not specified, but they were referred to as “infrared curtains.” An arduino nano was used to handle the logic and coordinate between the inputs and outputs, as well as the valves driving the door mechanism and the TR-65 reader. The TP Link module was used to power the circuitry facilitating the process via ethernet [6].
3.1.5 SureFlap Microchip Cat Door
Another product on the market that employs very similar technology and functionality of design is the SureFlap Microchip Cat Door by SureFlap. The main means of communication for this door is also RFID communication. Compatible with many microchips as well as tags, the reader will recognize up to 32 individual tags/microchips, allowing for use in a multi-pet house. This door is quite small, with dimensions of 5.75 x 4.75 inches. While this door is labeled as a cat door, it also proves to be useful for smaller dogs as well. Select models of this door include an LED screen at the top of the door in order to indicate the current status of a few parameters. The LED screen indicates which of the four modes that the door is in. There is one mode for the animal to go in and out as it pleases, one mode for “in-only” where the animal is only able to come inside but not go outside, another mode for fully locked, and the last mode is for out-only. These are all customizable via a button located on top of the door [7].
3.2 Relevant Technologies
This section will provide a list of relevant technologies that may be used to design an advanced doggy door. While many of the technologies may work, some will work better than others. A background will be provided for each option as well as why we may consider it. Lastly, the pros and cons will be discussed to explain why one path may be better or worse.
3.2.1 Radio Frequency Identification
Radio-frequency identification (RFID) is a wireless tracking technology that uses electromagnetic waves in order to convey information. The main components of RFID are the reader, the tag, and the antenna. Common implementations of RFID can be found in car key fobs, where the fob is a tag and the reader module built within the car is a car. Another example is the chip on a debit card, where the card itself acts as a tag.
A reader (sometimes referred to as an interrogator) is the component of RFID that is the primary processing unit of RFID communication. A reader converts specific data into electromagnetic fields through the air via an antenna. A tag contains a chip with unique information on it, programmable by the user. Once the tag is in range of this electromagnetic field, it sends out its own electromagnetic field containing its unique information. This field is then received by the reader and converted into data that can be read through certain software. Once this data is read, any given task specified and programmed by the user can occur, ranging from physically moving parts to digital action [8]. The IoT Smart Doggy Door intends to use this technology; each dog will have their own unique ID, where customizable permissions will allow them to enter and exit the doggy door at specific ranges of times in the day. The collar will contain an RFID tag that will communicate to a reader located underneath the doggy door. Once information has been communicated, depending on the customized permissions, the door will unlock, allowing the dog entry/exit.
There are many different variables when it comes to designing an RFID system. Careful research is required in order to make sure compatible components are selected. A very important parameter to consider is the polarization of the reader/antenna. There are two types of polarization: Linear polarization and circular polarization. Linear polarization is when the electromagnetic fields are sent through the air in such a way that, in order for a tag to receive the signal and send one back to the reader, the orientation of the tag must be known. With circular polarization, the electromagnetic fields are sent in such a way that the orientation of the tag does not need to be strictly defined [9]. Given these two options, the ideal polarization is circular polarization. This is mainly due to the fact that as the dog moves, the collar’s orientation will be unpredictable.
Every RFID antenna has a particular beamwidth. The beamwidth indicates the angle from the antenna where most of its power is being radiated outward. This means that an antenna with a particular beamwidth needs to be identified. Common angles range from 30 degrees to over 120 degrees. The higher the beamwidth, however, the power tends to decrease. This is because there is a larger volume that the power is being distributed across [10].The antenna will be situated underneath the door. Due to the fact that a short dog could be very low to the ground, a beamwidth of 120 degrees is preferable as opposed to a smaller angle so that the tag has a greater likelihood of being read. However, we must keep in mind the decrease in power that comes along with an increased bandwidth.
In addition to beamwidth, ensuring impedance compatibility is crucial. The antenna impedance must match with the value required of the reader’s datasheets. The top industry standard impedances are 75 Ω and 50 Ω. The specific reader module used in this project requires an impedance of 50 Ω. This value will maximize the power that is being transferred between the source and the load as well as minimize the signal’s possible reflection. Although most antennas operate with an impedance of 50 Ω already, this parameter still must not be ignored so as to avoid unnecessary complications and loss of energy.
When choosing a tag for any given application, there are two main types to consider: Passive tags and active tags. Both of these tags have their advantages and disadvantages. Having no internal source of power, passive tags send information only when they are in range of a reader whose electromagnetic fields incite power within the tag. Once this occurs, the tag sends back information for the reader to receive and interpret. In general, passive tags are far cheaper than active tags due to its ability to operate without a battery. Active tags, on the other hand, are tags that operate with an internal source of power. When it comes to active tags, there are two major types: transponders and beacons. Transponders are more battery efficient because they wait for when they are in range of a reader to send out their signal, whereas beacons send out a signal every 3-5 seconds. Active tags are capable of much further read ranges in comparison to passive tags, but a downside with active tags is that their battery presents a lifetime to the device, requiring the user to change it out every so often. Due to the necessity of a battery, active tags are generally more expensive than passive tags, and they are often larger in size in comparison to passive tags [11]. These variables give rise to important considerations for our application, such as whether or not we want to have a tag containing a lifetime, a large read distance, and so on. Passive tags have the benefit of affordability as well as convenience, given the fact that battery changes can be avoided.
Another variable to consider is what operating frequency is best suited for the project. Passive tags and active tags have different frequencies of operation, and each range of frequencies determine certain characteristics of the tags themselves, such as read range. While active tags commonly operate at 433 MHz, passive tags have three different ranges of frequencies: Low Frequency (LF), High Frequency (HF), and Ultra High Frequency (UHF). Having the shortest read range of only about 1-10 centimeters, 125 - 134 KHz indicate a Low Frequency tag. Containing a subset of RFID technology known as Near Field Communication (NFC), High Frequency tags operate at a frequency range of 13.56 MHz, where the typical read range could be between 1 - 100 centimeters. Corresponding to the longest read range of potentially over 30 meters, 865 - 960 MHz is the frequency range for Ultra High Frequency. While a higher frequency indicates further read distances, there is a downside to higher frequency as well. The further the read distance, the more opportunity there is to have proper operation-threatening materials to interfere with the signal, such as water and metal.
In regards to the frequency range in the best interest of our design, the pros and cons of these different ranges needed to be weighed. The LF tags run into the issue of a slow data reading speed in comparison to the higher frequency tags. An advantage to this frequency range is their low vulnerability to certain electromagnetic interferences. They are also able to pass their signals through layers of metal that are relatively thin. It’s short read range can be beneficial, but for the IoT Smart Doggy Door, it would pose a constraint. High Frequency tags have the advantage of a faster transmission rate for the data collected, but it is also limited to its short read range of a maximum distance of approximately 1 meter, where roughly 2 meters would be our ideal read range. In addition to this, HF tags also have higher vulnerabilities to noise and EM interference. Ultra High Frequency has the furthest read range capabilities between the three options, as well as the fastest data transmission rate. While a higher frequency indicates further read distances, there is a downside to this higher frequency as well. The further the read distance, the more opportunity there is to have operation-threatening materials to interfere with the signal, such as water and metal. [12]
3.2.2 Wi-Fi
It is through the use of Wi-Fi, made possible by the Wi-Fi module built into the Raspberry Pi Zero W, that our doggy door will be accessing the database that holds all users, tags, variables, etc. This specific system controller of ours uses the wireless standard of 802.11 b/g/n wireless LAN. In doing so we keep the cost of our product down while still using a very reliable and common standard that is capable of giving us speeds that exceed what is required for any of the communications the controller will be having with the database. This Wi-Fi standard utilizes the 2.4 GHz frequency band so even though it is not as fast as the 5 GHz band, the data transfer rates that we will be able to access through this band will be more than enough for the scope of our product. Not only this, but we actually benefit from using the 2.4 GHz band because this band is known to have a wider area coverage and have an easier time penetrating through solid objects to make a connection. In situations where a consumer with a larger house is using our product, this wider coverage can make all of the difference to making it work properly. While regardless of any factors that the consumer might present, the data being transferred between the door and the Internet will always be a fraction of things like multimedia streaming, downloads, etc.
Below we compare some of the main features that differentiate these two popular Wi-Fi frequency standards. We also have a column that notes whether we will reap the benefits of this feature, whether it might slightly negatively affect us, or whether there won’t be a noticeable effect. Keep in mind, we will be using the 2.4 GHz band.
Features | 2.4 GHz | 5 GHz | Effect for us |
Speed | Max of ~450-600 Mbps | Max of ~1300 Mbps | No effect |
Area Coverage | Larger area | Smaller Area | Positive effect |
Interference | Microwave ovens and other appliances | Cellphones, radars, sensors | No effect, both balance out |
Wall Penetration | Waves are more capable of travelling through solid objects | Waves are less capable of travelling through solid objects | Positive effect, no worries about connection strength |
Congestion | Old standard, high congestion | Newer standard, lower congestion | Slight negative effect, slowdowns aren’t big issue |
Table 3: Wi-Fi[13]
Our integration with the database is part of what makes our product an Internet of Things device. But the integrations actually go much deeper than just the system controller talking to the database. This system of ours includes the locking mechanism of the solenoids, the addition of an outer camera, the sensing of our motion sensors, and so much more that all interacts with a mobile application and classifies as a Internet of Things system. For every door that is sold, the consumer gets to register however many animals they want based on how many tags they have. Each of these animals has a unique ID or UID. This UID is the foundation for how our system functions. Every single animal registered under one of our doors has its own UID that lets the specific door recognize it. Each of these individual doors also have their own UID which is how the database keeps things organized. With the help of our RFID reader we hope to store each animal's UID on their RFID readable tag. When an animal approaches their respective door, the RFID reader will pick up on the tag and grab its UID. Then the system controller will take note of this UID and pass it along to the Wi-Fi module on the board so it can be sent over the internet. It is very important that when it does this it also takes note of its own UID and sends that along with the tag UID. When the database receives this information it first uses the door UID to access the correct subset of animals. From there it can search that subset for the animal UID that was picked up by the reader. Even though this seems like a process with quite a few steps, we plan for this to all happen very quickly as it is near impossible to train a dog to wait around a specific amount of time for a system to finish its task. The only aspect that we can see slowing down the process will probably be the sending and receiving to the internet through the Wi-Fi module. Still, with network speeds adequate enough to browse the web, sending two IDs and receiving some variable values shouldn’t take longer than a second at worst. An edge case that is addressed with our unique door system is not allowing just any animal with one of our IDs into any home. While this might be an edge case we found it would make the customer a lot more comfortable knowing that their door can only be unlocked by their animals. Not only that but the organization for the database will be a lot nicer and easier to follow for any sort of debugging.
3.2.3 Bluetooth
Bluetooth is an important protocol that can easily create a network of devices that can communicate with one another. It plays a large role in IoT as it provides many advantages that other protocols either cannot support or simply lack. While Bluetooth cannot fully operate on its own as an IoT device (due to the lack of internet connectivity), this protocol can be used to deliver information cheaply and effectively to devices that can broadcast information as needed.
One major selling point of using Bluetooth is how cheap it can be. To use it properly, two Bluetooth enabled devices need to be available to allow for communication. Therefore, in most projects, two sources of Bluetooth must be provided. With that being said, costs can still be around a few dollars. If many devices are required, the price can be expensive, however, for projects that require only a few devices, Bluetooth becomes an attractive option. Other alternatives like Wi-Fi or LTE require some sort of network service provider where fees are charged based on bandwidth usage, speeds, and capacity. A desired feature that Bluetooth offers is the Received Signal Strength Indication (RSSI) which will allow for the detection of the strength of a received signal. Using simple math, a rough estimate can be provided about the distance between two connected devices.
Bluetooth is versatile and provides a wide range of use cases. When people talk about this protocol, they mostly refer to Bluetooth Classic. Bluetooth Classic operates at 2.4GHz using the point-to-point communication topology. It is used in many cases where data types, such as audio, text, images, or video, need to be transferred or streamed [14]. In order to get two Bluetooth Classic devices to communicate with one another, they must be paired. This process can sometimes only take a few seconds. Along with short pair times, security is taken into consideration with authentication, encryption, and authorization [15]. Four different modes of security are offered and there are more than one way to pair two devices. Classic also offers reliable and fast data transfer speeds. While Classic may appear to be a desirable solution, battery life may suffer depending on types of data transfer, speed, and broadcast range.
Another form of Bluetooth is Bluetooth Low Energy (BLE). BLE is another viable option that serves many purposes. BLE commonly gets confused with Bluetooth Classic. BLE not only has a much better battery life compared to that of Classic, but it also offers a better price point as well. Similar to Classic, BLE communicates at 2.4GHz and is able to do so over many channels. Several types of communication topologies are offered such as point-to-point, broadcast, and mesh. BLE offers just a couple of security modes with several levels each [15]. Another important feature is “...high accuracy indoor location services [16].” which is useful for proximity detection and product tracking. Other fields where BLE can be used is data broadcasting with beacons, quick data exchanges, and personalized marketing. Data types like audio, video, images, and more are not supported though. BLE is a strong option to consider due to its variety of uses, cheap price, and ease of use.
While BLE is a better solution than Classic, Bluetooth overall is overkill for our project. Our project does not require constant transmission of data. We only require proximity detection and a unique ID, which can be provided with other communication protocols. We also really disliked the fact of having a battery powered collar. BLE does reduce the strain imposed by Classic, however, we do not want the user to worry about the collar dying or being impacted by environmental factors. While RSSI would be useful for our project, with a little bit of research, we quickly found that orientation and other external factors can greatly produce inaccurate results. Bluetooth has its time and place for its use, however, we believe better options exist.
3.2.4 Ultrasonic Sensing
When the project was relatively new and in development, many methods of technology were discussed and taken into consideration. Once such technology was ultrasonic sensing. With the necessity of distance measuring, naturally ultrasonic sensing technology was heavily considered. With the use of sound waves, ultrasonic sensing technology uses frequency ranges that are undetectable to the human ear. Once these waves are sent out at a speed of approximately 344 meters per second, they are then reflected back to their transmitter. The hardware component then processes the time it took this wave to be sent back and yields a value for the distance. The average human can hear frequencies up to 20 kHz, hence it is very important to operate at a frequency range that is above 20 kHz. Consequently, the typical range of frequencies that is used is within the frequencies of ultrasonic sound, around 40 kHz - 75 kHz, although other frequencies can be used. The frequency used is a very important consideration when choosing a design for this technology. The lower the frequency, the less distance that is detectable through ultrasonic sensing. For example, at 40 kHz, a distance of about 10 meters is detectable. However, at higher frequencies, only a few centimeters may be achievable.
This technology is utilized in many applications. Ultrasonic sensing has the ability to detect objects regardless of their shape, orientation, and physical properties. They are commonly used in implementations that must have the ability to avoid physical objects or detect the presence of something. This can be seen in drive thrus. Many companies include these sensors in order to detect the presence of a large vehicle such as a car or a truck in order to notify a worker. They are also a vital component in collision avoidance systems. Certain quadcopters use ultrasonic sensing in order to detect the presence of a wall or incoming object, and promptly move out of the way with a particular protocol initiated by its detection.
With such an effective means of measuring, one might wonder why this method was ultimately not chosen. Originally, it was debated where this technology would have been placed in our design. The idea of inside the collar was entertained, as well as on the door frame. Once the ultrasonic sensor came within a particular distance to the door, then pneumatic actions would be taken to open the doggy door. The use of some transmitter/receiver would have to be used as well in order to distinguish the presence of a particular object/location. It is important to note as well that the range of frequencies a dog can hear is up to around 45 kHz, and a cat’s detectable frequency range can be up to 85 kHz. While the sound coming from an ultrasonic sensor would not necessarily hurt an animal, nor cause them any discomfort, it is possible that this would distract the animal and result in unnecessary difficulty in training the animal. On top of this possible constraint, there is an additional issue: It would not be feasible to create unique identities for each individual pet. A defining characteristic of our IoT Smart Doggy Door design is the customizability of permissions of individual pets via a smartphone application. Using ultrasonic sensing technology, this would not be so easily implemented due to its lack of individuality. It would be difficult to distinguish one pet from the other, causing the idea of individual permissions to be unachievable [17].
3.2.5 Local Storage
On our system controller we will be using an SD card as a form of local onboard storage. There are two main reasons why we see it beneficial to our product to include and fully utilize this onboard local storage even with our product's main attribute being IoT. The first of these reasons is we plan to keep a cache of certain variables for each tag stored for quicker access. If we store these important, base level permissions locally we save the system the time of having to communicate with the database each and every time a pet approaches the door. Instead our cache will be holding the basic information of all the tags associated with the specific door and will know whether or not any of these specific animals can use the door when they approach it. To keep the system updated with time and weather changes that could change if an animal can use the door, we will be polling the database often to see if any of these changes have come into play. This frequent polling of the database by the system also allows it to accurately implement any direct overrides that the owner might’ve done on the mobile app.
Besides the overall quicker access, our local storage will keep our consumer at ease in the case of the system losing connection to the internet for whatever reason. As explained above, our system will be constantly polling the database for if each and every pet can currently use the door. In the situation where communication with the internet is lost, the local storage will still be holding the most recent data that the database contained before it lost communication with it. While unfortunately there is no way of us getting a change made in the database to the system when internet communication is lost, with our polling system, as soon as the connection has been re-established with the internet, the latest state for every single tag will be sent straight to the cache and ready to be accessed. When making a smart doggy door, the last thing we want our consumer to worry about is down time. With such a product it is essential that it is working 24/7 as your pet does not know when the internet is down. Without local storage our IoT door would have the negative compared to regular smart doggy doors that it would be down with no connection.
To summarize, the importance of our local storage comes from:
3.2.6 Security
Bringing up security when it comes to a doggy door design might seem a bit unnecessary to some, but one of our main goals with the project is the consumer’s peace of mind. Thankfully, since this will be a regularly sized doggy door, users will not have to worry about a thief making their way into their house through the door. However, there are still concerns that can arise from a doggy door system with regards to security. The main one that came to our mind was having a thief taking our consumer's pet from inside the house.
Our solenoid locking mechanism will double as the locking mechanism for the main functionality of the door while also preventing any thief from accessing anything on the inside. The solenoids on both sides of the door will sit very close to the flap itself. This means that the inner solenoids will prevent any thief from pushing the door in to get access to the immediate area by the door on the inside. Our flap will also reach the bottom of the frame, preventing the thief from sticking their fingers under it and pulling the flap towards them to access the inside, even and only if they manage to bypass the outer solenoids.
In the event that a thief is trying to open your door, not only will our preventative measures stop them from doing so, but we will also have our camera system setup so that anything that occurs outside without a tag’s presence will be captured as an image and sent back to the database and subsequently the user’s phone. We want to implement this with a high priority notification alert that will be sent to the user so that they are aware of the situation outside of their doggy door while it is happening. From the app the user can then take over control of the locking mechanism and they can also decide from there whether they want to contact some sort of law enforcement or a neighbor/friend to check out the situation.
An important implementation of our system to ensure this security measure works is overhauling the pet’s access in these situations, only being able to be overwritten by the user in the app. This means if the thief gets the pets attention and lures it towards the door in conditions where it would normally be let it out, the buzzer will play a sound alerting it that it cannot currently exit and the solenoids will stay in place as we will implement a top priority auto lock when the infrared sensor detects something outside. This also means that this system will also help keep unwanted animals from entering even if they grab the pets attention.
3.2.7 Databases
IoT integration has become the most important aspect of our project. In this semi-new field of smart doggy doors, we see the potential in innovating this product beyond what has been tried on the market. We want to put the power of customizability into the users hands with a mobile application that lets them control their smart doggy door at any time from anywhere. At the core of this concept, database integration is our necessary foundation to allow for all of this to happen.
Very early on into our brainstorming, right around the time when we had started considering a doggy door, the option of storage of IDs with some sort of subset of different variables that can change the effect of the state of the system was considered. It didn’t take us long to reach the thought of online databases as previous experience with them had shown us just how powerful they can be, but there were still several reasons why we didn’t just stick to some local storage only system. The first situation that solidified our preference towards databases was taking into consideration when a pet owner is away from their residence for any amount of time. With a local setup system, even if a mobile app was integrated, we would have no way to communicate with our door if the user was not in range of their home network. With our system, the user actually never communicates directly with the door on the mobile app. Instead, certain adjustments the user is making are sent to the database which the database then communicates to the door over the home network no matter where the user is.
Name | Couchbase | Firebase | MongoDB |
Short Description | JSON-based database derived from CouchDB | Cloud-hosted realtime database. All clients share one realtime instance and auto receive updates | Database that works both as a cloud service or a deployed self-managed infrastructure |
Cloud-based only? | No | Yes | No |
Offline mode? | No | Yes | No |
Performance | Exceptional | Good | Great |
Server Operating System | Linux, OS X, Windows | Hosted | Linux, OS X, Solaris, Windows |
Overall Security | Good | Great | Exceptional |
APIs and other access methods | CRUD, Query, Search, Analytics API | Android, iOS, Javascript API, RESTful HTTP API | Proprietary protocol using JSON |
Triggers | Not immediate | Immediate | Not immediate |
MapReduce | Yes | No | Yes |
Server-side scripts | Javascript | Potentially limiting Google ‘rules’ | Javascript |
Table 4: Databases[18]
Above we went into some popular databases that were all considered for use in our project. Finding the perfect database platform for our software is crucial as the database serves as the foundation on which our whole project is built upon.
Another consideration was the flexibility and power that databases are capable of nowadays and how they could help this project on a larger scale. With a local setup of IDs and variables we are limited to local storage space, potential local storage issues that can leave a consumer with all their inputted data being lost as it is only stored in that one location, and things of the sort. Besides this, having our user data in databases, our team is able to help the customer debug certain issues much easier with direct access to their specific product’s data. Our team is able to help them set up anything they might be struggling to set up and ensure that certain changes are reflected in our databases. Down the line, in the age of software updates, we would be able to make certain changes to our databases, add new variables, fix any potential issue, all without having to go through each individual product one by one.
For our database we will be using Firebase. Firebase is Google’s database that has some amazing features that led to us going with it. Nowadays Firebase is so much more than just a database, it is a service that provides its users with great ways to create projects like our own and helps with the integration of everything in the project. One of the features that will be of essential use to our team is their asynchronous listeners. These listeners can be attached to any of the variables we wish to create and act in such a way that when the variable is first initialized or when it’s value is changed, it will be able to trigger whatever event we see fit. This is how we plan to keep our local storage on the system up to date with anything happening in the database.
3.2.8 Programming Languages
As an Internet of Things project, our software will be what sets us apart from other “smart” doggy doors on the market. Most, if not all, of these smart doggy doors will just have to worry about programming their tags to the reader and be done with it. In comparison we will have to go through that process while also being sure it is communicated back to the database over the internet. After this it will have to add certain database entries that then have to use an API we would make to communicate it back. Finally, it must be able to access all of this on a mobile app that will be from the ground up allowing users to make changes to the database and use other features.
There was a lot that went into the decision on what programming language/languages to use for this project. Throughout their years at UCF our two computer engineers have learned quite a few different languages but most agree that they are most comfortable with Java. For this reason, Java was our first choice and with Javascript experience for API from previous classes we planned to use both of these languages to write all the software for our project. Java is an extremely powerful language, especially for people who know how to use it and have been taught some of its best utilities. In terms of Javascript, the experience was not as much as Java but it was being used in the exact same way we are looking to implement it.
However, as time passed and all factors were considered we ended up agreeing Python was best for our project. Python, while we may not have as much experience in it, is not only an extremely powerful language but it is easy to follow and understand. We are ready to be faced with some difficult software challenges and believe all the libraries and resources for python will be a big help in getting over the hurdles along the way. Python is the future of programming and with our innovative product that we hope to introduce to the market, we want to make sure we are not only with the times, but also future proof. Our Python software that will be made publicly available will make it much easier for our everyday user to try to follow if they would like to, while also being a breeze for most programmers to understand as Python is the most popular programming language in the world.
Even though we will mainly be utilizing Python for this project, some Javascript will still be considered for the database. But as mentioned, this will be no problem as we feel comfortable coding up APIs in Javascript. Javascript has many different objects and already existing APIs that it can easily access. Things like events, security features and authorization are all made simple through the use of Javascript. Because of our utilization of a REST API it is possible that we use Python.
3.2.9 Doggy Door Damping Mechanisms
One of the main concerns with the doggy door involves the swinging motion of the doggy flap door itself. When the door swings outward, we would like the door to move back to its starting position after being opened. This is to facilitate a predictable and consistent closing pattern so that it can be locked without any complications. When pondering the issues and comparing them to the desired function, there had to be solutions to this specific problem. Below are several types of relative technologies that were researched in order to solve this concern, which include rotary dampers, soft closing spring door closer, and door magnets.
3.2.9.1 Rotary Dampers
Rotary dampers slow down rotary movements and allow for controlled declaration. As seen in [19] , they come in two different styles, one having a gear component coming out that is often used in CD player lids that cause the lid to open slowly when the CD player is opened. The other style is called a disk damper. Instead of having a gear on the end of the damper, the disk damper has a small circular or square hole in the center that allows for a shaft to be inserted. The disk dampers usually require more torque in order for the damper to work properly. The gear-shaper rotary dampers have a larger range of torques necessary to work properly. With both of these dampers, they can be used for movement in the clockwise and counterclockwise directions, as well be bi-directionally. For the purpose of the project, the bi-directional damper would be the best option since a traditional in and out style doggy door is being used.
Figure 4: Rotary Dampers
Reprinted with permission pending, from [19]
3.2.9.2 Soft Closing Spring Door Closer
Another relevant technology is a soft closing spring door closer. These are very commonly placed on doors in schools, stores, and restaurants to close the door automatically once it is opened. These are usually large with respect to the door. The specific one in [20] that is pictured below is about 6 inches long and was the only spring door closer that scaled down to a doggy door size. The limitation of this design is that it only allows for movement in one direction. This would cause the design of the door to be adjusted and the door would have to only go out as opposed to in and out. If this mechanism was used then the door would have to be opened automatically for when the dog is outside and wants to come inside. This would cause an even bigger issue causing other technologies to be researched.
Figure 5: Soft Closing Spring Door Closer
Reprinted with permission pending, from [20]
3.2.9.3 Door Magnets
Door magnets were the first component thought of to get the door to settle back into its starting location after opening. This is arguably the most widely used device used to help the door close in doggy doors on the market. However, this project is using an RFID reader and the magnets could affect the electromagnetic fields that the reader gives off. This is something that needs to be further tested if it does affect it or if it will not be an issue if smaller magnets were to be used. This concern led to further research on how to keep the door in the starting location after opening in order to all together avoid any interferences in the electromagnetic fields coming off the RFID reader that could occur either right away or in the future.
3.2.9.4 Door Hinges
Different hinges were researched to be used for the doggy door to allow 180 degrees of rotation and work with the flap that was designed. As mentioned in section 3.2.9.1, rotary dampers were researched to eliminate the need for hinges so they could allow the door to rotate 180 degrees as well help allow the door to return to its starting position without having many swings back and forth. This idea would be the best but when prototyping, the rotary dampers started to not work exactly as planned and therefore door hinges were researched to see if they could work.
The first hinge looked at is just a basic door hinge that would be used for a small door. This was the first hinge that was prototyped due to being an inexpensive option. When it was prototyped, two hinges were used, and one part of the hinges were attached to the ceiling of the door frame while the other was attached directly to the door flap. For the initial prototype the door flap was made from plywood to just see how effective the hinge was. When the flap was open it was able to be fully opened to be perpendicular to its starting position when opening out, but when opening inward, the door was only able to open about halfway. The door flap had to be screwed too close to the ceiling of the door frame and when opened the top of the door would catch the ceiling of the door frame limiting its range of motion. Although this prototype did not fully get the range of motion that was expected, it could be adjusted to allow for a full range of motion but it would have to be done by adding another mechanism. The top of the door flap was already screwed as far down on the hinge as possible and could not be screwed any lower on the door or it runs the risk of not having a strong connection to the hinges and the screws breaking off from the door. Therefore a metal piece would have to be attached to the hinge and the door flap would then have to be attached to the new metal piece. This would allow for the door flap to be lowered from the top of the ceiling and allow a full range of motion. The downside of this fix is that it could leave a small gap from the ceiling to the top of the door that could allow bugs and the outside elements to enter the house, which would not be ideal.
The second hinge researched was a pivot hinge. These hinges are usually placed on the top and bottom of a door on either the right or left side, and this allows the door to rotate on the pivot. This is an alternative to normal door hinges. To use these pivot hinges for the purposes of the doggy door, they would be attached to the top left and right side of the door frame and the door flap itself. This is a promising idea but the main concern of this method is that most of these pivot hinges are designed to be attached from top to bottom as opposed from right to left, and this could lead to an unsecure connection between the door frame and door flap.
3.2.9.5 Solenoids
Solenoids were researched as a potential mechanism to be used as a way to lock the door and this information came from [21]. Another design of the solenoids is to dampen the flap when it starts to swing back after opening. Two solenoids will be placed on the inside of the flap and two will be placed on the outside of the flap. When the dog is inside and wants to exit to the outside, the exterior locks will retract to allow the dog to open the flap, but the interior locks will remain extended. The purpose of this is to allow the flap to be able to bounce off the interior locks once the flap begins to close. This will allow the solenoids to dampen the singing of the flap and allow for the door to need a smaller number of swings before returning to its stationary position.
Relevant Technology | Cost/Unit | # of Units for Implementation | Difficulty of Implementation (1-10) | Constraints |
Rotary Dampers | $8.64 | 2 | 9 | - High Torque |
Door Closer | $17.98 | 1 | 2 | -Unidirectional |
Door Magnets | $9.99 | 2 | 6 | - Interfere with RFID |
Door Hinges | $3.18 | 2 | 3.5 | - Limited range of motion as is |
Solenoids | $10.67 | 4 | 7 | - High current draw |
Table 5: Damping Mechanisms
The main concern of this design is that the motion of the flap would potentially damage the solenoid, or the flap could be damaged by hitting the solenoid. To get around this, a material that could absorb more of the force will be placed either on the solenoids or on the bottom of the slap to dampen the force of the swinging door more, while also reducing the chance for the door flap and the solenoid being damaged.
3.3 Core Components and Part Selection
Months of research was needed in order to choose the proper technology that would fit our design. Once the appropriate technology was determined, fitting hardware components that were compatible with one another also needed to be identified. The following section outlines the reason why certain technologies and specific hardware were chosen.
3.3.1 Raspberry Pi
After extensive research into the perfect system controller for our project, we arrived at the Raspberry Pi Zero W. When we initially as a group came to an agreement on the doggy door idea out of the other projects we had in mind, the scope of this smart door was quite different.
One of the first additions made to the idea back in the early stages of brainstorming was the IoT functionality. We all agreed that at this current point in time, just differentiating ourselves with the fact that our project was a doggy door instead of a regular door didn’t bring something necessarily new to the table as these have been done before, even if they are still a fresh new addition to the market. With some of us having just recently finished a class where we worked extensively with databases and got introduced to the endless possibilities of the IoT, we knew integrating it with our door was the creative step up we were looking for.
This is where our first real thought of the system controller came to us. After agreeing on making our product an IoT product and making it the main selling point to have it stand out from the current smart doggy doors, we knew a system controller with the ability to communicate over the internet was a must. This didn’t necessarily mean we needed a system controller with a Wi-Fi module built in as we were aware that there are separate add-on modules that provide Wi-Fi capabilities to a system controller that doesn’t have it on it’s own. Still, this is when the idea of a Raspberry Pi first came across the table for us as we knew it was a powerful, cheap, compact device that could communicate over the internet on it’s own or with an add-on depending on the model we went with.
As our research progressed and our idea became more solidified, there were a few minor components that would be added onto the vision we had for our product along the way. Starting off with the motion sensor, the idea to include it was brought up at a time when we already knew we needed the Wi-Fi capabilities and needed to make connections to actuators, a buzzer, and things of the sort. At this stage we were thinking of a system controller that would be along the lines of a MSP 430 as we knew the Raspberry Pi could’ve been considered a bit of overkill for what we were going to include and something under performing an MSP 430 could struggle handling something like the Wi-Fi module on top of everything else.
The last piece we would decide to include would end up being the most demanding one, the camera. After hoping to still get by with something that had comparable processing power to the MSP 430, research found that MSP 430s’ were known to struggle with capturing images even if it was the only thing they were tasked with. This is when we returned to what once might’ve been considered overkill for our scope as the addition to the camera now needed this extra processing power. Further researching into Raspberry Pis, with an understanding that we still didn’t need their most powerful controller, we found the Raspberry Pi Zero W to be the perfect device for our product as it had just the right of processing power to use a add-on camera perfectly, store these pictures locally when need be, and came with Wi-Fi capabilities already built in.
Around this point in our research is when the comparisons had to be made and used to determine which board would be best. Regardless of whether the other option would be some sort of MSP board from TI or an Adruino isn’t really important to this comparison. We wanted to compare these microcontrollers to the microprocessor which is the brain of the Raspberry Pi Zero.
Microcontroller | Microprocessor | |
Clock speeds | Usually well below 1 GHz, especially for the small scale board we are looking for | 1 GHz for the Raspberry Pi Zero W |
Memory (RAM) | Usually in the KB range | 512 MB for the Pi Zero |
GPIO pins | Usually less than 20 for smaller sized boards | 40 for the Pi Zero |
Operating system | None | Linux-based Raspbian software |
Programming Languages supported | Usually lower level languages | All sorts of languages up to high level languages like Python |
Table 6: Microcontroller vs Microprocessor[22]
As shown in the table above, Microprocessors will be the best type of system controller to go with for our project. In terms of the processing, all we will be doing in terms of the locking mechanism, the camera capturing images, all of it being communicated to the internet and back, along with other things; we found it crucial that we have a capable processor running everything. As you can also see from the previous sentence, there are not only tasks that can eat up a bit of processing power, but they will all be working at the same time. Because of this, the higher RAM capacity will be a big help for running concurrent tasks. Finally, the presence of an operating system along with the ability to program in most high level languages will make our job easier and allow for us to innovate further without being held back.
Raspberry Pis are compact single board computers that started off as teaching devices and have become so much more than that. Being categorized as computers these mini devices can have a keyboard, mouse, and monitor connected to them to use just like you use any other computer. Granted, simple tasks that we take for granted such as web browsing struggle to keep up with the speeds of computers that most would even consider slow. This also means things like some of the simplest video games or programs also struggle to run on the Pi and even the slightest step up in complexity renders the Pi useless.
Our final decision to go with the Pi Zero, while it may have not been difficult, was still run through a proper comparison to ensure that this system controller was indeed the correct and ideal device for what our project was to entail. Below we have laid out a table of different Raspberry Pi models and compared them to narrow down on our final choice.
Thankfully these uses are not what we are trying to get out of our Pi. Infact, we do not plan on connecting a keyboard, mouse, or monitor to our Pi at all. This mode that we plan to run our Pi in is referred to as “headless mode”. This allows for us to embed our Pi within our project. In our headless mode we will still have the Pi communicating with the internet, and all of this requires a very specific set up.
So as the table below shows, the Pi Zero W is our perfect system controller. To first off compare it with the Pico, let’s start with what makes the Pico look desirable. The first difference we can see is the lower price, which at the end of the day may just be a few dollars we are talking about, but it is over 50% cheaper. This along with the slightly smaller factor are both not enough to put it over the Zero. One area where looks can be deceiving and almost convince someone who’s not paying attention that the Pico performs better is the number of cores. A quick full glance will make it abundantly clear though that the Pico, while having one more core, also runs these cores at a significantly lower rate and has much less RAM. Getting into where the Zero W puts the nail in the coffin for the Pico is when observing the built in Wi-Fi capability on the Zero W and the already discussed advantages of a microprocessor vs a microcontroller for our project.
Raspberry Pi Zero W | Raspberry Pi Pico | Raspberry Pi 4 B | |
Description | The iconic, cheap, small Pi Zero with wifi and bluetooth | Raspberry Pi microcontroller | Fourth edition of the mainline Raspberry Pi devices |
Price | $10 | $4 | $35 |
Dimensions (HxWxD) in inches | 1.18 x 2.55 x 0.197 | 0.83 x 2 x 0.154 | 2.22 x 3.37 x 0.433 |
Weight in grams | 9 | 3 | 46 |
Number of cores | 1 | 2 | 4 |
Clock speed | 1 GHz | 133 MHz | 1.5 GHz |
RAM | 512 MB | 264 KB | 1, 2, 4, or 8 GB |
Ethernet | No | No | Yes |
GPIO pins | 40 | 26 | 40 |
Storage/Operating System | Yes, microSD/Raspbian | No | Yes, microSD/Raspbian |
Wi-Fi | 802.11n (only 2.4GHz) | No | 802.11 b/g/n/ac (2.4 and 5 GHz) |
Bluetooth | 4.1 BLE | No | 5.0 |
Table 7: Raspberry Pi Models[23]
When comparing the Zero W to the Pi 4 B is where things get a little more difficult when deciding on the correct system controller for us. One of the first things that strays us away from the mainline Pi is the fact that it is significantly more expensive and now the difference is not only ~$5. Not the deciding factor for us, but definitely starts it out lower than the Zero W. Next the quite bigger form factor is another thing that will be a negative for our use. We want to keep our system compact as this will all be going inside a door frame. Everything else from the power of the system controller to the capabilities with it’s wireless standards goes above and beyond on the Pi 4 B. After much consideration into this, we determined just how much power we needed, saw that the mainline Pi might be a little overkill, and sided with all of the advantages that the Pi Zero W gave us in terms of our project.
Our Raspberry Pi will work as our central hub. We will use it’s GPIO pins to connect all our different modules to it. The reader will send all it’s information that it obtains from tags in its surrounding area to the Pi so that it can be processed. This data is then both stored temporarily on the local storage while also being sent from the Pi’s Wi-Fi module to the database.
3.3.2 RFID Technology
As discussed in section 3.2.1, there are many variables to consider when choosing specific hardware components for a particular design. Extensive research was done to identify the components with the desired characteristics for the functionality of our project. RFID readers, tags, and antennas must be compatible with one another, requiring careful selection of each component, ensuring that one can accept the others.
3.3.2.1 RFID Reader
With the system we envisioned for this project, we needed some sort of reader that interacts with some sort of tag. As we’ve discussed throughout the paper, there was a lot of research done on this topic and we believe it led us to the perfect solution for our project. We went with the RFID reader as we believe it provides some of the most accurate and efficient results we can get as RFID as a technology has become very advanced over the past years.
As mentioned early, there are a few very important parameters to consider when choosing an RFID reader. One such crucial variable is the type of polarization that the electromagnetic signals will be communicated and processed. When considering this parameter for the IoT Smart Doggy Door, we determined that circular polarization would be the best fit for the application. This is due to the fact that the orientation of the collar will be variable at the moment of reading, given that the behaviors of animals are quite unpredictable.
The Sparkfun Simultaneous RFID Reader - M6E Nano was chosen to be our RFID reader. This interrogator has compatibility with circular polarized antennas as well as linearly polarized antennas, but it will be used in this design for the former. It also adheres to the EPCglobal Gen 2 ISO 18000-6c standard. This reader was a bit more costly at $235.95, but was deemed necessary given all of its desirable qualities. This will definitely be the most expensive piece of hardware used in our project. Because of this we have to do everything in our power to make sure that we handle the reader very carefully and try not to mess up any onboard circuitry on it as it would be very expensive to replace and would set back our progress.
Figure 6: Sparkfun Simultaneous RFID Reader - M6E Nano
The M6E Nano has an onboard antenna in addition to its integrated circuit reader. The onboard antenna has a relatively small reading distance on its own, promising a maximum of only 1 - 2 feet. After testing the onboard antenna with five UHF RFID tags, only one and a half feet was achievable as the furthest distance. Even with the one and a half feet, the reading capabilities are not reliable. For this reason, the reader has the option to connect an external antenna as well to achieve reading ranges according to the specifications of the external antenna. This external antenna can either be connected in two ways: up to four antennas can be connected to a series of four GPIO pins on the reader module, where the antennas in use can be multiplexed to change which antenna is to be active. The second method of connecting an external antenna is via the u.fl connector located towards the top of the reader, and to solder the board in such a way that the trace antenna is disconnected. In regards to the operation of the reader, exposure of less than 21 cm while the reader is at maximum operation power for an extended period of time is considered to be unsafe. Our design needs to consider the limitations of the onboard antenna, as well as weigh the necessity of a certain read distance in accordance with the price, application, etc.
Figure 7: Current Draw vs. DC Voltage and RF Output Level of onboard antenna [2]
Before considering an external antenna, the team first needed to test the onboard antenna’s capabilities. The chart above shows the relationship between current and voltage to yield a particular dBm for the onboard antenna, found within the datasheet provided. In order to ensure that the reading module is not damaged and that the device runs properly according to specifications, certain criteria must be met. The input voltage must be between 3.3V to 5V DC for most cases. In order to achieve 27 dBm, the reader must have an input voltage of at least 3.7 VDC. In addition to this, the total input current must also be below 1A. The maximum RF power that this reader is able to manage is 27 dBm; however, as seen in the graph, less current may be supplied at a particular voltage range in order to lower the RF power. For example, in order to operate at 25 dBm RF power, about 4.1 VDC will suffice for 0.7 A of current. Such details must be considered in order to address certain issues. For example, the higher the output power, the larger the read distance. While our design may want to avoid the potential danger of a 21 cm exposure by decreasing the RF power from the maximum output power of 27 dBm to 25 dBm, for example, the group needs to decide if the lesser read distance is a worthy tradeoff. Measurements need to be done as well in order to determine the significance of this decrease as well. Another element to consider is power consumption. In regards to RF power, every 3 dBm increase/decrease in power indicates a doubled/halved output power, respectively.
In summary, the Sparkfun Simultaneous RFID Reader - M6E Nano is an excellent choice for the team’s design. The reader is compatible with a circularly polarized antenna, which is crucial for the unknown orientation of the tag. Adhering to the EPCglobal Gen 2 ISO 18000-6c standard, this reader meets the standards established for RFID technology. While the price of 235 dollars for a reader is not ideal, it is ultimately unavoidable, and is considerably reasonable compared to many RFID reading modules on the market. The reader does have an antenna included on the board itself, however, rigorous testing of this antenna proved that the distance achievable was too small for its application, reaching a little over 1 foot. This led to the decision to seek out an external antenna. Another important thing to consider is the long-term exposure limit of the antenna. Long-term exposure safety will be discussed in section 4.2.4, labeled “safety constraints.” This reader also operates on the frequency band for North America, 902-928 MHz. Overall, this reader provides the functionality the design needs and is essential for the success of the project.
3.3.2.2 Tag
To use RFID, there are some core components that must be utilized. Firsty, there is the reader which will be able to process data. Secondly, an antenna is used to send and receive data. Finally, the tag is the component that will be able to store data. Using a combination of the three items, a comprehensive system of data transfer can be created.
Figure 8: Anatomy of an RFID Tag
Reprinted with permission pending, from [24]
The anatomy of the tag consists of an antenna, an integrated circuit and a memory bank. To power the integrated circuit and receive the data, the tag utilizes the antenna. When the reader sends a request, the antenna attached to the reader will send out a signal. Tags within range of the electromagnetic fields produced by the antenna attached to the reader will use the fields to induce a current to power the integrated circuit located inside the tag. Once the integrated circuit is powered, data will be retrieved from the memory banks and a signal will be propagated back out by the antenna on the tag. This is known as backscattering. When the tag backscatters a signal, the antenna attached to the reader will be able to pick up the signals and send it to the reader. The reader is then able to process the data that was stored on the tag.
RFID has many applications, therefore, many types of tags can be utilized. Different types of tags can operate under different frequencies. The common frequencies and the ranges at which they operate are as follows: low frequency (LF) which operates between 125kHz and 134kHz, high frequency (HF) which operates at 13.56MHz, and ultra High frequency (UHF) which operates at 433MHz or between 860MHz and 960MHz. It is important to note that most frequency ranges are region specific, therefore, the whole band may not be available in every location.
Figure 9: Visualization of different frequencies
LF has a very short read range of about 10cm. The benefit to using LF is that signals are much less susceptible to noise produced by the environment. Some examples of applications that LF excel in are animal tracking, access control, or where liquids or metals are present. HF has a faster data transmission rate than that of LF, but it is still on the slower side. While HF does have an improved read range of around 10cm to 1m, which is ideal for most hobbyists or small distance applications. Applications where HF performs well are in small item tracking (like books or in a store), payments, and ticketing. UHF has the greatest read range of anywhere between near field communication (NFC) to more than 100m. Not only does UHF have fast transmission speeds, but it also has larger memory as well. UHF is most beneficial in cases where accuracy or long range is required such as asset tracking, manufacturing, and electronic tolling.
Different types of tags also exist. There are passive, semi-passive (also known as semi-active or battery assisted-passive), and active tags. Passive tags have the lowest read ranges, but do not require any battery and are the cheapest. Semi-passive tags have a battery on the tag itself to help power the circuitry when a current is induced by an external signal. Lastly, active tags have the greatest read ranges but are less replaceable due to these tags having the highest costs. Active tags have several functions. The first function is that the active tag can act as a transponder and send out its data when in range of an antenna. This type of operation conserves the battery usage which increases the lifespan of the tag. The battery on the tag is used to amplify the signal to achieve greater read ranges. Secondly, the tag can act as a beacon. When acting like a beacon, the tag uses the battery to send out its data periodically for any antenna to pick up. This behaves differently from all other cases where the tag only responds when communicated with by a reader’s antenna. Due to the periodic transmission of data, the battery life is greatly reduced. Because the battery is difficult to replace, it is usually better to buy new tags instead of repairing old tags.
Tags come in different form factors as well. Some tags are round in nature like keyfobs or sailboat tags, some are rectangular like business cards or for wristbands, and some are even cylindrical in nature for implants. The larger the tag, the better the read performance because larger antennas can be accommodated. However, large tags may not always be possible in some applications like animal tracking. Orientation of tags is also important. If tags are not aligned appropriately to an antenna, the read range can be greatly hindered.
Figure 10: Different Tag Form Factors
Reprinted with permission pending, from [25]
Of all the different frequencies, we decided to use UHF due to its nature of having better read ranges. To get higher read ranges with LF or HF, prices increase exponentially. We also decided that our tag should be passive instead of semi-passive or active because not only is it cheaper, but we do not want our collar to operate with any batteries. If something were to damage the tag, the tag can be easily replaced. Finally, the ideal solution would be to go with a round tag that would be encased inside of some plastic or epoxy to weatherproof it. By attaching a split ring, the tag can be added or removed to any collar. Alternatively, we could use a rectangular tag (that is paper thin) for better read ranges, however, the tag must be embedded in the collar itself. The round tag will hang perpendicularly from the animal's neck and the dog will face the door when wanting to exit. This will allow for the best possible orientation of the tag to improve the system’s reading performance.
3.3.2.3 Antenna
It is important to ensure that our external antenna is compatible with the reader chosen as well as the project at hand. While there were many antennas that were analyzed, the Times-7 SlimLine A5020 Circular Polarized Antenna proved to be the best fit for our design, meeting most of the requirements of our desired antenna parameters that was outlined in section 3.2.1. This antenna was thus chosen as our external antenna.
The Times-7 SlimLine antenna is priced at $119.00. It’s polarization type is circular polarization, which is our desired polarization type, as mentioned earlier. As specified in 3.2.1, the beamwidth that was desired for our project was around 120 degrees. The Times-7 SlimLine antenna has a beamwidth of about 115 degrees, which is sufficiently close to the desired beamwidth. Pictured below is a diagram of the beamwidth given in the datasheet:
Figure 11: Beamwidth for Times-7 SlimLine A5020 Circularly Polarized Antenna [26]
The two graphs show the power that is emanated from the antenna, where the radial axis describes the amount of power radiated from the antenna at a particular location. The beamwidth corresponds to the angle that captures the majority of the power emanated. This angle is defined between the -3dB (half power) points on either side of the central axis, where the power that is emanated significantly decreases. For this antenna in particular, the input power in the datasheet was specified to be 6 Watts.
The Times-7 SlimLine A5020 Circular Polarized Antenna adheres to the FCC standard for the operating frequency in North America is 902-928 MHz. The max read distance for this antenna is 4.3 meters, which is around 14 feet. This read distance is more than acceptable for our application, where the desired read distance is around 3-4 feet. The gain of this antenna is 5.5 dBic. In order to achieve a particular read distance that is less than the maximum, this power through the antenna can simply be adjusted accordingly. The dimensions of this hardware component are 5.9 x 5.9 x 0.55 inches, providing a relatively small area. Considering that the antenna will be placed beneath the door, the smaller the dimensions of each hardware component, the better off our design will be. Pictured below is the Times-7 SlimLine A5020 Circular Polarized Antenna, the component that was ultimately chosen as our external antenna for the project.
Figure 12: Times-7 SlimLine A5020 Circularly Polarized Antenna
Even after our search was refined to the parameters discussed earlier, there were still many antennas that were considered during our research. Many of the antennas that were found satisfied a fraction of the requirements that were made, but could not quite satisfy certain areas enough. One such example is the Laird Bistatic PRL90209 RFID Antenna. This antenna met quite a few of the required specifications for our design. The first parameter to be considered was polarization. The PRL90209 was circularly polarized, which is exactly what we were looking for. The next most important characteristic was the beamwidth. This antenna was labeled as having a beamwidth of 70 degrees, which was significantly lower than the desired beamwidth of roughly 120 degrees. This value for the beamwidth coincides with its higher gain of 9 dBic. The max read distance for this particular antenna was not specified. The input impedance of this antenna is 50 ohms, which matches our design. The PRL 90209 operates on the frequency range of 902 - 928 MHz, and its maximum input power is 10 Watts. The dimensions of the antenna in question are 10.1 x 22.6 x 1.3 inches, and it was priced at $214.00. Overall, this antenna was not fitting to our design due to its relatively small beamwidth angle, as well as the fact that it was considerably more expensive than other options. In addition to this, the antenna was rather big, and a smaller size is preferable in order to fit underneath the door frame.
Another antenna that was considered was the Laird S9025PL Outdoor RFID Antenna. This specific component was very strongly considered. This antenna was specified to be circularly polarized, which is what the design required. The gain is given as 5.5 dBi. This indicates a much larger beamwidth than the previous antenna due to a smaller gain. This angle turned out to be 100 degrees, which is a few degrees shy of the preferred 120 degrees. The input impedance for this antenna satisfies the 50 ohm requirement, as well as the operating frequency required by the FCC, 902 - 928 MHz. Unfortunately, the max read distance for this antenna was not included. Its maximum power is also 10 Watts, much like the previous antenna discussed. Priced at $134.00, this antenna has very small, desirable dimensions of 5.2 x 5.2 x 0.71 inches. In the end, however, this antenna was nearly the same as the antenna that was ultimately chosen, except it was a few dollars more expensive with a smaller beamwidth. Its beamwidth shortcomings could have potentially been overlooked if the antenna compromised the issue with a decently lower price, for example.
The Vulcan RFID UHF RFID Antenna was also an antenna that was considered. Much like the previous few antennas, the Vulcan antenna is circularly polarized. With a gain of 3.4 dBi, the beamwidth for this component is listed as 100 degrees, which is decently smaller than the desired angle. The read range is specified to a value of around 3 meters at the maximum, which is certainly sufficient for our design. The input impedance of this antenna satisfies the 50 Ω requirement as well as the 902 - 928 MHz operating frequency necessitated by the FCC. With a price of $64.00, the antenna proves to be financially affordable compared to others. It is 5.4 x 5.4 x 0.13 inches, which is significantly smaller than the other antennas which is also another desirable characteristic. Despite the affordable cost, however, the Vulcan RFID UHF RFID Antenna was not chosen due to its detrimentally insufficient beamwidth.
Times-7 SlimLine Antenna | Laird Bistatic PRL90209 Antenna | Laird S9025PL Outdoor RFID Antenna | Vulcan UHF Antenna | |
Polarization | Circular | Circular | Circular | Circular |
Gain | 5.5 dBic | 9 dBic | 5.5 dBic | 3.4 dBi |
Beamwidth | 115 | 70 | 100 | 100 |
Read distance | 4.3 meters | unspecified | unspecified | 3 meters |
Dimensions | 5.9 x 5.9 x 0.55 inches | 10.1 x 22.6 x 1.3 inches | 5.2 x 5.2 x 0.71 inches | 5.4 x 5.4 x 0.13 inches |
Cost | $119.00 | $214.00 | $134.00 | $64.00 |
Input Power | 6 Watts | 10 Watts | 10 Watts | unspecified |
Operation Frequency | 902 - 928 MHz | 902 - 928 MHz | 902 - 928 MHz | 902 - 928 MHz |
Input impedance | 50 Ω | 50 Ω | 50 Ω | 50 Ω |
Table 8: Antenna Comparisons
3.3.3 Camera
Well into our brainstorming, we realized that adding a camera to our system would give the consumer a good amount of benefits. A camera provides the user with an extra layer of customization. Using it in conjunction with the mobile app the user can set up preferences on what they would like to be captured when motion is detected outside the door. We all agreed that going with two cameras would be redundant. Going with one on the outside gives us the added benefit of capturing any animal without a tag in our image.
This security feature is a big factor as to why we wanted to incorporate this camera. While the infrared sensor scans for any unidentified animal, at most it is capable of sending a signal back to the system which then can be transferred back to the database and therefore accessed on the mobile application warning of an unknown presence outside the door. However, this would not give the user any idea of what it might be outside the door and that could be worrisome. With the camera implemented, when the motion detector is set off and the RFID reader is not, an image will be captured and sent to our database storage. This will then be accessible to the user through their mobile app.
Besides this use we considered that some users of our system, while being away from their home for an extended period of time, might want to set up the camera to capture their pet everytime it goes out and comes back in for a peace of mind. This can be comforting for the user while also giving them the ability to see if any sneaky animal tried to make their way in along with their pet.
When first looking into the camera for our project we came across ArduCAM which is an affordable option that connects to many different types of system controllers and provides a decent quality image. After realizing we needed the Raspberry Pi for its processing power, we now have the option to also use the options provided by the company themselves, even though these seem to be pricier. For our project in specific we aren’t trying to capture images that will be posted on social media or framed inside a consumer's home, so we just need a camera that produces images that are good enough for being able to recognize your pet, but not much more than that. After an image is taken it will be transferred to the database as mentioned but we will also use an SD card with our Raspberry Pi to store images locally for 24 hours.
Arducam OV5647 | Raspberry Pi Camera Mod 1 | Raspberry Pi Camera Mod 2 | |
Price | $14 | $25 | $25 |
Size | 25 x 24 mm | 25 x 24 x 9 mm | |
Weight | 3g | 3g | |
Still Resolution | 5 MP | 5 MP | 8 MP |
Video Modes | 1080p30, 720p60, 480p60/90 | 1080p30, 720p60, 480p60/90 | 1080p30, 720p60, 480p60/90 |
Sensor Resolution | 2592 x 1944 Pixels | 2592 x 1944 Pixels | 3280 x 2464 Pixels |
Optical Size | ¼” | ¼” | ¼” |
Full-frame SLR lens equivalent | 35 mm | 35 mm | |
Angle of view | 64 x 48 ° | 53.5 x 41.4 ° | 62.2 x 48.8 ° |
Table 9: Camera Module Comparisons [27]
To compare some of the options we had for the camera we listed out some of the most appealing options in terms of our project scope in the table above. When searching for our options, the list automatically got narrowed down quite a bit because of the fact that we are working with a Raspberry Pi Zero and not just a regular Pi.
As can be observed above, these cameras don’t end up being too different from one another. The biggest difference is between the lower two and the Pi Camera Module v2 which is above the others. This v2 of the camera module basically outdates the v1 and almost completely rules it out in any case as they are the exact same price. Price is the real area where our final decision was made. We know for the scope of our project, the higher resolution is not really necessary as we are more concerned with loosely identifying what is in front of the camera rather than get a perfect image of it. Due to this, the Arducam with the lower resolution, lower price and same angle of view as the v2 was our best option out of the 3.
3.3.4 Infrared Sensor
We decided we wanted to use some sort of motion/distance detection for our project when we first started thinking of the risks associated with security and potentially having some animal outside the doggy door that was a wild animal that would obviously not be registered in the system. First, an ultrasonic sensor came to mind as it can not only detect something at the door but it could also provide us with decently accurate information on just how far this thing was from the door. It was pretty quick for us to see the issues with using an ultrasonic sensor. In the event that the consumer was receiving a package at the door and it was left on the ground, the ultrasonic sensor would have no way of knowing that this wasn’t some wild animal and instead just some inanimate, non-moving object.
To combat this issue we looked elsewhere for our motion detecting and very quickly came across PIR sensors. PIR sensors use infrared technology to not only detect something that has moved into its range, but it uses the technology to detect higher or lower levels of radiation given off by hotter or colder subjects. This allows it to differentiate a living thing from a box and will save the consumer the hassle of receiving multiple pictures of boxes while away from their residence.
PIR motion sensors are not extremely complex devices. Not only that but they also only really need to execute one main task which is motion sensing. Besides that we preferably want one that allows us to change the delay and sensitivity. In the table below we will be comparing different sensors we found online that seemed suitable for our project’s needs.
HC-SR501 | LEDENET | LPIR-8A | |
Price | Varies, usually around $4 per sensor | $10 | $8 |
Size (mm) | 32 x 24 | 86 x 51 | 89 x 60 |
Field of View | <120 degrees | 60 degrees | |
Range (ft) | 21 | 16-26 | 15 |
Table 10: Infrared Sensor Comparisons
This motion sensor is how we will alert the camera to take a picture, with a few conditions. First, we want to make sure it is not an object so we won’t take a picture as soon as motion is detected. Second, even if in the process we lose a few quick sneaky animals passing by, we want to wait a small amount of time before capturing the image to avoid getting images of people’s feet and things of the sort. Lastly, we would by default only capture any image in the situation that the RFID reader is not detecting anything within range, unless otherwise selected by the user in the mobile app.
We also plan on having an interior sensor facing straight down towards the floor below it. Animals are very unpredictable in nature and can often change their train of thought second to second. Not only this but with all the technological tools we currently have at our disposal, we have no accurate way of reading an animal's thought process or even fully accurately predicting what we think it will do. The problem with this arises when we see how this can lead to our product not always being used in the way we would want it to be used. With humans, most of the time if they open a door they will be entering or at the very least entering within the next few minutes. Only in a very specific case where they might remember something as they are opening the door will they potentially open and not go through. However thanks to our intelligence we are aware that we have opened a door and didn’t go through and can take the correct steps to make corrections. With an animal they can, for whatever reason, try and go through the door and halfway through while sticking their head out, decide they rather stay inside. While doing so they also don’t understand the problem they are presenting us with, obviously.
In order to address this potential problem that came up, we decided to add this second sensor on the inside. It will detect when something gets close enough to the door that there is a 90% chance it has opened the door. But just knowing this information isn’t enough to determine if any animal has actually gone completely through the door or not. To do that we must use both of the sensors that we plan on including in our product simultaneously, communicating with the board about certain data they are collecting. This small system comes into play when a tag has been detected by the reader. When a tag is picked up we want to start taking note of any values we are picking up from both sensors. If we receive a signal from the one sensor on the inside but never from the other, we know that the animal probably just stuck its head outside and didn’t leave. A small issue that arises with this is depending on how big the animal and their head is, the outside sensor might pick up some motion and relay that back to our system when in reality the animal might’ve not gone outside fully. To counter this we plan to place the exterior sensor on the top of the door frame at such an angle that completely avoids these mishaps. With this implemented correctly, once a tag is detected we will have the system check to see if anything is picked up on both sensors. If the system does register movement from both sensors, this means that the animal has successfully left through the door and we can register it as a proper exit and take note of the specific animal being outside with almost 100% certainty.
3.3.5 Locks
When researching what mechanism will be used to lock the door, several different ideas were thought of. Some of them could only work with specific door designs while others could be used for any door designs. One idea that was thought of that would only work a specific door design, is to use a linear actuator. For this design, the linear actuator would be placed at the top of the door frame and be used to open and close the door vertically. The linear actuator would then have enough force when fully extended to lock the door in place. This method was able to automatically open the door while also being used as a locking mechanism. One issue with this method is that it was costly for our project. With a lot of the budget going into the RFID reader and the antenna, which is the focal point of the project, other methods were researched to lock the door. This design also made the entire structure of the doggy door close to four and a half feet tall. A door this size would not be as marketable and other designs were taken into consideration after these issues were brought up.
The next two locks work very similarly but the locking mechanisms themselves are different. For this locking design, two locks will be placed on the inside of the door near the bottom of the frame and two locks will be placed on the outside of the door. This design is used for a door flap that opens and closes inward and outward. Both locks will extend out towards the sky and block the door from being able to swing back and forth when the door is not being used. When the dog wants to exit to the outside, the locks on the outside of the door flap will retract while the locks on the inside will remain extended. This will allow the dog to only be able to exit one way and not allow for any wild animal to outside elements to be allowed to enter the house. When the dog finishes exiting the door, the flap will swing back and bounce off the inside locks in order to dampen the motion of the flap and reduce the number of swings necessary to cause the flap to return to its stationary position. Once the flap is back to its stationary position, the outside locks will extend again, locking the door from both sides. Another possibility from the lock design that more research has been conducted on, is to extend the locks on the outside once the flap has passed these locks and before it has been dampened from the inside lock. This would allow for all four locks to catch the door in place before it has time to swing, ultimately reducing the time the door is unlocked. This is the goal for the final locking mechanism, but more research into making this possible must be conducted.
One of the two mechanisms that could be implemented into the locking design stated in the previous paragraph is a push-pull solenoid actuator. These solenoids would be placed about an inch from the door frame on the left and right sides of the door and on both the inside and outside. The main component of the solenoid being used is 56x25 mm and will have a stroke length of 8mm and can be seen in article [21]. It will have a max force of 20N and require 12v and 1A, as specified within the datasheets found on the website. The location of these solenoids will be located underneath the door flap on both sides and will block the path of the flap from being moved when locked. When the door is unlocked, the solenoids will retract underneath the bottom of the door frame, allowing a full range of motion to the flap.
Figure 13: Push Pull Solenoid
Reprinted with Permission, [21]
The second mechanism that could be implemented into this current locking design, is a mechanism that would have to be 3D printed and does not have a true name. It is a rectangular piece that would be connected to a rotary motor. The rectangular part of the locking mechanism would be used to lock the door in place and the rotary motor is used to lower the rectangular part from blocking the flap. Once lowered, it will allow the door to have a full range of motion. This design was found by researching other smart doggy doors to see what was effective for other versions. Since this part has to be 3D printed, and not a lot of research on this style of mechanism, more research was put towards the solenoid design. Another concern was that the 3D plastic would not be able to withstand the forces that could be placed on this mechanism from the dog or outside factors.
Figure 14: Sketch of the how the solenoid and rectangular locking mechanism will be implemented
A lot of designs have been taken into consideration so far. While other designs are more than capable of working, they may be overkill and we believe a more simple solution exists. The previous designs require a lot of components. Some of the components include ways to reduce the momentum of the door (using rotary dampers) so that we can catch the door (with a reed sensor that will detect proximity of the door flap) as it returns to its original closing position for the first time. This is important because we do not want other animals to run out after only one animal gets permission to pass through the door. Therefore, locking the door as soon as possible is very important for our design.
After more thought and discussion, a new approach arose. This new idea will allow the door to be locked every time so long that it has enough momentum (though much is not required). The components for this design are less electrical and more mechanical than some of the other designs. There will be four specially engineered locking pins as well as a “knob” (or a protrusion of sorts) that will be locked into place by the four pins. Also, some component is required to lift the pins from the locked position. In the door flap’s default position, the flap will be stuck in between the four locking pins. Two pins will be on the inside of the flap and two pins will be on the outside of the flap. These pins are also specially designed so that the door can only open the locking pins in one particular direction (unless some external force is applied). This allows the locking pins to be configured in such a way that one way entry is allowed from both sides. This behaves much like a normal door. For example, a door can be closed without twisting the handle, however, if a door must be opened, the handle must be twisted, and a force must be applied. If the door needs to be released from the four pins, a minimum of two pins must be raised (either both pins on the inside or outside of the door flap). This is where an external force must be applied. Other designs include a push pull solenoid; however, this solenoid is less desirable because by default, the solenoids will be turned on. With our research, the smallest current draw that we found with a solenoid is about 600mA. Having four solenoids will require 2.4A at a voltage of 12V. That is a minimum of 28.8W. Other solenoids we have seen can go up to 1A per solenoid. Needless to say, having the solenoids on almost all the time is very inefficient. Additionally, if the system ever loses complete power (both from the wall power source and the external battery), the door will be unlocked which is unacceptable. Finally, the solenoids create an electromagnetic field which may possibly interfere with the reading performance of the antenna. This information has led us to research other components, such as electromagnets.
Figure 15: Electromagnet
Reprinted with permission, from [28]
In the place of solenoids, this new design that the team thought of would instead incorporate four electromagnets. These electromagnets would be implemented to effectively replace the presence of the solenoids, each situated on either side of the door on both the inside and the outside. Electromagnets are essentially magnets that can be turned on or off. Much like the solenoids, when these magnets are not “active,” they will be in such a position that will keep the door locked. Once activated, ideally these electromagnets will sufficiently retract, clearing the way for the door to open. For our new design, the electromagnets will, by default, be turned off. What must be discussed is the driving force behind their actuation. Remaining purely electrical, the only time at which these electromagnets will be turned on is after the antenna has already read and processed a tag. Therefore, the electromagnetic fields will not interfere with the antenna’s reading performance, mitigating the concern for electromagnetic interferences. This realization in particular was especially promising, considering the delicacy of RFID technology’s adverse reaction to electromagnetic interferences. Another fortunate characteristic of these electromagnets was realized, and it’s benefits would significantly be reflected in our finance budget. The magnets are much smaller and vastly cheaper than the push-pull solenoids that were discussed for the previous design. This change in price becomes glaringly obvious when the required quantity of four actuators is taken into consideration. Overall, these magnets will perform much better and will be more efficient.
While electromagnets would be ideal for this use case, electromagnets are not as strong as some permanent magnets. Therefore, we first had to do some math to see if electromagnets were a possibility. Ideally, we wanted an electromagnet that was no taller and no wider than one inch. We found an electromagnet that had 12V DC input and around 80mA current draw. A chart was also provided to find the Gauss of the electromagnet at varying distances. Due to precise mechanical engineering, we did not want the distance of the locking pin to be any shorter than a quarter of an inch. At this point, we had enough information to determine if using electromagnets were feasible. To solve for the force of the electromagnet at a quarter of an inch, we needed the following variables: number of turns in solenoid, current draw, magnetic constant, area of ferrous material, and the distance between the magnet and ferrous material. We had to solve for both the magnetic constant as well as the number of turns in the solenoid. To find the constant, we only needed to plug in two numbers. To find the number of turns in the solenoid, we needed to solve for the magnetic field intensity from the flux density. From the magnetic field intensity, we were able to rework the magnetomotive force and solve for the number of turns. After finding all the variables, the force could be found. Unfortunately, the force of the electromagnet was weaker than the force exerted by gravity on the locking pin. Therefore, without relying on bigger electromagnets, more current draw, and more money, this implementation would not work. The math described can be found in the figure below.
Figure 16: Electromagnet Force
While electromagnets would not work, push pull solenoids were still a viable option. By setting up the solenoids in a particular manner, the default state of the solenoids will be off. The solenoids will be positioned on either side of the door, one on the inside and one on the outside, for both edges of the doggy flap door. This design will be implemented by placing a solenoid above each of the 3D printed locking pins. The locking pins will be specially printed to match certain dimensions that are needed. These pins will need to attach to the shaft of the solenoid in a very specific way, whose design specifications will be rectified by the 3D printing technology. Once the Raspberry Pi processes a tag and the door is ready to be unlocked, the corresponding solenoids will activate, which will lift the locking pins for a few seconds. This will give whichever pet has activated the door a sufficient amount of time to exit. Once the solenoids are turned off, however, the locking pins will then be pushed back into place. This is because of the spring that will be attached to the shaft of the solenoid. As the door returns to its original position, the “knobs” on the door flap will raise the locking pins (due to the design allowing for one way entry from either side) and lock the flap into place. Because the knobs will constantly collide with the locking pins, the pins must be durable. The pins must be lightweight, and the spring must be relatively weak to allow the locking pins to be raised with the force of the closing door. Below are several drawings that help visualize the idea of the door. For this design to work with the knobs, a groove (or cutout) must be made to allow the knobs to pass through. Without the latter, the knobs will collide with the frame and will prevent the frame from closing any further.
Figure 17: Locking Pin Mechanism
In order to use this lock, it will have to be designed in AutoCAD first and then 3D printed. This method was chosen over making the pieces out of wood to ensure all the pieces are identical as well as being light and sturdy. This also allows for small designs or holes to be designed on the lock in the AutoCAD that will be very precise and reduce the chance of errors occurring. This method is also better over making the locks by hand because if the project were to be mass-produced it would be easier to recopy each locking mechanism rather than make each one by hand and have a chance of not working properly due to human error. The locking system is designed in three parts, the pin, the knob that attaches to the door, and the shaft that the pins will stabilize to only move up and down. The locking mechanism can be created by using one of two different types of filament, which is ABS or PLA filament. Both of the advantages and disadvantages of these two types are further discussed in section 3.3.8 but both do have a constraint that needs to be taken into account. This is that types of filaments deteriorate after thirty days and can no longer be used without potentially damaging the 3D printed objects as well as the 3D printer. This puts more emphasis on getting all the precise measurements correct the first time so only minor adjustments need to be made to get all the necessary locking pieces created within the thirty day window.
The first piece designed is the pin that will be used to lock and unlock the door. The length will be 0.65 inches, the width will be 0.5 inches and the height will be 1.75 inches tall. The pint will also have a 25 degree slant at the bottom of the pin to allow for the knob to push up the pin. Four of these will be 3D printed with two on each side of the door. The pair on each side will have the slant side facing away from each other to allow for the knob to push up the pin and then get trapped inside the pair of pins. A possible design that may be added in the future is that each pin will have a small cylindrical piece extending off the side of it on one side. This is used to prevent the pin from falling too far down from the shaft and causing the motion from the knob to not work as it is supposed to.
The second piece that will be 3D printed is the knob. This piece will attach to the door and push the pin up. This piece consist of a rectangular prism with the dimension of 0.75”x0.75”x0.5” as well as a cylindrical prism on the top of it with a diameter of 0.3125 inches and a length of 0.75 inches. The rectangular piece is used to connect the knob to the door while the cylindrical piece will extend out and push the pin up. The rectangular bottom has an opening for the door to slide in to be attached. This opening is 0.27 inches wide and 0.5 inches deep. Small holes are inserted to the side of the rectangular prism to allow for screws to connect the knob to the door to allow for a sturdy connection. The cylindrical piece will be attached to the top of the rectangular prism on the opposite side of the opening.
Figure 18: 3D Design of the Locking Pin (Left) and Knob Mechanisms (Right)
The third piece that will be 3D printed is the shaft for the pins that will allow them to move up and down without them moving side to side. Unlike the pins, where all for will be printed individually, the shaft for each pair of pins will be connected to each other in one piece. This will allow for a specific distance that the pins are separated to make sure the spacing on each side is the same to help reduce any error when used. The shafts will be connected with two horizontal bars that will be on the back side of the shafts. These bars will also have drill holes on them to allow for the shafts to be attached to the side wall of the door structure. The size of the drill holes were referenced with [29]. This allows for an easy assembly and eliminates the need to try to find the best way to attach the shafts to the door after printing them. A possible design that may be added is that each pin will have a small knob on one of the faces that will reduce the range of motion of them and prevent them from falling too low on the shafts. If this is the case, the front of the shafts will also have a small slit on them which allows for the cylindrical prism on the pin to enter and act as a guide for the pin to go up and down without it falling too far below the shaft.
Figure 19: 3D Design of the Shaft Mechanisms (Above)
Figure 20: 3D Design Prototype 2 of Locking Pin (Below)
After initially designing and then later printing the pieces of the locking mechanism, alterations to the design had to be made. One issue that kept occuring was getting the size of the shaft right for the size of the locking pin. The shaft for the first prototype was too small and the locking pin could not fit through the shaft. The shaft for the second prototype was too large and the pin moved around and rotated too much. On the third prototype there was a better idea of what to make the measurement to allow for little friction between the locking pin and shaft while also reducing the amount of side movement from the pin. A square top was also added to the design of the locking pin. This square has the same dimensions as the outer square of the shaft and will be used to prevent the locking pin from falling through the shaft. This will eliminate the need for a piece of wood to be attached underneath the locking mechanism to keep the locking pins up. The angle of the pin was also increased to thirty-five degrees as opposed to twenty-five degrees. This will help the knob of the locking mechanism to have an easier time lifting up the pin. For the locking mechanism two pieces of equipment were thought of to pull the pin up to unlock the door. For this design of the locking pin, it will utilize a push pull solenoid that pulls the pin up when a voltage is applied to it. In order to connect the locking pin to the solenoid, a rectangular piece was added to the top of the square piece. The shaft at the end of the solenoid splits into two smaller pieces that have a gap between them. It has two holes that a screw can fit. This allows the rectangular part of the solenoid to fit between this gap and make a sturdy connection between the locking pin and the solenoid. After printing, the option to create a drill hole in this rectangular piece was decided rather than designing them into the 3D printed design. This was done to ensure that the drill holes on the locking pin match up with the drill holes of the solenoid. The drill holes on the locking pin will be created by using a drill bit to create the holes and this process gives more the option for a precise alignment between the two sets of drill holes. This is something that can be changed in the future with more precise measurements between the rectangular top piece of the locking pin and the solenoid. Then the drill holes can be implemented into the design to eliminate the need for the drill holes to be made manually using a drill bit. This will also speed up the production time if the locking mechanism needs to be mass produced in the future.
Figure 21: 3D Design of the Prototype 2 of the Shaft Mechanism
The two original shaft pieces had two bars run behind the two shafts to allow for drill holes to be connected to the door frame of the smart doggy door. However, this method made the bars to be very flimsy and decreased the durability of the locking mechanism. Instead the third design uses one bar that has a larger height. The drill holes between the two shafts were also removed and instead an additional bar was placed in between the two shafts. With both of these changes the durability of the shaft mechanism was greatly increased.
Figure 22: 3D Design of the Prototype 2 of the Knob Mechanism
The knob had a small amount of changes. The circular shaft of the knob was increased from 0.75 inches to one inch to allow for a longer reach from the side of the door to the bottom of the locking pins. The base of the knob that connects to the side of the door increased from 0.75 inches to one inch to allow for a sturdier connection, giving more room for the drill holes as well and the drill holes were changed to allow for #6 screws. The only aspect unchanged that may need fixing in the future is to increase the size of the circular shaft at the base to ensure its sturdy connection to the base. With this, the knob can withstand the force exerted from the swinging of the door that pushes the locking pin up.
Locking Mechanism | Operating Voltage | Current Draw | Force | Operating Speed | Price | Size |
Solenoids | 12V DC | 1A | 20N | Instant | $11.59 | 2.2"x1" |
Linear Actuator | 12V DC | 2.3 A | 4000N | 4.5mm/s | $59.95 | Extended Length: 44.3” |
3D Printed Pin | None | None | N/A | N/A | $21.00 | 0.75”x0.5”x2” |
3D Printed Shaft | None | None | N/A | N/A | Free | 1.3”x3.375”x0.8125” |
3D Printed Knob | None | None | N/A | N/A | Free | 0.75”x0.5”x1.5” |
Electromagnet | 12V DC | 80mA | 6N | Instant | $29.24 | 0.75”x0.75”x0.62” |
Table 11: Comparisons of the Different Locking Mechanisms
The table above goes into more details about the measures and other specifications of the different mechanisms that will be used to lock the smart soggy door. It will start at a diameter of 0.5 inches and will gradually become more narrow for 17/32 inches until it reaches a diameter of 0.3125 inches. After this distance, the width of the cylinder will remain the same for another 17/32 inches. This increase in the width of the knob is done to create a sturdier piece that will reduce the risk of the piece breaking after further use.
3.3.6 Buzzer
When researching for our project we put a bit of our resources into researching how animals react to sounds. Through past experiences and prior knowledge we as a group knew that sounds could be used as indicators for certain animals and that these animals could pick up on them. We also knew that an animal with the ability to isolate certain sounds in its brain also gives it the ability to associate certain sounds with whatever is happening around them when they hear the certain sound. This is how dogs can be trained to sit or stay. However, further research into this subject found that many dogs can very well be sitting because of the pointing gesture their owner is doing at them rather than their ears hearing the sounds produced by the owner saying the word ‘sit’. Cats we thought were also just generally less responsive to hearing these commands, but it actually just has to do with the fact that cats are a bit harder to boss around and will do whatever they please at any given moment. With proper training, a cat can learn the sounds made by the owner saying “sit” and react to it properly if it wants to.
While a buzzer was the first item that produced a consistent sound that came to mind for us, initial research first went more towards bell training. Upon getting a better understanding of bell training we saw that this wasn’t exactly what we were aiming for with our project but we could still get some useful knowledge out of it to apply it in our own application. Bell training is a training that teaches an animal to ring a bell that is accessible to them whenever they want to do a certain thing, like go outside for example. In fact the training for the dog getting used to the buzzer will probably have to be approached in a similar way with the only difference being that in our case the buzzer will be activated independent of the dogs actions. The dog must be trained to learn that the buzzer's sound indicates he can go outside and we will then use the buzzer to reproduce that sound and if the dog is properly trained, it will approach the door to prepare to exit.
Unfortunately the buzzer only has one frequency it outputs at, meaning we cannot set up different buzzes for different things. This puts us in a position where we must decide on either setting up the buzzer as it was mentioned in the last paragraph to alert the dog when it could come in or setting it up to warn the dog away from trying to use the door for whatever reason. There could be several different reasons why you might not want your pet exiting the doggy door even if it approaches. The main reason for this will have to do with the permissions we plan on giving the pet through the database, accessible to the user through the mobile app. Besides this, as mentioned in the security section, if there is something outside that is not identified by a tag.
Dogs are smart but at the end of the day there is only so much we can ask of them. In a situation where a dog is given a door to exit/enter their respective home through, there is no fool-proof way of informing the dog that it can only go out under certain conditions and even if just one of those conditions is not met, they will not be able to use the door. The last thing that we want for our consumers' pets, is for them to run full force into a door that isn’t going to budge for them. Not only is this super dangerous and problematic for the pet’s health but it can also severely damage our project’s components. To counter all of this we introduced the buzzer and hope it’s use will prevent such an accident. The pet will have to be trained to understand it, and that training might be slightly different depending on if the buzzer alerts them of their ability to enter/exit, but this system will provide us with a reliable sound to alert the pets of something.
3.3.7 Power
If you look at percentages for the average daily consumer, their chances of losing power day to day are quite low. Low to the point where the percentage might fall within the range of percentages that are attributed to edge cases. Yet with our product we find it of utmost importance that we do not treat such a scenario as an edge case. Even with the low chances of a power outage, it is still something that everyone probably goes through at least once a year. That one day of the year our customer could be away on a business trip, relying on our system to let his dog out when certain conditions are met. He might try to check up on the system and be alerted on the mobile app that, unfortunately, the system is down due to a power outage. Fortunately for him, we have thought of this exact scenario that can, and most likely will, happen to any of our consumers.
This is where our battery bank comes into play. We will set up a system that has the battery always powering the system. Without our battery bank we would just get the necessary input power from a wall outlet. With our system, power will still be extracted from a wall outlet at all times. But instead of sending this power straight into the system controller, we send it to the battery to keep it at its full capacity. In the situation where there is a power outage, now the system will be able to stay up and running for as long as the battery power lasts.
Another possible approach is having a system that takes in the power from the wall and then reaches a crossroad in its set up. Depending on certain factors we will determine if our doggy door will be currently running off of straight wall power or off of the battery. This solution will not potentially overload and expand the battery which can decrease its efficiency slowly over time while also potentially becoming a very dangerous hazard. With this set up we will be required to have a way of sensing whether the battery is fully charged or if it is in need of charge. This is because if we never end up charging the battery it will never be ready for its use. In theory, on initial setup our product will take the wall power and split it evenly between the door itself and charging the battery. Once it has been detected that the battery is fully charged, the wall power will no longer be directed to it and will be all sent directly to the unit. Batteries can hold a charge for an extended period of time, but power outages are not a very common event. Due to this the battery might drop to a percentage that is not preferable for keeping the system up and running. To counter this, the system we use to determine if the battery is fully charged will also detect if it has fallen under 90% and provide it with power if that becomes the case.
3.3.8 3D Printing Filament Material
The locking mechanism is designed on autoCAD and then 3D printed. When it comes to 3D printed different filaments can be used that each have their own properties and prices. The filament that would provide the best for the smart doggy door is a filament that can make precise prints with fine measurements as well as being durable. While these are the main properties desired for the locking mechanism of the smart doggy door, the price of the filament will also provide a major factor in the decision on what filament to use. The 3D printers that are used are one of two printers provided to the student at the University of Central Florida. These printers are only able to print ABS or PLA printer filament so the decision between what filament to use is between those two options. The University of Central Florida gives each group ten cubic inches of free prints and therefore both types of filaments were tested in printing out early models of the printing mechanism. The information below was gathered from [30].
The first filament that was tested was the ABS filament. Each piece of the locking mechanism was printed very precisely and the quality of the print turned out very good as well. The pieces were very sturdy and lightweight. The overall quality of the print and filament used was very positive after receiving the pieces.
The second filament tested was the PLA filament. After receiving the printed pieces, it was clear that the quality of the print did not turn out as well as the print using the PLA filament. Around many of the drill holes for the shaft of the locking mechanism, was a clump of extra burnt plastic that blocked some of the holes. The PLA filament was also denser and heavier than the ABS prints.
After receiving the 3D prints that used each of the two filament types, the ABS filament seemed to be the better choice. That being said, more research between the two types was conducted to make sure the PLA filament pieces were not just a poor print and would come out better if redone. After researching more into the two types, it was clear each had its advantages and disadvantages. The main drawback of both filaments is that they start to deteriorate after thirty days and this puts a constraint on the team to get all the necessary locking components created before the thirty day window is up. If all the locking mechanism pieces are not created in this window, additional 3D printing filament will need to be ordered, and this will increase the cost of the overall design of the smart doggy door project.
ABS | PLA | |
Price | ($14 - $60)/kg | ($19 - $75)/kg |
Nozzle Temperature | 210℃ - 250℃ | 180℃ - 220℃ |
Properties |
|
|
Table 12: Comparisons of the Different Printing Filaments [30]
3.4 Part Selection Summary
When deciding parts for our system, a lot of considerations had to be taken into place. Some of the considerations taken for the components are as follows: price, weight, responsiveness, dependability, current draw, required operating voltage, footprint of the components, and more. While we desire to achieve a system that is easy to use and has a lot of features, we want to keep costs down when we can. Ultimately, we wanted to prototype a functional system that demonstrated our vision for this project. However, being college students greatly limited our budget. Dividing the prices among each of the members and paying for parts across the span of two semesters made the overall price more reasonable. Another important factor to keep as low as possible was the footprint of components. Due to the design of our system, we will have some space allocated to house all of our components such as the antenna, reader, battery, Raspberry Pi, and more. To prevent the design from becoming too large and obtrusive, the footprint must be contained by opting in for smaller components if the option was available. Some examples where this was necessary was the decision between antennas. While the specs for one antenna may offer more range or a better beamwidth, our decision was to go with the antenna that had a smaller area but nearly identical characteristics. Sometimes, when deciding factors, an inverse relationship existed with other factors. For example, if we wanted a component to be more dependable or have more desirable features, the price must also increase. When deciding between using either Bluetooth or RFID, Bluetooth would have been proven to be cheaper, but the RSSI was inconsistent, and it also operated on batteries. The table below discusses additional considerations when deciding which technology to use on the collar for communication between the collar and the system.
Wi-Fi | Bluetooth Low Energy (BLE) | RFID | Ultrasonic Sensing | |
Range (m) | 50+ | < 100 | < 5 | < 7 |
Frequency (MHz) | 2400 | 2400 | 902 - 928 | 0.025 - 0.05 |
Battery consumption | High | Low | None | Low |
Price | < $6 | < $3 | < $ 1 | < $30 |
Responsiveness | Varies | Varies | Fast | Fast |
Connection Type | TCP/IP | BLE Protocol | Radio frequency | Ultrasonic |
Table 13: Communication Comparisons
Some of these rows may vary depending on antennas used, network providers, features included, and more. From our research, this was the general consensus of the parts we found. Realistically, RFID is much more expensive once both the reader and antenna are included. However, to implement RFID into a collar, it is very cheap by itself. The other communication protocols do not take into consideration the other parts required to make the system on the collar work. The collar may also require regulators, a power supply, a development board or some combination of all three. Wi-Fi and BLE may vary a lot with regards to range and responsiveness. This can be largely affected by environmental conditions (such as noise or obstructions) and the orientation of the device itself.
3.5 Weatherproofing and Enclosure Design
Due to the door being partially on the outside, a weatherproof design must be implemented to ensure that the smart doggy door can withstand the harsh weather from outside and be durable enough to last many years after installation. It is also important to create a design that will not damage the inside walls of the house since a small hole in the wall must be made in order to insert the doggy door for the home. In order to create the best design that takes weatherproofing into consideration, the design of the door frame as well as the materials that go into making it were carefully selected in order to make that most durable and weatherproofing design while also keeping the overall cost of the door frame reasonably low.
3.5.1 Door Materials
The door itself is split into three major components, the door frame, the door, and the hinges that connect the two. To save on cost, the door frame was constructed using wood boards. The boards were positioned into a 4”x12”x22” rectangular shape, leaving the front and back open. The size of this frame will allow for large dogs to easily and comfortably go in and out of the door frame. The door needed to be able to withstand outside factors such as wild animals, burglaries, and the dogs pushing the door daily. A feature of the door that was wanted but not necessary, was for the door to be considerably clear to allow for sunlight while also allowing the homeowners and pets to be able to see what was on the other side of the door. To accommodate these door features, the door was made using a polycarbonate sheet because it is lightweight and durable as well as clear.
Two materials were thought of to allow the door to swing back and forth, normal door hinges and rotary dampers. We first tried to use rotary dampers to allow the door to swing since they could provide some resistance when the door is swinging back. This would allow for the door to not swing back and forth constantly and shut nicely. This was especially important to the design of the project because ideally, the door would lock once the swings back to the starting location, to eliminate the chances of unwanted things entering the house once the dog exits through the door. After testing the rotary dampers, it became clear that using rotary dampers may not be the best solution due to a lack of knowledge that could be found on them and difficulty in trying to attach the rotary dampers to the door. The one style of rotary damper that had the appropriate level of torque only had an end with a gear (this is pictured in Fig. 3).
After testing the rotary dampers, the design went back to using normal door hinges. One half of the hinge will be connected to the ceiling of the door frame and the other half will be connected to one side of the door. After prototyping this design, it became clear that the side of the door that did not have the hinge connected to it could not fully open ninety degrees. This was due to the width of the door being pushed to one side of the hinge and the top part of the door would hit the ceiling of the door frame limiting the door from opening more than thirty degrees. While this is the case, it is a problem that can be fixed by using a piece to extend the door lower from the ceiling and allow for the correct degree of motion from the door flap. This will allow for a full range of motion of the door and allow for the desired motion that the smart doggy door will need in order to operate properly with the project. The group believes this method will work but could provide some issues such as leaving a gap between the ceiling of the smart doggy door and top of the door flap. To fix this issue, a piece of foam will be placed in between the door flap and the ceiling to make sure there are no more gaps.
3.5.2 Weather Resilience
The polycarbonate sheet is shatter resistant, has UV protection for long-term weatherability, and impact resistance. As stated in [31], this material can be used for storm-window replacement which adds to the protection from outside elements. The door will be as flush with the door frame as possible, while not reducing the range of motion of the door, to help reduce cool air from inside the house escaping and to help keep the natural eliminates from getting inside each home. Part of the door frame will come out from the installation hole and will be screwed onto the wall parallelly to prevent any outside elements from getting inside the wall from the installation hole. These door frames, that are made out of wood, will be coated in a waterproofing spray to reduce the risk of the wood becoming damaged while being outside.
Another potential design that was thought of is to place a waterproof material around the wooden door frame. As seen in [32], this material would be a water repellent canvas that could easily be surrounded by the wooden components of the door and provide a most durable weatherproofing design. This fabric is an onyx black color and is used similarly to a tarp but with better water repelling capabilities. This would also provide the most aesthetic design which would lead to most customers wanting to use our product. This is a more costly idea, but it could be worth it if the durability increases the number of years that the IoT Smart Doggy Door could be used by several years increasing the overall lifespan of the product.
Another method to add resistance to the weather for the smart doggy door, coming from [33], is to apply a rain guard water sealer spray to the wood of the doggy door. This approach is an inexpensive option and would provide immediate results once the spray is fully dried. This option would also be one of the easiest to implement and can be used in addition to the polycarbonate sheet to add extra weather resilience. This sealer protects against wind-driven rain, helps prevent mold and mildew, and also protects against salt, dirt, UV light, and freezing temperatures. While this is the case, it may not be as effective as providing a water-resistant coating as the water repellent canvas and could be something that needs to be reapplied every so often to ensure a strong resistant coat. This could cause the customers to either buy this wood water sealer on their own or else the smart doggy door could start to experience water damage after a couple of years of use and is a potential constraint that needs to be addressed.
One potential option to increase the weather resilience and overall durability of the smart doggy door would be to create the overall structure of the doggy door out of metal as opposed to wood. While this would provide many benefits to the weather resistance and durability, it could create even more complications to the production of the smart doggy door. Making the door structure out of metal would be very expensive not only to get the necessary materials but to also cut the metal into the necessary pieces needed to put the door structure together. This would drive the production cost up and would end up causing the price of the door to increase and with the smart doggy door using an RFID reader and needing an antenna already, the price for the smart doggy door would potentially be too large for customers to be willing to buy the product. Another potential concern of using a metal structure for the door would be that it would be partially outside and could have the chance to be the target of a lightning strike, which would inevitably lead to even larger issues. For these issues, using metal for the structure of the smart doggy door will not be used even though it makes the overall product look more professional and be more durable.
After leaning away from the structure being made out of metal, the next option that was thought of was to make the structure out of hard plastic. This would make the overall quality to be very professional and aesthetically pleasing to the customers and it would allow for the smart doggy door to be able to be mass-produced. While these are all great reasons to use a plastic material for the structure of the door, it has similar concerns to that of using metal for the door structure. The cost of producing it would be very high, and unless we would be able to make hundreds of smart doggy doors to make the production cost lower, this method would not make much sense to use. The initial cost would also be too large to afford without the use of a loan to pay for it.
Product | Cost | Weather Protection | Ease of use (1-easy, 10-hard) |
Polycarbonate Sheet | $16.84 | Impact resistant, UV light, water resistant | 4 |
Water Repellent Canvas | $14.00 | Water repellent | 8 |
Water Sealer | $12.53 | Water, dirt, salt, UV light | 2 |
Metal Structure | No Quote | Water Repellent | 10 |
Plastic Structure | No Quote | Water Repellent | 9 |
Table 14: Compares the Different Weather Resilient Products
That being said, the plastic structure adds a lot of benefits that are worth looking into. It would be naturally resistant to rain and create a better weather-resistant smart doggy door as opposed to using wood without the need of using any additional products. This option will not be used for the initial project but could be something that can be used in the future if the smart doggy door has a lot of success and customers would want a more durable, weather-resistant, and professional product.
3.5.3 House Installation
The doggy door is set up to be installed into a wall leading outside and [34] helps explain the best way to do this. Most doggy doors are installed into an outside door, but the next most common way is to install it in a wall and this is the approach with the IoT smart doggy door. This approach was taken to allow for the hardware inside the door frame to be able to fit without having any components exposed. The average thickness of a door is about 2 inches while the average thickness of an exterior wall is approximately 9-12 inches thick. This allows about 8-9 inches to store all the necessary hardware components needed and have them protected from external factors. The door will come in three parts, the main structure of the door that includes the doggy flap as well as the locks and electrical components. The other two parts are a pair of identical door frames that will cover any remaining gaps from the insertion hole as well as provide a means of screwing all three parts together and providing a sturdy connection.
3.6 Mobile Application
Currently, there are several ways to develop mobile applications. Some options include an app builder, developing an application for each operating system, or using some framework to make adjustments for each system. App builders tend to be easy to use, but offer the least amount of control by the developer. An application can also be made for each operating system (mainly iOS and Android) which will offer the best speed. The issue with this route is that an app must be created for each operating system, which requires a lot of extra work. Frameworks can be user friendly while providing the developer with many tools to use at their disposal. Frameworks can also be slightly adjusted to allow for the creation of an app on different operating systems. While many options exist for the creation of a mobile application, some options provide better support, speed, and control.
The developers have no previous experience with using Swift or App builders. Due to the platform dependent usage of Swift and low control of App builders, these two options will not be used. While the developers do have experience when it comes to using Java, development is once again platform dependent and will also not be used. Finally, while both Flutter and React Native have a lot to offer, React Native will be the framework used to create the mobile application. The developers have had exposure to React Native and are more familiar with JavaScript than they are Dart. The usage of 3rd party libraries is also a selling point when it comes to using React Native over Flutter.
Our mobile app will be the bread and butter of our project. With it in conjunction with the database, everything will be interconnected with the hardware components on the door. We have a few screens we plan on implementing for the user to navigate through, and they will be able to manage the tags and permissions on the app.
Flutter | React Native | App Builder | Java | Swift | |
Language | Dart | JavaScript | Varies | Java | Swift |
Ease of Use | Easy | Medium | Easy | Medium | Hard |
Environment Setup | Text editor | Text editor | Web application | Android studio, IntelliJ Idea | Xcode, Atom, Appcode |
Speed | Fast | Fast | Slow | Fast | Fast |
Support/ Documentation | Yes | Yes | No | Yes | Yes |
Portability | Yes | Yes | Varies | No | No |
3rd Party Libraries | No | Yes | No | Yes | Yes |
Learning Curve | Medium | Medium | Easy | Large | Large |
Table 15: Application Development
3.7 Database Design
As mentioned previously, we will be using Firebase to create the database for our project. Firebase is much more than just a database service and has many uses past it. For our purposes we will be using it mainly as a database but Firebase is a Backend as a service (Baas) meaning it is actually capable of much more than just database hosting. With our use we will dig into its core and make use of its realtime database that is a multi-node key-value database optimized for synchronizing data and storing it centrally in the cloud. All the data gets stored in a JSON and gets synchronized in real time to each client.
Firebase works best with systems that can store a cache of the latest data somewhere and it will be integrated beautifully with our local storage. Even if the internet goes out, Firebase will continue working its magic in the background, executing any timed based or user called actions. Firebase is able to actively track all of this while it's happening, regardless of connection to the door, it’s able to keep note of every single change. Once the device comes back online, this allows for a smooth and quick refresh of the entire system. It’s even capable of taking note of changes that have happened locally and merge them with the latest information from the regained connection.
As stated above, the data from Firebase gets stored in a JSON. JSONs are JavaScript objects and are the foundation of how our API will work and communicate with the database. Firebase utilizes something referred to as a REST API. REST APIs are APIs that follow the REST architecture. REST stands for representational state transfer. An API is considered RESTful if it has a client-server architecture that consists of clients, servers, and resources with all of its requests managed through HTTP. It requires stateless client-server communication and cacheable data which allows the streamlining of the client-server communications. Our API will consist of all these constraints and therefore will be considered a REST API. Our realtime database will be the REST endpoint. Using an API testing client like ARC we will be able to send whichever HTTP requests we want to our endpoint and observe to see if the correct changes are made, assuring us that our software setup is working as intended.
When it comes to how we will actually lay out the database, there are a few layers to it. At the base we want there to be all the user accounts, creating an account is the first step for any user that wants to use our product. There is tons of inexpensive, dumb doggy doors out there. Therefore we are not looking to provide that service, even if we allow it to function without things like internet and power in emergency situations, an account is required. After creating the account we currently are looking to have the next level under that be the door/doors. Under that layer is where the owner can start adding all of his different pets to the door one by one based on the tag they give them. Finally at the deepest layer is all the permissions each individual animal has.
As the developers, on our side of things we see every single account that is created for our service. We will encrypt every password for the safety and peace of mind of our consumers, not only knowing that we will not do anything malicious with the information, but in an unfortunate situation where our database gets hacked, their sensitive information is safe behind encryption. From this level of access that we will have as the developers we will be able to send out over the air updates to our consumers if we implement a new feature, bug fixes if we are getting lots of complaints pertaining to a specific issue, and we will also be able to easily assist a customer who might be struggling with the setup or certain configuration of their account.
4 Related Standards and Design Constraints
A very important goal our team must meet is to adhere to certain standards established, as well as the natural design constraints given the design’s integration process. It is important to adhere to the standards set on any given technology in order to guarantee optimal operation as well as safety for the users and developers. The IoT Smart Doggy Door strived to meet the related standards for all technology involved in the making of this product in order to have the most advantageous design possible. Knowledge of the design constraints is also crucial in communicating and applying necessary safety information to all parties that may be involved.
4.1 Related Standards
Before tackling such a massive project, acknowledging the industry standards is crucial. In this section, several electronic and RF standards will be discussed. These standards will serve as guidelines as well as beacons of success for the project. From the beginning, the team was aware of the many intricacies and details that are involved with RFID related products. In addition to this, electronic standards alone are very extensive, and use of such components without a deep knowledge, understanding, and reference to important industrial guidelines can, and most likely will, lead to devastating repercussions. In order to ensure success and safety, the following related standards will be acknowledged and followed.
4.1.1 ISO 18000-6C:
The RFID reader and tags must adhere to a particular standard. EPC global and the International Standards Organization coordinate these standards to ensure that RFID technology is safe and operates properly. The readers and tags that will be used in this project follow the ISO 18000 standard. This standard specifies certain qualifications and characteristics for RFID related products, such as what type of operation the system will follow. An example of this is an ITF (Interrogator-talks-first) system, which describes the communication relationship of the reader and the tag. In this example, the reader would be the initiator. Another example would be TOTAL (tag-only-talks-after-listening), where, as the name suggests, the tag would not independently send out signals, but would rather wait for an initiation in order to communicate.
EPCglobal Gen2 consists of 6 different tag classes, each adhering to the ISO 18000 protocol, labeled as classes from 0 to 5. “Gen” refers to the RFID system's physical architecture in regards to how the system is set up to operate. The class refers to what type of functionality the RFID will employ. Some of these classes offer features that are not necessary or required for the scope of this project. In addition to this, some of these classes’ tag requirements do not even fit this project. Each class has slightly different features, each with a unique amount of customizability or read/write capabilities. The scope of this project only requires a passive tag with short read range. For this reason, the tags that we decided to implement fall under the class 1 category, fully described as EPCglobal Class 1 Gen2 tags: ISO 18000-6C protocol.
Class 0:
This class specifies a “read-only” interrogator-tag RFID system that is specified to be used in the ultra high frequency (UHF) range. The tags would be preprogrammed, and must be of the passive type. Tags falling into this class category could achieve our overall goal. However, this class does introduce an additional step to the process with the preprogram configuration required. While the frequency of operation does match the frequency of our implementation, a main aspect of the design we strive for would be ease of use, where the tag is capable of being written as well, storing multiple unique identities.
Class 1:
This class is meant for RFID systems that operate in the ultra high frequency or high frequency (UHF or HF) range. An appealing characteristic of this class is its ability to write-once, and read-many (WORM). This means that the tag will be written once, and then read an indefinite amount of times. This fits perfectly into the design of our project. We wish to create an RFID system that can give a unique identity to each individual animal/pet, and then to read that tag indefinitely. This class also operates at the UHF range, which is what our project will employ as well.
Class 2:
Any frequency range from low frequency, near field communication, high frequency, all the way to ultra high frequency are able to fall under this class given its unique functionality. RFID systems of class 2 consist of passive tags that are able to be read or written on, but the amount of times that it can be written is not just once, but as many times as desired. Considering the fact that our project only requires a one-time write in order to establish an animal's unique ID, this class simply would be unnecessary given the context.
Class 3:
RFID systems that fall under class three are able to perform many useful operations. This class allows for read-write operations for sensors capable of measuring phenomena such as temperature, acceleration, or pressure. An RFID system falling under this category would be very useful for projects involving such parameters, however, this class would not be useful to us, considering our design only requires the sensing of the dog’s presence. Ultimately, the number of features for this class simply exceeds the scope of this project.
Class 4:
This class of tags describes quite powerful operations that could get complicated very quickly. It consists of only active tags that can be either read or written. The identifying characteristic of this category is the tags ability to communicate with other tags and other readers. Its integrated transmitter allows it to perform such complicated operations. Considering the fact alone that this category requires an RFID system with an active tag, it is not applicable to our design. In addition to this, communicating with more than one reader as well as other tags simply has no place in this group's project.
Class 5:
This class is very similar to class four, except it has a few more features offered. Like class four, category five is comprised of purely active tags that are capable of communicating to other readers and tags. However, RFID systems falling under this category describe an active tag that has the ability to supply power to other tags. In addition to this, the tags from class five are also characterized by their communication compatibility with other devices aside from readers as well. The same conclusion that was drawn for class four can be drawn for class 5 as well: In addition to the active-only tags, the amount of features offered to this class are simply unnecessary.
4.1.2 IPC-2221:
PCBs also have certain standards to meet. The Institute of Printed Circuits has issued a set of standards for printed circuit boards. There are many standards that IPC has created for PCB design. One of these standards is IPC-2221, which is the standard that addresses the physical properties of a PCB, such as the layout of its design, as well as how materials used perform electrically and mechanically. There are three classes of requirements for PCBs: The first class focuses on commercial products for everyday users, where the reliability of the application is is not of primary importance; the second class is required for applications where its functionality should be uninterrupted, but intermittent failures are acceptable; the third class is for products that need constant operation, when any error could prove detrimental.
4.1.3 Serial Peripheral Interface (SPI):
Serial Peripheral Interface (SPI) describes the relationship of communication for an embedded system of components. It consists of a master device that takes charge of multiple peripherals. This synchronous communication protocol was not developed by global institutes such as IEEE, but was developed by Motorola, a multinational telecommunications company, around the 1980s. SPI became so common that it became accepted as a standard as any other industry standard. In SPI, there is only one master device that is able to communicate to all other peripherals. In our project, the master device will be the raspberry pi zero W, which was essential in the embedded communication required for our design.
4.1.4 Universal Serial Bus (USB):
Universal Serial Bus (USB) describes the communication between a PC and a peripheral. The USB standard allows for proper and safe communication between PC’s and other devices. It grants the ability to not only connect and communicate with a device, but also to give it power to operate. This standard offers a multitude of benefits to a user. For example, USB provides self-configuring, eliminating the need to configure settings to optimize operation. A very important benefit is the ability to power small peripherals, which negates the need for external power supplies. This simplicity was obviously very attractive to our design. Therefore, in our project, USB will definitely be used for extensive testing of the RFID reader and RFID antenna, displaying the results of their performance on a program on the computer. These results can be seen in section 7, where the prototyping process and results are outlined.
4.1.5 Doggy Door Standards
When it comes to doggy door standards there are not a lot of standards. One of them however is the size of the doors when it comes to dog size. As seen in [35], depending on the size dog you have, you need a specific door size or else it could be too small and potentially too big if the dog is too small to be able to push open the door flap. The large door design was used due to it being able to accommodate smaller dogs as well as working with the most common larger size dogs such as Labs, German Shepherds, Golden Retrievers and other similar sized dogs. Unfortunately, this project will not be able to accommodate the largest of dog breeds such as St. Bernard, Great Dane, and Rottweilers.
Pet Size | Door Dimensions | Dog Weight |
Small | 6”x7” | 0 - 10 lbs |
Medium | 8”x15” | 10 - 30 lbs |
Large | 10”x19” | 30 - 60 lbs |
Extra Large | 12”x23” | 60 - 110 lbs |
Table 16: Common Door Sizes [35]
4.2 Design Constraints
Throughout our research and prototyping, there were many boundaries that had to be watched out for. Both real world and system design constraints limited our ability to implement the design as envisioned.
For our system to work as intended, the design constraints are taken into consideration. By not adhering to the constraints, the system may not work or may produce unexpected results.
4.2.1 RFID Constraints
One simple, yet very important constraint is that this system will only work with a special type of tag. That is, EPCglobal Gen2 tags that follow the ISO 18000-6C protocol. Realistically, the owner will be able to use any collar they desire, however, if the tag is not present, the system will not work. With that being said, the tags are cheap, easily replaceable, and can be bought from many vendors.
4.2.2 Internet Constraints
The Internet plays a large role in this project. Because it is an IoT door, the internet is a must for this system to operate. Therefore, when utilizing this doggy door, the Raspberry Pi Zero W must have a way to access the internet via Wi-Fi, hotspot, or some other communication protocol. The system will be able to work without the internet so long as it has maintained at least one internet connection before. When the internet is present, a local storage will be updated to reflect the information found on the database. After the internet is disconnected, the information stored on the local storage will then be used as the new database until a connection is made to the internet once again.
The Raspberry Pi Zero W that we chose for this project utilizes the Wi-Fi standard of 802.11 b/g/n. Back in 1997 IEEE created the first WLAN standard, 802.11. 802.11 is a very slow and incapable standard but as devices started to outpace it, IEEE saw it as a perfect foundation to just build off of. The first of these updates to the standard to come was 802.11b which uses the 2.4 GHz frequency just like the original. It also supports a maximum theoretical rate of 11 Mbps and a range of 150 feet. 802.11g increased this to 54 Mbps.
Both of these standards are available to be accessed by our Pi, as the b/g/n means that any of those are supported. The last, and newest of these is the 802.11n which took things to a whole new level as the speeds jumped from the measly 50 Mbps range to the 300 Mbps maximum theoretical. 802.11 also supports both 2.4 GHz and 5 GHz, however our Pi does not support the 5 GHz band. As can be seen, our Pi does not necessarily support the latest and greatest in Wi-Fi technology but for our use, we won’t have to. [36]
4.2.3 Time Constraints
With the implementation of a full-scale product design into a college class, there is a natural limitation on the amount of time available. The University of Central Florida splits the Senior Design course into the span of two semesters (roughly a 10-month span of time), with occasional deadlines to keep the students on track. Failure to ultimately accomplish a working product has serious consequences. The most glaring of any possible repercussions is the delay of the members’ graduation date. Furthermore, the GPA of each team member would unfortunately reflect this failure. In addition to this, months of research and work would ultimately be nullified, considering the fact that the team would need to pick an entirely new project on the second attempt of the class. Each member of this group is planning to be in a full-time engineering position after receiving their bachelor’s degree in their respective engineering college. The failure of this class could affect the future of each individual’s career, proving potentially irreversible side effects.
The team was very aware of all the above concerns prior to enrolling in the class. The team needed to prevent any disastrous outcomes whatsoever. Firstly, the requirement of a 120 page paper, as well as the integration of multiple hardware/software components, proved to be quite daunting. The team decided to create a project milestone that detailed a week-by-week plan. This plan took into account a very important consideration: The practical case will never perfectly reflect the ideal case. Nearly all project milestones were set by the team to be accomplished before the due dates mandated by the Senior Design class. Ideally, there would be a substantial amount of time after the team’s project milestone to refine and finalize any given aspect of the project. This would also ease the integration process, given that our hardware components would be ordered and tested early on, diminishing the risk of significant setback due to sudden or unexpected hardware complications. To complement this practice, the team began the research and design process several months before the class started. Secondly, as a team, we were aware of our lack of experience regarding such a wide-ranging embedded project. Our team knew we needed guidance. This led us to seek out the counsel of one of the professors at the University of Central Florida; namely, Dr. Chung Yong Chan accepted the role of a mentor for our group. Dr. Chan helped the team to stay on track with the project by frequently stressing the importance of certain tasks as well as make our project milestones realistic. Each week, Dr. Chan met with our group to discuss the scope of the project and provided insight as to the direction of the project. He also helped us to realize the third important factor in managing our time constraints, which was to have a deep knowledge of the hardware components under consideration. Requiring an in-depth look into datasheets, it was essential to ensure that all components were compatible with one another. A situation of concern was realizing that the hardware elements we had ordered and implemented were not compatible. Intimately knowing the components led to careful selection of each hardware integrant, which reduced the possibility of this.
4.2.4 Safety Constraints
For this system to operate without batteries and have a reading distance of about one meter, RFID must be used. It is important to note that to increase the read range, a larger antenna or more power must be used. If more power is used, the safety of an animal can become at risk. Depending on the gain of the antenna and the output power, an organism is not to be within 21cm of the antenna [2, p. 63]. If one is within a range less than the previously stated value, either the output power of the reader must be reduced or a lower gain antenna must be used, otherwise, the organism is exposed to safety concerns. Because our reader must be either above or below the door, careful design considerations must be taken to keep both people and animals safe while using this application.
The onboard antenna located on the Sparkfun Simultaneous RFID Reader requires maintaining a minimum distance of 21cm to avoid any negative side effects of long-term exposure. It is important to note that this distance was required for the onboard antenna. Keeping in mind the importance of safety, the team needed to see what this warning meant for different gains. The datasheets had an antenna gain of 8.15. With this gain and an input power of 27 dBm for 21 cm away, the RF output power must be calculated. The RF output power turns out to be 5.89e+0. Next, we must find an input power for our antenna that will yield an RF output power that is below this value. This input power is found by fixing the distance of 21 cm, plugging in the 5.5 dBi gain for the Times-7 antenna, and varying the input power until the output power yields the desired result.
Times-7 SlimLine Antenna Input Power | Distance from the antenna | RF output power |
6 W (max) | 21 cm | 3.84e+1 |
5 W | 21 cm | 3.20e+1 |
4 W | 21 cm | 2.56e+1 |
3 W | 21 cm | 1.92e+1 |
2 W | 21 cm | 1.28e+1 |
1 W | 21 cm | 6.40e+0 |
0.9 W | 21 cm | 5.76e+0 |
Table 17: Times-7 SlimLine Antenna Input Power vs RF Output Power
As seen in the table, the antenna achieves an RF output power below 5.89e+0 when it has an input power of roughly 0.9 Watts. This corresponds to about 29.5 dBm. One concern of this distance restraint was the potential threat of a lowered read range. Fortunately, the input power for the antenna was actually able to achieve larger values due its smaller gain in reference to the onboard antenna. With this realization, reduced read range was no longer of concern.
4.2.5 Physical Constraints
While the door is designed to fit most animals, not every animal will fit. Animals that are too large, like Great Danes, will not fit. Animals that are too small, like puppies, are not intended to use this door either. The animal must be not too big or too small and strong enough to climb over the frame while pushing the door open.
While the system is easy to set up and start using right away, it does not necessarily mean animals will use it instantly. It will require some time and training before the animal starts to recognize the cues of the door. If the buzzer is played, the animal will understand it can either enter or exit. If the animal approaches the door and no buzzer is played, then the animal cannot proceed through. The buzzer must be a frequency that animals can understand. It must also be loud enough to be heard on both sides of the door.
Finally, the door is intended to be used one animal at a time. Most doggy doors will allow animals to run out one after another. If that happens with this door, the purpose of creating unique profiles for every animal is defeated. Therefore, to protect against the latter as much as possible, we will catch the door as it returns to its closing position instead of the door remaining inside its transient state. Ultimately, however, the door is designed for one animal to go through at a time.
4.2.6 Doggy Door Constraints
The design of the door is an important one, that needs to work fluidly and have no issues when the doors opens and closes. One of the main design constraints with respect to the design of the door, is the door returning to its starting position after being open so it can be locked without having any complications. The first idea to solve this constraint was to add magnets to the side of the door in order to attract the door to the starting position. The concern with this method was that the magnets would interfere with the RFID reader and would disrupt the connection between the reader and the tag to unlock the door. After this concern, other ideas were thought to solve this constraint. The next idea was to use a two-way door hinge that is used for saloon style doors. The main problem with this idea was that these two-way door hinges are only made for the thickness of normal sized doors and the doggy door would be too thin to use this hinge. The next idea was to use a soft closing spring door closer. The spring can be adjusted to meet the appropriate amount of force for when the door closes. The main concern with this idea was that this soft closing door hinge only works one way and since the door is designed to be open and closing both in and out, this method would not work. At this point in trying to find a solution to dampen the door once opened to have the door come back to the starting position, a new design was thought of that would work bi-directionally. After further research, the new idea was thought of to use rotary dampers. To test if this method worked, two dampers were purchased. After further testing, the rotary dampers that were bought had too strong of torque and it would make it very difficult if not impossible for the dog to push the door open. To try to solve this solution, meetings with mechanical engineers that design the rotary dampers were contacted to find one that would be more appropriate for our design.
After testing the new rotary damper that the engineers recommended, it was discovered that the torque would still be too great for the application of a doggy door. The torque might not be too much for a dog to open the door flap, but it would cause more force by the dog, and a concern would be that the door would not have enough weight to rotate the rotary damper and the door would remain open after a dog exits the door. The rotary damper also had a gear attached to the end of it that is used for most applications, but this would be difficult to implement into the door design created for this project. Further research into gears and similar mechanical parts would be needed to use the rotary damper, and for all these reasons, the rotary dampers were no longer considered for this project.
After the rotary dampers were no longer considered for the project, the next mechanism that was tested was normal door hinges. This was something that was going to be the alternative design idea if the rotary dampers did not work. The main concern of using a door hinge would be that it would not get the full range of motion needed for a doggy door flap and that the door would continue to swing back and forth several times before returning its starting position, leaving time for unwanted things to enter the house. This design was used for the first prototype of the doggy door, this concern occurred exactly how it was envisioned. The top of the door would hit the top of the ceiling and limit the range of motion on one side of the door while the other side worked exactly as planned. While this is the case, the hinges used on the prototype were promising and could work how they are designed with an added mechanism that lowers the door from the ceiling. A small piece of metal with a set screw holes on the left and right sides will be placed in between the hinge and door connection and will lower the door from the ceiling and allow for a full range of motion.
The new lock design that is being used will also allow for the door to lock shut once the door returns to the starting position on the first swing back. This lock will be a solution to the door constraint and be used to lock the door as well. The lock will work similarly to a normal door lock where when the door is shut, a bolt with a slant on one side will be forced in the door from the door frame and will pop back out once the door is fully open and a slot for the bolt to extend is available. The lock will use the force of the door swinging backward and push this bolt (placed vertically instead of horizontally for this case) upwards. Both sides of the door will have a piece on the bottom of the door sticking out on the left and right of the door. This piece will go through the door frame to meet the locking mechanism on the other side of the door frame wall. When these pieces swing back it will lift the bolt up and move past it and get blocked by an identical bolt facing the opposite direction, causing the door to be locked and become stationary after one swing.
The limitations to this idea is that it must be 3D printed in order to get the necessary components to get the locking mechanism to work. Due to this the lock will not be as strong as if it was created using some kind of metal. Using metal would be ideal and would not cause any concerns of durability but because it could not be done the next best option was to 3D print it. The good thing about 3D printing it, is that it can be customizable to meet specific requirements and sizes and was adjusted to make the locking mechanism as durable as possible. This included building built-in drill holes into the structures as well as making everything a little thicker. With it being 3D printed, it allows for this locking mechanism to be mass produced if the product is pushed to the market. This being the case, the push for making the materials using a metal and mass producing it that way would be something that would benefit the quality, durability, and overall safety of the product design.
Another limitation of this new 3D printed locking mechanism is that it has to be designed using the AutoCAD software and then printed. Due to this, a lot of trial and error will need to be done in order to get the correct dimensions of all three parts. This may lead to printing and redesigning the parts multiple times until the precise measurements for these parts are met. This will lead to an increase in cost for the necessary materials to create the 3D prints. This constraint was evident after the initial design of these three parts were printed. The shaft hole was too small, and the pins would not be able to fit in the shaft without excessive force and the shaft would need to be redesigned. The pins were also slightly larger than desired and will need to be redesigned with smaller dimensions but overall, this piece needed the least amount of work needed on it. The last piece that needs to be redesigned is the knob that will push up the pins. After the initial design, it was evident that the knob diameter was too large, and had a hard time pushing the pin up. Instead, the force from the knob wanted to push the pin in the horizontal direction as opposed to the vertical direction. Due to all of this, the 3D printed locking design can be designed to meet specific specifications but also can cause the project to have an increase in time and cost to create the locking mechanism.
When it comes to 3D printing and the size of the smart doggy door and the components that are needed to create it, several fine measurements must be used. For the locking mechanism, each piece is relatively small and the smallest error in measuring the correct sizes needed can make all the pieces not fit with each other and cause the designs to be redesigned. This was evident in the first prototype of the locking mechanism. The shaft for the locking mechanism did not leave enough room for the locking pin to move up and down. This piece then had to be redesigned, reprinted, and retested. The University of Central FLorida gives each group ten cubic inches of free 3D prints and then after that the filament used to print the 3D pieces must be purchased on the groups own to print it. Due to the measurements needing to be precise and not fitting or working exactly as planned, ten cubic inches of prints was used in prototyping before the final locking mechanism was created. This increased the price to make the 3D prints. A spool of filament is not too expensive and will be able to be used for any additional prototyping of the locking mechanism. While this is the case, the biggest constraint with 3D printing on campus is the policy that the University of Central Florida has on the 3D printer after you use up the free ten cubic inches. The policy states that a group can bring in its own spool of filament to be printed and it can be used for 30 days. After the 30 days, the policy says that the filament can no longer be used because it loses its quality to be printed and will either be thrown out or given back to the group who bought it. This is due to the filament being exposed to the humidity in the air causing it to start to deteriorate and this can cause the quality of the prints to be poor but it can also clog the 3D printer which can cause it to be damaged. While this is understandable, it is the second part of the policy where the true constraints of creating 3D printed objects at the University of Central Florida comes into effect. Once a group brought in their own spool for the first time and the 30 days has past, the group can no longer have any free prints and can no longer provide their own filament to be printed. This policy makes it where a group only has a 30 day window to use the campus 3D printer and after that they cannot be used by that group any longer. This dramatically reduces the amount of testing and redesigning that can be done and can potentially become a major issue if a piece of the locking mechanism breaks after the 30 days have ended. Due to this issue, the group is having to be more precise and think of all potential issues that could come from the locking mechanism before testing any additional prototype designs. One of the best ways to see if an idea will work is to fail fast and fail often until the best solution arises. This limits the failure that can be very beneficial to design the best locking mechanism for the smart doggy door and could cause issues later in the design process. If something were to break or need to be redesigned after the 30 day period, another 3D printer that is off the campus of the University of Central Florida would have to be used. This could be a difficult task to find someone or a company that is willing to allow us to print on their 3D printer without charging a high cost to do so. The best solution to this constraint is to think of the best designs that may solve the problems with the locking mechanism ahead of time and then print all of the prototypes the first day of the 30 day period. This would allow for the most amount of testing to be done while also leaving the most amount of time possible to redesign any of the parts of the locking mechanism from there.
One possible piece of equipment that could be used to raise the locking pin in order to unlock the door is to use an electromagnet. Four electromagnets would be used and each one would be placed above one of the four locking pins. When current is applied to the electromagnet, the magnet will attract a piece of metal that will be placed on the top of the locking pins, raising the locking pin and unlocking the smart doggy door. Once the applied current is turned off, the locking pin will be released and the smart doggy door will be locked once again. After further research into electromagnets, it was discovered that the strength of the magnet and the distance between the magnet and the pin are inversely proportional and exponentially decrease the farther the distance becomes. After conducting calculations on the maximum distance that the electromagnet would have to be to attract the 3D printed locking pin, this distance came out to be less than a quarter of an inch. For the 3D printed locking mechanism, the minimum distance needed was a quarter of an inch and therefore the specific electromagnet that was looked at would not work for the smart doggy door. After figuring this out, further research went into looking at other electromagnets that provided a stronger attraction from a further distance. The one way to get the electromagnets to work was to get a bigger magnet and this was not ideal because it must fit in the side of the door and may create an issue fitting along with the other components. The more significant issue with using a larger electromagnet, however, is that the larger electromagnets were either too costly or would need too large of an amount of current for the project and made the electromagnets unable to be used for the smart doggy door.
After realizing that the electromagnets would not work to raise the locking pin and ultimately unlock the door, the next piece of equipment that was researched to see if it would work was solenoids. Four solenoids would be used and each one would be attached to the top of each pin. The part of the solenoid shaft without any applied current will be attached to the locking pin. When a current is applied to the solenoid, the shaft of the solenoid will move in the opposite direction, ultimately raising the locking pin to unlock the smart doggy door. When the door closes the force of the door moving back to the center will also be enough force to push the solenoid shaft up, allowing the smart doggy door to be locked once again. The issue with using the solenoids to unlock the smart doggy door is that each solenoid will need up to one amp of current and this could create some issues with the power source that is used for the smart doggy door. Another constraint with using solenoids in the design is that the maximum stroke length would be very small in order to stay below the one amp current draw. For the current solenoid that was researched, the maximum stroke length of the solenoid is only 10mm. This does however give a distance greater than a quarter of an inch that is desired, which the electromagnet did not achieve. The main concern with the solenoid is that it can only be turned on for a couple of seconds before it will begin to overheat and possibly damage the solenoid and potentially other components in the design of the smart doggy door. Two seconds could be all that is needed to fully unlock the smart doggy door and give the dog enough time to exit through the door, but this is something that will have to be monitored to eliminate any potential damage to any components used in the design. With all these constraints with respect to the solenoid, the group believes these constraints can be manageable and can be overcome while also taking them into account.
An equally important factor to the door design other than the materials to build it and the locking mechanism is how it will be implemented into the homes of the customers. This can bring about constraints of their own. The first major constraint is the door frame of the doggy door having to be very wide to house all the necessary hardware components to create the smart doggy door. This can limit the ways the door can be implemented into the house. Many normal doggy doors are placed inside already existing doors and are relatively easy to assemble. A hole would just be cut in the wooden door and then the doggy door would be placed inside and screwed into the door. However, this smart doggy door is eight inches wide in order for the RFID reader and the antenna to be placed inside as well as all the other hardware components. This makes it impossible to place the smart doggy door inside an existing house door without it sticking out. This makes the next best place to implement the doggy door to be in an exterior wall of the house. Although it would fit appropriately and be a sturdy fit, this could be a difficult task for customers to do without professionally trained people to help them, which would only drive up the entire price the customer would have to pay in order to implement the smart doggy door. This could make customers wary of purchasing the smart doggy door and look at the other competitors to find another product that has an easier implementation even at the expense of the competitor’s door having less features to it. This could end up making the product less desirable and may need to be something that is looked at in the future to find an easier method to implement the smart doggy door.
Another important constraint that needs to be addressed is the material that the smart doggy door will be made out of. Ideally, the smart doggy door structure would be made out of metal or hard plastic to give it a more professional quality. This would allow for the smart doggy door to be mass-produced and perfectly sized pieces every time if enough units were desired by customers this would ultimately drive down the production cost and make the overall cost of the product decrease. That being said, a metal or plastic manufacturer would be needed, and to get one of those companies to create the prototype would be very costly for only one unit that could potentially not work exactly how it is supposed to. It would be a very high initial cost that would drive up the cost for each smart doggy door and this would cause customers to look to other competitors for cheaper products. For these reasons, the prototype will be made out of wood. This significantly decreases the cost to make the prototype but does have its own drawbacks as well. It is not as durable as using metal or plastic and is not as weather resilient as the other two. Other products would have to be used to ensure that they can withstand the effects of the weather and this will provide more money to go elsewhere in the budget of the project.
5 System Designs
This section will discuss design considerations made for both the software and hardware as well as the designs that we decided to go with.
5.1 Hardware Design
Before any software applications were able to be discussed or considered, we first needed to lay a solid foundation. The team needed to research specific hardware components and make a selection based on certain desired parameters.
5.1.1 Antenna
In order to determine the location of the antenna, we needed to consider a few aspects of the IoT Smart Doggy Door. Firstly, the antenna must be set up in such a way that the beamwidth fully captures the desirable range of motion of the dogs in order to detect when to open the door. The antenna must capture when the dog is in close proximity to the door from both the inside of the house as well as the outside of the house. Given that the beamwidth for the Times-7 SlimLine Antenna radiates directly outward from the top, this narrows the options down. With this information, the antenna must be placed upside down above the door frame, or rightside up below the door frame. Secondly, we need to think about the different types of dogs that may enter the door. Housing the antenna beneath the door frame as opposed to the top will provide more accurate and consistent results given two factors: Even if the chances are relatively low, difficulties with reading may be presented from a very short dog where the collar is much lower to the ground. The second factor is the non-invasive nature of an embedded structure underneath the door as opposed to above the door, where there is a risk of a bulky eyesore. In a project where one’s living space is involved, neatness and aesthetics are very important.
As far as its integration into the system, it was important to consider the specific connection types of the Times-7 antenna as well as the m6e nano simultaneous reader selected. In order to ensure proper connection, the SMA female connector type of the antenna needed to connect to the u.FL connector type of the RFID reader. For this reason, we need two different cables with an adapter. First, however, the length of the cable as well as its thickness needed to be considered. If possible, the shortest length is desirable, due to the fact that more energy is lost the longer the cable is. As discussed in the next section, the reader will be housed in the same space as the antenna, so the length of the cable can be very short. When connecting components in a tight space, a thick cable would not be suitable due to a lack of malleability. An SMA male to SMA female cable is required to connect to the antenna, followed by an SMA male to RP-SMA male adapter, concluded with a RP-SMA female to u.FL connector for the u.FL connection type of the reader. Pictured below are the three cable components necessary for the design.
(a)
(b)
Figure 23: (a) u.FL to RP-SMA female; (b) SMA male to SMA female
Figure 24: SMA female to SMA male adapter
5.1.2 RFID Reader
The RFID reader will be housed within the bottom of the door frame, out of view. This design choice was decided in accordance with the position of the antenna, as well as the safety concerns for the Simultaneous RFID reader m6e Nano. The datasheets give the warning of a health concern that arises when a living thing is within 21 centimeters of the reader for an extended period of time when the module is running at its maximum power capacity. Even though the reader will be operated beneath the maximum power capacity for our design, tucking the module sufficiently beneath the door eliminates any potential danger that could arise. The location of the antenna heavily influenced this decision as well, given the physical connection required. If the reader was housed elsewhere, running cables would become expensive and inconvenient. With the reading module in an immediate vicinity mitigates these concerns.
The reader will be in charge of several important operations and communications. The ThingMagic Nano module connections are mostly taken care of on the Simultaneous RFID Reader module, however there is one aspect that needs to be changed: The Times-7 SlimLine Antenna must be specified as the selected antenna. This is because the onboard antenna is chosen by default. Port 39 of the m6e nano module is responsible for the RF signal, which will choose between the PCB antenna and the u.FL connector. Once the antenna is connected to the u.FL connector, a drop of solder is used to close the solder jumper to the u.FL port, as seen below.
Figure 25: Antenna selection to the Times-7 Slimline
5.2 Software Designs
This section is dedicated to discussing different environments that will be used and software designs considered. While several options may exist for each section, we decided to choose the solution with the most functionality that we could best implement.
5.2.1 Software Environments
Software environments are an important consideration when developing and testing code. One of the most common environments is an integrated development environment. Some IDEs provide a lot of useful tools for installing new libraries, debugging, compiling, and more. The downside, however, is usually the expense of system’s speed/performance, memory usage, and abstraction of resources. This is because a large application must be installed, and a graphical user interface (GUI) is being used to nicely display the contents of the software. Another alternative is to use text editors. Text editors tend to perform much faster, however, only offer a fraction of the tools (there are still ways to implement tools) of an IDE. Some text editors do not provide a GUI which makes the environment that much more lightweight. Unlike most IDEs, text editors usually support many languages whereas some IDEs only support one or two languages.
Integrated Development Environments | Text Editors | Command Line Interface Text Editor | |
Languages Supported | Few | Many | Many |
Speed | Slow | Fast | Fast |
Tools | Many | Many once setup correctly | Few |
Learning Curve | Medium | Easy | Hard |
Setup | Hard | Easy | Easy |
System Resources | Demanding | Light | Very Light |
Prototyping | Medium | Easy | Easy |
Developer experience | Some experience | A lot of experience | Some experience |
Table 18: Software Environments
Not all development needs to be done on the Raspberry Pi. The mobile application, APIs, and database setup can all be done on a more capable computer. Our choice of environment will be a text editor even though our computers will be capable of running larger IDEs. The main reason being that we do not need all the features offered by an IDE. If any feature is needed, we will find a way to implement it. IDEs are also usually language dependent and provide a steeper learning curve. The developers have a lot more experience with text editors and much prefer the speed of them as well. One editor the developers have experience with in particular is VS Code. VS Code is not only fast, but it offers a large supportive community as well. While VS Code can run on a desktop without a problem, the Raspberry Pi does not offer the same performance specifications to run the editor. Therefore, for development on the Pi, we are opting in to use a command line interface (CLI) text editor. This type of editor allows for quick development once mastered. CLI text editors also provide many simple, yet powerful commands to keep the development process fast and efficient.
5.2.2 Software Integration with Hardware
While this system holds many electrical and mechanical components, the software is what holds everything together. To get one component to talk to another, a communication protocol must be established before acting on the data. This doggy door will use several methods of communication whether it be serial, Wi-Fi, radio frequency, or through the use of general purpose input output (GPIO) pins. Therefore, our design must be flexible and capable to handle different forms of communication.
When we were first deciding hardware components, we also recognized that, depending on the hardware, the software will also be affected. Our goal was to use a Raspberry Pi, however, if that was not possible, we would have to use a microcontroller instead. The benefit of the Pi was that it has wifi, sufficient processing power, and camera capability all in one. If we had to use a microcontroller, it had to be capable of handling several outputs as well as communicate data back and forth to the Wi-Fi module and camera. While this option could have worked, we believed that having all the components exist in one system controller would allow us more time to focus on developing the project rather than focusing on getting parts to communicate with one another.
5.2.3 User and System Integration
To make this project as flexible and as user controllable as possible, we determined that we would need some sort of framework to be established. By including both a database as well as a smartphone application, the user will have control over the system. From the user’s phone, the database can be updated via some action on the phone that is registered to an API. We then had to consider how we would get the information from the database to the Raspberry Pi. Our initial thought was to communicate the Pi to the smartphone and the smartphone to the database. This approach is not sufficient for several reasons. Firstly, the user’s phone must always be within range of the door in order to remain connected and transmit requests. This restricts the distance from which the door can be controlled. Secondly, if at any point the Wi-Fi is changed or disconnected on the user’s phone, the communication of data would be disrupted even though the Raspberry Pi is still connected to the Wi-Fi. Finally, there would be additional latency when sending and processing requests between the Pi and the database. This is because the Pi needs to talk to the database, not the phone itself. Adding the phone in the line of communication puts that much more distance between the two endpoints. With some rethinking, we decided to make the Pi connect to the database and the database would then connect to the phone. This is possible because we are able to process API requests on the Pi which will then be able to communicate directly to the database. This configuration will allow the user to control the system as long as they have an internet connection without any additional latency. This setup will also allow the user to control the system with multiple phones. In the initial design, the Raspberry Pi must be told what phones to communicate with.
5.2.4 Offline Operation
After designing how the communication will be established in the system, we started to think about edge cases. One edge case is that the power may go out. Despite having a backup battery to allow the system to remain on for a little longer, the Wi-Fi would be disconnected, and the Pi would no longer be able to connect to the database. While the door is being powered by the external battery, we want the system to still be operable. Even though the Pi cannot connect to the database without an internet connection, the software will be designed so that we will establish a local storage on the Pi that will store the most recent updates made on the database. Therefore, without Wi-Fi, the Pi will still be able to process tags. Even though the Pi will not be able to process updates made to the online database, the system will mimic all changes made up until the disconnect.
5.2.5 Programming Languages
We have considered multiple languages to design our software in. Our first initial thought was to use C due to its speed. We also considered Java because those designing the software have had the most experience with this programming language. Lastly, we also considered Python for its simplicity and quick development time. Both C and Java are supported by the ThingMagic Mercury API which will be used to program the RFID reader. However, a Python wrapper for the C version of the API was created. Therefore, any of the languages mentioned are viable so far. When choosing a language, we wanted to be able to have simple development. Python is known for its almost human readable syntax. Because Java was so familiar to us, this was another option for simple development. While the software designers have had experience with C in the past, we felt as if it required more work to get a simple program running. We want our software to be fast, however, the difference between C (the fastest language) and Python (the slowest language) is minimal for our use case. We also preferred an interpreted language because it would be easier for us to test our code on different platforms compared to setting up our environment and testing with compiled languages. Scripts are easy to create in Python and can be created to run in the background. Doing so will allow us to run multiple processes at once. One downside to Python is that it uses dynamic typing instead of static typing. This can be an issue when trying to debug the code. A mistyped variable will simply create a new variable and still run normally, which may produce unexpected results. With all considerations, however, we still believe Python will be the best language for our application. Below is a table expressing the key features to each language.
C | Java | Python | |
Language Type | Compiled | Compiled | Interpreted |
Speed | Fast | Medium | Slow |
Development Time | Slow | Medium | Fast |
Static vs Dynamic | Static | Static | Dynamic |
Portability | Not portable | Semi-portable | Very portable |
Ease of use | Hard | Medium | Easy |
ThingMagic API Support | Direct support | Direct support | Indirect support through Python wrapper of C |
Table 19: Software Design Considerations
5.2.6 Reading an RFID Tag
Software design also needs to be considered when reading RFID tags. The tags have user memory, reserved memory, electronic product code memory (EPC), and tag identifier memory (TID). For user memory, the storage size will typically increase as the price of the tag increases. This memory is able to be edited by the user, but usually only after the EPC becomes full. Reserved memory is dedicated to permit or disable tag functionality. EPC is memory that can also be written to by the user. This is the most common memory to be utilized. Depending on the class of the tag, the tag may be written to only once or can be written to many times. Finally, there is TID which is a unique identifier created by the manufacturer of the tag. This memory banked cannot be altered.
While the user memory and EPC will allow the user to create their own password for the tag, we plan to utilize the TID. The EPC is not always unique and can be copied onto other tags. The TID, however, will always be unique. This will not only ensure a unique identity between every collar, but it also provides an additional layer of security. The EPC can be used for other applications though. While the TID is the unique identifier for the dog, the EPC can be used to store the animal’s name, age, breed, or the owner’s contact information.
Below is an image that shows the layout of the different memory types in EPC Gen2 memory:
Figure 26: EPC Gen2 Memory
Reprinted with permission pending, from [37]
5.2.7 RFID Reader Interrupts
Once the tag is read and processed by the system, there must be an interrupt in the code. An interrupt is when your code stops what it is doing to process some other code. Interrupts also have a priority. Interrupts may interrupt other interrupts only when a higher priority is present. Otherwise, an interrupt will finish its code before resuming back to normal. Interrupts are important because an event can be processed as soon as it happens. For our project, we only want to process the first tag read by the antenna, not all tags within range. Therefore, once the tag is read and processed, an interrupt will occur and prevent the antenna from reading any other tags. From here, the tag can be processed further and even sent to the database to return relevant information for that one tag.
5.2.8 Motion Sensor
Motion sensors play an important role for our system. Not only will the motion sensors detect outside movement and trigger the camera, but the motion sensors will also maintain the state (inside or outside) of the animal as well.
Much like the RFID reader interrupt, the motion sensor will also have an interrupt as well. Two motion sensors will be set up on the door frame of the system where one sensor will face the inside and the other motion sensor will face the outside. Only the motion sensor on the outside will trigger the camera on the Raspberry Pi. For this to occur, an interrupt must be set on the pin the motion sensor is connected to. Whenever the motion sensor detects movement, the code will pause to then take a picture from the camera and send it to the database for viewing. A delay will be introduced so the camera does not continuously take pictures every time it detects movement.
The motion sensor is also vital for keeping track of whether the animal is inside or outside. After the reader processes the tag and the Pi receives permission from the database to unlock the door, the reader will be paused for a couple of seconds. While the reader is paused, the motion sensors will then be ready to update the state. If both sensors detect movement, within the window the reader is off, it can be assumed that the animal went through the door. Otherwise, if only one sensor is triggered, then it can be assumed that the animal did not pass fully through the door.
5.2.9 Locking and Unlocking
The software will be designed such that after a tag is processed and the animal receives permission to pass through the door, an output will be produced to toggle the locks as well as the buzzer to signify that the animal has permission to pass through. The output will be in the form of an electrical signal that will be processed through various integrated circuits. This output will be used to activate the solenoid locks. Once these locks are activated, they will lift up, which will, in turn, pick up the locking pins as well, due to their physical connectivity. This will remain active for a few seconds before the output is turned off and the locking pins fall back into their original spot due to gravity. Due to the nature of solenoids, they should not be turned on for long due to low resistance and high current flow. This will allow for a lot of heat generation.
The unlocking mechanism can be used in conjunction with the state of the animal as well. This state is determined by the motion sensors and will be stored as a variable inside the database. When the Pi generates an output for electromagnets to activate, depending on the state, only two locking pins will be raised. This will allow a one-way exit or entry for the animal. This will also prevent other animals from trying to run in from the opposite direction.
5.2.10 Background Scripts
Code ran on the Raspberry Pi will be running in the background using Python scripts. When the Pi initially boots up, a script will start immediately setting the whole system into motion. By running scripts in the background, this will allow the Pi to not dedicate its attention to a single process. From the main script, other python scripts can be called as well. This will be helpful to compartmentalize the code and organize functionality.
5.2.11 Mobile Application
For this application, we will be using React Native and the Expo framework for development. While this combination will allow for development on both iOS and Android, the demonstration will be shown on Android. Therefore, a stretch goal would be to have a functioning application on iOS. This would not require that much more work due to the nature and portability of React Native.
We understand the fact that iOS is one of the biggest mobile operating systems in the world and the current biggest in the US, but for our testing we believe that Android devices will better suit our needs. When bringing our product to consumers’ houses we will have a planned solution of how we will make sure that they are able to set up their newly bought Internet of Things doggy door no matter what mobile device they use.
When the user opens the app, they will be prompted to login/sign up or enter the ID of the door (or some variation thereof) in order to continue inside the application. After providing the correct credentials, the user will be able to see the list of animals they have registered or unregistered. If the application displays the name and breed, the animal has already been registered inside the database. If the application only displays the EPC, the collar has been recognized, but it is not tied to any animal. To update the name and breed of the EPC, the user can press on the three dots to fill out that information. From here, the collar/card can be deleted from the database as well. The user will also be able to press the camera icon to load all images taken by the system within a certain timeframe. A couple of design considerations have been taken into place regarding the scanning of a new tag. One possibility is to have a physical button on the system itself that will prepare the system to scan a tag. From here, the tag will be sent to the database. Another possibility is to have a button on the application that will prompt the system to scan a new tag. Ideally, when a tag is scanned, it can be viewed on the application shortly after. Finally, to change the permissions for each of the animals, the user can simply press on the card (not on the three dots). A possible design consideration can be found in the image below:
Figure 27: Mobile Application Designs
5.3 Door Construction Designs
Throughout the process of designing the smart doggy door, different components have been changed or altered that affect the way the doggy door will function. This caused multiple prototypes to be created to test out these different ideas, whether it is the structure of the doggy door, the flap mechanic, or the locking mechanism.
5.3.1 Initial Door Design Concepts
After researching the current doggy doors on the market, a few door designs were made that each had their benefits and disadvantages. The first design was very similar to a regular doggy door. The door would have a flap style mechanic and would be opened and closed manually by each pet. The door had magnets on the side of the door and these would bring the door back to the starting position to allow for the door to be locked. The door would be automatically locked using two push pull solenoids that would extend into a slot in the door. When the dog approaches the door and the tag the dog carries is read by the RFID reader, the solenoids would retract, unlocking the door. The main concern for this door design is that the magnets would interfere with the electromagnetic waves coming from the RFID reader. For this reason, more research was done into alternative door designs.
The second door tries to solve the issue of the door coming back to the starting location within 2-3 seconds after the dog exits through the door by using a locking mechanism that is made of a metal sheet. There will be two of these metal sheets on the inside and outside of the door and they will slide up and down and lock by trapping the door in between them. When the dog exits the door from inside to outside, the set of these locks on the outside will lower while the set inside stays up, allowing the door to only open towards the outside. Once the door swings back, the door will hit padding on the back side of the lock to dampen the door swinging. This will eliminate the number of times the door swings and bring the door back to its starting position sooner.
The third design concept for the door used a different door mechanic. Instead of using a door that swings open and closed, the door would slide up and down on a track. The door would be connected to a linear actuator which would open and close the door. From [38], when the actuator was fed 12V, the door would open and when it was not fed any voltage, the door would close again. To lock the door, the actuator would just remain closed and the door would slide an inch below the bottom of the door frame and the actuator would hold the door in place making it unable to slide the door up. This design concept fixed some of the previous issues but created more issues. The door would have to be about four and a half feet tall to allow for the linear actuator to fully extend and retract properly. This design would be less appealing for customers and they would be less willing to make an incision in a door or wall for this to fit. Another concern was the price and quality of the actuator. The minimum price of an actuator that was the right size was about sixty dollars. This is already a large sum of the project budget which made it less appealing as a solution. After further research, it was found that the actuator had a maximum speed of 4.5 mm/s. After discovering this, this design was no longer considered because of the slow extend/retract speed which could cause an impatient animal to potentially break the mechanics of the door.
A door concept that was researched that is very similar to the one above, is to use a pulley system to automatically open the door for the dog. Two motors would be placed at the bottom of the door and a wire would be back up around the pulley track and then attached to the door and this would allow the door to slide along a vertical track. The main concern for this design is that a dog could be impatient and push up on the bottom of the door. This would cause the door to move up and cause the pulley wire to have slack and then immediately snap back to have resistance again. This could cause the pulley system to break or malfunction and it was seen as not being as reliable of a door design.
Figure 28: Sketch of the initial doggy door designs that illustrates their concepts
The first prototype for the doggy door was constructed primarily out of wood. The wood for the frame was made from 1x8x8 wood planks and the door was made from plywood about quarter an inch thick. Although polycarbonate sheets are most likely going to be used for door flap in the final design, plywood was a cheaper option for the first prototype constructed. This prototype was primarily constructed to see if the door frame design would work and if the dimensions were accurate to the research conducted on the appropriate size of doggy doors. The door frame is 10”x19”x8” with a smaller box on top to house the hardware equipment that is 8”x5”x8”. The door flap was connected to the frame using two normal door hinges with one part connected to the door flap and the other connected to the ceiling of the door frame. For the first prototype, it worked well and a lot of knowledge was learned from doing this. The first thing learned is that the tool to cut the wood did not work as well as it was hoped and a different tool may be used to cut straighter and more precise pieces. The next thing that was learned from this prototype was that the door hinge did not work as hoped. The door flap had a full range of motion on one side and was able to open the full 90 degrees and came back appropriately. The other side however, only had a range of motion of about 30-45 degrees. This was due to the wood being attached on that side of the door hinge and when the door was opened, the top part of the door flap would press against the ceiling of the door frame and block the range of motion. Therefore, a new hinge design will have to be implemented, either a completely new hinge or an attachment that can lower the door flap from the ceiling of the door frame to allow for a full range of motion.
The second prototype was constructed out of wood just like the previous prototype. The second prototype was designed to allow the 3D printed locking mechanism to work to verify if the entire locking mechanism works as it is designed. The shaft of the locking mechanism is placed near the bottom of the inside part of the walls. Due to this, the top and bottom pieces of wood need to be longer to allow for more space between the walls and the door flap. Once the shaft of the locking mechanism is drilled into the side walls, the knob is attached to the end of the door flap on each side. The knob will push the locking pins up to allow for the door to be locked and unlocked. With this current prototype, the door will be automatically locked when the door swings back after being opened, however, this is not a piece of equipment in this prototype to unlock the door. For this reason, the door has to be manually unlocked by pressing the locking pins up by using our fingers. Once the shaft and the knob of the locking mechanism are in place, a small piece of wood is attached underneath the shaft to allow for a place for the locking pins to rest so they do not fall through the shafts. The same thing is done to the top of the shaft to ensure that the locking pins do not fly out of the shafts when the door flap wings back and pushes the pins up. Throughout this prototype a lot of challenges were faced that created setbacks for this prototype. The major setback was that the power drill that was used to screw in pieces to the wood broke half-way through assembling the door, limiting the quality of the build. While this is the case, the main reason for this prototype was to see if the 3D locking mechanism worked and if it did by what degree did it work and this information was still able to be acquired once the locking pins were placed in the shaft and the prototype was tested. After testing, the group found out that the locking mechanism was able to lock the door flap in place from a 90 degree swing angle. It worked with only one set of locking pins as well and this was done as a stress test to ensure that the locking mechanism could handle the force of the door flap swing back. After this prototype, adjustments to the door structure and 3D printed locking mechanism that would make for a better design for the final prototype.
The final design that is used for the prototype takes aspects from a couple ideas and tries to take the best parts of each. The design consists of a doggy flap made of polycarbonate sheet instead of wood. The polycarbonate sheet will be connected to the ceiling of the smart doggy door with a small door hinge and this will allow it to swing 90 degrees in both directions. This provides weather resilient properties as well as being durable. It is also semi-transparent which will allow light to come in but will not allow people to see into the house. Each side of the smart doggy door will have two layers with a gap in between to house the 3D printed locking mechanism. The innermost layer will be a quarter inch thick and will have a rounded opening for the locking knob to travel through so it can push up the locking pins that are inside the gap. The outermost side of the door will be thicker and will be used as a support structure for the smart doggy door. The gap in between the two layers will have the 3D printed locking shafts as well as the locking pins that will be used to lock the door when not being used. There will also be a storage space underneath the bottom of the door frame to allow for the RFID reader, antenna, and other hardware components to be placed to ensure that it is out of the way from the animals and that it can be protected from the elements outside.
Figure 29: Picture of the first (left) and second (right) prototype of the doggy door
To ensure that it is thoroughly protected, the smart doggy door will be coated in a rain guard water sealer. This will protect the door frame from being weakened by the water while also protecting the hardware components from being damaged from rain. The 3D printed locking mechanism has also been updated to provide a better locking mechanic. The locking pins now contain a square top to prevent them from falling through the locking shafts. This will eliminate the need for a wooden platform that the pins would have to sit on to prevent them from falling. The locking pins also have a connection piece on top of the square top to allow an easy connection between the locking pins and the solenoids that will be used to lift up the pins in order to unlock the door when being used. The locking shaft was given extra support in the design to prevent damage from occurring from the force of the door when it swings back and forth. The locking knob was also altered and the base of the circular part of the knob now starts wider and gets narrower as it travels upward. This was done to create a sturdier connection so it can withstand the force of the door swinging back and pushing the pins upward. When all of the parts that make up the locking mechanism are used together, this will allow the door to lock automatically by using the force of the door moving backwards. The knob will push up the locking pin and then be stopped by the neck locking pin that is in the opposite direction. This eliminates the need to use a sensor and try to time the solenoids to lock the door that was used in previous door designs.
Door Design | Cost | Advantages | Disadvantages |
Flap w/ solenoids and magnets | $30 |
|
|
Vertical Door w/ linear actuator | $159 |
|
|
Flap with Rotary Dampers and Solenoids | $47.34 |
|
|
Flap with solenoids and 3D printed locking mechanism | $51 |
|
|
Table 20: Door Design Considerations
The door will come in three parts to allow for easy installation that will connect with each other using screws that will also go through the exterior wall for a sturdy connection. The parts included will be two exterior frames that will attach to the wall on the interior and exterior sides, as well as a middle piece that will be able to fit in the hole made in the wall that will house the door itself as well as the hardware for the doggy door. The frames allow for external factors such as rain, dirt, bugs, ect, to not be able to get inside the walls and cause damage. For the middle piece, all the hardware will already be mounted on the door and be covered so no additional installation steps are needed for the customer.
5.3.2 How to Install
The door is designed to be installed in an exterior wall. As seen in [34], to install the door, the first step is to locate the studs in the wall. Once they are located, they will be promptly avoided. The interior side of the IoT Smart Doggy Door on the wall will then be traced in preparation for cutting. Once the outline is traced, four holes will then be drilled in the corners of the doggy door. Next, use a jigsaw to saw out the outline. This process will be repeated for both the inside and the outside. Once the hole is cut, insert the first piece of the doggy door and then repeat for the other side. After this, use the given screws to connect the two pieces of the door together while also drilling through the wall for added stability. Once the frame is installed, use a screwdriver to screw in the doggy door flap. Once completed, plug in the IoT Smart Doggy Door into a wall outlet and the IoT Smart Doggy Door is now operational.
Figure 30: DIagram of the Installation Process [34]
6 System Fabrication
The entire process of designing a PCB is very involved and requires extensive thought and precision. The complete project design must be considered, including electrical specifications, products available on the market, the financial and physical constraints assigned to us, and much more. Careful research into datasheets as well as theory of hardware components is crucial in ensuring that maximum efficiency and proper operation is maintained.
With such a broad subject, finding a place to begin is a good approach. First, the PCB components needed to be decided. As discussed in previous sections, the project requires the power supply to be fed through the mains voltage from a common household wall outlet. Rated for 120 VAC, this voltage needs to be stepped down and converted to DC voltage. For this reason, we begin with identifying an AC to DC converter that will provide sufficient output power as well as output current needed to power our system. We also need to see what DC output voltage we will need for our design as well. We must also keep in mind the efficiency of the converter, deciding whether or not the specifications that we have require higher efficiency, or if a low efficiency is acceptable. In consideration of these three things, we must find a topology that will meet these requirements.
For DC to DC regulation, very similar parameters are required. The team first needed to identify the output voltage that is required for the second rail, and how many rails the project needs in the first place. The input of the DC/DC converter must be able to take the value of the first rail that was created from the AC/DC converter. The amount of output current needs to be enough to supply that rails total current demands, and the output power must be able to supply the power requirements of the current rail as well as all subsequent rails. In addition to this, the efficiency of the converter must be taken into account, ensuring that the output power of the previous stage would be able to overcome the efficiency loss. All of these factors will be considered when choosing a topology.
The project also must include an external battery that will supply the power required for the project when the power from the wall goes out. This will be accomplished with a solid state relay design that will connect a 12 V battery to the 12 V rail when the mains voltage turns off. When the power comes back on, the relay will switch the power supply to being from the mains voltage source.
For PCB design, we must find a software that will be fitting for our design. After a software has been chosen, we will need to create a Bill of Materials (BOM) that will list all of the necessary components’ quantities, descriptions, and prices. Footprints for relevant components need to be compiled onto the schematic editor, where the visualization of PCB design will occur.
6.1 PCB Design
The process of designing a Printed Circuit Board is highly involved, and it can be quite extensive in its application. The specific hardware component chosen to be the PCB in our team’s design was the Power Supply Unit (PSU) for the project. The PSU is in charge of powering the entire design, including the RFID reader, the RFID antenna, the Raspberry Pi Zero W, the infrared sensors, and the camera. Many important things to consider in the PCB design, such as components, voltage regulation, schematic layouts, and design software will be discussed in this section. Thorough research was conducted in order to determine the appropriate components and software used for the PCB design process. Calculations as well as reasoning will be given as to why certain choices were made, including schematics and block diagrams that are relevant to the project.
6.1.1 Power requirements
Figure 31: PCB Converter schematic
The PCB consists of multiple sections. Firstly, we need to identify a series of converters that will supply power to our design. For this, the team turned to reference designs on the Texas Instruments website, where several converters were considered. Ultimately, the parameters were set through a few important requirements. It is important to note that our design only needed two voltage rails, a 12 Volt rail and a 5 Volt rail. The AC/DC converter required a 120 VAC input voltage compatibility and a 12 Volt output rail. The current that the AC/DC needed to supply was at the least 4 Amps. In total, the amount of power that the system will need is roughly 62.75 Watts. The DC/DC converter will require an output wattage of 14.75 Watts and an output current of at least 2.95 Amps. The output voltage will result in a rail voltage of 5 Volts. All of these values can be found within the power table included in section 6.1.3. A schematic of the converter design can be seen in the figure above.
6.1.2 AC to DC Converter
Our design requires an Alternating Current (AC) voltage as the input. However, the voltages for our components must be Direct Current (DC). For this reason, we need an AC to DC converter. The first step in constructing this converter is by including a transformer at the input of the AC current, which in this case is a home outlet. Our desired step down voltage factor to be provided from the transformer will be a factor of 10. Considering the 120 VAC output of a home outlet, this means that the AC voltage output of the transformer will then be around 12 VAC. Next, a full bridge rectifier is needed in order to produce purely positive voltage cycles. Then, a coupling capacitor is included at the output of the full bridge rectifier in order to provide a more steady voltage, whose value stays relatively close to the peaks. These are things we must consider if we are to design our own AC to DC converter. Reference designs may also be obtained from Texas Instruments’ website as well. Due to the dangers of mains voltage, our group chose to look at reference designs.
First, the inputs and desired outputs need to be established before looking into designs. Since we are powering this through a home wall outlet, the input of the converter should be 120 VAC. The outputs that we desire are as follows: Voltage needs to be 12 VDC (in order to power our highest voltage requirement, which will be stepped down for other components). For each voltage rail, each component will need to draw a particular amount of current. For our project, there will only need to be two voltage rails, where the first voltage rail will be 12 Volts and the second voltage rail will be 5 Volts. For the solenoids, we will have the 12 Volt rail. The RFID reader, RFID antenna, raspberry pi zero W, IR sensors, camera, and buzzer will all be supplied 5 volts. Adding each of these component’s currents will yield the amount of output current that the voltage rail’s converter will need to supply. The datasheets of most of these components specify the values such as current and output power, but for some of them, they must be found in the contexts of our particular design and how we decide to operate them. In order to determine how much current the antenna will be drawing, we must see how much voltage is being supplied as well as how much power it will be consuming. The power we chose to operate the antenna at is 27 dBm, which corresponds to 0.5 W of power. Given that the input voltage for the reader is 5 V, then the current draw for the antenna can be found by dividing the power by the voltage, which yields 100 mA. The output power of the AC to DC converter must also be sufficient in order to power our entire project. In order to calculate this minimum output power requirement for the converter, we need to superimpose the maximum input powers of each of our components. Even though the maximum input power of 6 W is specified in the datasheet, the power of the RFID antenna will be around 0.5 W in application, so 0.5 W is the power that will be considered. In addition to this, the IR sensors will be operated at 0.325 Watts. With this information, we see that the minimum output power for the AC to DC converter must be at least 62.75 Watts, and the amount of output current that it will need is the superposition of the current requirements of the 12 Volt rail, which will be discussed a bit more in section 6.1.5. The last extremely important thing to consider when choosing an AC to DC converter is whether or not the converter is isolated. If it is isolated, then it is much safer and there is a very low chance of electrocution. If it is non-isolated, then it is much more dangerous. For this reason, our design will be looking into reference designs that are isolated.
Component | Voltage | Current Draw | Maximum Input Power |
RFID reader | 5 V | < 1 A | 5 W |
RFID antenna | 5 V | 100 mA | 6 W |
Solenoids | 12 V | Max 2 A | 3 W |
Raspberry Pi | 5.1 V | 1.2 A | 6.12 W |
IR Sensors | 5V - 20V | 65 mA | 0.325 W - 1.3 W |
Camera | 5 V | 260 mA | 1.3 W |
Buzzer | 5 V | 260 mA | 1.3 W |
Table 21: Power Requirements
There are many different topologies to consider when choosing an AC to DC converter. The top three topologies that were looked at were Flyback controllers, LLC controllers, and Power-factor correction (PFC) controllers. The Flyback topology’s transformer consists of a mutually coupled inductor pair. The primary inductor winding is on the input side of the transformer, and it will control the secondary inductor winding, which is connected to the output side of the transformer. This topology makes use of a switch mode power supply (SMPS) that will utilize MOSFETS in order to switch the inductors from the storage of energy to the releasing of energy. A huge advantage to this topology is the fact that it does not have the need for additional circuitry to create a galvanic isolation between the input and output, due to the coupled inductor’s role as a transformer. This is definitely a valuable asset, considering the cost of additional inductors for storage that are essential for other topologies. Another advantage to this type of topology is its ability to safely produce multiple output voltages that are all isolated from the input, again due to the versatility of the coupled inductors. In addition to this, the flyback converters generally tend to have fewer components to its base design. The drawback of this fact, however, leads the topology to claiming a much lower efficiency when compared to some of its AC to DC counterparts. In addition to this, they’re peak currents tend to be very high, which yields a relatively low output current in the context of other converter topologies [39].
The LLC controllers are an incredibly efficient topology. This powerhouse of a topology is extremely valuable. They are capable of achieving output powers ranging from tens of watts to hundreds of watts, all while maintaining a very high efficiency. This is accomplished through the topology’s titular components: two inductors and a capacitor. One inductor will be used as a magnetic storage for the transformer while the other inductor and capacitor will be a resonant circuit so-to-speak, in charge of tuning the circuit to a particular resonant frequency. This concept gives this topology the ability to achieve its most important aspect: softswitching. Softswitching can be described as zero voltage switching (ZVS) as zero current switching (ZCS). This characteristic lends this topology with its high efficiency. This comes into play when the network turns a DC voltage into a square wave via a switching bridge. The current through the LLC tank located before the transformer then becomes sinusoidal in nature. When the MOSFETs switch on or off, the current and voltage overlap in their transitions from either high to low for a brief period of time. Each time this occurs, there is an amount of power that is wasted within the circuit. The LLC resonant tank fixes this issue and achieves ZVS by establishing a resonant frequency to prevent the current from rising until very shortly after the voltage has reached zero. ZCS is then accomplished by maintaining a zero voltage across the switch while the MOSFET is on until the current reaches zero. The main advantages of this topology are as follows. It has the capability of achieving less EMI, as well as its obvious high efficiency over not only a wide range of loads, but also with a large coverage of output power. It does not need an output inductor, leading to a lower cost of BOM. Some of the drawbacks for this topology are complexity of such a design, making the design and control of this converter to be extremely challenging, as well as its use of a variable frequency, which proves to be much more challenging than dealing with a fixed frequency [40].
A very important parameter to consider when discussing the workings of a converter is the power factor. Power factor is defined as the true power divided by the apparent power, where the true power is the useful power being used to transfer utilizable energy given to the load and the apparent power is the total power that is being used in the entire system, also expressed as the addition of the reactive power plus the true power. The culprits of low power factors are any capacitive or inductive components/loads. This is due to the fact that these components cause the current running through a given point in the system to either lead (in the case of capacitive loads) or lag (in the case of inductive loads) the system. When finding the power expended across these components, it can be seen that the voltage multiplied by the current yields a power that will not provide its maximum possible value. In order to fix this, power factor correction (PFC) controllers seek to mitigate the loss in phase through several complicated methods. In order to correct lower power applications (where the energy that is to be supplied is less than 100 watts), passive PFC makes use of capacitive and inductive components to counteract each others’ effects at a particular resonance frequency. Active PFC is for applications that exceed ratings of 100 watts. This type of power factor correction uses a control circuit IC, such as a pulse width modulator in order to tune the duty cycle of the voltage and current signals to where their phases align as closely as possible. The unfortunate truth this project had to face is that the active PFC correction would not be usable due to the fact that we need much less than 100 watts of power for the supply. For this reason, we must look towards the passive PFC controllers when deciding on an AC to DC converter. The advantages that a passive PFC controller provides are great affordability and simplicity. On the other hand, the drawbacks to this design are a very small range of allowable voltage inputs, as well as a large and rather cumbersome build, with an absence of any controller ICs [41].
Topology | Advantages | Disadvantages |
Flyback Controllers |
|
|
LLC controllers |
|
|
(PFC) Controllers |
|
|
Table 22: AC to DC Converter Topologies Advantages vs Disadvantages
6.1.3 Voltage Regulators
Given that voltage regulators are one of the most important and vastly utilized electrical components in printed circuit boards, it will be predictably integrated within our team’s Printed Circuit Board (PCB) design. The hardware component chosen as our designed PCB was chosen to be the power supply of the project.
It is crucial to choose the right type of voltage regulators for our design. Containing either a classification of step-down or step-up, these electrical components determine the input voltage, the output voltage, and the maximum load current. There are two main types of voltage regulators, each with their own benefits as well as weaknesses: linear voltage regulators and switching voltage regulators. Linear regulators are only capable of stepping down a voltage, where the component will output a lower voltage with any given input voltage. A huge benefit to these linear regulators is that they have very low susceptibility to noise and are exceptionally effective at producing a clear signal. Another benefit to these regulators is that they are very cheap and relatively simple in their design. However, something to look out for when considering this type of regulator is the power that will be wasted, and the amount that is acceptable for the design.
When choosing a linear regulator, it is important to keep in mind the power that will be generated in the process of regulation. The power dissipated by the regulator can be found by multiplying the output current by the difference of the input voltage and the output voltage. This indicates a risk in stepping down the input voltage significantly. It is also important to note that these electrical components have a “minimum” voltage difference it is able to step-down, meaning careful investigation and consideration of the output current is required. Given that many of our hardware components are capable of drawing a maximum of around 1 Amp, this will have to be something the team is wary of. The datasheets will provide an in-depth description of how much heat the component will potentially generate and will provide a value for a variable called Theta-JA. This value multiplied by the power dissipated will yield how many degrees Celsius above room temperature that the regulator will reach. This calls for consideration of the temperature the component is housed in to ensure that the regulators will not exceed the recommended maximum of 125°C.
The second type of regulator is a switching regulator. Able to take the role of either a step-down (also called a Buck Converter) or step-up (also called a Boost Converter), these regulators are very versatile. One very important quality of a switching regulator is its high efficiency. Many of these regulators are about 90% efficient in their power transfer, meaning that oftentimes they only waste about 10% of power in the process, diminishing the primary issue linear regulators have with overheating. With this great efficiency, these regulators are capable of stepping the voltage up or down significantly with ease. The downside to these regulators is that they are unfortunately highly susceptible to noise, and will likely not provide a clear enough output voltage for a particular component’s input voltage requirements. A common practice is to utilize the benefits of both of these regulators. First, a switching regulator can be placed in order to provide a significant voltage drop. Then, a linear regulator can be utilized to provide a sufficiently small voltage drop, so as to minimize the power lost, and to provide a clear output voltage for the receiving hardware component [42].
6.1.4 Converter Selection
Before choosing specific voltage regulators and converters, it is important to find certain specifications for such components. Knowing the amount of wattage required for each device we plan to power is crucial. Therefore, we must find the voltage required as well as the maximum current that is to be drawn from each component. For these parameters, the team included a power table for every element that will be powered in the previous section. In this section, however, more exact numbers will be analyzed, and a thorough discussion of specific reference designs will also be seen. Particularly, Texas Instruments large archive of reference designs were methodically investigated in order to find the perfect design for our project. Eventually, specific reference designs were selected in order to provide a framework for our idea. These designs fit the specifications of our current draw required, as well as each voltage rail's power required.
For our DC/DC converter, ultimately we knew that we needed an output power of 14.75 Watts and an output current of at least 2.95 Amps, as seen in section 6.1.1. The output voltage must be a 5 Volt rail and the input voltage for this converter must be 12 Volts, considering the fact that it will be connected directly from the output of the AC to DC converter. For this reason, we found that the reference design PMP7170. This design has a few different output voltages, so more specifically, the PMP7170.1 design on the Texas Instrument website fits these requirements sufficiently well. The PMP7170.1 reference design has an input voltage of 12 V, an output voltage of 5 V, an output current of 4.4 Amps, and an output power of 22 Watts. It is also important to consider the efficiency of the converter as well, to ensure that it has enough input power to supply its output requirements. The input power into the DC to DC converter is approximately 30 Watts. The output efficiency is given by the graph below found within the test reports of the product. It can be seen that it has an efficiency of about 93% with a current draw of around 3 Amps. The amount of power that the DC to DC converter will need from the AC to DC converter can be found by dividing the output power by the efficiency, which will yield about 24 Watts. It is also very important to grant the power supply a sufficient amount of “wiggle room” so that there is no risk of an inadequate amount of power. Given that the AC to DC converter will be supplying 30 Watts, the DC/DC converter will have a sufficient amount of power.
Figure 32: PMP7170.1 efficiency graph [43]
There are a few very important parameters to consider when choosing a specific AC/DC converter for a project. Firstly, the first voltage rail must be determined, which was said earlier to be 12 Volts. The total amount of power that was required to power the project was approximately 62.75 Watts, so we will need an AC/DC converter that will be able to supply, at the least, 65 Watts. The amount of output current that is needed only depends upon the current demands of the output rail of the AC/DC converter. The 12 Volt rail will be supplying power to the four solenoids, who will only have two solenoids active at a given time. Considering each of these solenoids have a max input current of 2 Amps, then at a maximum, about 4 Amps would be drawn for this voltage rail. Therefore, we need an isolated topology that has an output current of at least 4 Amps, an output voltage of 12 V, an input voltage compatibility of 120 VAC, and an output power of at least 62.75 Watts. Considering all of these parameters, the PMP10335 was chosen as the AC/DC converter that will be used for this project. It has an input voltage of 85-265 VAC, an output voltage of 12 Volts, a maximum output current draw of 6.5 Amps, and a maximum output power of 78 Watts. The table below shows the efficiency under certain power supply conditions. For our design, we will have an output power of about 63 Watts, so the efficiency for this converter will be between 84.28% and 84.51%, so 84.4% is a close approximation to the efficiency for this converter in the context of our project. Keeping in mind that the amount of output power that this converter will be supplying is 62.75 Watts, the amount of power that this converter will be drawing from the source is roughly 74.34 Watts of power with its 84.4% efficiency.
Figure 33: PMP10335 efficiency [44]
6.1.5 PCB Design Software
There are a few different methods of designing a PCB. Some of these software are more accessible and appropriate for our design. Some EDA softwares include very useful features that speed up the PCB design process considerably, as well as providing perspectives that would not be attainable through other software. It is crucial that the software chosen is capable of schematic and PCB layout simulation. The following list provides a brief look into a few different PCB design softwares and their properties, along with the reasoning as to why we chose the software implemented in the designing process.
KiCad: This software offers a free and very simplistic downloadable software. The program is capable of schematic, simulation, and board layout design. One of the attractive features that this software supplies is a three dimensional view of your PCB board. This allows the user to edit the board given the input of a different perspective. In addition to this, this software is able to create a bill of materials (BOM) along with a tabular view.
EAGLE: EAGLE stands for Easily Applicable Graphical Layout Editor. This program offers a variety of useful features. A very desirable feature that this software has is its auto-routing. Once a schematic has been assembled, the program attempts to automatically connect all of the traces together. This is not only a matter of convenience, but it also prevents incorrect connections that could potentially be accidentally made. This software is capable of schematic and simulation through Ngspice.
Altium: Altium comes with quite a few benefits. It’s latest 365 platform offers a cloud-based storage system, which means that no download or installation of the software is necessary, and access to whatever PCB project is being worked on can be on any computer that is desired, as long as it can reliably connect to the internet, of course. Altium is capable of schematic, simulation, and PCB editing. It is able to take in many different import file types, as well as export various file types. Altium, however, is not a free to use service, as there is a subscription required for their program, which is a yearly subscription.
EasyEDA: EDA stands for Electronic Design Automation. The main draw to this design software is that it does not require a heavy download and storage on your computer, which means that the PCB design process takes place on the website itself. With this web-based system, the PCB designer has the option to edit his or her design from any computer, as long as the computer accessing EasyEDA has an internet browser capable of handling the software. As the name implies, the interface and functionality of EasyEDA is relatively simple in comparison to some its PCB designer counterparts. With millions upon millions of libraries, the user will most likely never run into the issue of a missing symbol. If on the off chance that there is a symbol that is not present, then the software has an option to create a custom one.
All of the above PCB design softwares are able to achieve the goals for this project. Ultimately, EAGLE was chosen as the software that we plan to build our printed circuit board on. This was mainly due to the team’s familiarity with this particular software, given its implementation in the University of Central Florida’s mandatory class, Junior Design (EEL 3926). The program itself can be quite dense, requiring a very involved and methodical approach to the design process. From the software, particular footprints can be chosen to represent the components. EAGLE has a vast library of thousands of relevant footprints. This is especially important, because without the correct footprint, then the PCB would not have the proper connection type, size, or dimension that it may need. Certain components may prove to be an issue over others. In particular, some parts are very specific in their design, and finding the correct footprint may be difficult on some softwares. This is something to keep in mind when building a PCB. Components like resistors and capacitors are very easy to find, and present no issue when building a PCB. The hardware parts that present the most concern are IC’s, transformers, and other such components. For example, a SMPS (Switch Mode Power Supply) transformer is practically unavoidable for our project, considering that the role of our PCB is to be the power supply of the project. With this in mind, the team needed to carefully research the specific components of the reference designs chosen in order to ensure availability.
7 Prototype System Testing
For our prototyping we utilized the senior design lab available to us at UCF. As students in the class, we are allowed to use the lab whenever it is open. Even though we are in the first half of the class and mainly focused on completing this paper, we wanted to get ahead of the curve and start prototyping our components before we would only have a semester for everything. This meant that we had to order all our parts early on as we wanted to test things together as that would be how we can expect to see it on the final design. Once things started coming in we decided to move forward with the set up processes for all components to ensure that they were ready, tested and prepared to be put to use in conjunction with other parts.
7.1 RFID Reader Testing (3db)
Once we received our RFID reader we decided we wanted to put it to the test right away. We had a couple of options to test the reader. Firstly, we could have tested the reader by using the ThingMagic® MercuryAPI. This would require us to already have the Raspberry Pi setup for programming. The API only offers Java, C, and .NET programming environments; however, a Python wrapper was created by other users for ease of use and faster development. Though the Python wrapper would have made testing simpler compared to that of the other supported languages, testing would have taken more time than desired. The second option was to use the Universal Reader Assistant (URA) provided by the manufacturers of the M6e Nano. This only required a USB to Serial converter and the URA. The application created a graphical user interface to allow the user to easily manipulate the settings (such as power, reading behavior, and more) of the reader. The latter option allowed for the quickest testing possible. The RFID reader comes with an on-board antenna that gives us a certain amount of range that is advertised by the manufacturer on their datasheet. This range is stated to be 2 feet but reviews of the reader were quick to point out that this range wasn’t actually achievable and people were getting max ranges of 6-12 inches.
The first day that we put our antenna to the test, we did not know how to set it up with a power supply just yet. For this reason, the team decided to continue using USB power. Using this method, our antenna power was limited. The software the team used was able to operate from a potential max of 27 db to only a disappointing 3db. Once the testing was completed, the results showed that the reader and antenna worked. This was great to see and reassuring that everything was working as it should. Although this was considered to be a breakthrough, there was one aspect of the results that were quite disappointing: The ranges were less than favorable. Shown below is our initial prototyping setup with the values we obtained using a few of the RFID tags we purchased to test. This test was only using the 3db frequency as we had no method of connecting our antenna to any sort of power supply at this time.
Figure 34: RFID reader testing
7.2 RFID Reader Testing (27db)
After looking into the datasheet, the minimum current found to operate the reader at maximum power, which is 27dBm at 5V, was 640mA. For safety concerns, we operated the RFID reader at 25dBm and 5V with a supplied current of around 700mA. The datasheet specified that the current draw was 580mA, however, with our testing, we reached a current draw of about 630mA. We believe that the 580mA was the current draw needed to operate the reader at that power, not to operate and transmit/receive at the same time. Our USB power source for initially testing the RFID reader provided the 5V required by the reader, however, it only offered a max current supply of 500mA. If we risked operating above 5dBm, the reader could have suffered some possible damage. To ensure that our reader was working at higher powers, we had to find another way to power the reader. The first option was to provide an external power supply to two pins on the board. The second option was to provide power to the reader via an Arduino style board. Here, the RFID reader would act as a shield for the development board. We preferred the first option because it did not require us to order any additional components. Therefore, we used the power supply unit provided to students in the Senior Design lab. After configuring the power supply and attaching it to our reader, we were able to get a read range of about a foot and a half. The onboard antenna proved to be insufficient for our application, therefore, a new antenna had to be ordered and set up. Once the antenna came in, the reader had to be configured to use the external antenna instead of the onboard antenna. This was done by removing soldering from one joint and adding solder to another. Operating at 27dBm, the same power before, the read range increased about 3ft. Another distinguishable factor was that the tags no longer had to be placed within line of sight of the antenna. The new antenna offers a much higher beamwidth. Therefore, the tags can be placed off to the side of the antenna (by a couple of feet) and still be easily read. As seen in the images of our testing below, we really were able to move around the tags and still pick up a signal. We started slowly just moving it away from the antenna and quickly noticed that we were getting quite far and yet the tags were still being picked up. The most interesting part was that as we moved it in other lateral directions around the antenna, we saw that it still was picking up the tags and even at some greater ranges. Next we went ahead and put it behind objects and it still was picking it up. Once we saw this we wanted to see if we could combine the previous two realizations that we made and put it under the table right under the antenna and even thought at this point it was not at all to our surprise, the reader was still doing a magnificent job at picking up the tags even as we moved them away.
Figure 35: Onboard vs external antenna
Below is a table that compares the information found from both the onboard and external antenna:
Antenna | Input Power | Distance from antenna (average) | Received Signal Strength Indicator (RSSI) (average) |
Onboard | 3dBm | < 1in | -38dBm |
Onboard | 27dBm | 0.406m | -60dBm |
External | 3dBm | 6in | -50dBm |
External | 27dBm | 1.37m | -60dBm |
Table 23: Onboard vs External Antenna
7.3 Door Testing
One issue that we foresaw with the making of our door, was that after one animal gets permission to pass through the door, there is a brief window that another animal may dart through the door while it is still unlocked. If the latter happens, this will defeat the purpose of making a unique profile for every animal registered on the system because not every animal will be able to enter or exit under the same circumstances. This problem is created if the doggy door flap is not able to lock into place soon after an animal passes through the door. Therefore, the transient state of the doggy door must be minimized as much as possible without making the door fall too slowly. Our initial thought was to apply some sort of strip to the edge of the door flap that will reduce its speed as it falls back to its original position.
Though this may work, it will not be a sufficient solution on its own. Alternatively, a rotary damper, which reduces the angular velocity of an object, could also be used. Once the velocity of the door is reduced enough, we need some way to detect if the door is within locking distance. This can be done with a reed switch. This component can detect a magnetic field and produce some output. By placing a magnet on the bottom edge of the door flap, and the reed switch on the door frame just below the normally closed position, we can detect when the door is returning to its closed state. As the reed switch detects the magnetic field, our goal is to use locks to catch the door, as it is falling, and lock it into place. As seen in the prototype in the pictures below, the red LEDs represent the locks of the door. When they are off, the locks would be retracted. When the LEDs are on, the locks would be activated. Because the door was falling too fast, the “locks” (or red LEDs) were not activated until the door passed its closed position. This issue can be resolved by using the mentioned stripping, rotary dampers, or some combination thereof.
Figure 36: Reed switch prototype on and off state
7.4 Initial Raspberry Pi Testing
As great and convenient a Raspberry Pi is, getting everything set up for our specific usage in our specific setting was not without its obstacles. Pis are very capable and intelligent system controllers that not only utilize most of the great features found on modern MCUs but also function with a complete operating system that takes full advantage of the Pi’s hardware. This operating system needs to be stored somewhere, and like any desktop computer some sort of storage device is required to hold the operating system. In the case of our tiny desktop we will be using a micro SD card of 32 GB to store our operating system along with anything else that may be required of our project.
7.4.1 SD card setup
Setting up this SD card with the correct operating system for the Pi is rather simple and straightforward following the helpful guides provided by the Raspberry Pi company themselves. Keep in mind however, that our use for this Pi will be strictly in it’s headless mode. Besides the initial setup that will also be done in a somewhat headless form for every user, the device is intended to be embedded into the door system and left alone. No external connections of mouse, keyboard, or monitor are meant to be made and realistically shouldn’t be to keep everything working as we intended. We want to give the users peace of mind that they can purchase this product, follow our guided initial setup, and then never have to worry about the Pi again.
The first tricky situation we ran into had to do with our connection to the internet. When formatting the SD card and loading it up with the operating system, we are required to enter our Wi-Fi network that we would want the Pi to connect to. It isn’t necessarily required for every case, but since we will be running headless, we will need the Pi to connect to the internet for us to be able to access it and work on it. Normally you would be able to simply install the operating system on an SD card and if you don’t add the Wi-Fi network right away you can just add it once you boot up your Pi and use your connected mouse, keyboard, and display to navigate the interface. To emulate the somewhat headless setup our users will have to do, we wanted to keep every step of the process headless.
7.4.2 SSH setup
Above we mentioned that in order for us to be able to access and work on the Pi, we will need to have it connected to the internet. This is because the way we are going to set it up remotely is by remoting into it. In order to do so we will be using a free SSH and Telnet Windows platform called PuTTY. This client allows us to run remote sessions on a computer over a network. When setting up the Pi, we were given the option to turn on SSH which we did, allowing us to use this. Through PuTTY we are able to use any of our own Windows devices to remote into whatever the Raspberry Pi is displaying as long as it is powered on and it is on the same network as the Windows device we are running PuTTY off of.
The PuTTY interface provides us a complex looking screen that is actually not too difficult to follow for our use of it. All we have to do is make sure our connection type is set to SSH, which it is set to by default, and enter the Pi's IP address which we can try to obtain some different ways. The first main issue with the Wi-Fi was mainly an issue with the plan we had in place. We wanted to connect to the UCF Wi-Fi so we wouldn’t rely on a specific person’s device for connecting and essentially working on the Pi. However UCF uses a very unique Network configuration and we ran into a wall trying to connect to it. The system they use to connect consists of entering a username and password while the Pi can only connect to networks that their security authentication only requires a password. Furthermore, finding the IP address of the Pi on a network that is used by thousands of people at once was sure to be an issue in and of itself.
7.4.3 Hotspot setup
This leads us to have to resort to alternative options. Thankfully, it didn’t take us long to think of the possibility of having the Pi connect to a hotspot. By connecting to a hotspot the Pi would essentially be on its own network along with the device programming it. The Pi would also be able to connect to any of our hotspots as when the situation arose that one of us did not have that feature on our phone through our mobile carrier, we found out that our laptop was just as capable of sharing the network it was connected to with other devices. Best of all, on this network with only the Pi and the device, finding the IP address of the Pi was as easy as it could be and lead to seamless connection.
When a correct address is entered the first thing we are greeted with is a security message from PuTTY asking us to make sure that we want to connect to the IP that was entered. After authorizing our connection we are brought into our command line terminal where the first line presented to us is asking us for our login username and once that is entered, the password. After a successful login using the credentials we assigned to the Pi during its operating system set up, we are now finally at the desktop level accessing everything on the Pi through the command line. This system runs Ubuntu, a version of Linux, which means through the command line we could do basically anything we want, especially programming wise.
7.4.4 VNC viewer setup
However, we still might want to see the GUI of our desktop in this Pi for many different reasons. Again through the amazing free software that you can download off of the internet, this remote access that basically displays what we would see if we plugged the Pi into an HDMI is possible. For this process we use an application called VNC Viewer. One of the first things we have to do to get this to work is use our setup with PuTTY to access the Pi’s config and set the VNC server to enabled. After this once we open VNC Viewer we are presented with an application that almost mimics a web browser. On first launch we will see an address bar with nothing in the window below it. After connecting to a session, all our previous sessions will begin to appear in that said window. After putting our Pi’s IP address into the address bar we are presented with a pop up window that asks us for the login credentials. After entering it we will finally be getting the full Raspberry Pi viewing experience remotely. This will fully function with our keyboard and mouse to navigate around the desktop, use the file explorers and other applications, and even utilize the command line from it’s desktop application if we wish to.
After setting up the Pi for our programming needs we decided to get to some early testing to get a feel for what we can expect. As is tradition in the programming world, we decided to write a very quick python version of “Hello World”. We came to find that the best way for us to write programs as of right now is through the command line. Using a command titled ‘Nano’ we are able to create and open any sort of file for editing through the command line. We realized that through the VNC Viewer there can be a slight lag when utilizing the command line terminal, so we decided for most of the time we will be working on the Pi; we will likely only be accessing it through PuTTY. Our first command was word for word “nano hello.py”. This command created and opened a file for us to edit line by line. The “.py” extension indicates to the operating system that the file is a Python file. With Python being as user friendly and simple to grasp as it is, this hello world program was simply one line in the editor where we would print “hello world”. After writing it up, we saved it in nano and exited the editor that is built into the command line. Once it brought us back to the command line, we simply entered “python hello.py”. This command line indicates the operating system that we would like to run a python script of the version of Python that we are using on the system. Without any issues our script ran and printed out “Hello World”.
7.4.5 LED setup
Now that we understood where we were going to be writing these programs, how we could create them and edit them without even opening a separate window, and how they were going to run through the command line, it was time for us to step up the difficulty a bit and lean more towards understanding certain aspects of the Pi that we are going to be utilizing heavily, Leading us to decide that our next task was to light up an LED through one of the Pi’s GPIO pins. First we did some research as we wanted to make sure that we didn’t mess up any component. Using a multimeter in the lab in diode mode we were able to turn on the LED with 2.3V. Looking into datasheets for our Pi we found out that the GPIO output pins supply 3.3V. We built the circuit, and using previous knowledge gained from classes and a few burned out LEDs in some of our pasts, we made sure to add a resistor to control the current flowing through the LED.
After setting all of this up it was time to get to the software side of things. This time around we created a folder for all the python projects we are probably going to create on the desktop called “Projects”. Within this newly created folder we would create the python file that would run our LED script simply titled “LED.py”. As simple and vast as base Python is, it still needs some additional libraries for certain things and as you would expect, importing them is no harder than you would think. There are two libraries that we will have to access for this small task of ours since we not only want to turn on the LED, but also turn it off after a certain amount of time. To do this we will need to add the libraries ‘gpiozero’ and ‘time’. But more specifically, we want to import ‘LED’ and ‘sleep’ from each of these respectively. The sleep functionality from ‘time’ will allow us to essentially put our program to sleep for a specific number of seconds. This will be used to put our program to sleep between turning the LED on and off. LED from ‘gpiozero’ allows us to create a variable that will hold onto a certain PIN number based on the GPIO pins on the board and treat it as an LED. Meaning that with the variable we assign to this pin we can turn the LED on and off with simple built in functions.
While originally seeming like a somewhat daunting task that might take us a bit of research and time to figure out, the mix of research with safe testing led us to quick understanding of certain concepts and how our board works with the programming. Using one wire to connect the GPIO 17 pin to the positive leg of our LED on the breadboard, and another wire to connect the back half of the resistor to the ground on our Pi, we complete the circuit that will power on our LED. Now it was simply instructing the Pi to run the script that we gave it and without any issues it immediately was able to power on the LED. Initially we forgot an additional sleep at the end of our while loop and were very confused as to why our LED was not blinking or turning off at all but after better analyzing our code we saw our simple mistake and were able to correct it.
7.4.6 Motion sensor setup
Our next task while working with our Raspberry Pi would entail trying to set up our motion sensor. As expected, our PIR sensor has three pins that need to be connected to our system controller. Our sensor has three pin headers that stick out the bottom of the board but when looking at their roots at the bottom of the board we see no label. However, if we pop the plastic casing of the sensor off the top we will be able to see the labels for it. The three labels are for VCC, GND, and OUT. The VCC will connect to a 5V pin on the Pi, the GND to ground, and the OUT to any GPIO pin. All of the mentioned can be seen in the images below.
Figure 37: Passive Infrared Sensor
Now to set up the correct program for our sensor, we have to have a little refresher on how exactly these devices work. These passive infrared motion sensors have a fresnel lens and an infrared detector along with the supporting circuitry. The lens focuses any infrared radiation present around it towards the infrared detector. Any heat that is detected by the sensor alerts the circuitry to output a 5V signal for a period of time as soon as the heat is detected. The way the sensor knows it’s motion and not just an idle heat signature is by detecting changes in heat around it. Something that our testing would be sure to show us, that we were quite unaware of, is that this sensor is highly sensitive.
Keeping in mind that the sensor will give us a 5V signal directly to the Pi is important to note as that will be what we will be looking for with our software. This means that we will be using the GPIO pin that the sensor is connected to as a GPIO.IN connection type. From here on out our code can simply be an infinite loop that either detects if we are getting a ‘1’ or ‘0’ from our GPIO.IN pin. The reason it is not ‘5’ and instead it is ‘1’ is because the software and the libraries know to detect a HIGH signal that is 5V as a 1 and any LOW signal that can be 0V as a 0.
The last thing to address before getting into the initial findings of our testing is a certain aspect of certain PIR sensors, including the one that we are using for our project. Our sensor has two orange components with sockets that fit a Phillips head screwdriver. These orange components are potentiometers that we will be using to adjust certain attributes of our sensor. The potentiometers allow us to adjust both the delay and the sensitivity of our sensor by rotating the sockets with any sort of Philips head screwdriver. These would prove to be essential to understanding our initial testing as we were a bit confused when we were first testing.
When we finally set up our sensor with our Pi and programmed everything, we initially weren’t even aware that the switch between a HIGH signal and a LOW signal weren’t instant. We were expecting to see our looping text automatically change to the motion detected text when we moved our hand over the sensor and then immediately back after we moved it back. However, only half of this assumption was true, we saw the immediate change to motion detected happen, but this was printed quite a few times after we had already moved our hand away. This is because of the fact that the delay will cause the high signal to stay for an extended period of time.
There was another issue that was prevalent. The next thing that we noticed was that the sensor occasionally gave undesired readings. Sometimes, without the presence of any moving objects, the sensors continued to detect some type of motion. Discovering the root cause of this issue proved to be quite a challenge. Due to the fact that there is no clear way of knowing what exactly the sensor could be detecting, this was a lot trickier to figure out and debug. Another possibility is user error; we could have potentially hooked something up incorrectly. After running into both of these issues repeatedly, the troubleshooting process led us to the potentiometers. We began by tweaking these components in an attempt to try and change the delay and sensitivity. Thankfully, the delay was not too difficult to figure out. At the end of this, we found that we were able to resolve our problem through surprisingly easy means, which consisted of messing with that socket.
In terms of the sensitivity, unfortunately it wasn’t as easy. Even though we were able to move the socket and technically change it just as easily as the delay, the problem always came back to the fact that we could never really know what was causing the motion being detected and whether it was a problem with the code, with the sensor, with the sensitivity setup, with objects in the testing area, etc.
8 Administrative Content
This IoT Smart Lock Doggy Door is a large project that branches out to many fields of both Computer and Electrical Engineering. Each member had strengths and weaknesses, so by dividing every part of the project to have two individuals not only ensured the completion of a part, but having two sets of eyes tackle one problem at a time reduced issues encountered. When working on such a large project and for extended periods of time, it is crucial to maintain goals as well as effective communication. From the beginning, a Discord server was created to allow for constant communication between all members. This server also served as a meeting location if we were not able to meet in person. Google Docs and Google Sheets also proved to be very useful to keep every individual accountable. These applications also allowed all the group members to work in parallel which helped reduce the time spent on certain areas immensely.
Tackling this project all at once would have proved to be daunting and overwhelming. Therefore, a new approach had to be devised. Project milestones were formed to ensure that we could gauge our progress throughout the semester and meet project deadlines. Our milestones were also carefully planned to allow us to finish early rather than right at the deadline. This is very important because personal matters cannot always be predicted. Having that extra buffer secured our completion of the paper by the actual deadline for the course. Also, while every milestone could have been broken down even further, we decided to keep all similar milestones under one title. Having too few or too many milestones can add unnecessary stress. By creating realistic goals and deadlines, we were able to move at a consistent pace.
Budgeting for this project was another large factor to determine. Maintaining an affordable project while managing bills was paramount to all of us. We prioritized making our project feature rich and easy to use. Therefore, to meet the two previous criteria while maintaining a low cost, careful planning had to be done. Parts were researched extensively to increase the ratio of functionality to cost. This ratio could be increased by either finding a part with a lot of features or a part with a really low price tag. This project was also largely software oriented which allowed us to expand our features even further without raising the price with additional hardware components.
8.1 Project Milestones
Our milestones were carefully planned to ensure project completion ahead of time while being conscious of events that could not be accounted for. To reduce the stress load among each of the members, weekly deadlines were set to maintain a constant pace while completing the paper and starting to prototype. The milestones that took the longest to complete were researching and ordering components. Every part researched had to be taken into consideration while discussing the pros and cons to each part. Once a list was compiled, the team looked over these factors and considered what would be best for the project. After research, not every part could be purchased from the same vendor. While some orders only took a couple of days to come in, other parts took up to a couple of weeks. One of our most difficult milestones to accomplish was to establish a two way communication between the door, database, and smartphone application. Another difficult milestone to accomplish was optimizing the door as much as possible. There were many intricacies and small parts that went into the design of the door, and many of our initial design ideas involved pulley systems, which required knowledge of Mechanical Engineering. None of the members on the team had experience with this particular subset of Engineering, causing the door designing process to be that much more difficult.
Number | Milestone | Week |
1 | Finalize project idea | 1 |
2 | Finalizing Hardware Components | 5 |
3 | Order Components | 6 |
4 | Configure System Controller | 10 |
5 | Prototype with Breadboard | 15 |
6 | Plan Design of PCB | 16 |
7 | Order PCB | 17 |
8 | Setup Database | 16 |
9 | System Controller Communicates with Database (API) | 19 |
10 | Door Constructed | 19 |
11 | Combine Hardware with Door | 22 |
12 | Build Android Application | 23 |
13 | Revisions | 26 |
14 | Final Tests | 29 |
Table 24: Senior Design 1 and 2 Project Milestones
8.2 Project Budget
While the budget came out to be on the higher end, the project was rich with features and satiated our desire for a truly “smart” Doggy Door. Splitting the cost over two semesters and four group members made the return on investment that much better. This fact alone made the design process transition smoothly to its implementation. The even distribution of finances helped facilitate a project budget, aiding the team in the planning process. Our most expensive items turned out to be the RFID reader integrated module, as well as the external antenna. However, this could not be bypassed while still maintaining long read ranges. Luckily, the cost of the rest of the materials were much more affordable. The prices of all the components can be found in the table below, showing the item, the quantity, and the price:
Item | Quantity | Price |
RFID reader | 1 | $235 |
RFID external antenna | 1 | $119 |
Raspberry Pi Zero W | 1 | $10 |
microSD Card | 1 | $8 |
UHF Tags | 3 | $2 |
Camera | 1 | $14 |
Buzzer | 1-2 | $1.50 |
Motion Sensor | 1 | $8 |
Solenoids | 4 | $30 |
Power Source | 1 | $10 - $15 |
PCB | 1 | $20 - $30 |
Antenna Connectors | 3 | $12 |
Door Materials | - | $70 |
3D Printer Filament | 1 | $20 |
External Battery | 1 | $20 - 40 |
TOTAL | N/A | ~$579 - $614 |
Table 25: Project Budget
9 Appendix
9.1 References
[1] “ATTSHOP.TW - 2021.” [Online]. Available: https://attshop.tw/. [Accessed:
01-Sep-2021].
[2] JADAK, "THINGMAGIC NANO USER GUIDE," TM_Nano-UG User Guide,
March 2015 [Revised Sept. 2018].
[3] High Tech Pet, “Model PX-2 large standard power pet ® door for all pets up to 100 lbs.,” POWER PET DOORS ON SALE HERE! Dog Doors Cat Doors, Pet Operated. [Online]. Available: https://www.hitecpet.com/autpetdoorfo.html?gclid=Cj0KCQjwssyJBhDXARIsAK98ITQyTr6VMpap9811HmQP74EE8lqQq6KhiiB9dzshMY9gtx_o6rlHtA0aAlVVEALw_wcB. [Accessed: 02-Dec-2021].
[4] Chewy, “PETSAFE electronic SmartDoor, large,” Chewy.com, 2017. [Online]. Available: https://www.chewy.com/petsafe-electronic-smartdoor/dp/52031?utm_id=401602544&msclkid=a237f922ba0d1448072998610d2f84af&utm_source=bing&utm_medium=cpc&utm_campaign=Shopping_NC_Dog_HG_Technology&utm_term=4585307092268925&utm_content=Monitoring+%26+Containment-Dog+Doors. [Accessed: 02-Dec-2021].
[5] MyQ, “MyQ Pet Portal,” myQ Pet Portal. [Online]. Available: https://www.myqpetportal.com/. [Accessed: 02-Dec-2021].
[6] M. Tech, “World's Coolest Dogdoor Engr version - youtube,” youtube.com, 09-Aug-2018. [Online]. Available: https://www.youtube.com/watch?v=D7Ph32a0L9c. [Accessed: 02-Dec-2021].
[7] SureFlap, “SUREFLAP microchip cat door, Brown,” Chewy.com, 2017. [Online]. Available: https://www.chewy.com/sureflap-microchip-cat-door/dp/157115. [Accessed: 02-Dec-2021].
[8] Wikipedia, “Radio-frequency identification,” Wikipedia, 22-Nov-2021. [Online]. Available: https://en.wikipedia.org/wiki/Radio-frequency_identification. [Accessed: 02-Dec-2021].
[9] S. Armstrong, “Circular polarization vs. linear polarization: Which is the right RFID antenna?,” atlasRFIDstore, 03-Apr-2013. [Online]. Available: https://www.atlasrfidstore.com/rfid-insider/circular-polarization-vs-linear-polarization. [Accessed: 02-Dec-2021].
[10] “Home,” RFID Tracking Systems: Atlas RFID Store. [Online]. Available: https://www.atlasrfidstore.com/9-tactics-for-choosing-an-rfid-antenna/#widenarrow. [Accessed: 02-Dec-2021].
[11] Kevin Bonsor & Wesley Fenlon, “How RFID works,” HowStuffWorks, 05-Nov-2007. [Online]. Available: https://electronics.howstuffworks.com/gadgets/high-tech-gadgets/rfid.htm#pt1. [Accessed: 02-Dec-2021].
[12] “How to select a correct tag – frequency,” RFID4U. [Online]. Available: https://rfid4u.com/rfid-frequency/. [Accessed: 02-Dec-2021].
[13] “2.4 GHz vs. 5 ghz WIFI,” CenturyLink. [Online]. Available:
https://www.centurylink.com/home/help/internet/wireless/which-frequency-should-you-use.html. [Accessed: 07-Dec-2021].
[14] A. Kandhare, “Bluetooth vs. Bluetooth Low Energy: What's the
difference?,” Medium, 18-Jun-2019. [Online]. Available:
https://medium.com/@akash.kandhare/bluetooth-vs-bluetooth-low-energy-whats-the-difference-74687afcedb1. [Accessed: 15-Oct-2021].
[15] C. Skallak, “Bluetooth Security Features,” Bluetooth Security Features -
Embedded Lab Vienna for IoT & Security, 04-Feb-2020. [Online].
Available: https://wiki.elvis.science/index.php?title=Bluetooth_Security_Features. [Accessed: 20-Oct-2021].
[16] Bluetooth SIG Overview – Bluetooth Technology See how the global
standard for simple, “Bluetooth technology overview,” Bluetooth® Technology Website. [Online]. Available: https://www.bluetooth.com/learn-about-bluetooth/tech-overview/. [Accessed: 17-Oct-2021].
[17] “How an ultrasonic sensor works,” Sensor Partners, 13-Apr-2021. [Online]. Available: https://www.sensorpartners.com/en/knowledge-base/everything-about-the-operation-principles-of-ultrasonic-sensors/. [Accessed: 02-Dec-2021].
[18] “System properties comparison Couchbase vs. Firebase Realtime Database vs. mongodb,” Couchbase vs. Firebase Realtime Database vs. MongoDB Comparison. [Online]. Available: https://db-engines.com/en/system/Couchbase%3BFirebase+Realtime+Database%3BMongoDB. [Accessed: 07-Dec-2021].
[19] Bansbach Easylift of North America, Inc. “FRT/FRN-D3.” Rotary Dampers | FRT/FRN-D3, https://www.damper.net/products/rotary-dampers/frt-frn-d3.php.
[20] “Prime-Line Safety Spring Door Closer, 4-1/4 in., Diecast Construction, White, Non-Handed-KC10HD.” The Home Depot, https://www.homedepot.com/p/Prime-Line-Safety-Spring-Door-Closer-4-1-4-in-Diecast-Construction-White-Non-Handed-KC10HD/100565035.
[21] Industries, Adafruit. “Medium Push-Pull Solenoid - 5V or 6V.” Adafruit Industries Blog RSS, https://www.adafruit.com/product/3992.
[22] L. Pounder, “Raspberry Pi vs arduino: Which board is best?,” Tom's
Hardware, 10-Jul-2020. [Online]. Available: https://www.tomshardware.com/features/raspberry-pi-vs-arduino. [Accessed: 07-Dec-2021].
[23] “RaspberryPI models comparison: Comparison tables,” SocialCompare.
[Online]. Available: https://socialcompare.com/en/comparison/raspberrypi-models-comparison. [Accessed: 07-Dec-2021].
[24] A. Kalnoskas, “How do RFID tags and reader antennas work?,” Analog IC
Tips, 25-Apr-2017. [Online]. Available: https://www.analogictips.com/rfid-tag-and-reader-antennas/. [Accessed: 23-Nov-2021].
[25] starnfc, “Pros and cons of RFID tags,” STARNFC, 17-Apr-2015. [Online].
Available: https://www.starnfc.com/what-are-rfid-tags-used-for-and-how-they-work/. [Accessed: 20-Nov-2021].
[26] Times-7, “CIRCULAR POLARIZED UHF ANTENNA – A5020,” Datasheet, 2019
[27] ikikVC, “Raspberry pi camera: Comparison of high quality camera with
camera module V2,” Latest Open Tech From Seeed, 29-May-2020. [Online]. Available: https://www.seeedstudio.com/blog/2020/05/14/raspberry-pi-camera-comparison-of-high-quality-camera-with-camera-module-v2/. [Accessed: 07-Dec-2021].
[28] Adafruit Industries, “5v electromagnet - 2.5 kg holding force,” Adafruit
Industries blog RSS. [Online]. Available:
https://www.adafruit.com/product/3872. [Accessed: 05-Nov-2021].
[29] “Drill Bit Sizes for Drilling Screw Pilot Holes.” Quikdrawers, https://quikdrawers.com/drill-bit-sizes-for-drilling-screw-pilot-holes.
[30] Giang, Ken. “Pla vs. ABS: What's the Difference?” Hubs, https://www.hubs.com/knowledge-base/pla-vs-abs-whats-difference/.
[31] “Everything You Need To Know About Polycarbonate Sheet.” Piedmont Plastics, 30 Oct. 2017, https://www.piedmontplastics.com/blog/everything-you-need-to-know-about-polycarbonate-sheets.
[32] “The Fabric Exchange the FBARIC Exchangeℳ Amerbelle American 500 Denir Water Repel Canvas Onyx Black 58 Inch Wide Fabric by the Yard.” Walmart.com, https://www.walmart.com/ip/The-Fabric-Exchange-The-Fbaric-Exchange-Amerbelle-American-500-Denir-Water-Repel-Canvas-Onyx-Black-58-Inch-Wide-Fabric-by-The-Yard/527553076?wmlspartner=wlpa&selectedSellerId=101080947.
[33] “Premium Wood Sealer Water Repellent.” Rainguard Water Sealers, 27 Nov. 2021, https://rainguard.com/shop/premium-grade-wood-sealer-water-repellent-protection-wood-surfaces/.
[34] Stephen Daily December 6, et al. “How to Install a Dog Door in a Wall.” PetDoors.com, 6 Dec. 2018, https://www.petdoors.com/blogs/dog/how-to-install-a-dog-door-in-a-wall.
[35] Fuh, Grace. “What Pet Door Size Should You Buy Based on Your Dog's Breed.” Endura Flap®, Endura Flap®, 21 Mar. 2018, https://enduraflap.com/blogs/pet-doors/choosing-the-right-size-pet-door.
[36] B. Mitchell, “802.11 wifi standards explained,” Lifewire, 16-Nov-2021. [Online]. Available: https://www.lifewire.com/wireless-standards-802-11a-802-11b-g-n-and-802-11ac-816553. [Accessed: 07-Dec-2021].
[37] “RFID Basics - EPC Gen2 memory,” RFID4U. [Online]. Available:
https://rfid4u.com/rfid-epc-gen2-memory/. [Accessed: 17-Nov-2021].
[39] elprocus, “Flyback converter : Design, working, Calculations & Its Applications,” ElProCus, 30-Jan-2021. [Online]. Available: https://www.elprocus.com/what-is-a-flyback-converter-design-its-working/. [Accessed: 04-Dec-2021].
[40] Dr. K, youtube, 08-May-2020. [Online]. Available: https://www.youtube.com/watch?v=kpOOv00Y6aU&t=550s. [Accessed: 15-Nov-2021].
[41] Foolish Engineer, “Power Factor Correction | Active Power Factor Correction | PFC Control | Boost PFC,” YouTube, 17-Aug-2020. [Online]. Available: https://www.youtube.com/watch?v=KVZVGHwp7B0&t=126s. [Accessed: 15-Nov-2021].
[42] Predictable Designs, “How to pick the right voltage regulator(s) for your design,” PREDICTABLE DESIGNS, 13-Jan-2021. [Online]. Available: https://predictabledesigns.com/how-to-pick-the-right-voltage-regulators-for-your-design/. [Accessed: 04-Dec-2021].
[43] Texas Instruments, “PMP7170.1,” PMP7170_RevB Test Results, June 15, 2012
[44] Texas Instruments, “PMP10335,” PMP10335 Rev B Test Results, September 29, 2004
9.2 Permissions
Figure 1: Doggy Door
Figure 8: Anatomy of and RFID Tag
Figure 10: Different Tag Form Factors
Figure 15: Electromagnet
Figure 26: EPC Gen2 Memory
Figure 4: Rotary Dampers
Figure 13: Push Pull Solenoid
II