Open Collections

UBC Undergraduate Research

CAPSTONE Group 062 Bird Impact Detection System Design Document Chen, Susanna; He, David; Morton, Kieran; Xiong, Emily; Vicentijevic, Stevan 2019-05-16

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Notice for Google Chrome users:
If you are having trouble viewing or searching the PDF with Google Chrome, please download it here instead.

Item Metadata

Download

Media
18861-Chen_S_et_al_EECE_4XX_Bird_impact_detection_Capstone_final_report.pdf [ 17.58MB ]
18861-Chen_S_et_al_EECE_4XX_Bird_impact_detection_Capstone_list_deliverables_key.pdf [ 3.12MB ]
18861-Chen_S_et_al_EECE_4XX_Bird_impact_detection_Capstone_requirements.pdf [ 583.63kB ]
18861-Chen_S_et_al_EECE_4XX_Bird_impact_detection_Capstone_validation.pdf [ 4.79MB ]
Metadata
JSON: 18861-1.0387026.json
JSON-LD: 18861-1.0387026-ld.json
RDF/XML (Pretty): 18861-1.0387026-rdf.xml
RDF/JSON: 18861-1.0387026-rdf.json
Turtle: 18861-1.0387026-turtle.txt
N-Triples: 18861-1.0387026-rdf-ntriples.txt
Original Record: 18861-1.0387026-source.json
Full Text
18861-1.0387026-fulltext.txt
Citation
18861-1.0387026.ris

Full Text

UBC Social Ecological Economic Development Studies (SEEDS) Sustainability Program Student Research Report        CAPSTONE Group 062 Bird Impact Detection System Design Document Susanna Chen, David He, Kieran Morton, Emily Xiong, Stevan Vicentijevic University of British Columbia EECE 4XX Themes: Biodiversity, Buildings May 16, 2019         Disclaimer: “UBC SEEDS Sustainability Program provides students with the opportunity to share the findings of their studies, as well as their opinions, conclusions and recommendations with the UBC community. The reader should bear in mind that this is a student research project/report and is not an official document of UBC. Furthermore, readers should bear in mind that these reports may not reflect the current status of activities at UBC. We urge you to contact the research persons mentioned in a report or the SEEDS Sustainability Program representative about the current status of the subject matter of a project/report”. May 16, 2019Executive SummaryThe Bird Impact Monitor is a project inspired by SEEDS andtheir initiative on creating bird-friendly technology. UBC hap-pens to be on the migrating path for many bird species andbirds have important roles in the ecosystem. Previously stud-ies commissioned by SEEDs estimated that over 10,000 die dueto window collision on campus. The purpose of this project isto collect real-time bird impact data to help SEEDs implementa bird-friendly building guideline and for researchers to betterunderstand birds’ behavior.Our goal is be replace the manual data collection done by SEEDSin previous years with an automated system that is able to detectbird impacts more accurately and with minimal maintenance.More detailed outlines can be found the the Requirements doc-ument.The device is made of two sections: the detection system andthe communication system. The detection system consists of anaccelerometer connected to an Arduino Uno Wifi Rev 2. Theaccelerometer will be installed on the windows and transmitsanalog data to the Arduino for analysis and identification. OnceCapstone Group 062 Design 2May 16, 2019an impact is identified, the Arduino will send data to MyDevicesCayenne over Wifi. The client will be able to access and visual-ize the data using Cayenne.The prototype we have developed is able to satisfy all of SEEDsrequirements, in particular, it accurately detects bird impactwith a 95% accuracy while rejecting environmental disturbances,it costs less than $80 per unit, and obstructs less than 10% ofthe window. Further recommendations to the project are out-lined in the design documents and will serve as guidelines forfuture projects for improvements and scalability.Capstone Group 062 Design 3CONTENTS May 16, 2019Contents1 System Architecture 171.1 System Operation . . . . . . . . . . . . . . . . . . 192 Simulation of Bird Impact 212.1 Mock Bird . . . . . . . . . . . . . . . . . . . . . . 222.2 Pendulum Setup . . . . . . . . . . . . . . . . . . 252.3 Ideal Environment Simulation . . . . . . . . . . . 252.3.1 Sampling rate . . . . . . . . . . . . . . . . 262.3.2 Results Summary . . . . . . . . . . . . . . 272.4 Non-Ideal Environment Simulation . . . . . . . . 282.4.1 Results Summary . . . . . . . . . . . . . . 293 Detection System 293.1 Impact Sensor . . . . . . . . . . . . . . . . . . . . 303.1.1 Accelerometer . . . . . . . . . . . . . . . . 303.1.2 Anti-aliasing Filter . . . . . . . . . . . . . 323.1.3 Other Sensors Evaluated . . . . . . . . . . 343.2 Detection Algorithm . . . . . . . . . . . . . . . . 353.2.1 State Machine System . . . . . . . . . . . 363.2.2 Initialization State . . . . . . . . . . . . . 363.2.3 Voltage Reading State . . . . . . . . . . . 393.2.4 Identification State . . . . . . . . . . . . . 41Capstone Group 062 Design 4CONTENTS May 16, 20193.2.5 Data uploading . . . . . . . . . . . . . . . 423.3 Microcontroller . . . . . . . . . . . . . . . . . . . 433.3.1 Microcontroller Design Considerations . . 433.3.2 Minimum Specification Description . . . . 453.4 Recommendations for Future Components . . . . 464 Communication System 474.1 Communication System Design Considerations . . 474.2 Minimum Wireless Specifications Description . . . 484.3 UBC Visitor WiFi Description . . . . . . . . . . . 494.4 Accessing the UBC Visitor Network . . . . . . . . 494.5 Other Data Communication Designs Evaluated . 505 Data Storage 515.1 Data Storage Design Considerations . . . . . . . . 515.2 Minimum Specification Description . . . . . . . . 525.3 Cayenne Database . . . . . . . . . . . . . . . . . 535.4 Other Data Storage Designs Evaluated . . . . . . 546 Power Source 556.1 Minimum Specification Description . . . . . . . . 566.2 Other Power Options Evaluated . . . . . . . . . . 577 System Setup 587.1 Sensor Connections . . . . . . . . . . . . . . . . . 59Capstone Group 062 Design 5CONTENTS May 16, 20197.2 Detection System Window Installation . . . . . . 607.2.1 Microcontroller Window Installation . . . 617.2.2 Sensors Window Installation . . . . . . . . 637.2.3 Power Source Installation . . . . . . . . . 647.3 MyDevices Cayenne Database Connection . . . . 648 User Interface 658.1 Minimum Specification Description . . . . . . . . 66References 73Appendix A: Client Sample Collected Data 74Appendix B: Bird Impact Calculations 75Appendix C: Simulation Pendulum Setup 80Pendulum Setup Procedure . . . . . . . . . . . . . . . 81Pendulum Setup Calculations . . . . . . . . . . . . . . 83Appendix D: Ideal Environment Test 86Varying Sensor Placement Test . . . . . . . . . . . . . 86Varying Impact Location Test . . . . . . . . . . . . . . 92Appendix E: Non-Ideal Environment Test 98Human Noise Disturbance . . . . . . . . . . . . . . . . 98Rain . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104Capstone Group 062 Design 6CONTENTS May 16, 2019Appendix F: Impact Data Processing 111Appendix G: Unimplemented Detection System Com-ponents 115Digital Filter . . . . . . . . . . . . . . . . . . . . 115Microphone Sensor . . . . . . . . . . . . . . . . . 119WiFi Disconnection Handler . . . . . . . . . . . . 120Damping Ratio Analysis for Detection Algorithm . . . 121Appendix H: System Placement 127Appendix I: Microcontrollers Evaluated 129Appendix J: Google Sheets Information 131Appendix K: Database and UI Setup 132Appendix L: System Waterproofing Plan 136Capstone Group 062 Design 7LIST OF FIGURES May 16, 2019List of Figures1 High-Level Design of the System . . . . . . . . . . 172 System Operation Data Pathway through System 203 Cayenne Data Presentation with Sample Data . . 224 Mock Birds For Validation Tests . . . . . . . . . . 245 Accelerometer Signal Spectrogram of Ideal Envi-ronment Background Noise and Simulated birdImpact . . . . . . . . . . . . . . . . . . . . . . . . 266 Best Case Accelerometer Impact Signal, Time Do-main vs. Frequency Domain . . . . . . . . . . . . 277 Worst Case Accelerometer Impact Signal, TimeDomain vs. Frequency Domain . . . . . . . . . . 288 Detection System Diagram . . . . . . . . . . . . . 309 Sample Bird Impact Signal Before Anti-aliasingFilter is Applied . . . . . . . . . . . . . . . . . . . 3310 Sample Bird Impact Signal After Anti-aliasingFilter is Applied . . . . . . . . . . . . . . . . . . . 3311 System State Machine Diagram . . . . . . . . . . 3712 Reset Flag Register Bits (1) . . . . . . . . . . . . 3913 Recovery from Power Loss Flowchart . . . . . . . 4014 Flowchart of the Detection Algorithm . . . . . . . 42Capstone Group 062 Design 8LIST OF FIGURES May 16, 201915 Detection System Wiring Schematic. It is notedthat due to a limitation in the schematic gener-ator, the ADXL335 is displayed instead of theADXL337. . . . . . . . . . . . . . . . . . . . . . . 5916 Microcontroller Installed in Plastic Box . . . . . . 6217 Microcontroller inside Plastic Box (Red Circle),Accelerometer with Cover (Blue Circle) Affixedto Sample Window . . . . . . . . . . . . . . . . . 6318 Cayenne Dashboard UI featuring numerical counter(left) and line plot (right) widgets, populated withsample data. . . . . . . . . . . . . . . . . . . . . . 66C1 Photo of Mock Bird Used for Validation Tests . . 81D1 Drops Performed at Varying Sensor Location(red)While Fixing the Impact Location (Blue) . . . . 88D2 Scatter Plot with Best Fit Line of Voltage vs Dis-tance by Varying Impact Location . . . . . . . . 90D3 Acceptable Sensor Placement Locations Indicatedby Green . . . . . . . . . . . . . . . . . . . . . . . 92D4 Drops Performed at Varying Impact Location(Blue)While Fixing the Sensor Location . . . . . . . . . 94D5 Scatter Plot of Voltage vs Distance by VaryingImpact Location . . . . . . . . . . . . . . . . . . . 96Capstone Group 062 Design 9LIST OF FIGURES May 16, 2019E1 Noise Floor Measurement of Human Talking at70dB . . . . . . . . . . . . . . . . . . . . . . . . . 101E2 Comparison of Signals with and without Noisedisturbance . . . . . . . . . . . . . . . . . . . . . 103E3 Full Rain Test Setup . . . . . . . . . . . . . . . . 106E4 Window with Garbage Bag Sealing and Rain . . . 106E5 Noise Floor Measurement of Rain . . . . . . . . . 108E6 Comparison of Signals with and without rain dis-turbance . . . . . . . . . . . . . . . . . . . . . . . 109F1 Accelerometer Impact Voltage in Time Domain . 112F2 Accelerometer Impact Voltage in Time Domain . 113F3 Accelerometer Impact Voltage Signal in FrequencyDomain . . . . . . . . . . . . . . . . . . . . . . . 113G1 Frequency Domain Effect of Various Digital Filterse117G2 Example Signal of Impact . . . . . . . . . . . . . 122G3 Example Signal of Human Noise . . . . . . . . . . 123G4 Example Signal of Impact . . . . . . . . . . . . . 124G5 Example Signal of Impact . . . . . . . . . . . . . 124G6 Different Configuration of Envelope Based on PeakSeparation denoted by np . . . . . . . . . . . . . 125G7 Finding the Largest R-squared Value . . . . . . . 126H1 Comparison of Repeated Impact Signals PerformedInside and Outside of the Window . . . . . . . . . 128Capstone Group 062 Design 10LIST OF FIGURES May 16, 2019K1 Cayenne ’Add Widget’ Drop-Down Menu . . . . . 133K2 Settings for Cayenne Numerical Counter . . . . . 134K3 Settings for Cayenne Line Chart . . . . . . . . . . 135Capstone Group 062 Design 11LIST OF TABLES May 16, 2019List of Tables1 Technical Specifications of ADXL337 . . . . . . . 322 Microcontroller Minimum Specifications . . . . . 463 Data Communication Minimum Specifications . . 484 Communication System Evaluation . . . . . . . . 505 Data Storage Minimum Specifications . . . . . . . 536 Data Storage Evaluation Comparison . . . . . . . 557 Power Source Minimum Specifications . . . . . . . 568 Power Source Evaluation Comparison . . . . . . . 579 UI Minimum Specifications . . . . . . . . . . . . . 66B1 Energy transfer of 7g bird at bird-window collision. 76B2 Energy transfer of 7g bird at bird-window collision. 77B3 Energy transfer of 18g mock bird at bird-windowcollision. . . . . . . . . . . . . . . . . . . . . . . . 79B4 Energy transfer of 57g mock bird at bird-windowcollision. . . . . . . . . . . . . . . . . . . . . . . . 79C1 Pendulum Drop Angles of 18g bird with StringLength of 1.9m. . . . . . . . . . . . . . . . . . . . 85C2 Pendulum Drop Angles of 57g Bird with StringLength of 0.60m. . . . . . . . . . . . . . . . . . . 85D1 Results from Varying Sensor Placements . . . . . 89D2 Results from Varying Impact Locations . . . . . . 95Capstone Group 062 Design 12LIST OF TABLES May 16, 2019E1 Summary of Maximum Peak-to-Peak Voltage with70dB noise in the Background . . . . . . . . . . . 100E2 Summary of Maximum Peak-to-Peak Voltage withRain in the Background . . . . . . . . . . . . . . 107F1 Impact Signal Patterns of Accelerometer . . . . . 114G1 Comparison of Digital Filter Properties with BirdImpact Signal . . . . . . . . . . . . . . . . . . . . 118G2 Microphone Sensor Minimum Specification andComparison . . . . . . . . . . . . . . . . . . . . . 120I1 Microcontroller Evaluation Comparison . . . . . . 130Capstone Group 062 Design 13List of Abbreviations May 16, 2019List of AbbreviationsC1 Design Document Constraint 1. Pages:. 31, 119C2 Design Document Constraint 2. Pages:. 52C3 Design Document Constraint 3. Pages:. 56C4 Design Document Constraint 4. Pages:. 60C5 Design Document Constraint 5. Pages:. 48FR1 Design Document Functional Requirement 1. Pages:. 30,31, 36, 119FR2 Design Document Functional Requirement 2. Pages:. 36,48, 53FR3 Design Document Functional Requirement 3. Pages:. 46,48, 53, 66NFR1 Design Document Non-Functional Requirement 1. Pages:.25, 29–31, 36, 60NFR2 Design Document Non-Functional Requirement 2. Pages:.36, 45, 50, 53, 56, 66, 136NFR3 Design Document Non-Functional Requirement 3. Pages:.48Capstone Group 062 Design 14List of Abbreviations May 16, 2019List of Key TermsAliasing: Misidentification of the frequency of a signal. Causesdistortion or error.Analog Data: For a signal that is continuous, its time-varyingfeature is represented with another time-varying quantity.Bird Impact: The event where a bird collides with the windowupon which the Bird Impact Detection system is installed.Database: A set of data that is held in a structured way in acomputer.Data Segment: A piece of a data packet containing certaininformation for storage. Includes timestamps and locationdata.Kinglet: A type of bird identified by the client as being ofhigh concern for bird impacts on UBC Campus.Microcontroller: A computer that is composed on an in-tegrated circuit, that has various distinguishable features(number of CPUs, memory, input/output peripherals).Mock Bird: An object we use in order to simulate the equiv-alent energy produced by a bird, i.e., a kinglet.Capstone Group 062 Design 15List of Abbreviations May 16, 2019Nyquist Frequency: Twice the maximum expected frequencyof a signal, the minimum rate at which the signal may besampled without introducing error.SEEDS: The UBC Social Ecological Environmental Develop-ment Studies program.Sensor: A device that can detect or measure physical proper-ties.User Interface: The method in which an user and a computersystem interact.Voltage: A potential difference with the unit of Volts.Capstone Group 062 Design 161 SYSTEM ARCHITECTURE May 16, 20191 System ArchitectureThe design for the product is divided into four major compo-nents:• Detection System• Communication System• Data Storage• User Interface (UI)Figure 1: High-Level Design of the SystemThe detection system refers to an accelerometer and microcon-troller device that will be attached to the window being mea-sured (Section 3). The detection system in the system architec-ture is seen in Figure 1. The purpose of the detection systemportion of the device is to monitor the window for any sufficientCapstone Group 062 Design 171 SYSTEM ARCHITECTURE May 16, 2019signal that represents a bird colliding with the glass. The detec-tion system then sends this data to the data storage device foruse and analysis by SEEDS.The communication system (Section 4) refers to the WiFi con-nection the detection system uses to communicate data to datastorage (Section 5). This subsystem ensures that all bird impactdata recorded by the detection system is accurately transmittedto data storage. The primary purpose of the communicationsystem is to make access of data more convenient by making itremotely accessible.Data storage refers to Cayenne, which the detection systemsends bird impact information to (Section 5). The purpose ofthe data storage portion of the device is to store impacts thatare detected by the detection system. The data storage compo-nent provides a remote database that expands upon the spaceavailable for storage of impact data. As well, the data storagemakes the impact data consistently available for the UI and ac-cess by SEEDS.UI refers to the Cayenne Dashboard, which is used to presentthe data stored in the data storage component to users of theCapstone Group 062 Design 181 SYSTEM ARCHITECTURE May 16, 2019system (Section 8). It processes the data in data storage andpresents it in an easily readable and user-friendly format. Thisincludes a numerical counter that presents the location the datawas collected, and a tally of total impacts at that location. Inaddition, the UI plots the data over time from the location as-sociated with the counter.1.1 System OperationThe system is designed to detect bird impact events that occuron the window the system is installed upon. An occurrence ofa bird impact is defined as the primary condition in which thesystem will perform functions. The system does not performfunctions outside of monitoring for the occurrence of a bird im-pact event. Figure 2 displays the path of data from a bird impactthrough the system.The impact sensors continuously transmit data to the micro-controller representing the vibrations in the inner pane of thewindow the system is installed on. When a bird impacts thewindow the system is mounted on, the vibration generated isconverted into analog signals by the impact sensors (Section3.1). These analog signals are then transmitted as voltage alongCapstone Group 062 Design 191 SYSTEM ARCHITECTURE May 16, 2019Figure 2: System Operation Data Pathway through Systemwires to the microcontroller (Section 3.3) for processing.Analog data is received by the microcontroller through wiresthat connect it to the impact sensors. The microcontroller thenprocesses these analog signals, and monitors said signals for signsof a bird impact. When an impact is detected, the microcon-troller records the event. Recording consists of creating an ob-ject in the microcontroller’s memory, including the location andtime of the impact. Location is defined as an identifier of whichwindow the system is installed on, consisting of the building andan index referring to the window. Appendix A displays exam-ples of locations recorded, in the column marked ’facade’. ACapstone Group 062 Design 202 SIMULATION OF BIRD IMPACT May 16, 2019digital record of the impact is then transmitted using the com-munication system (Section 4) to data storage (Section 5). Anacknowledgement of the impact event is sent to the appropri-ate Cayenne channel. The Cayenne channel designates at whichbuilding location the system is located, and is coded into theArduino.The digital record packets sent by the microcontroller via WiFiare then received by Cayenne. Figure 3 displays how data isstored in Cayenne when a bird impact is received. Each linerepresents one data package that was received from the deviceby Cayenne. Sensor name is used to identify the location of thesystem, and is associated with the channel. Value refers to thenumber of impacts total that have been identified by the systemsince it was last reset. Timestamp is the approximate time whenthat data package was received, indicating when the associatedimpact occurred.2 Simulation of Bird ImpactIn a literature review, no previous work regarding the repeatablerecreation of a bird impact was found. Due to this, a methodfor simulating an bird impact is created for use in designing andtesting the Bird Impact Detection system. The client identifiedCapstone Group 062 Design 212 SIMULATION OF BIRD IMPACT May 16, 2019Figure 3: Cayenne Data Presentation with Sample Datathe kinglet(2) as a bird of particular concern for bird impactson UBC campus. This species is therefore used as the focusof bird impact simulations used to design and test the system.Appendix B provides more details, including calculations, for thedesign of a bird impact simulation. The bird impact simulationdescribed in this section is used for all of the applicable testingdone for design and validation of the system.2.1 Mock BirdThe bird considered in the design of the mock bird is the kinglet,a species identified by the client as the most common for birdimpacts on the UBC campus(3). Kinglets have the followingphysical characteristics:• 7g mass.• 14-18cm wingspan.Capstone Group 062 Design 222 SIMULATION OF BIRD IMPACT May 16, 2019• 8-11cm length from head to tail.• Foraging speeds between 2.7m/s and 9.7m/s.An 18g rubber ball and a 57g tennis ball are used as the mockbirds to simulate bird impacts on the test window. Figure 4displays the mock birds that were used for the simulations. Themock birds are designed using the following characteristics:• Mass• Physical size (wingspan, length from head to tail)• Flight SpeedsThe two mock birds are purposefully designed to have a mass of18g and 57g. This is done to limit the drop speed and dropheight required to simulate bird impacts, facilitating repeat-able and safe testing. A pendulum (Appendix C) is the chosenmethod of simulating the bird impacts because of its ability tocontrol impact locations and finely tune the impact speed. Sincethe maximum speed of the kinglet is too fast to be effectivelysimulated in a lab setting using the pendulum, ideal kinematicsequations are used with the increased masses of the mock birdsto reduce the speed of the simulated impacts (Appendix B). Wecan ensure that the mock bird impacts are consistent with truekinglet impacts by maintaining equivalent impact energies, asCapstone Group 062 Design 232 SIMULATION OF BIRD IMPACT May 16, 2019(a) Photo of 18g Mock Bird Used for Val-idation Tests(b) Photo of 57g Mock Bird Used for Val-idation TestsFigure 4: Mock Birds For Validation Testspresented in Appendix B. The shape of the mock birds is cho-sen to be a ball to ensure that simulated impacts are unaffectedby the rotation or other positioning upon collision with the win-dow. To simplify the simulation, the effects of air resistance anddeformation of the ball are disregarded.Capstone Group 062 Design 242 SIMULATION OF BIRD IMPACT May 16, 20192.2 Pendulum SetupTo simulate varied bird impacts in a reliable and repeatablemanner, a pendulum is used. By varying the drop angle of themock bird (Section 2.1), the pendulum can simulate differentbird impact speeds on different spots of the test window. Ap-pendix C describes the pendulum setup used in more detail.2.3 Ideal Environment SimulationThis section describes an experiment that was conducted to sup-plement the design of the detection algorithm (Section 3.2) ofthe detection system (Section 3). The complete ideal environ-ment simulation experiment can be found in Appendix D.The purpose of this experiment is to identify important charac-teristics (peak-to-peak voltage, duration, and frequencies) cap-tured by the accelerometer (Section 3.1) during a bird-windowcollision in ideal conditions. These characteristics are used inthe design of the detection algorithm that can distinguish bird-window collisions from other by/on window disturbances, meet-ing NFR1. A secondary purpose of this test is to determine thebest sensor placement location for the system setup (Section 7).This experiment is designed to mimic the ideal conditions inCapstone Group 062 Design 252 SIMULATION OF BIRD IMPACT May 16, 2019which the system will operate at the UBC Vancouver campus,with no external sources of noise such as rain or wind.2.3.1 Sampling rateIn order to calculate accurate frequency peaks when perform-ing a Fast Fourier Transform(4) to the data, we must deter-mine the frequency range of impact vibration on the glass. Todo this, we initially sampled the signal at the maximum rateof serial data transmission, 4000Hz, and recorded data in realtime while applying short time Fourier Transform to study theirfrequencies.(5).Figure 5: Accelerometer Signal Spectrogram of Ideal Environment Back-ground Noise and Simulated bird ImpactFigure 5 shows the spectrograms of the ideal background noise(on the left), and a typical simulated bird impact (on the right).Capstone Group 062 Design 262 SIMULATION OF BIRD IMPACT May 16, 2019It is apparent that the bird impact vibration is under 1000Hz.As a result, according to the Nyquist Frequency(6), the detec-tion system is designed with a sampling rate of 2000Hz.2.3.2 Results SummaryTesting multiple impact locations allows for the impact signalto be characterized. Impacts produce oscillating signals with anexponentially decreasing envelope in the time domain with twoor four peaks at frequency domain.Figure 6: Best Case Accelerometer Impact Signal, Time Domain vs. Fre-quency DomainFigure 6 shows the signals of the best case simulated impact,located on the center of a the glass. Appendix D, Figure D3Location 6 displays an example of a best case simulated impact.This is a typical impact with two frequency peaks around 80Hzand 160Hz.Capstone Group 062 Design 272 SIMULATION OF BIRD IMPACT May 16, 2019Figure 7: Worst Case Accelerometer Impact Signal, Time Domain vs. Fre-quency DomainFigure 7 shows the signal of the worst case simulated impact,located near the edge of the window (refer to Appendix D: Fig-ure D3: Location 1). This is not typical impact as it has fourfrequency peaks, which may be caused by the damping effect ofthe metal frame.As shown by the best and worst case impacts, the signals havedifferent maximum peak-to-peak voltages and frequency peaks.2.4 Non-Ideal Environment SimulationSimilarly to Section 2.3, this section uses an experiment thatwas conducted to supplement the design of the detection algo-rithm (Section 3.2) of the detection system (Section 3). Thecomplete non-ideal environment simulation experiment can befound in Appendix E.Capstone Group 062 Design 283 DETECTION SYSTEM May 16, 2019The purpose of this experiment is to identify important charac-teristics (peak-to-peak voltage, duration, and frequencies) cap-tured by the accelerometer (Section 3.1) during a bird-windowcollision with simulate environmental disturbances, rain and hu-man sound. These characteristics are used in the design of thedetection algorithm in order to distinguish bird-window colli-sions from other disturbances near the window, meeting NFR1.This experiment is designed to mimic the non-ideal conditionsin which the system will operate at the UBC Vancouver campus,testing rainy and noisy conditions.2.4.1 Results SummaryBased on the best and worst case impact data displayed in Ap-pendix E, we can see that rain and noise increase the noise floorlevel, but it is significantly smaller than any bird impact signaland can therefore be ignored.3 Detection SystemThe detection system consists of a microcontroller and one im-pact sensor. Figure 8 displays how these components are con-nected. The sensor used for impact detection is an accelerome-ter. This sensor is attached to the window being measured, inCapstone Group 062 Design 293 DETECTION SYSTEM May 16, 2019order to provide data to the microcontroller for processing. Themicrocontroller reads data from the sensor and uses it to deter-mine whether a bird impact has occurred. If the microcontrollerdetects a bird impact, it sends an acknowledgement to the datastorage (Section 5) using WiFi (Section 4).Figure 8: Detection System Diagram3.1 Impact SensorA bird impact is made up of audible sounds, vibrations, andmotion experienced by the glass of a window (7). The detec-tion system uses an accelerometer to capture the informationproduced from audible sounds and window vibrations during animpact for bird impact detection (8). This sensor is used tomeet FR1 and NFR1 of the system by accurately detecting birdimpacts.3.1.1 AccelerometerThe accelerometer ADXL337 is the impact sensor chosen for thisproject. Accelerometers are a type of sensor that outputs a volt-Capstone Group 062 Design 303 DETECTION SYSTEM May 16, 2019age signal as a function of the force on the sensor in a specifieddirection. The accelerometer’s versatile applications in buildingand structural monitoring make it applicable in our project(9).A kinglet, the bird identified by the client as being of most con-cern for bird impacts on UBC Campus, is estimated to produceapproximately 0.2N to 3N of force which is equivalent to 0.026gto 0.33g upon impact as shown in the calculations in AppendixB(10).In order to meet the cost constraint defined in C1, the accelerom-eter must also cost less than $30. In addition, a high sensitivityallows for the voltage output to be relatively large even whenthe vibration is small as in the case of a low speed impact. Sincethere is a trade-off between the sensitivity and the threshold ofacceleration of an accelerometer, we decided to purchase an ac-celerometer with high sensitivity up to 330mV/g so that impactfrom a small bird flying at low speed can be detected to satisfyFR1 and NFR1. The sensor must have and operating temper-ature range of at least -10◦C to 30◦C. This is to ensure thatthe system will function inside of buildings on UBC Campus.This range sufficiently larger than the expected range of tem-peratures inside of buildingsto ensure the system will functionproperly. Given the above considerations, the minimum specifi-Capstone Group 062 Design 313 DETECTION SYSTEM May 16, 2019cations of the accelerometer are summarized in Table 1(11).Table 1: Technical Specifications of ADXL337Feature Minimum Specification ADXL337Input 0.026g to 0.33g ±3 to ±3.6gSensitivity 100mV/g 270 to 330mV/gOperating Voltage Range 3.3 to 5V 1.8 to 3.6VOperating Temperature −10 to 30◦C −55 to +125◦CCost per Unit less than $30 $163.1.2 Anti-aliasing FilterAliasing is a concern that arises in reading the analog signalfrom the accelerometer. The Nyquist Frequency of the system isapproximately 520Hz, based on the bird impact simulation (Sec-tion 2). The Nyquist Frequency is calculated using the highestfrequencies observed in simulation, approximately 260Hz. Thesystem is sampling at 2000Hz, which is well above the minimumrequirement and results in oversampling. This oversampling in-troduces high frequency white noise that may make the detec-tion system less accurate. A physical anti-aliasing filter is usedto reduce this effect.This filter is implemented by connecting a capacitor betweenthe z-axis output of the accelerometer and ground. As sug-gested by the manufacturer of the ADXL337 (Section 3.1.1),Capstone Group 062 Design 323 DETECTION SYSTEM May 16, 2019a 10nF capacitor is used(11). Figure 9 displays a sample birdimpact signal without the filter implemented, and Figure 10 dis-plays the same signal after the filter is implemented. The filteris implemented mathematically in these two figures, to highlightthe effect of the anti-aliasing filter on a specific impact.Figure 9: Sample Bird Impact Signal Before Anti-aliasing Filter is AppliedFigure 10: Sample Bird Impact Signal After Anti-aliasing Filter is AppliedThe filter attenuates the signals used to identify bird impacts byCapstone Group 062 Design 333 DETECTION SYSTEM May 16, 2019up to 0.5dB, but maintains a satisfactory signal-to-noise ratio.In addition it significantly attenuates high frequency peaks, vis-ible in frequencies above the peak at approximately 250Hz. Thisindicates that the filter is limiting the analog signal to withinthe frequencies that are expected in the event of a bird impact.3.1.3 Other Sensors EvaluatedIn addition to the accelerometer mentioned above, we have alsoconsidered microphones, a piezo disc array, and infrared motionsensors as alternative options. Microphones meet the require-ments of the impact detection sensor, and are therefore a viablesensor option of the system. A microphone is not included inthe final design as no situation was discovered during validationtests where the microphone was able to detect a bird impact thatthe accelerometer could not. The microphone as an impact de-tection sensor is discusses in more detail in Appendix G. Piezodiscs are a type of pressure transducer that generate voltageswhen they are being compressed. However, piezo discs generateAC voltage, which is incompatible with the input format of themicrocontroller. Therefore this option has been eliminated.Infrared sensors emit infrared radiation and detect the reflectedradiation from an object to determine if there is movement in thesensing region (12). These sensors were initially considered as aCapstone Group 062 Design 343 DETECTION SYSTEM May 16, 2019way of confirming the presence of motion immediately in frontof the window when vibrations have been detected by the otherimpact sensors. The two IR sensors that were tested were theIR proximity sensor and the short-range distance sensor. How-ever, IR sensors require mounting on the outside of the windowto provide effective information from bird impacts. These sen-sors were therefore eliminated following the decision to place thesystem on the inside of the window, explained in Appendix H.3.2 Detection AlgorithmTo accurately detect bird impacts among the other vibrationsof the window, an algorithm is needed. This algorithm is im-plemented on the Arduino Uno WiFi Rev2 (Section 3.3). Thethree characteristics of the signal that are used by the algorithmare:1. Signal Voltage Amplitude2. Dominant Frequency Peaks3. Signal DurationBird impacts have distinct characteristics that can be used todistinguish them from other disturbances that cause vibrationin the window glass. The algorithm is implemented using a stateCapstone Group 062 Design 353 DETECTION SYSTEM May 16, 2019machine and a Fast Fourier Transform function for the ArduinoUno WiFi Rev2.3.2.1 State Machine SystemThe algorithm is implemented using 4 different states:1. Initialization2. Voltage Reading3. Identification4. Data UploadingThe state machine is implemented using the Arduin Uno WiFiRev2 (Section 3.3) to collect and analyze data from the ac-celerometer (Section 3.1). Figure 11 shows the state diagramfor the system, including how the states are connected and ba-sic next state logic. The primary purpose of the state machineis to satisfy FR1, FR2, NFR1, and NFR2, allowing the systemto monitor for impacts autonomously with a low error rate.3.2.2 Initialization StateThe first state of the state machine is initialization, which isentered when the system is reset or powered on. If the systementers this state from a spontaneous power loss, it recovers theCapstone Group 062 Design 363 DETECTION SYSTEM May 16, 2019Figure 11: System State Machine Diagramprevious impact data from internal memory using a method-ology defined below (Section 3.2.2.1). The system connects tothe WiFi network (Section 4.3) and MyDevices Cayenne (Sec-tion 5). It then waits until the signal from the accelerometerbecomes stable to avoid any issues with initial signal fluctua-tion. Once the system is connected to Cayenne and the signalis stable, it moves into state 2 (Section 3.2.3).Capstone Group 062 Design 373 DETECTION SYSTEM May 16, 20193.2.2.1 Recovery from Power LossDue to how bird impact information is stored on the Cayennedatabase (Section 5), the number of bird impacts recorded bythe system must be recalled in the case of a loss of power. Apower loss will erase the volatile local system memory, where thenumber of bird impacts is stored. Therefore, a method for recall-ing the bird impacts from a non-volatile memory is needed. Thisrecovery from power loss occurs during the initialization state ofthe state machine, which is always triggered upon booting thedevice. The two types of system power loss are:1. Power Supply Resets: power outage, a brownout, unplug-ging the power source from the system2. User Resets: pressing the reset button on the deviceTo recognize a power loss, the algorithm makes use of a featureon the microcontroller (Section 3.3) called the Reset Controller;the source of a reset occurrence is recorded into the Reset FlagRegister, shown on Figure 12 (1).Each bit is binary, storing a value of 1 or 0. The bits of interestare:Capstone Group 062 Design 383 DETECTION SYSTEM May 16, 2019Figure 12: Reset Flag Register Bits (1)• Bit 0: PORF - Power-On Reset Flag• Bit 1: BORF - Brownout Reset Flag• Bit 2: EXTRF - External Reset FlagBits 0 and 1 are set to 1 if a power supply reset occurs, whilebit 2 is set to 1 if a User Reset occurs.In the event of a power supply reset, the bird impact data isrecalled from the non-volatile memory on the microcontroller.In the event of a user reset, the bird impact data is set to 0. Thisis expressed in the flowchart in Figure 13. This functionality wasshown to work throughout various other tests, and is thereforevalidated.3.2.3 Voltage Reading StateIn this state, the system continuously monitors the signal fromthe accelerometer for the amplitude characteristic of a bird im-pact. The previous 25 milliseconds of accelerometer signal areCapstone Group 062 Design 393 DETECTION SYSTEM May 16, 2019Figure 13: Recovery from Power Loss Flowchartstored. When the signal amplitude becomes larger than thethreshold of 0.0968V (ten times of ideal environment noise floor),the system moves into state 3 (Section 3.2.4). Additionally, anLED attached to the microcontroller indicates when the systemis in this state to confirm the system is working properly. TheLED is on when in this state, and turns off when in any otherstate.Capstone Group 062 Design 403 DETECTION SYSTEM May 16, 20193.2.4 Identification StateIn this state, the system analyzes the data recorded from theaccelerometer for signs of a bird impact. The three key char-acteristics of amplitude, frequency peaks, and signal durationare analyzed (details of these calculations can be found in Ap-pendix F). Upon entering this state, an additional 400 millisec-onds of signal from the accelerometer are stored. A Fast FourierTransform allows the Arduino Uno WiFi Rev2 to identify thefrequency peaks of the signal, and the signal duration may becalculated. The frequency peaks that the system monitors forare:1. 80Hz2. 120Hz3. 160Hz4. 170HzIf the duration of the signal is within the window of 0.1-0.3 sec-onds and the dominant frequency peaks match the characteristicpeaks, the system moves into state 4 (Section 3.2.5). Otherwise,once analysis is complete the system moves back into state 2(Section 3.2.3). Figure 14 displays the flowchart for this processof analyzing the signal.Capstone Group 062 Design 413 DETECTION SYSTEM May 16, 2019Figure 14: Flowchart of the Detection Algorithm3.2.5 Data uploadingIf the system identifies window vibrations as a bird impact, itenters this state. The system updates the online data storage(Section 5) with the new bird impact using WiFi (Section 4)Capstone Group 062 Design 423 DETECTION SYSTEM May 16, 2019and saves the bird impact data for recovery (Section 3.2.2.1).Once the system confirms that the data packet has been sent,it automatically goes back to state 2 to continue monitoring forimpacts (Section 3.2.3).3.3 MicrocontrollerThe microcontroller chosen for the system is the Arduino UnoWiFi Rev2(13). Table 2 compares the specifications of this mi-crocontroller to the minimum specifications. The Arduino UnoWiFi Rev2 meets or exceeds the minimum microcontroller spec-ifications.3.3.1 Microcontroller Design ConsiderationsThe following design components are considered in the micro-controller choice:1. Microcontroller code size of 15kB2. 100B data packets3. Maximum of 48 bird impact events per day4. 33.6kB of potential stored data per 7 day periodThe code size consideration is based on the size of the code thatis developed for the microcontroller to perform the signal pro-Capstone Group 062 Design 433 DETECTION SYSTEM May 16, 2019cessing (Section 3.2). The code requires up to 11kB of flashmemory for the microcontroller to analyze impacts. 15kB ischosen as the design parameter to account for future additionsto the code, as well as associated libraries required for function.The 100B data packets and 48 bird impact events per day isbased on the data provided by the client, included in AppendixA. The size of 100B was found by saving a sample max-size char-acteristic data packet received from the detection system as atext file. The size of this file was significantly under 100B, butthe minimum specification was chosen to be over-designed incase more information is required in data packets in the future.48 events per day is decided by analyzing the data provided inAppendix A for the maximum annual collisions on any givenwindow on UBC Campus. The max number of impacts on onewindow per year previously found by the client is 26. This de-sign consideration is overestimated in case the client data is lowcompared to the actual number of bird impact events is under-estimated, or if the system is used in an area that experiencesmore bird impacts in the future.The maximum potential stored data per 7 day period is decidedby items 2 and 3 above. This consideration only considers theCapstone Group 062 Design 443 DETECTION SYSTEM May 16, 2019worst-case scenario where the system is unable to connect to thenetwork for the entire 7 day period due to unexpected circum-stances. 48 100B data packets is used to find that up to 4800Bof data packets may need to be stored locally on the device inthis scenario. For the entire 7 day period before maintenance,this indicates up to 33600B of data may need to be stored, or33.6kB.3.3.2 Minimum Specification DescriptionThe impact sensor (Section 3.1) consists of a single accelerome-ter. To support the Detection System, the microcontroller musthave one analog input pin for each of the two sensors. The ac-celerometer requires a 3.3V output pin that provides at least300µA of current(11). The sensor sampling rate must be atleast 520Hz, the Nyquist frequency for simulated bird impactevents. The minimum clock speed of the microcontroller mustbe at least this value to ensure sensor signals on the event ofa bird impact may be read properly. The microcontroller mustalso have at least 15kB of flash memory to hold code for sen-sor analog-to-digital conversion (Section 3.2). To fulfill NFR2,the microcontroller must have 33.6kB of on-board memory forbackup storage. This considers the case where the microcon-troller is unable to send data using the UBC Visitor network(Section 4) upon detecting a bird impact. It assumes impactCapstone Group 062 Design 453 DETECTION SYSTEM May 16, 2019data packets of approximately 100B, with 48 events stored perday for the entirety of the maintenance period of 7 days. Tosatisfy FR3 the microcontroller choice must be able to commu-nicate wirelessly using WiFi (Section 4).Table 2: Microcontroller Minimum SpecificationsFeatureMinimum Specifi-cationArduino UnoWiFi Rev2Analog Pins 1 6Output Voltage 3.3V 3.3VOutput Current 300µA 50mAClock Speed 520Hz 16MHzFlash Memory 15kB 48kBMemory Storage 33.6kB 6,144kBOnboard WiFi Mod-uleYes YesSee Appendix I for other microcontrollers evaluated.3.4 Recommendations for Future ComponentsFour components were conceptualized for the detection systemthat are not included in the final design. These componentscould all be included in future iterations of the detection sys-tem to potentially increase its functionality. The componentsconceptualized that are not included are as follows:Capstone Group 062 Design 464 COMMUNICATION SYSTEM May 16, 20191. Digital filter for the accelerometer (Section 3.1.1)2. Microphone sensor for impact detection3. WiFi disconnection in the case of long-term loss of network4. Damping Ratio Analysis for Detection AlgorithmThese components are presented in Appendix G. Due to thevarying stages of development of each component before theywere removed from consideration for the final design, they arenot presented in a completed format. These are suggestions forfuture design components that would potentially be beneficialfor the system.4 Communication SystemThe data communication method chosen for the system is WiFi(14).The WiFi network that is used on UBC Campus is UBC Visitor(15)(Section 4.2). Table 3 compares the specifications of WiFi to theminimum specifications for the subsystem. WiFi meets the min-imum data communication specifications, so it is chosen for thesystem.4.1 Communication System Design ConsiderationsThe main design consideration for the communication systemis the transmission rate of 4B/s. This assumes characteristicCapstone Group 062 Design 474 COMMUNICATION SYSTEM May 16, 2019Table 3: Data Communication Minimum SpecificationsFeature Minimum Specification WiFiWireless Yes YesConnectivity Across UBC Campus Across UBC CampusTransmission Rate 4B/s 737500B/sdata packets of 100B (Section 3.3.1) being transmitted by thedetection system (Section 3). In addition, this consideration as-sumes a 30 second limit on transmission of data communicationfrom the detection system to data storage. This limit is derivedfrom what is perceived as a reasonable amount of time for datapackets to be available after a bird impact event occurs.4.2 Minimum Wireless Specifications DescriptionThe Detection System (Section 3) must be able to communicatewith Data Storage (Section 5) wirelessly to satisfy FR2, FR3,and NFR3. Wireless communication removes the need for theuser to gather data from the device manually, so access is eas-ier. Wireless communication also ensures impact data is contin-uously available from the system data storage. Connectivity isdefined as a minimum specification instead of range due to theavailability of WiFi throughout UBC Campus(16). To ensurethat the system can meet C5, the communication system mustCapstone Group 062 Design 484 COMMUNICATION SYSTEM May 16, 2019be able to connect across UBC Campus. The data transmissionrate must be at least 4B/s (Section 4.1).4.3 UBC Visitor WiFi DescriptionThe UBC Visitor WiFi network(15) is a low-bandwidth networkprovided for guests of UBC Campus that are not faculty orstudents. It is an unsecured network that only requires acceptinga terms of service to access. UBC Visitor is used instead ofUBC Secure(17) due to the Arduino Uno Wifi Rev2 (Section3.3) being unable to validate with the UBC Secure network’ssecurity protocols. Due to the relatively low bandwidth requiredfor the communications, the limits of the UBC Visitor networkare not a concern for the function of the system.4.4 Accessing the UBC Visitor NetworkUnder normal circumstances, microcontrollers and similar de-vices are unable to access the UBC Visitor WiFi network(15).To connect to the network, the MAC address of the microcon-troller used must be registered with UBC IT. This service isoffered due to the low overall bandwidth of the system commu-nication. In addition, it is important that the system microcon-troller connects to the network at least once per week to ensurethat the device stays registered on the UBC Visitor WiFi. ThisCapstone Group 062 Design 494 COMMUNICATION SYSTEM May 16, 2019is considered to meet NFR2, as this maintenance is requiredonly once in every 7 day period.4.5 Other Data Communication Designs EvaluatedOther options that were evaluated for wireless communicationare:• LoRa(18)• Bluetooth 5.0(19)• Zigbee(20)Table 4: Communication System EvaluationFeature WiFi LoRaBluetooth5.0ZigbeeWireless Yes Yes Yes YesConnectivityAcross UBCCampusLimited onUBC Cam-pusRequiresnew infras-tructureRequiresnew infras-tructureTransmissionRate737500B/s 31.25B/s 250000B/s 31250B/sTable 4 compares these options to WiFi communication. All ofthe options considered would meet the minimum specificationsfor the communication method. WiFi was chosen due to itsCapstone Group 062 Design 505 DATA STORAGE May 16, 2019convenience and existing availability on UBC Campus. In addi-tion, WiFi has extensive support available online. Therefore, itis chosen as the communication system.5 Data StorageData storage for the system uses MyDevices Cayenne(21). TheCayenne database presents data in a processed and accessibleformat. It is also used to facilitate the system UI (Section 8).If required, data may be downloaded directly from the Cayennedatabase in a spreadsheet format, which is the format providedby the client shown in Appendix A. Table 5 compares the spec-ifications of Cayenne with the defined minimum specifications.5.1 Data Storage Design ConsiderationsThe following design components are considered in the data stor-age choice:• Able to store 3 individual data segments per impact• Data segment max size of at least 32 charactersThe 3 data segment design consideration for data storage isbased on the minimum required data specified by the client.It is required that the system store 3 different pieces of data onthe event of a bird impact:Capstone Group 062 Design 515 DATA STORAGE May 16, 2019• Bird impact timestamp• Bird impact location marker, identified as a specific windowin a building• Number of bird impacts at that locationThis ensures that the system can store all of the data requiredby the client on the event of a bird impact.The max data segment size of 32 characters is based on thesample data provided by the client in Appendix A. It is basedon the window location identifiers, which have the longest datasegments included in this sample data. 32 characters is over-designed based on the sample data provided, to provide flexibil-ity in future location identifiers that may be used.5.2 Minimum Specification DescriptionThese specifications assume that the data packets stored are amaximum size of 100B, with 48 events per day for a 7 day main-tenance period (Section 3.3.1). It is assumed that at the end ofthe 7 day maintenance period, a user ensures that the data stor-age subsystem has sufficient space remaining. Each package ofevent data consists of three segments - a timestamp and windowidentifier, to satisfy C2, and a total number of bird impacts atCapstone Group 062 Design 525 DATA STORAGE May 16, 2019that location. To meet FR2, FR3, and NFR2, Cayenne musthave at least 33.6kB of storage space (Section 3.3). In addi-tion, data storage must be able to hold at least 1008 individualsegments of data. This number ensures that the system maystore 48 3-segment data packets per day, for 7 days as describedabove (Section 3.3.1, Section 5.1). To store the impact locationdata, each data segment should be capable of storing at least 32characters (Section 5.1).Table 5: Data Storage Minimum SpecificationsFeatureMinimumSpecificationCayenneStorage Size 33.6kB UnlimitedUnique DataSegments1008 UnlimitedData SegmentLength32 Unlimited5.3 Cayenne DatabaseThe primary data storage method for the system is a Cayennedatabase(21), provided by MyDevices(22). Figure 3 shows howdata is stored in the Cayenne database. Cayenne meets or ex-ceeds all of the minimum specifications for data storage, so itprovides a viable solution. Cayenne also provides tools for acces-Capstone Group 062 Design 535 DATA STORAGE May 16, 2019sible displaying and accessing of data, used for the UI (Section8). Cayenne services are also provided for free, making it a goodchoice for the system.5.4 Other Data Storage Designs EvaluatedOther options that were evaluated for data storage are:• Secure Digital (SD) Card(23)• Amazon Web Servers(24)• Dropbox(25)• Google Sheets(26)Table 6 compares Cayenne and Google Sheets to the three op-tions that were not chosen. Google Sheets meets or exceeds allof the requirements for data storage, and was implemented inearly iterations of the system. Due to issues encountered withreliability, it was removed from the final version of the system.More information regarding Google Sheets and why it was notimplemented is presented in Appendix J.The SD card was not chosen as it requires the data from thedetection system be stored with the system, rather than on-line. This reduces accessibility, as the data must be collectedmanually from the SD card. An Amazon Web Server was notCapstone Group 062 Design 546 POWER SOURCE May 16, 2019Table 6: Data Storage Evaluation ComparisonFeature CayenneGoogleSheetsSD CardAmazonWebServersDropboxStorageSizeUnlimited Unlimited 512GB 5GB 2GBUniqueDataSegmentsUnlimited 5 ∗ 106 Unlimited Unlimited UnlimitedDataSegmentLengthUnlimited 50,000 Unlimited Unlimited Unlimitedchosen due to Cayenne and Google Sheets providing sufficientservices for free, while a S3 Web Server has a more limited freemodel(24). Dropbox was not chosen as it is limited to 2GB offree storage(25), while Cayenne and Google Sheets do not havea limit to future free scalability.6 Power SourceThe system is powered by a power adapter. Table 7 comparesthe specifications of an power adapter to the minimum specifica-tions for the subsystem. The power adapter meets the minimumpower specifications, so it is chosen for the system.Capstone Group 062 Design 556 POWER SOURCE May 16, 2019Table 7: Power Source Minimum SpecificationsFeature Minimum Specifications Power AdapterPower Capacity 2000 mAh UnlimitedDC Output Yes YesOutput Voltage 9-12 VDC 9-12 VDCOutput Current 250 mA 250 mA2.1 mm Plug Yes YesCenter Pin Positive Yes YesObtrusiveness of Win-dowLess Than 10% < 1%6.1 Minimum Specification DescriptionThe method for powering the system must satisfy C3, and NFR2.The power source must also be compatible with the microcon-troller (Section 3.3). The system in an idling state consumes 12mAh of power, so the power source of the system must have acapacity of 2000 mAh at minimum. The power method mustbe compatible with a center 2.1 mm center positive plug, havea VDC output of 9-12 V and have an output current of 250mA(13).Capstone Group 062 Design 566 POWER SOURCE May 16, 20196.2 Other Power Options EvaluatedThe other option evaluated for powering the system is by bat-tery.Table 8 compares a power adapter to a battery.Table 8: Power Source Evaluation ComparisonFeatureMAKITA BL10132000MAH 10,8V LI-ION(27)PowerAdapterObtrusiveness ofLess Than 10% ofWindowYes YesCompatibility withArduinoYes YesMaintenance Need Yes NoThe microcontroller (Section 3.3) consumes a minimum of 12mA at 5V and 16Hz while it is in an idling state since it hascapacities of standard shield, a standard USB interface, powerregulation and LEDs (13). A battery that met the minimumspecifications in Table 8 was considered and is a viable optionfor powering the system. However, a power adapter is morereliable and convenient for the maintenance of the system.Capstone Group 062 Design 577 SYSTEM SETUP May 16, 20197 System SetupThe physical portion of the Bird Impact Detection System con-sists of a microcontroller and sensor (Design Document Section3) that are mounted on the indoor side of window being ob-served for bird impacts. The decision to place the system in-doors is explained in further detail in Appendix H. The sensorfor the detection system is connected to the microcontroller di-rectly (Section 7.1). The sensor itself affixed to the indoor glasspane of the window directly, and the microcontroller is attachedto the window frame in a plastic enclosure (Section 7.2). Thephysical components of the Bird Impact Detection System arelinked to the non-physical components through a WiFi modulein the microcontroller (Section 3.3)The non-physical portion of the Bird Impact Detection systemconsists of a WiFi wireless internet connection (Section 4), My-Devices Cayenne (Section 5.1), and the UI (Section 8). MyDe-vices Cayenne is connected to the detection system through useof the internet (Section 6.3.1). The UI is connected to MyDe-vices Cayenne directly, as a provided service from MyDevices(Section 6.3.2).Capstone Group 062 Design 587 SYSTEM SETUP May 16, 20197.1 Sensor ConnectionsThe detection system sensor (Section 3.1) is connected to the mi-crocontroller (Section 3.3) using solid-core insulated wires. Fig-ure 15 displays the schematic for the wiring in the detection sys-tem. It is noted that the ADXL335 is displayed in the schematic,as the software used for the schematic labels all ADXL3XX ac-celerometers this way. In the construction of the system, theADXL337 should be used, as specified in the Detection System(Section 3.1).Figure 15: Detection System Wiring Schematic. It is noted that due to alimitation in the schematic generator, the ADXL335 is displayed instead ofthe ADXL337.Capstone Group 062 Design 597 SYSTEM SETUP May 16, 2019The pins of the sensors are connected to the microcontroller asfollows:1. Accelerometer Z-axis: Connected to input pin A0 of theArduino Uno Wifi Rev2.2. Accelerometer 3.3V: Connected to the 3.3V power pin ofthe Arduino Uno Wifi Rev2.3. Accelerometer Ground: Connected to the ground pin of theArduino Uno Wifi Rev2.The Accelerometer X- and Y-axis pins are not connected to themicrocontroller as they are not used in impact analysis (Section3.2). A 10nF capacitor is attached between the accelerometerZ-axis and ground to filter the signal that is recorded by theArduino Uno WiFi Rev2 (Section 3.1.2).7.2 Detection System Window InstallationThe detection system (Section 3) must be able to be attachedin an operating position on the inside of a window to satisfyC4. The justification for why the system is installed on theinside rather than outside of a window is found in AppendixH. The installed system must be able to detect bird impacts tosatisfy NFR1. The system consists of an accelerometer and amicrocontroller as displayed in Figure 2, connected using wires.Capstone Group 062 Design 607 SYSTEM SETUP May 16, 2019A power adapter (Section 6) connects the Arduino Uno WiFiRev2 (Section 3.3) to an appropriate wall plug for power. Awaterproofing solution for potential future iterations is found inAppendix :, if the system is changed to outside installation.7.2.1 Microcontroller Window InstallationThe Arduino Uno Wifi Rev2 microcontroller (Section 3.3) isplaced in a plastic enclosure box with dimensions of 7.62x7.62x3.81cm.The microcontroller is positioned on posts inside of the enclosurethat keep it in place. Figure 16 displays the microcontroller in-stalled inside the plastic box. A cover is normally included thatencloses the microcontroller, but is not shown in the figure forvisibility. Holes are included in the design of the box to allowsensor wires, computer cables, and power to be connected. Inaddition, a cavity is included in the box below the microcon-troller to allow for the filter capacitor of the accelerometer to beinstalled (Section 3.1.2).Capstone Group 062 Design 617 SYSTEM SETUP May 16, 2019Figure 16: Microcontroller Installed in Plastic BoxThis enclosure box is mounted on the metal frame of the windowbeing measured using double-sided mounting tape.(28). The boxis placed with one edge 10.795cm from the frame of the windowand one edge directly against the window glass, with the serialand power ports facing away from the window glass. Figure 17displays the plastic box affixed to the sample window, identifiedby the red circle.Capstone Group 062 Design 627 SYSTEM SETUP May 16, 2019Figure 17: Microcontroller inside Plastic Box (Red Circle), Accelerometerwith Cover (Blue Circle) Affixed to Sample Window7.2.2 Sensors Window InstallationThe accelerometer (Section 3.1) is affixed directly to the win-dow using duct putty(29), under a 3.175x3.175cm square plasticcover. Duct putty is a secure adhesive that does not harden inmost circumstances, while still transferring the majority of theCapstone Group 062 Design 637 SYSTEM SETUP May 16, 2019vibration energy from the surface it is attached to. This makesit a good choice for the situation of the project, as it does notdamage the window and allows for sensors to remain attachedfor long periods of time. An alternative that was considered wasdouble sided tape. However, double sided tape dampens the vi-brations transmitted to the sensor attached to the window dueto thickness compared to duct putty. In addition, a plastic coveris attached over the accelerometer using duct putty to protect itand keep it secured. Figure 17 displays the accelerometer affixedto the sample window, identified by the blue circle.7.2.3 Power Source InstallationThe adapter described in Section 6 (Power Source) that powersthe system is mounted against the wall beside a subject window.The adapter is mounted using cable tie mounts. These cable tiemounts will be installed using double-sided wall-safe tape(28).7.3 MyDevices Cayenne Database ConnectionAppendix K provides detailed instructions for setting up the My-Devices Cayenne database and connecting it to the Arduino UnoWiFi Rev2. The detection system (Section 3) is connected to theMyDevices Cayenne database (Section 5) using the communica-tion system (Section 4). The microcontroller in the detectionsystem communicates directly with Cayenne directly throughCapstone Group 062 Design 648 USER INTERFACE May 16, 2019the use of Cayenne libraries for the Arduino. No other setup isrequired for the detection system to communicate with Cayenne,as long as the communications system is accessible and the de-tection system is provided with the correct Cayenne credentialsfollowing the tutorial.8 User InterfaceThe UI for the system is handled using MyDevices Cayenne(21).Table 9 compares the specifications of the Cayenne UI to theminimum specifications. MyDevices Cayenne exceeds the mini-mum UI specifications, so it is chosen for the system. In addi-tion, Cayenne is used as the primary data storage (Section 5),so it is the primary choice for the system UI. Figure 18 displayshow data is presented to the user in the Cayenne Dashboard.Window identifier refers to the building and window index thatidentifies which window the detection system is installed on.Number of impacts is the total impacts detected by the sys-tem since it was installed on the window being monitored, pre-sented by the numerical counter. The line graph presents theimpact data over time to highlight bird impact number trends.Additionally, Cayenne allows for data to be downloaded in aspreadsheet-ready format.Capstone Group 062 Design 658 USER INTERFACE May 16, 2019Table 9: UI Minimum SpecificationsFeatureMinimum Specifi-cationCayenneData Visualization Numerical CounterNumerical Counter,Line Plot, Database,Spreadsheet DownloadFigure 18: Cayenne Dashboard UI featuring numerical counter (left) and lineplot (right) widgets, populated with sample data.8.1 Minimum Specification DescriptionThe UI must continuously provide a clear and easy-to-use vi-sualization of data to satisfy FR3 and NFR2. Visualization ofdata refers to presenting data from the data storage (Section5) in a user friendly manner. The UI must at least present anumerical counter of the number of impacts on the window thesystem is installed on.Capstone Group 062 Design 66REFERENCES May 16, 2019References1 M. T. Inc., “Arduino microcontroller cpu,”atmega4809 datasheet. [Online]. Available:http://ww1.microchip.com/downloads/en/DeviceDoc/megaAVR0-series-Family-Data-Sheet-DS40002015B.pdf2 C. University, “Golden-crowned kinglet,” 2017. [On-line]. Available: https://www.allaboutbirds.org/guide/Golden-crowned Kinglet/id3 A. Porter and A. Huang, “Bird collisions withglass: Ubc pilot project to assess bird collisionrates in western north america.” [Online]. Available:https://sustain.ubc.ca/sites/default/files/seedslibrary/BWC%20report%20SEEDS%20May%202015.pdf4 D. H. . B. C. S. Heideman, Michael T Johnson, “Gaussand the history of the fast fourier transform,” IEEE ASSPMagazine, vol. 1, no. 4, pp. 14–21.5 T. Zhang and J. Wu, “Learning long-term filter banksfor audio source separation and audio scene classification,”EURASIP Journal on Audio, Speech, and Music Processing,vol. 1, pp. 1 – 13, Dec. 2018.6 J. B. Allen, “Short time spectral analysis, synthesis, andCapstone Group 062 Design 67REFERENCES May 16, 2019modification by discrete fourier transform,” IEEE Transac-tions on Acoustics, Speech, and Signal Processing.7 “Make your windows bird-safe.” [Online].Available: https://www.humanesociety.org/resources/make-your-windows-bird-safe8 S. Hanly, “What’s the difference between vibration sensors?”[Online]. Available: https://www.machinedesign.com/motion-control/what-s-difference-between-vibration-sensors9 S. Grover, “Prediction of earthquake using 3 axis accelerome-ter sensor (adxl335) and arduino uno,” International Journalof Science and Research.10 “Appendix 12.1 — bird-impact forces — thephysics - transport canada.” [Online]. Avail-able: https://www.tc.gc.ca/eng/civilaviation/publications/tp13549-appendices-appendix12-1-410.htm11 T. Instruments, “Small, low power, 3-axis3g accelerometer,” adxl337 datasheet. [Online].Available: https://cdn.sparkfun.com/datasheets/Sensors/Accelerometers/ADXL337.pdf12 Motion sensor guide. [Online]. Available: https://www.safewise.com/resources/motion-sensor-guide/Capstone Group 062 Design 68REFERENCES May 16, 201913 Arduino. Arduino uno wifi rev2. [Online]. Available:https://store.arduino.cc/usa/arduino-uno-wifi-rev214 B. Mitchell. 802.11 standards explained:802.11ac, 802.11b/g/n, 802.11a. [On-line]. Available: https://www.lifewire.com/wireless-standards-802-11a-802-11b-g-n-and-802-11ac-81655315 UBC. ubcvisitor wireless network. [Online]. Avail-able: https://it.ubc.ca/services/email-voice-internet/wireless-internet-access/ubcvisitor-wireless-network16 ——. Wireless coverage. [Online]. Avail-able: https://it.ubc.ca/services/email-voice-internet/wireless-internet-access/wireless-coverage17 ——. ubcsecure wireless network. [Online]. Avail-able: https://it.ubc.ca/services/email-voice-internet/wireless-internet-access/ubcsecure-wireless-network18 T. Network. Limitations of lorawan. [Online]. Avail-able: https://www.thethingsnetwork.org/docs/lorawan/limitations.html19 J. G. Sponas. Things you should knowabout bluetooth range. [Online]. Avail-Capstone Group 062 Design 69REFERENCES May 16, 2019able: https://blog.nordicsemi.com/getconnected/things-you-should-know-about-bluetooth-range20 I. Poole. Zigbee technology tutorial. [Online]. Avail-able: https://www.radio-electronics.com/info/wireless/zigbee/zigbee.php21 MyDevices. Cayenne, the world’s first drag-and-drop iotproject builder. [Online]. Available: https://mydevices.com/cayenne/features/22 ——. About. [Online]. Available: https://mydevices.com/about/23 Move over sandisk, this 512gb microsd cardis now the biggest money can buy. [On-line]. Available: https://www.trustedreviews.com/news/integral-memory-new-512gb-microsd-card-338137824 Amazon. Amazon s3 pricing. [Online]. Available: https://aws.amazon.com/s3/pricing/?p=ps25 Dropbox. How much does dropbox cost? [Online]. Available:https://www.dropbox.com/help/billing/cost26 Google. Google spreadsheet limitations. [On-line]. Available: https://gsuitetips.com/tips/sheets/google-spreadsheet-limitations/Capstone Group 062 Design 70REFERENCES May 16, 201927 Makita bl1013 2000mah 10,8v li-ion. [Online]. Avail-able: https://www.tme.eu/en/details/accu-bl1013-2ah/rechargeable-batteries/makita-bl1013-2000mah-108v-li-ion/28 Staples. Scotch mounting tape. [Online]. Avail-able: https://www.staples.ca/en/Scotch-Mounting-Tape/product 11189 1-CA 1 2000129 S. Hanly. Accelerometer mounting bestpractices for vibration measurement. [On-line]. Available: https://blog.mide.com/accelerometer-mounting-best-practices-for-vibration-measurement30 Y. Q. Answered. (2016) 10 hours of people talking.[Online]. Available: https://www.youtube.com/watch?v=PHBJNN-M Mo31 S. C. E. X. K. M. David He, Stevan Vicentije-vic, “Version5 3 with reset,” https://github.com/Alpaca99/ELEC491/blob/master/intergratecode/Version5 3 with reset/Version5 3 with reset.ino, 2019,commit e0b8e21.32 E. Punskaya. Design of fir filters. [Online]. Avail-able: https://www.vyssotski.ch/BasicsOfInstrumentation/SpikeSorting/Design of FIR Filters.pdfCapstone Group 062 Design 71REFERENCES May 16, 201933 MathWorks. (2019) Window designer. [Online].Available: https://www.mathworks.com/help/signal/ref/windowdesigner-app.html34 L. C. H. Zhou, Li, “Microphone-based vibration sensor forugs applications,” IEEE Transactions on Industrial Elec-tronics, vol. 64, no. 8, pp. 6565–6572, 2017.35 K. Johnson, Physics, 1998.36 C. Inc., “Electret condenser microphone,” cMA-4544PF-W datasheet. [Online]. Available: https://www.cui.com/product/resource/cma-4544pf-w.pdf37 Arduino. Arduino mkr wan 1300. [Online]. Available:https://store.arduino.cc/usa/mkr-wan-130038 Linkit smart 7688. [Online]. Available: https://www.seeedstudio.com/LinkIt-Smart-7688-p-2573.html39 MyDevices. Sign up for cayenne. [Online]. Available:https://mydevices.com/cayenne/signup/40 ——. Step 3: Connect your arduino. [Online]. Avail-able: https://cayenne.mydevices.com/cayenne/dashboard/arduino/pending/8abdbe10-4838-11e9-a6b5-e30ec853fbf2/2Capstone Group 062 Design 72REFERENCES May 16, 201941 Canada’s rainiest cities. [Online]. Avail-able: https://www.currentresults.com/Weather-Extremes/Canada/wettest-cities.php42 J. M. A. S. Aschalew Kassu, Carlton Farley III, “Analysis ofspectral signatures of silicone-based sealant materials usedin residential and commercial buildings.”43 U. Silicones. How long should siliconesealant last around your home. [Online].Available: https://www.united-silicones.com/blog/how-long-should-silicone-sealant-last-around-your-home/Capstone Group 062 Design 73APPENDIX A: CLIENT SAMPLE COLLECTED DATA May 16, 2019Appendix A: Client Sample Collected DataCapstone Group 062 Design 74APPENDIX B: BIRD IMPACT CALCULATIONS May 16, 2019Appendix B: Bird Impact CalculationsThe following details the process of representing a bird impactmathematically for the kinglet. Kinglets commonly have ap-proximately the following relevant attributes:• 10cm length from head to tail• Mass of 7g• Flight speeds between 2.7m/s and 9.8m/sThe mock bird is approximated using these properties (Section2.1). The force imparted upon a window is then calculated usingthe following equation for force in units of g (gram-force):F =mv22d∗ 0.0098The parameters are defined as follows:d: The distance over which the bird impact is delivered, esti-mated as the 10cm length of the bird.m: The mass of the average kinglet, 7 grams.v: The speeds of impact considered, defined as the flight speedsabove.Table B1 displays the impact forces calculated using the equa-tion above for the considered flight speeds of the kinglet.Capstone Group 062 Design 75APPENDIX B: BIRD IMPACT CALCULATIONS May 16, 2019Table B1: Energy transfer of 7g bird at bird-window collision.Kinglet ImpactSpeed (m/s)Calculated Im-pact Force (gram-force)2.7 0.0269.8 0.342It is noted that for simplification, these estimated impact forcesdisregard parameters such as dampening due to feathers duringthe impact.For testing purposes, the energy of the bird at the moment ofcollision will be considered instead of the impact force. Kineticenergy is used to represent a bird impact, and potential en-ergy is used to simulate the impact using a pendulum (Section2.2). This is due to the use of a physical approximation of thebird (Section 2.1) with significantly different physical propertiesfrom a bird in terms of shape, compressibility, and mass. Thetwo equations used for calculation of kinetic (Ek) and potential(Ep) energies are:Ek =12mv2Ep = mghThe parameters used in these equations are defined as follows:Capstone Group 062 Design 76APPENDIX B: BIRD IMPACT CALCULATIONS May 16, 2019m: The mass of the kinglet (7g) or the mock bird (18g) (Section2.1)v: The velocity of the kinglet or mock bird. To cover a range ofimpact speeds, the following speeds are considered:• 9.8 m/s (6.2 m/s)• 6 m/s (3.83 m/s)• 2.7 m/s (1.7 m/s)g: The gravitational constant, approximated as 9.81 m/s2h: The drop height required to simulate a bird impact at thegiven speedTo simulate a bird impact, the kinetic energy of a kinglet atthe desired impact speed is calculated. Table B2 displays thekinetic energies of the three impact speeds considered, which aredefined above.Table B2: Energy transfer of 7g bird at bird-window collision.Capstone Group 062 Design 77APPENDIX B: BIRD IMPACT CALCULATIONS May 16, 2019Speed La-belKingletSpeed (m/s)EnergyTransferredEk (J)Drop Height(m)High Speed 9.7 0.336 4.8MediumSpeed6 0.126 1.8Low Speed 2.7 0.0255 0.37A pendulum (Section 2.2) is used to swing the mock bird (Sec-tion 2.1) at the window to simulate bird impacts. To approxi-mate a real bird impact, the height required for the mock birdto be dropped from the pendulum is equated to the kinetic en-ergy of the real impact. Tables B3 and B4 display the dropheights calculated for each required kinetic energy value definedin Table B2 for both mock bird masses. It is assumed that allof the potential energy is transferred into kinetic energy duringthe swing towards the glass of the window.Capstone Group 062 Design 78APPENDIX B: BIRD IMPACT CALCULATIONS May 16, 2019Table B3: Energy transfer of 18g mock bird at bird-window collision.Speed La-belMock BirdSpeed (m/s)PotentialEnergy Ep(J)Drop Height(m)High Speed 6.2 0.336 1.9MediumSpeed3.83 0.1268 0.71Low Speed 1.7 0.0255 0.14Table B4: Energy transfer of 57g mock bird at bird-window collision.Speed La-belMock BirdSpeed (m/s)PotentialEnergy Ep(J)Drop Height(m)High Speed 3.43 0.336 0.60MediumSpeed2.10 0.1268 0.22Low Speed 0.94 0.0255 0.045Capstone Group 062 Design 79APPENDIX C: SIMULATION PENDULUM SETUP May 16, 2019Appendix C: Simulation Pendulum SetupTo simulate bird impacts, a setup is required for impacting themock bird on the window. This setup must be adjustable forboth impact speed and location impacted on the window. Thesetup chosen is a pendulum design. Figure C1 displays the pen-dulum set up over the sample window in the manner used fortesting.Capstone Group 062 Design 80APPENDIX C: SIMULATION PENDULUM SETUP May 16, 2019Figure C1: Photo of Mock Bird Used for Validation TestsPendulum Setup ProcedureApparatusThe pendulum is constructed using the following apparatus:1. Mock bird (Section 2.1)Capstone Group 062 Design 81APPENDIX C: SIMULATION PENDULUM SETUP May 16, 20192. String with varying length3. String bag to hold mock bird, with secure mounting pointsfor string attachment4. Protractor5. Camera tripodProcedureThe pendulum should be assembled using the following steps:1. Place the mock bird (1) inside the string bag (3).2. Ensure the string (2) is of appropriate length for the birdimpact location desired. Shorter strings raise the locationof the impact on the test window, and longer strings lowerthe location of the impact on the test window.3. Attach the string (2) to the string bag (3) containing themock bird (1).4. Attach the other end of the string (2) to a secure mountingpoint on the top of the tripod (5).5. Ensure the pendulum is able to swing freely in a mannerthat allows it to impact the window unimpeded.Capstone Group 062 Design 82APPENDIX C: SIMULATION PENDULUM SETUP May 16, 20196. Use the protractor (4) to set the beginning angle of themock bird (1) to attain the desired impact speed (TableC1, C2)To ensure simulated impacts occur at the desired location onthe test window, allow the mock bird to hang freely. Positionthe tripod so the mock bird is positioned at the desired hori-zontal location. Adjust the height of the tripod to ensure thesimulated impact occurs at the appropriate vertical location onthe window. This should be set as appropriate for each test thatis conducted.Pendulum Setup CalculationsTo perform bird impacts using the pendulum, the string shouldbe held taut at a drop angle appropriate for the speed required,calculated for the 18g ball in Table C1 and the 57g ball in Ta-ble C2. Due to the nature of the pendulum design, it is moreaccurate to use starting angle instead of height for ensuring thecorrect impact energy is attained. The angle is calculated usingthe following equation:θ = arcsinhmax − hhmaxWhere:hmax: The drop height of the mock bird from Table C1 and C2Capstone Group 062 Design 83APPENDIX C: SIMULATION PENDULUM SETUP May 16, 2019h: The desired drop heightθ: The angle measured from the pendulum resting positionThe angles required for the different drop heights of both 18gand 57g mock birds are shown in Tables C1 and C2.Capstone Group 062 Design 84APPENDIX C: SIMULATION PENDULUM SETUP May 16, 2019Table C1: Pendulum Drop Angles of 18g bird with String Length of 1.9m.Speed La-belMock BirdSpeed (m/s)Drop Height(m)Pendulum θ(deg)1-HighSpeed6.2 1.9 902-MediumSpeed3.83 0.75 523-LowSpeed1.7 0.15 23Table C2: Pendulum Drop Angles of 57g Bird with String Length of 0.60m.Speed La-belMock BirdSpeed (m/s)Drop Height(m)Pendulum θ(deg)1-HighSpeed3.43 0.60 902-MediumSpeed2.10 0.22 523-LowSpeed0.94 0.045 23Capstone Group 062 Design 85APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019Appendix D: Ideal Environment TestVarying Sensor Placement TestPurposeThe purpose of this experiment is to find an acceptable place-ment of the accelerometer on the window by performing dropsat various location on the window while fixing the location ofthe impact shown in Figure H1. These experiments are designedto mimic the ideal conditions in which the system will operateat the UBC Vancouver campus.ApparatusThe apparatus for this experiment includes:• The test window• A window mount• A pendulum that will consist of a mock bird (Validationappendix) and a string• The microcontroller (Design Document, Section 3.3)• The accelerometer (Design Document, Section 3.1.1)Capstone Group 062 Design 86APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019It is noted that the common kinglet weighs approximately 7g,while we will be using a mock bird (Appendix B). This is doneto limit drop heights required, and is accounted for in later cal-culations. The test window is set up according to Figure (FigureC1). The sensors are connected according to Figure 16, in sec-tion 7.1.Procedure1. Verify the mass of the mock bird and attach the bird toa string with a measured length to the pendulum frame.Attach the pendulum frame, shown in Figure C1, to thetest window.2. Place the accelerometer in location 1 shown in Figure D1and connect to the microcontroller according to the schematicin Figure 14, section 7.1.3. Drop the mock bird onto the approximate area marked byblue circle in Figure D1 from 90 degree angle to simulatethe speed of 6.7m/s (which is listed in Table C2 and TableB2. Perform two impact. Save the signal for processing.4. Repeat Step 3 after changing the sensor location to loca-Capstone Group 062 Design 87APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019tions 2-7.Figure D1: Drops Performed at Varying Sensor Location(red) While Fixingthe Impact Location (Blue)Capstone Group 062 Design 88APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019ObservationsThe maximum peak-to-peak voltage and frequencies are recordedin Table D1.Table D1: Results from Varying Sensor PlacementsLocationMaximumPeak-to-PeakVoltage(V)Dominant Frequency(Hz)1 0.5736 82.5, 1651 0.593 82.5, 1652 0.2449 82.5,120,1652 0.2905 82.5,120,1653 0.1901 82.5,137,176.53 0.1998 82.5,137,176.54 0.3062 82.5,1654 0.3203 82.5,1655 0.2933 82.5,137.5, 167.5,257.55 0.2739 82.5,167.5 257.56 0.3062 82.5,120,165, 257.56 0.3094 82.5,167.5 2607 0.3803 82.5,165, 257.57 0.3642 82.5,167.5 257.5In order to find an acceptable location for the accelerometer, thedistance between the impact location and the sensor placementlocation is plotted against the maximum peak-to-peak voltageCapstone Group 062 Design 89APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019as shown in Figure D2.Figure D2: Scatter Plot with Best Fit Line of Voltage vs Distance by VaryingImpact LocationFrom the varying sensor placement test, the accelerometer testshows a correlation between the sensor location and voltage.The further the distance between the impact and the sensor,the lower the voltage. While the majority of the data points fallalong the best fit line that demonstrates an inverse relationshipbetween the voltage and distance, there is an outlier when thedistance is 9 inches. This outlier is from impacts at location 2.Capstone Group 062 Design 90APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019Potential causes of the outlier could be dampening due to therigidity of the metal window frame. In addition, the closer thesensor is to the frame the lower the resulting voltage as displayedin Table D1.ConclusionBased on the results and analysis summarized above, the ac-ceptable sensor placement location, as indicated by the figurebelow, is at least 3 inches away from both frames. Therefore,the accelerometer should be at least 3 inches away from theframes in any direction for an voltage output at least 20 timesthe noise floor. In addition, for the best coverage of window forimpact detection, it is better to place the sensor as close to thecenter (location 1) as possible. Figure D3 displays the accept-able locations for the sensor placement on the test window.Capstone Group 062 Design 91APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019Figure D3: Acceptable Sensor Placement Locations Indicated by GreenVarying Impact Location TestPurposeThe purpose of this varying impact location test is to identifythe voltage and frequency characteristics at different impact lo-cation on the window, while fixing the location of the sensor at6 inches away from the frame.ApparatusCapstone Group 062 Design 92APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019The apparatus for this experiment includes:• The test window• A window mount• A pendulum that will consist of a mock bird (Validationappendix) and a string• The microcontroller (Design Document, Section 3.3)• The accelerometer (Design Document, Section 3.1.1)Procedures1. The test is conducted as follows: Set up testing environ-ment according to Figure 14 section 7.1, with the accelerom-eter in the location marked for the sensors(red) shown inIdeal environment tests set-up shown in D3.2. Verify the mass of the mock bird and attach the bird toa string with a measured length to the pendulum frame.Attach the pendulum frame, shown in Figure C1, to thetest window.3. Drop the mock bird onto the approximate area marked byblue circle in Figure D4 from 90 degree angle to simulate aspeed of 6.7m/s (Drop Height 1 listed in Table C1). Per-form two impact. Save the signal for processing.Capstone Group 062 Design 93APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 20194. Repeat Step 3 for for locations 2-6.Figure D4: Drops Performed at Varying Impact Location(Blue) While Fixingthe Sensor LocationObservationsThe maximum peak-to-peak voltage and frequencies associatedwith each impact location are summarized below.Capstone Group 062 Design 94APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019Table D2: Results from Varying Impact LocationsLocationMaximumPeak-to-PeakVoltageDominant Frequency1 0.2997 120,2562 0.4318 120,2562 0.3996 120,2563 0.3738 82,165,2303 0.3964 82,165,2304 0.3964 82,165,2304 0.2997 82,165,2305 0.4157 82,120, 2575 0.3899 82,120, 2576 0.5736 82,1206 0.593 82,120The distance between the impact location and the sensor place-ment location is plotted against the maximum peak-to-peakvoltage as shown in Figure D5. No discernible correlation isestablished between impact location and sensor placement interms of maximum peak-to-peak voltage.Capstone Group 062 Design 95APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019Figure D5: Scatter Plot of Voltage vs Distance by Varying Impact LocationThe voltage range of the signals recorded by the accelerome-ter is from 0.1901V to 0.593V. The dominant frequencies of thesimulated impacts are identified as 82.5Hz, 120Hz, 165Hz, and260Hz. These frequencies consistently appear at a variety of im-pact locations.ConclusionsThis test is helpful in determining the voltage threshold andfrequency ranges for the detection algorithm outlined in section3.2.Capstone Group 062 Design 96APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019For the accelerometer, the voltage ranges from 0.1901V to 0.593V.Dominant frequencies are also identified: 82.5Hz and 165Hz,120Hz, 137Hz, 260Hz. These frequencies appear repeatedly indifferent impact locations.Capstone Group 062 Design 97APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 2019Appendix E: Non-Ideal Environment TestHuman Noise DisturbancePurposeThe purpose of the human noise disturbance test is to iden-tify the effects of noise on the signal’s characteristics such asvoltage and frequencies. The results of this test will help final-ize the voltage thresholds and frequency ranges in the detectionalgorithm to account for real-world operation scenarios.Apparatus• a UE WonderBoom bluetooth speaker• Decibel X application for iPhone• 2 iPhones• Ideal environment tests set-up shown in Appendix DProcedureThe human disturbance is created following these steps:1. Turn on the UE WonderBoom speaker and connect it to aniPhone with bluetoothCapstone Group 062 Design 98APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 20192. Place the bluetooth speaker 3 meters away from the backof the window3. Play the test sound on the iPhone connected to the speaker(30)4. Take the second iPhone, open Decibel X, and measure thenoise level next to the window5. Adjust the volume of the iPhone playing the sound untilthe decibel meter on the second iPhone reads 60-70dB6. Place the accelerometer the position indicated by the redcircle in Figure D1 and connect to the microcontroller ac-cording to the schematic in Figure 14, section 7.1.7. Drop the mock bird onto the approximate area marked bylocation 1 (blue) in Figure D1 from Drop Height 1 listedin Table C1. Perform two impact. Save the signal for pro-cessing.8. Repeat Step 7 for location 6 indicated by Figure D1.ObservationsThe observations are summarized below.Capstone Group 062 Design 99APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 2019Table E1: Summary of Maximum Peak-to-Peak Voltage with 70dB noise inthe BackgroundMaximum Peak-to-PeakVoltage(V)Best case w/noise 0.5221worst case w/noise 0.2224Best case: No noise 0.5736Worst case: No noise 0.2997Noise Floor: Human Noise 0.0161As shown from Table E1 and Figure E1, the strength of thenoise floor is negligible compared to the strength of the impactsignal. Therefore, it should not have significant effect on theimpact signals, which is confirmed below.Capstone Group 062 Design 100APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 2019Figure E1: Noise Floor Measurement of Human Talking at 70dBFigure E1 shows the spectrogram and and the FFT of the back-ground noise with Human Talking at 70dB. Compared to theCapstone Group 062 Design 101APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 2019ideal environment background noise (Figure 5 at Section 2.3.1),there is a frequency peak at around 270Hz, which may be causedby a vibration due to the loud human noise. However, when welook at the amplitude at frequency domain, the highest peak isaround 0.09, which can be ignored compared to even the worstcase, which have all four of its peaks over 1.3 when we havesmall impact at the edge (see Figure 7 at section 2.3.2).Capstone Group 062 Design 102APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 2019Figure E2: Comparison of Signals with and without Noise disturbanceThe voltage of the impact signal in the time domain are rel-atively consistent, with the strength of the signal in non-idealenvironment slightly lower than ideal environment.The human noise disturbance dampens the voltage and by aboutCapstone Group 062 Design 103APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 20198% in the best case impact and the about 25%. The noise floor is3% of the best case impact and 7% of the worst case impact withnoise. In the frequency domain, the locations of the dominantpeaks remain constant, while the signal in ideal environmenthaving higher amplitude than the one in non-ideal environmentat those peaks. The worst case impact demonstrates the samecharacteristics.ConclusionHuman noise disturbance dampens the strength of the signal.Therefore, the voltage threshold in the detection algorithm shouldbe changed accordingly to account for the noise. There’s no ef-fect on the frequencies ranges.RainPurposeThe purpose of this to examine the effect of rain on the im-pact signals.Apparatus• a 15ft garden hoseCapstone Group 062 Design 104APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 2019• a hose spray nozzle• duct tape• 1 garbage bag• Ideal environment tests set-up shown in the Appendix DProcedure1. Connect one end of the hose to the hose spray nozzle, andthe other end to the water outlet2. Tape the garbage bag to the back side of the window asshown in Figure E3.3. Place the accelerometer the position indicated by the redcircle in Figure D1 and connect to the microcontroller ac-cording to the schematic in Figure 14, section 7.1.4. Turn on water and aim nozzel at the window.5. Drop the mock bird onto the approximate area marked bylocation 1 (blue) in Figure D1 from Drop Height 1 listedin Table C1. Perform two impact. Save the signal for pro-cessing.6. Repeat Step 7 for location 6 indicated by Figure D1.Capstone Group 062 Design 105APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 2019Figure E3: Full Rain Test SetupFigure E4: Window with Garbage Bag Sealing and RainCapstone Group 062 Design 106APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 2019ObservationsTable E2: Summary of Maximum Peak-to-Peak Voltage with Rain in theBackgroundMaximum Peak-to-PeakVoltage(V)Best case w/noise 0.3642worst case w/noise 0.1192Best case: No noise 0.5736Worst case: No noise 0.2997Noise Floor: Light Rain 0.0097The rain disturbance dampens the voltage and by about 36% inthe best case impact and the about 60%. The noise floor is 3%of the best case impact and 8% of the worst case impact withnoise. As shown from Table E2 and Figure E5, the strengthof the noise floor is negligible compared to the strength of theimpact signal. However, the strength of the signal is dampenedsignificantly.Capstone Group 062 Design 107APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 2019Figure E5: Noise Floor Measurement of RainAs shown in Figure E5, the rain generates vibration with randomfrequency peaks with amplitudes less than 0.04 which can be ig-nored compared to the ideal environment background noise(FigureCapstone Group 062 Design 108APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 20196 at Section 2.3.1),Figure E6: Comparison of Signals with and without rain disturbanceThe voltage of the impact signal in the time domain is damp-ened significantly.Capstone Group 062 Design 109APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 2019In the frequency domain, the locations of the dominant peaksremain constant, while the signal in ideal environment havinghigher amplitude than the one in non-ideal environment at thosepeaks. The worst case impact demonstrates the similar charac-teristics.ConclusionIn conclusion, the maximum peak-to peak voltage difference ofan impact is lower in non-ideal environment compared to idealenvironment and the voltage threshold in the detection algo-rithm will be updated accordingly to account for possible sce-narios with rain. The dominant frequencies remain constant.Capstone Group 062 Design 110APPENDIX F: IMPACT DATA PROCESSING May 16, 2019Appendix F: Impact Data ProcessingIn order to determine an actual bird impact, a series of mockbird impact tests are performed to figure out the characteristicssuch as duration and frequency range. For the Discrete TimeFourier Transform we use the algorithm of fast Fourier Trans-form to calculate(4).The process of calculation is shown as below and more detailcan be referred to the code(31).1. Receive analog data from accelerometer at a rate of 2000Hzand store in a global array.2. Convert the signal into voltage.3. Remove the DC component by subtract the average voltageof stored data4. Measure the voltage difference by subtracting maximumvoltage by minimum voltage in the array5. Measure the duration by setting top and bottom voltagethreshold value and measure time when it dampens belowthat threshold6. Find frequency peaks by using Discrete Time Fourier Trans-form to convert the signal in frequency domainCapstone Group 062 Design 111APPENDIX F: IMPACT DATA PROCESSING May 16, 2019Figure F1: Accelerometer Impact Voltage in Time DomainFigure F1 displays how voltage difference is measured, FigureF2 displays how signal duration is measured, and Figure F3displays how frequency peaks are found.Capstone Group 062 Design 112APPENDIX F: IMPACT DATA PROCESSING May 16, 2019Figure F2: Accelerometer Impact Voltage in Time DomainFigure F3: Accelerometer Impact Voltage Signal in Frequency DomainCapstone Group 062 Design 113APPENDIX F: IMPACT DATA PROCESSING May 16, 2019ObservationsBy repeating mock bird impact testing and changing differentmaterial of mock bird (Section 2.1), we are able to characterizethe features of a bird impact, summarized in Table F1.Table F1: Impact Signal Patterns of AccelerometerTest Speed Voltage Difference (V) Duration (s) Frequency peaks (Hz)Low 0.1297 1.5725 84,173Medium 0.3258 0.2330 85,175High 0.5539 0.2662 86,175Minimum 0.0483 0.1175 85,178Table F1 is to record the Voltage Difference, Duration and Fre-quency peaks of accelerometer signal. (For the specific value ofspeed, please refer to Appendix C: Table C2.)Capstone Group 062 Design 114APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019Appendix G: Unimplemented Detection Sys-tem ComponentsFour components were considered for implementation in the de-tection system, but were not included in the final design. Thesecomponents are:1. Digital filter for the accelerometer (Section 3.1.1)2. Microphone sensor for impact detection3. WiFi disconnection in the case of long-term loss of network4. Damping Ratio Analysis for Detection AlgorithmThese components were not included but could be useful in fu-ture iterations of the system. They are suggested as potentialupgrades or additional functionality that could be added to im-prove various aspects of system function.Digital FilterA digital filter implemented in detection system removes thehigh-frequency components of signals produced by the accelerom-eter. These high-frequency signal components may interferewith the lower frequency analog signals in the 50-260Hz rangethat are indicative of a bird impact event. Therefore, a digi-tal filter enhances the ability of the detection system to analyzeCapstone Group 062 Design 115APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019signals from the sensor(32). The system is sampling the analogsignals at 2000Hz, so signals of 1000Hz or less may be filtereddigitally according to Nyquist’s Sampling Theorem. As the max-imum expected frequency on event of a bird impact is 260Hz,the digital filter is designed with a normalized cutoff frequencyof 0.26.A digital filter is implemented in the Arduino (Section 3.3) bymultiplying sample and a defined number of preceding samplesby a set of predetermined coefficients, then summing the result.The following filters were tested with recorded data from simu-lated bird impacts (Section 2):1. Rectangle2. Von Hann3. Hamming4. Blackman5. Chebyshev6. KaiserThese filter types were simulated using the MATLAB windowDe-signer command(33). Figure G1 compares the frequency domainoutput of each filter when applied to the same sample impactCapstone Group 062 Design 116APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019signal. Frequency domain output is the primary concern as it isused in the detection algorithm (Section 3.2).Figure G1: Frequency Domain Effect of Various Digital FilterseTable G1 compares the characteristics of each filter when appliedto a typical bird impact event signal. The digital filter propertiesare defined as:Mainlobe Width: Double the point at which the signal powerfalls 3dB below the peak power.Relative Sidelobe Attenuation: Difference between power ofthe mainlobe peak and peak power in sidelobes, measuredin dB.Capstone Group 062 Design 117APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019Leakage Factor: Ratio of power in the sidelobes of a signal tototal signal power.Length of Filter: The number of previous samples of the sig-nal required to apply the filter, in addition to the mostrecent samples.Table G1: Comparison of Digital Filter Properties with Bird Impact SignalDigital FilterMainlobeWidthRelativeSidelobeAttenuationLeakageFactorLength ofFilterRectangular 0.29688 -12.4dB 8.68% 6Von Hann 0.25781 -31.6dB 0.05% 12Hamming 0.25 -36.7dB 0.04% 11Blackman 0.25 -59.1dB 0% 14Chebyshev 0.26562 -100.0dB 0% 8Kaiser 0.27344 -24.2dB 0.45% 8The Chebyshev filter is recommended for use in the system dueto having approximately 0% leakage and a cutoff frequency veryclose to the desired cutoff frequency. The Chebyshev filter forCapstone Group 062 Design 118APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019the system is defined using the following set of coefficients:y(n) = 0.0055x(n) + 0.0388x(n− 1) + 0.1418x(n− 2) + 0.3482x(n− 3)+ 0.6333x(n− 4) + 0.8936x(n− 5) + 1.0000x(n− 6) + 0.8936x(n− 7)+ 0.6333x(n− 8) + 0.3482x(n− 9) + 0.1418x(n− 10)+ 0.0388x(n− 11) + +0.0055x(n− 12)To implement this filter in the detection system, these coeffi-cients are programmed into the code. As samples are read fromthe detection system sensor (Section 3.1), the samples should bemultiplied by the appropriate coefficients.Microphone SensorThe CMA-4544pf microphone sensor is one of the potential im-pact sensors of the detection system. Microphone sensors areknown to have a wide range of applications in detecting vibrations(8).For example, microphones have been previously used for mon-itoring underground vibrations continuously and reliably(34).Since the microphone sensor must detect the audible soundsfrom bird collisions to satisfy FR1, the sensor must operate inthe frequency range of human hearing (20 to 20,000Hz)(35).Considering the cost of the microcontroller, the sensors, and theother miscellaneous material, the budget of the microphone wasdetermined to be less than $10 to satisfy C1. The considerationsCapstone Group 062 Design 119APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019for choosing a microphone sensor (36) are summarized in TableG2.Table G2: Microphone Sensor Minimum Specification and ComparisonFeature Minimum Specification CMA-4544pfInput 20 to 20,000Hz 20 to 20,000HzOperating Voltage Range 3.3 to 5V 3 to 10VCost less than $10 $1.2The microphone may improve the accuracy of the detection sys-tem in environments that were not tested in the developmentof the Bird Impact Detection System. If the variety of environ-ments in which the system is expected to operate is increasedin the future, the microphone may become useful as a backupsensor for the accelerometer. Therefore, it is recommended foraddition to future iterations of the detection system.WiFi Disconnection HandlerIn validation testing of the Bird Impact Detection System, nosituation was encountered where the wireless communication(Section 4) was disconnected for an extended period of time.Therefore, the detection algorithm (Section 3.2) does not ac-count for the situation in which the communication system isinaccessible for an extended period of time due to unforeseencircumstances. The Bird Impact Detection System currentlyCapstone Group 062 Design 120APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019utilises the UBC Visitor WiFi network (Section 4.3), which iskept consistently accessible by UBC IT services. Due to this, acontingency for extended loss of connection was not a priorityin the detection system algorithm.Future iterations of the system may be used outside of UBCCampus, or in locations on UBC Campus where it is more dif-ficult to obtain a WiFi connection. If the system is plannedfor future use in these or other similar circumstances, it is rec-ommended that the detection system algorithm be altered toaccount for impacts that occur while the communication systemcannot be accessed. Such an algorithm would store a record ofimpact events that are not able to be sent immediately to datastorage (Section 5) to be sent once a connection is reestablished.Damping Ratio Analysis for Detection AlgorithmIn the current detection algorithm, the method to determinethe duration of an impact is by counting the amount of the timebetween the maximum peak-to-peak voltage until the signal set-tles back to noise floor as shown in Figure F2. However, thismethod require taking more data samples in order to capture thefull duration of the signal. Another method that would allow usto identify the damping characteristics of an impact signal.Capstone Group 062 Design 121APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019Motivation The damping ratio is a character unique to theimpact signal and can be used to effectively distinguish betweenimpact and other disturbances. A bird impact has a distinctivesignal profile different from other disturbances in the environ-ment such as rain or human talking. As shown in the FigureG2 and G3, the envelope of the impact signals display a cleardamping characteristic that is different from other disturbancesignals.Figure G2: Example Signal of ImpactCapstone Group 062 Design 122APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019Figure G3: Example Signal of Human NoiseCapstone Group 062 Design 123APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019How to Find the Damping Ratio in MatlabFigure G4: Example Signal of Impact1. Starting with an example signal shown in G4, we need toclean up the time-domain signal by eliminating all data en-tries before the index that corresponds to maximum volt-age,in order to get an envelope of the signal that pertainsto an exponential decay.Figure G5: Example Signal of Impact2. Use the “envelope” function [yupper, ylower] = envelope(x, np,′ peak′)in Matlab, to extract the upper envelope of the signal. Theenvelope function uses spline interpolation over local max-ima separated by an adjustable number of samples. yupperCapstone Group 062 Design 124APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019is the variable denoting the upper envelope. np is peak sep-aration, which is the number of sample over which the localmaxima are separated. The bigger the np, the smoother theenvelope, as shown in Figure G5.Figure G6: Different Configuration of Envelope Based on Peak Separationdenoted by np3. Using the Curve Fitting Tools in Matlab, we can generatethe an exponential curve fit to the envelope. Since thecurve fitting function is y = a ∗ e(b ∗ x), it is importantto eliminate the offset to allow for the constant term thatis not present in the function. The R-squared parameter isthe the proportion of the variance in the dependent variablethat is predictable from the independent variable, which isimportant for determining the quality of the fit. The closerR-squared is to 1, the better the fit. This process is shownin Figure G6.Capstone Group 062 Design 125APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019Figure G7: Finding the Largest R-squared Value4. Since we are looking at the damping ratio, using visualinspection of the time domain signal, we can see that thesamples between 0 to 200 display damping characteristics.Therefore, we can apply curve fit to the 200 samples anddiscard the rest. The resulting R-squared value is 0.94,which is a good fit.5. Using Matlab to automate the process for more data, wecan define the range of damping ratio and apply to theidentification algorithm.This method is not currently implemented because the arduino’slimited memory does not allow such heavy computation. How-ever,with a more powerful microcontroller such as an RaspberryPi, such functionality can be achieved.Capstone Group 062 Design 126APPENDIX H: SYSTEM PLACEMENT May 16, 2019Appendix H: System PlacementTwo options are available for the placement of the Bird ImpactDetection system. These options are:1. Placement inside the building in which the window is in-stalled.2. Placement outside the building in which the window is in-stalled.In both options, the sensor would be affixed directly to the glassof the window, and the microcontroller would be affixed directlyto the metal frame (Section 7.2). Bird impacts were conductedin both conditions using the simulated bird impact setup (Sec-tion 2). Figure H1 compares the sensor voltage readings fromimpacts with the sensor placed on the inside of the window (red)and the outside of the window (blue). The sensor was affixedto the same horizontal and vertical position on the window forboth the inside and the outside positions. The simulated birdimpact was on the same location of the window for both sensorplacements.Repeated impacts are performed on both the inside and outsideof the window and their peak-to-peak voltage are comparable asCapstone Group 062 Design 127APPENDIX H: SYSTEM PLACEMENT May 16, 2019Figure H1: Comparison of Repeated Impact Signals Performed Inside andOutside of the Windowshown in Figure H1. This is to show that placing the sensor oninside or outside has little effect on the accelerometer signal.To reduce the complexity of the system, the sensor is placed onthe inside of the window. This decision is reflected in the overallsystem installation (Section 7). It is assessed that this reducescomplexity by the more controlled conditions inside of buildingscompared to outside. If the system were placed outside, morestrict design constraints would be required with regard to weath-erproofing and access to power. A plan was created for the caseof the system being placed outside, presented in Appendix L.Capstone Group 062 Design 128APPENDIX I: MICROCONTROLLERS EVALUATED May 16, 2019Appendix I: Microcontrollers EvaluatedThe other options that were considered for the microcontrollerare:• Arduino MKR WAN 1300 (37)• LinkIt Smart 7688 (38)Table I1 compares these two microcontrollers to the ArduinoUno WiFi Rev2.The Arduino MKR WAN 1300 does not provide enough built-inmemory for the project, with regards to the worst-case mainte-nance needs. The LinkIt Smart 7688 was not chosen due to thenecessity of adding an SD card for data storage. In addition,the Arduino Uno WiFi Rev2 is already familiar to the groupmembers of Capstone Group 62. It has extensive online supportfor the functionality required for the project, reinforcing it asthe microcontroller choice over the other options.Capstone Group 062 Design 129APPENDIX I: MICROCONTROLLERS EVALUATED May 16, 2019Table I1: Microcontroller Evaluation ComparisonFeatureMinimumSpecifica-tionArduinoUno WiFiRev2ArduinoMKRWAN 1300LinkItSmart7688Analog Pins 1 6 7 12OutputVoltage3.3V 3.3V 3.3V 3.3VOutput Cur-rent300µA 50mA 7mA 4mAClock Speed 520Hz 16MHz 48MHz 580MHzFlash Mem-ory15kB 48kB 256kB 32MBMemoryStorage33.6kB 6,144kB 32kB SD CardOnboardWiFi Mod-uleYes Yes No YesCapstone Group 062 Design 130APPENDIX J: GOOGLE SHEETS INFORMATION May 16, 2019Appendix J: Google Sheets InformationGoogle Sheets, provided by Google Drive(26), was considered asthe second data storage method for the system. Google Sheetsmeets or exceeds all of the minimum specifications for data stor-age, so it provides a viable solution. In addition, Google Sheetsis an accessible format for raw data storage that is familiar tothe client, and is likely to be familiar to other potential users.It is also a free service provided by Google, as data stored in theGoogle Sheets application is unaffected by Google Drive freestorage limits. Google Sheets does require data to be presentedin HTTPS format to be parsed, meaning an API should be usedto connect it to the detection system (Section 3).However, while Google Sheets meets or exceeds all of the re-quirements of data storage (Section 5), issues were encounteredin the implementation of Google Sheets alongside Cayenne (Sec-tion 5.3). While Cayenne was able to receive data packages reli-ably during validation testing, Google Sheets became unreliablewhen implemented within the detection system state machine(Section 3.2). Therefore, despite meeting or exceeding the min-imum specifications defined, Google Sheets was not included inthe final design of the system.Capstone Group 062 Design 131APPENDIX K: DATABASE AND UI SETUP May 16, 2019Appendix K: Database and UI SetupA MyDevices Cayenne account is required to set up and accessthe features of the Cayenne database and UI. A free accountmay be registered at the MyDevices Cayenne website (39) tocomplete this setup.To connect the Arduino Uno Wifi Rev2 (Section 3.3) to theCayenne database, follow the tutorial provided on the MyDe-vices website(40). The tutorial for the Arduino Uno with a Wifishield should be followed, ensuring the following global vari-ables in the main code(31) match the values presented for thedatabase:1. MQTT Username2. MQTT Password3. Client ID4. MQTT Server5. MQTT PortName the device any desired, appropriate identifier. Ensurethat the UBC Visitor WiFi connection is available, and thatthe channel in the tutorial code matches the desired channel forCapstone Group 062 Design 132APPENDIX K: DATABASE AND UI SETUP May 16, 2019data transmission. Once the network and Arduino Uno WiFiRev2 are ready, run the code from the tutorial on the device.When the device is displayed as connected on the Cayenne dash-board, the custom widgets for the UI may be added. To adda custom widget, choose ‘device/widget’ from the ‘Add new. . . ’drop-down menu, pictured in Figure K1. The ‘Custom Wid-gets’ option should be used to add the widgets for the systemUI (Section 8). Note that the counter widget should already beadded from the tutorial completed to add the device, and thatwidget names and channels may be changed later if needed.Figure K1: Cayenne ’Add Widget’ Drop-Down MenuThe custom widgets for the UI are added as follows:Numerical Counter: Choose the ‘Value’ widget. Name theCapstone Group 062 Design 133APPENDIX K: DATABASE AND UI SETUP May 16, 2019widget with the device location identifier and ensure thecorrect device and channel are chosen. The data type shouldbe set to ‘Counter’, with units of ‘Analog’. Once complete,the ‘Add Widget’ button should be available if the deviceis connected. This will add the widget to the dashboard foruse. Figure K2 displays the settings that should be used.Line Chart: Choose the ‘Line Chart’ widget. Name the widgetappropriately for the device location identifier and ensurethe correct device and channel are chosen. The data typeshould be set to ‘Counter’, with units of ‘Analog’. Oncecomplete, the ‘Add Widget’ button should be available ifthe device is connected. This will add the widget to thedashboard for use. Figure K3 displays the settings thatshould be used. If desired, the y-axis scale may be adjusted.Figure K2: Settings for Cayenne Numerical CounterCapstone Group 062 Design 134APPENDIX K: DATABASE AND UI SETUP May 16, 2019Figure K3: Settings for Cayenne Line ChartCapstone Group 062 Design 135APPENDIX L: SYSTEM WATERPROOFING PLAN May 16, 2019Appendix L: System Waterproofing PlanThis is the installation method for the system if it is installedon the outside of a window. The system (Section 1) must beable to operate for seven days without need for maintenance tosatisfy NFR2. Vancouver has 164 rainy days per year on aver-age (41). The exposure of the system to rain or condensation isinevitable should the system be situated on a window. Water-proofing removes the risk of damage or breakage of the physicaldevice on the window by way of exposure to water. Assumingthat it rains every 2.2 days, our waterproofing method must beable to protect our system consistently from water exposure toenable our system to consistently detect bird impacts. This wa-terproofing plan includes how to waterproof each of the systemcomponents individually.Microcontroller Waterproofing SolutionThe Arduino system (Section 3.3) will be placed in a weather-resistant case. Holes will be drilled through the case so thatthe Arduino ports that are needed for the system will be acces-sible. Once required wires are in place, silicone or epoxy willbe used as an effective way to seal to holes. The method ofsilicon waterproofing components of the system was evaluatedCapstone Group 062 Design 136APPENDIX L: SYSTEM WATERPROOFING PLAN May 16, 2019as the implementation of silicon for the usage of waterproofingor sealing cracks is reliable. It is a solution that is ubiquitousand robust in areas of heat exposure, moisture and chemical use(42). The method of waterproofing for the Arduino provides thefollowing features: lasts a minimum of 20 years(43).Impact Sensors Waterproofing SolutionA layer of silicone or epoxy will be applied to the accelerometerto keep it from water damage. The method of silicon water-proofing components of the system was formulated as the im-plementation of silicon for the usage of waterproofing or sealingcracks is reliable. It is a solution that is ubiquitous and robustin areas of heat exposure, moisture and chemical use (42). Themethod of waterproofing for the impact sensor provides the fol-lowing features: last a minimum of 20 years(43).Capstone Group 062 Design 137 UBC Social Ecological Economic Development Studies (SEEDS) Sustainability Program Student Research Report        CAPSTONE Group 062 Bird Impact Detection System Design Document Susanna Chen, David He, Kieran Morton, Emily Xiong, Stevan Vicentijevic University of British Columbia EECE 4XX Themes: Biodiversity, Buildings May 16, 2019         Disclaimer: “UBC SEEDS Sustainability Program provides students with the opportunity to share the findings of their studies, as well as their opinions, conclusions and recommendations with the UBC community. The reader should bear in mind that this is a student research project/report and is not an official document of UBC. Furthermore, readers should bear in mind that these reports may not reflect the current status of activities at UBC. We urge you to contact the research persons mentioned in a report or the SEEDS Sustainability Program representative about the current status of the subject matter of a project/report”. May 16, 2019Executive SummaryThe Bird Impact Monitor is a project inspired by SEEDS andtheir initiative on creating bird-friendly technology. UBC hap-pens to be on the migrating path for many bird species andbirds have important roles in the ecosystem. Previously stud-ies commissioned by SEEDs estimated that over 10,000 die dueto window collision on campus. The purpose of this project isto collect real-time bird impact data to help SEEDs implementa bird-friendly building guideline and for researchers to betterunderstand birds’ behavior.Our goal is be replace the manual data collection done by SEEDSin previous years with an automated system that is able to detectbird impacts more accurately and with minimal maintenance.More detailed outlines can be found the the Requirements doc-ument.The device is made of two sections: the detection system andthe communication system. The detection system consists of anaccelerometer connected to an Arduino Uno Wifi Rev 2. Theaccelerometer will be installed on the windows and transmitsanalog data to the Arduino for analysis and identification. OnceCapstone Group 062 Design 2May 16, 2019an impact is identified, the Arduino will send data to MyDevicesCayenne over Wifi. The client will be able to access and visual-ize the data using Cayenne.The prototype we have developed is able to satisfy all of SEEDsrequirements, in particular, it accurately detects bird impactwith a 95% accuracy while rejecting environmental disturbances,it costs less than $80 per unit, and obstructs less than 10% ofthe window. Further recommendations to the project are out-lined in the design documents and will serve as guidelines forfuture projects for improvements and scalability.Capstone Group 062 Design 3CONTENTS May 16, 2019Contents1 System Architecture 171.1 System Operation . . . . . . . . . . . . . . . . . . 192 Simulation of Bird Impact 212.1 Mock Bird . . . . . . . . . . . . . . . . . . . . . . 222.2 Pendulum Setup . . . . . . . . . . . . . . . . . . 252.3 Ideal Environment Simulation . . . . . . . . . . . 252.3.1 Sampling rate . . . . . . . . . . . . . . . . 262.3.2 Results Summary . . . . . . . . . . . . . . 272.4 Non-Ideal Environment Simulation . . . . . . . . 282.4.1 Results Summary . . . . . . . . . . . . . . 293 Detection System 293.1 Impact Sensor . . . . . . . . . . . . . . . . . . . . 303.1.1 Accelerometer . . . . . . . . . . . . . . . . 303.1.2 Anti-aliasing Filter . . . . . . . . . . . . . 323.1.3 Other Sensors Evaluated . . . . . . . . . . 343.2 Detection Algorithm . . . . . . . . . . . . . . . . 353.2.1 State Machine System . . . . . . . . . . . 363.2.2 Initialization State . . . . . . . . . . . . . 363.2.3 Voltage Reading State . . . . . . . . . . . 393.2.4 Identification State . . . . . . . . . . . . . 41Capstone Group 062 Design 4CONTENTS May 16, 20193.2.5 Data uploading . . . . . . . . . . . . . . . 423.3 Microcontroller . . . . . . . . . . . . . . . . . . . 433.3.1 Microcontroller Design Considerations . . 433.3.2 Minimum Specification Description . . . . 453.4 Recommendations for Future Components . . . . 464 Communication System 474.1 Communication System Design Considerations . . 474.2 Minimum Wireless Specifications Description . . . 484.3 UBC Visitor WiFi Description . . . . . . . . . . . 494.4 Accessing the UBC Visitor Network . . . . . . . . 494.5 Other Data Communication Designs Evaluated . 505 Data Storage 515.1 Data Storage Design Considerations . . . . . . . . 515.2 Minimum Specification Description . . . . . . . . 525.3 Cayenne Database . . . . . . . . . . . . . . . . . 535.4 Other Data Storage Designs Evaluated . . . . . . 546 Power Source 556.1 Minimum Specification Description . . . . . . . . 566.2 Other Power Options Evaluated . . . . . . . . . . 577 System Setup 587.1 Sensor Connections . . . . . . . . . . . . . . . . . 59Capstone Group 062 Design 5CONTENTS May 16, 20197.2 Detection System Window Installation . . . . . . 607.2.1 Microcontroller Window Installation . . . 617.2.2 Sensors Window Installation . . . . . . . . 637.2.3 Power Source Installation . . . . . . . . . 647.3 MyDevices Cayenne Database Connection . . . . 648 User Interface 658.1 Minimum Specification Description . . . . . . . . 66References 73Appendix A: Client Sample Collected Data 74Appendix B: Bird Impact Calculations 75Appendix C: Simulation Pendulum Setup 80Pendulum Setup Procedure . . . . . . . . . . . . . . . 81Pendulum Setup Calculations . . . . . . . . . . . . . . 83Appendix D: Ideal Environment Test 86Varying Sensor Placement Test . . . . . . . . . . . . . 86Varying Impact Location Test . . . . . . . . . . . . . . 92Appendix E: Non-Ideal Environment Test 98Human Noise Disturbance . . . . . . . . . . . . . . . . 98Rain . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104Capstone Group 062 Design 6CONTENTS May 16, 2019Appendix F: Impact Data Processing 111Appendix G: Unimplemented Detection System Com-ponents 115Digital Filter . . . . . . . . . . . . . . . . . . . . 115Microphone Sensor . . . . . . . . . . . . . . . . . 119WiFi Disconnection Handler . . . . . . . . . . . . 120Damping Ratio Analysis for Detection Algorithm . . . 121Appendix H: System Placement 127Appendix I: Microcontrollers Evaluated 129Appendix J: Google Sheets Information 131Appendix K: Database and UI Setup 132Appendix L: System Waterproofing Plan 136Capstone Group 062 Design 7LIST OF FIGURES May 16, 2019List of Figures1 High-Level Design of the System . . . . . . . . . . 172 System Operation Data Pathway through System 203 Cayenne Data Presentation with Sample Data . . 224 Mock Birds For Validation Tests . . . . . . . . . . 245 Accelerometer Signal Spectrogram of Ideal Envi-ronment Background Noise and Simulated birdImpact . . . . . . . . . . . . . . . . . . . . . . . . 266 Best Case Accelerometer Impact Signal, Time Do-main vs. Frequency Domain . . . . . . . . . . . . 277 Worst Case Accelerometer Impact Signal, TimeDomain vs. Frequency Domain . . . . . . . . . . 288 Detection System Diagram . . . . . . . . . . . . . 309 Sample Bird Impact Signal Before Anti-aliasingFilter is Applied . . . . . . . . . . . . . . . . . . . 3310 Sample Bird Impact Signal After Anti-aliasingFilter is Applied . . . . . . . . . . . . . . . . . . . 3311 System State Machine Diagram . . . . . . . . . . 3712 Reset Flag Register Bits (1) . . . . . . . . . . . . 3913 Recovery from Power Loss Flowchart . . . . . . . 4014 Flowchart of the Detection Algorithm . . . . . . . 42Capstone Group 062 Design 8LIST OF FIGURES May 16, 201915 Detection System Wiring Schematic. It is notedthat due to a limitation in the schematic gener-ator, the ADXL335 is displayed instead of theADXL337. . . . . . . . . . . . . . . . . . . . . . . 5916 Microcontroller Installed in Plastic Box . . . . . . 6217 Microcontroller inside Plastic Box (Red Circle),Accelerometer with Cover (Blue Circle) Affixedto Sample Window . . . . . . . . . . . . . . . . . 6318 Cayenne Dashboard UI featuring numerical counter(left) and line plot (right) widgets, populated withsample data. . . . . . . . . . . . . . . . . . . . . . 66C1 Photo of Mock Bird Used for Validation Tests . . 81D1 Drops Performed at Varying Sensor Location(red)While Fixing the Impact Location (Blue) . . . . 88D2 Scatter Plot with Best Fit Line of Voltage vs Dis-tance by Varying Impact Location . . . . . . . . 90D3 Acceptable Sensor Placement Locations Indicatedby Green . . . . . . . . . . . . . . . . . . . . . . . 92D4 Drops Performed at Varying Impact Location(Blue)While Fixing the Sensor Location . . . . . . . . . 94D5 Scatter Plot of Voltage vs Distance by VaryingImpact Location . . . . . . . . . . . . . . . . . . . 96Capstone Group 062 Design 9LIST OF FIGURES May 16, 2019E1 Noise Floor Measurement of Human Talking at70dB . . . . . . . . . . . . . . . . . . . . . . . . . 101E2 Comparison of Signals with and without Noisedisturbance . . . . . . . . . . . . . . . . . . . . . 103E3 Full Rain Test Setup . . . . . . . . . . . . . . . . 106E4 Window with Garbage Bag Sealing and Rain . . . 106E5 Noise Floor Measurement of Rain . . . . . . . . . 108E6 Comparison of Signals with and without rain dis-turbance . . . . . . . . . . . . . . . . . . . . . . . 109F1 Accelerometer Impact Voltage in Time Domain . 112F2 Accelerometer Impact Voltage in Time Domain . 113F3 Accelerometer Impact Voltage Signal in FrequencyDomain . . . . . . . . . . . . . . . . . . . . . . . 113G1 Frequency Domain Effect of Various Digital Filterse117G2 Example Signal of Impact . . . . . . . . . . . . . 122G3 Example Signal of Human Noise . . . . . . . . . . 123G4 Example Signal of Impact . . . . . . . . . . . . . 124G5 Example Signal of Impact . . . . . . . . . . . . . 124G6 Different Configuration of Envelope Based on PeakSeparation denoted by np . . . . . . . . . . . . . 125G7 Finding the Largest R-squared Value . . . . . . . 126H1 Comparison of Repeated Impact Signals PerformedInside and Outside of the Window . . . . . . . . . 128Capstone Group 062 Design 10LIST OF FIGURES May 16, 2019K1 Cayenne ’Add Widget’ Drop-Down Menu . . . . . 133K2 Settings for Cayenne Numerical Counter . . . . . 134K3 Settings for Cayenne Line Chart . . . . . . . . . . 135Capstone Group 062 Design 11LIST OF TABLES May 16, 2019List of Tables1 Technical Specifications of ADXL337 . . . . . . . 322 Microcontroller Minimum Specifications . . . . . 463 Data Communication Minimum Specifications . . 484 Communication System Evaluation . . . . . . . . 505 Data Storage Minimum Specifications . . . . . . . 536 Data Storage Evaluation Comparison . . . . . . . 557 Power Source Minimum Specifications . . . . . . . 568 Power Source Evaluation Comparison . . . . . . . 579 UI Minimum Specifications . . . . . . . . . . . . . 66B1 Energy transfer of 7g bird at bird-window collision. 76B2 Energy transfer of 7g bird at bird-window collision. 77B3 Energy transfer of 18g mock bird at bird-windowcollision. . . . . . . . . . . . . . . . . . . . . . . . 79B4 Energy transfer of 57g mock bird at bird-windowcollision. . . . . . . . . . . . . . . . . . . . . . . . 79C1 Pendulum Drop Angles of 18g bird with StringLength of 1.9m. . . . . . . . . . . . . . . . . . . . 85C2 Pendulum Drop Angles of 57g Bird with StringLength of 0.60m. . . . . . . . . . . . . . . . . . . 85D1 Results from Varying Sensor Placements . . . . . 89D2 Results from Varying Impact Locations . . . . . . 95Capstone Group 062 Design 12LIST OF TABLES May 16, 2019E1 Summary of Maximum Peak-to-Peak Voltage with70dB noise in the Background . . . . . . . . . . . 100E2 Summary of Maximum Peak-to-Peak Voltage withRain in the Background . . . . . . . . . . . . . . 107F1 Impact Signal Patterns of Accelerometer . . . . . 114G1 Comparison of Digital Filter Properties with BirdImpact Signal . . . . . . . . . . . . . . . . . . . . 118G2 Microphone Sensor Minimum Specification andComparison . . . . . . . . . . . . . . . . . . . . . 120I1 Microcontroller Evaluation Comparison . . . . . . 130Capstone Group 062 Design 13List of Abbreviations May 16, 2019List of AbbreviationsC1 Design Document Constraint 1. Pages:. 31, 119C2 Design Document Constraint 2. Pages:. 52C3 Design Document Constraint 3. Pages:. 56C4 Design Document Constraint 4. Pages:. 60C5 Design Document Constraint 5. Pages:. 48FR1 Design Document Functional Requirement 1. Pages:. 30,31, 36, 119FR2 Design Document Functional Requirement 2. Pages:. 36,48, 53FR3 Design Document Functional Requirement 3. Pages:. 46,48, 53, 66NFR1 Design Document Non-Functional Requirement 1. Pages:.25, 29–31, 36, 60NFR2 Design Document Non-Functional Requirement 2. Pages:.36, 45, 50, 53, 56, 66, 136NFR3 Design Document Non-Functional Requirement 3. Pages:.48Capstone Group 062 Design 14List of Abbreviations May 16, 2019List of Key TermsAliasing: Misidentification of the frequency of a signal. Causesdistortion or error.Analog Data: For a signal that is continuous, its time-varyingfeature is represented with another time-varying quantity.Bird Impact: The event where a bird collides with the windowupon which the Bird Impact Detection system is installed.Database: A set of data that is held in a structured way in acomputer.Data Segment: A piece of a data packet containing certaininformation for storage. Includes timestamps and locationdata.Kinglet: A type of bird identified by the client as being ofhigh concern for bird impacts on UBC Campus.Microcontroller: A computer that is composed on an in-tegrated circuit, that has various distinguishable features(number of CPUs, memory, input/output peripherals).Mock Bird: An object we use in order to simulate the equiv-alent energy produced by a bird, i.e., a kinglet.Capstone Group 062 Design 15List of Abbreviations May 16, 2019Nyquist Frequency: Twice the maximum expected frequencyof a signal, the minimum rate at which the signal may besampled without introducing error.SEEDS: The UBC Social Ecological Environmental Develop-ment Studies program.Sensor: A device that can detect or measure physical proper-ties.User Interface: The method in which an user and a computersystem interact.Voltage: A potential difference with the unit of Volts.Capstone Group 062 Design 161 SYSTEM ARCHITECTURE May 16, 20191 System ArchitectureThe design for the product is divided into four major compo-nents:• Detection System• Communication System• Data Storage• User Interface (UI)Figure 1: High-Level Design of the SystemThe detection system refers to an accelerometer and microcon-troller device that will be attached to the window being mea-sured (Section 3). The detection system in the system architec-ture is seen in Figure 1. The purpose of the detection systemportion of the device is to monitor the window for any sufficientCapstone Group 062 Design 171 SYSTEM ARCHITECTURE May 16, 2019signal that represents a bird colliding with the glass. The detec-tion system then sends this data to the data storage device foruse and analysis by SEEDS.The communication system (Section 4) refers to the WiFi con-nection the detection system uses to communicate data to datastorage (Section 5). This subsystem ensures that all bird impactdata recorded by the detection system is accurately transmittedto data storage. The primary purpose of the communicationsystem is to make access of data more convenient by making itremotely accessible.Data storage refers to Cayenne, which the detection systemsends bird impact information to (Section 5). The purpose ofthe data storage portion of the device is to store impacts thatare detected by the detection system. The data storage compo-nent provides a remote database that expands upon the spaceavailable for storage of impact data. As well, the data storagemakes the impact data consistently available for the UI and ac-cess by SEEDS.UI refers to the Cayenne Dashboard, which is used to presentthe data stored in the data storage component to users of theCapstone Group 062 Design 181 SYSTEM ARCHITECTURE May 16, 2019system (Section 8). It processes the data in data storage andpresents it in an easily readable and user-friendly format. Thisincludes a numerical counter that presents the location the datawas collected, and a tally of total impacts at that location. Inaddition, the UI plots the data over time from the location as-sociated with the counter.1.1 System OperationThe system is designed to detect bird impact events that occuron the window the system is installed upon. An occurrence ofa bird impact is defined as the primary condition in which thesystem will perform functions. The system does not performfunctions outside of monitoring for the occurrence of a bird im-pact event. Figure 2 displays the path of data from a bird impactthrough the system.The impact sensors continuously transmit data to the micro-controller representing the vibrations in the inner pane of thewindow the system is installed on. When a bird impacts thewindow the system is mounted on, the vibration generated isconverted into analog signals by the impact sensors (Section3.1). These analog signals are then transmitted as voltage alongCapstone Group 062 Design 191 SYSTEM ARCHITECTURE May 16, 2019Figure 2: System Operation Data Pathway through Systemwires to the microcontroller (Section 3.3) for processing.Analog data is received by the microcontroller through wiresthat connect it to the impact sensors. The microcontroller thenprocesses these analog signals, and monitors said signals for signsof a bird impact. When an impact is detected, the microcon-troller records the event. Recording consists of creating an ob-ject in the microcontroller’s memory, including the location andtime of the impact. Location is defined as an identifier of whichwindow the system is installed on, consisting of the building andan index referring to the window. Appendix A displays exam-ples of locations recorded, in the column marked ’facade’. ACapstone Group 062 Design 202 SIMULATION OF BIRD IMPACT May 16, 2019digital record of the impact is then transmitted using the com-munication system (Section 4) to data storage (Section 5). Anacknowledgement of the impact event is sent to the appropri-ate Cayenne channel. The Cayenne channel designates at whichbuilding location the system is located, and is coded into theArduino.The digital record packets sent by the microcontroller via WiFiare then received by Cayenne. Figure 3 displays how data isstored in Cayenne when a bird impact is received. Each linerepresents one data package that was received from the deviceby Cayenne. Sensor name is used to identify the location of thesystem, and is associated with the channel. Value refers to thenumber of impacts total that have been identified by the systemsince it was last reset. Timestamp is the approximate time whenthat data package was received, indicating when the associatedimpact occurred.2 Simulation of Bird ImpactIn a literature review, no previous work regarding the repeatablerecreation of a bird impact was found. Due to this, a methodfor simulating an bird impact is created for use in designing andtesting the Bird Impact Detection system. The client identifiedCapstone Group 062 Design 212 SIMULATION OF BIRD IMPACT May 16, 2019Figure 3: Cayenne Data Presentation with Sample Datathe kinglet(2) as a bird of particular concern for bird impactson UBC campus. This species is therefore used as the focusof bird impact simulations used to design and test the system.Appendix B provides more details, including calculations, for thedesign of a bird impact simulation. The bird impact simulationdescribed in this section is used for all of the applicable testingdone for design and validation of the system.2.1 Mock BirdThe bird considered in the design of the mock bird is the kinglet,a species identified by the client as the most common for birdimpacts on the UBC campus(3). Kinglets have the followingphysical characteristics:• 7g mass.• 14-18cm wingspan.Capstone Group 062 Design 222 SIMULATION OF BIRD IMPACT May 16, 2019• 8-11cm length from head to tail.• Foraging speeds between 2.7m/s and 9.7m/s.An 18g rubber ball and a 57g tennis ball are used as the mockbirds to simulate bird impacts on the test window. Figure 4displays the mock birds that were used for the simulations. Themock birds are designed using the following characteristics:• Mass• Physical size (wingspan, length from head to tail)• Flight SpeedsThe two mock birds are purposefully designed to have a mass of18g and 57g. This is done to limit the drop speed and dropheight required to simulate bird impacts, facilitating repeat-able and safe testing. A pendulum (Appendix C) is the chosenmethod of simulating the bird impacts because of its ability tocontrol impact locations and finely tune the impact speed. Sincethe maximum speed of the kinglet is too fast to be effectivelysimulated in a lab setting using the pendulum, ideal kinematicsequations are used with the increased masses of the mock birdsto reduce the speed of the simulated impacts (Appendix B). Wecan ensure that the mock bird impacts are consistent with truekinglet impacts by maintaining equivalent impact energies, asCapstone Group 062 Design 232 SIMULATION OF BIRD IMPACT May 16, 2019(a) Photo of 18g Mock Bird Used for Val-idation Tests(b) Photo of 57g Mock Bird Used for Val-idation TestsFigure 4: Mock Birds For Validation Testspresented in Appendix B. The shape of the mock birds is cho-sen to be a ball to ensure that simulated impacts are unaffectedby the rotation or other positioning upon collision with the win-dow. To simplify the simulation, the effects of air resistance anddeformation of the ball are disregarded.Capstone Group 062 Design 242 SIMULATION OF BIRD IMPACT May 16, 20192.2 Pendulum SetupTo simulate varied bird impacts in a reliable and repeatablemanner, a pendulum is used. By varying the drop angle of themock bird (Section 2.1), the pendulum can simulate differentbird impact speeds on different spots of the test window. Ap-pendix C describes the pendulum setup used in more detail.2.3 Ideal Environment SimulationThis section describes an experiment that was conducted to sup-plement the design of the detection algorithm (Section 3.2) ofthe detection system (Section 3). The complete ideal environ-ment simulation experiment can be found in Appendix D.The purpose of this experiment is to identify important charac-teristics (peak-to-peak voltage, duration, and frequencies) cap-tured by the accelerometer (Section 3.1) during a bird-windowcollision in ideal conditions. These characteristics are used inthe design of the detection algorithm that can distinguish bird-window collisions from other by/on window disturbances, meet-ing NFR1. A secondary purpose of this test is to determine thebest sensor placement location for the system setup (Section 7).This experiment is designed to mimic the ideal conditions inCapstone Group 062 Design 252 SIMULATION OF BIRD IMPACT May 16, 2019which the system will operate at the UBC Vancouver campus,with no external sources of noise such as rain or wind.2.3.1 Sampling rateIn order to calculate accurate frequency peaks when perform-ing a Fast Fourier Transform(4) to the data, we must deter-mine the frequency range of impact vibration on the glass. Todo this, we initially sampled the signal at the maximum rateof serial data transmission, 4000Hz, and recorded data in realtime while applying short time Fourier Transform to study theirfrequencies.(5).Figure 5: Accelerometer Signal Spectrogram of Ideal Environment Back-ground Noise and Simulated bird ImpactFigure 5 shows the spectrograms of the ideal background noise(on the left), and a typical simulated bird impact (on the right).Capstone Group 062 Design 262 SIMULATION OF BIRD IMPACT May 16, 2019It is apparent that the bird impact vibration is under 1000Hz.As a result, according to the Nyquist Frequency(6), the detec-tion system is designed with a sampling rate of 2000Hz.2.3.2 Results SummaryTesting multiple impact locations allows for the impact signalto be characterized. Impacts produce oscillating signals with anexponentially decreasing envelope in the time domain with twoor four peaks at frequency domain.Figure 6: Best Case Accelerometer Impact Signal, Time Domain vs. Fre-quency DomainFigure 6 shows the signals of the best case simulated impact,located on the center of a the glass. Appendix D, Figure D3Location 6 displays an example of a best case simulated impact.This is a typical impact with two frequency peaks around 80Hzand 160Hz.Capstone Group 062 Design 272 SIMULATION OF BIRD IMPACT May 16, 2019Figure 7: Worst Case Accelerometer Impact Signal, Time Domain vs. Fre-quency DomainFigure 7 shows the signal of the worst case simulated impact,located near the edge of the window (refer to Appendix D: Fig-ure D3: Location 1). This is not typical impact as it has fourfrequency peaks, which may be caused by the damping effect ofthe metal frame.As shown by the best and worst case impacts, the signals havedifferent maximum peak-to-peak voltages and frequency peaks.2.4 Non-Ideal Environment SimulationSimilarly to Section 2.3, this section uses an experiment thatwas conducted to supplement the design of the detection algo-rithm (Section 3.2) of the detection system (Section 3). Thecomplete non-ideal environment simulation experiment can befound in Appendix E.Capstone Group 062 Design 283 DETECTION SYSTEM May 16, 2019The purpose of this experiment is to identify important charac-teristics (peak-to-peak voltage, duration, and frequencies) cap-tured by the accelerometer (Section 3.1) during a bird-windowcollision with simulate environmental disturbances, rain and hu-man sound. These characteristics are used in the design of thedetection algorithm in order to distinguish bird-window colli-sions from other disturbances near the window, meeting NFR1.This experiment is designed to mimic the non-ideal conditionsin which the system will operate at the UBC Vancouver campus,testing rainy and noisy conditions.2.4.1 Results SummaryBased on the best and worst case impact data displayed in Ap-pendix E, we can see that rain and noise increase the noise floorlevel, but it is significantly smaller than any bird impact signaland can therefore be ignored.3 Detection SystemThe detection system consists of a microcontroller and one im-pact sensor. Figure 8 displays how these components are con-nected. The sensor used for impact detection is an accelerome-ter. This sensor is attached to the window being measured, inCapstone Group 062 Design 293 DETECTION SYSTEM May 16, 2019order to provide data to the microcontroller for processing. Themicrocontroller reads data from the sensor and uses it to deter-mine whether a bird impact has occurred. If the microcontrollerdetects a bird impact, it sends an acknowledgement to the datastorage (Section 5) using WiFi (Section 4).Figure 8: Detection System Diagram3.1 Impact SensorA bird impact is made up of audible sounds, vibrations, andmotion experienced by the glass of a window (7). The detec-tion system uses an accelerometer to capture the informationproduced from audible sounds and window vibrations during animpact for bird impact detection (8). This sensor is used tomeet FR1 and NFR1 of the system by accurately detecting birdimpacts.3.1.1 AccelerometerThe accelerometer ADXL337 is the impact sensor chosen for thisproject. Accelerometers are a type of sensor that outputs a volt-Capstone Group 062 Design 303 DETECTION SYSTEM May 16, 2019age signal as a function of the force on the sensor in a specifieddirection. The accelerometer’s versatile applications in buildingand structural monitoring make it applicable in our project(9).A kinglet, the bird identified by the client as being of most con-cern for bird impacts on UBC Campus, is estimated to produceapproximately 0.2N to 3N of force which is equivalent to 0.026gto 0.33g upon impact as shown in the calculations in AppendixB(10).In order to meet the cost constraint defined in C1, the accelerom-eter must also cost less than $30. In addition, a high sensitivityallows for the voltage output to be relatively large even whenthe vibration is small as in the case of a low speed impact. Sincethere is a trade-off between the sensitivity and the threshold ofacceleration of an accelerometer, we decided to purchase an ac-celerometer with high sensitivity up to 330mV/g so that impactfrom a small bird flying at low speed can be detected to satisfyFR1 and NFR1. The sensor must have and operating temper-ature range of at least -10◦C to 30◦C. This is to ensure thatthe system will function inside of buildings on UBC Campus.This range sufficiently larger than the expected range of tem-peratures inside of buildingsto ensure the system will functionproperly. Given the above considerations, the minimum specifi-Capstone Group 062 Design 313 DETECTION SYSTEM May 16, 2019cations of the accelerometer are summarized in Table 1(11).Table 1: Technical Specifications of ADXL337Feature Minimum Specification ADXL337Input 0.026g to 0.33g ±3 to ±3.6gSensitivity 100mV/g 270 to 330mV/gOperating Voltage Range 3.3 to 5V 1.8 to 3.6VOperating Temperature −10 to 30◦C −55 to +125◦CCost per Unit less than $30 $163.1.2 Anti-aliasing FilterAliasing is a concern that arises in reading the analog signalfrom the accelerometer. The Nyquist Frequency of the system isapproximately 520Hz, based on the bird impact simulation (Sec-tion 2). The Nyquist Frequency is calculated using the highestfrequencies observed in simulation, approximately 260Hz. Thesystem is sampling at 2000Hz, which is well above the minimumrequirement and results in oversampling. This oversampling in-troduces high frequency white noise that may make the detec-tion system less accurate. A physical anti-aliasing filter is usedto reduce this effect.This filter is implemented by connecting a capacitor betweenthe z-axis output of the accelerometer and ground. As sug-gested by the manufacturer of the ADXL337 (Section 3.1.1),Capstone Group 062 Design 323 DETECTION SYSTEM May 16, 2019a 10nF capacitor is used(11). Figure 9 displays a sample birdimpact signal without the filter implemented, and Figure 10 dis-plays the same signal after the filter is implemented. The filteris implemented mathematically in these two figures, to highlightthe effect of the anti-aliasing filter on a specific impact.Figure 9: Sample Bird Impact Signal Before Anti-aliasing Filter is AppliedFigure 10: Sample Bird Impact Signal After Anti-aliasing Filter is AppliedThe filter attenuates the signals used to identify bird impacts byCapstone Group 062 Design 333 DETECTION SYSTEM May 16, 2019up to 0.5dB, but maintains a satisfactory signal-to-noise ratio.In addition it significantly attenuates high frequency peaks, vis-ible in frequencies above the peak at approximately 250Hz. Thisindicates that the filter is limiting the analog signal to withinthe frequencies that are expected in the event of a bird impact.3.1.3 Other Sensors EvaluatedIn addition to the accelerometer mentioned above, we have alsoconsidered microphones, a piezo disc array, and infrared motionsensors as alternative options. Microphones meet the require-ments of the impact detection sensor, and are therefore a viablesensor option of the system. A microphone is not included inthe final design as no situation was discovered during validationtests where the microphone was able to detect a bird impact thatthe accelerometer could not. The microphone as an impact de-tection sensor is discusses in more detail in Appendix G. Piezodiscs are a type of pressure transducer that generate voltageswhen they are being compressed. However, piezo discs generateAC voltage, which is incompatible with the input format of themicrocontroller. Therefore this option has been eliminated.Infrared sensors emit infrared radiation and detect the reflectedradiation from an object to determine if there is movement in thesensing region (12). These sensors were initially considered as aCapstone Group 062 Design 343 DETECTION SYSTEM May 16, 2019way of confirming the presence of motion immediately in frontof the window when vibrations have been detected by the otherimpact sensors. The two IR sensors that were tested were theIR proximity sensor and the short-range distance sensor. How-ever, IR sensors require mounting on the outside of the windowto provide effective information from bird impacts. These sen-sors were therefore eliminated following the decision to place thesystem on the inside of the window, explained in Appendix H.3.2 Detection AlgorithmTo accurately detect bird impacts among the other vibrationsof the window, an algorithm is needed. This algorithm is im-plemented on the Arduino Uno WiFi Rev2 (Section 3.3). Thethree characteristics of the signal that are used by the algorithmare:1. Signal Voltage Amplitude2. Dominant Frequency Peaks3. Signal DurationBird impacts have distinct characteristics that can be used todistinguish them from other disturbances that cause vibrationin the window glass. The algorithm is implemented using a stateCapstone Group 062 Design 353 DETECTION SYSTEM May 16, 2019machine and a Fast Fourier Transform function for the ArduinoUno WiFi Rev2.3.2.1 State Machine SystemThe algorithm is implemented using 4 different states:1. Initialization2. Voltage Reading3. Identification4. Data UploadingThe state machine is implemented using the Arduin Uno WiFiRev2 (Section 3.3) to collect and analyze data from the ac-celerometer (Section 3.1). Figure 11 shows the state diagramfor the system, including how the states are connected and ba-sic next state logic. The primary purpose of the state machineis to satisfy FR1, FR2, NFR1, and NFR2, allowing the systemto monitor for impacts autonomously with a low error rate.3.2.2 Initialization StateThe first state of the state machine is initialization, which isentered when the system is reset or powered on. If the systementers this state from a spontaneous power loss, it recovers theCapstone Group 062 Design 363 DETECTION SYSTEM May 16, 2019Figure 11: System State Machine Diagramprevious impact data from internal memory using a method-ology defined below (Section 3.2.2.1). The system connects tothe WiFi network (Section 4.3) and MyDevices Cayenne (Sec-tion 5). It then waits until the signal from the accelerometerbecomes stable to avoid any issues with initial signal fluctua-tion. Once the system is connected to Cayenne and the signalis stable, it moves into state 2 (Section 3.2.3).Capstone Group 062 Design 373 DETECTION SYSTEM May 16, 20193.2.2.1 Recovery from Power LossDue to how bird impact information is stored on the Cayennedatabase (Section 5), the number of bird impacts recorded bythe system must be recalled in the case of a loss of power. Apower loss will erase the volatile local system memory, where thenumber of bird impacts is stored. Therefore, a method for recall-ing the bird impacts from a non-volatile memory is needed. Thisrecovery from power loss occurs during the initialization state ofthe state machine, which is always triggered upon booting thedevice. The two types of system power loss are:1. Power Supply Resets: power outage, a brownout, unplug-ging the power source from the system2. User Resets: pressing the reset button on the deviceTo recognize a power loss, the algorithm makes use of a featureon the microcontroller (Section 3.3) called the Reset Controller;the source of a reset occurrence is recorded into the Reset FlagRegister, shown on Figure 12 (1).Each bit is binary, storing a value of 1 or 0. The bits of interestare:Capstone Group 062 Design 383 DETECTION SYSTEM May 16, 2019Figure 12: Reset Flag Register Bits (1)• Bit 0: PORF - Power-On Reset Flag• Bit 1: BORF - Brownout Reset Flag• Bit 2: EXTRF - External Reset FlagBits 0 and 1 are set to 1 if a power supply reset occurs, whilebit 2 is set to 1 if a User Reset occurs.In the event of a power supply reset, the bird impact data isrecalled from the non-volatile memory on the microcontroller.In the event of a user reset, the bird impact data is set to 0. Thisis expressed in the flowchart in Figure 13. This functionality wasshown to work throughout various other tests, and is thereforevalidated.3.2.3 Voltage Reading StateIn this state, the system continuously monitors the signal fromthe accelerometer for the amplitude characteristic of a bird im-pact. The previous 25 milliseconds of accelerometer signal areCapstone Group 062 Design 393 DETECTION SYSTEM May 16, 2019Figure 13: Recovery from Power Loss Flowchartstored. When the signal amplitude becomes larger than thethreshold of 0.0968V (ten times of ideal environment noise floor),the system moves into state 3 (Section 3.2.4). Additionally, anLED attached to the microcontroller indicates when the systemis in this state to confirm the system is working properly. TheLED is on when in this state, and turns off when in any otherstate.Capstone Group 062 Design 403 DETECTION SYSTEM May 16, 20193.2.4 Identification StateIn this state, the system analyzes the data recorded from theaccelerometer for signs of a bird impact. The three key char-acteristics of amplitude, frequency peaks, and signal durationare analyzed (details of these calculations can be found in Ap-pendix F). Upon entering this state, an additional 400 millisec-onds of signal from the accelerometer are stored. A Fast FourierTransform allows the Arduino Uno WiFi Rev2 to identify thefrequency peaks of the signal, and the signal duration may becalculated. The frequency peaks that the system monitors forare:1. 80Hz2. 120Hz3. 160Hz4. 170HzIf the duration of the signal is within the window of 0.1-0.3 sec-onds and the dominant frequency peaks match the characteristicpeaks, the system moves into state 4 (Section 3.2.5). Otherwise,once analysis is complete the system moves back into state 2(Section 3.2.3). Figure 14 displays the flowchart for this processof analyzing the signal.Capstone Group 062 Design 413 DETECTION SYSTEM May 16, 2019Figure 14: Flowchart of the Detection Algorithm3.2.5 Data uploadingIf the system identifies window vibrations as a bird impact, itenters this state. The system updates the online data storage(Section 5) with the new bird impact using WiFi (Section 4)Capstone Group 062 Design 423 DETECTION SYSTEM May 16, 2019and saves the bird impact data for recovery (Section 3.2.2.1).Once the system confirms that the data packet has been sent,it automatically goes back to state 2 to continue monitoring forimpacts (Section 3.2.3).3.3 MicrocontrollerThe microcontroller chosen for the system is the Arduino UnoWiFi Rev2(13). Table 2 compares the specifications of this mi-crocontroller to the minimum specifications. The Arduino UnoWiFi Rev2 meets or exceeds the minimum microcontroller spec-ifications.3.3.1 Microcontroller Design ConsiderationsThe following design components are considered in the micro-controller choice:1. Microcontroller code size of 15kB2. 100B data packets3. Maximum of 48 bird impact events per day4. 33.6kB of potential stored data per 7 day periodThe code size consideration is based on the size of the code thatis developed for the microcontroller to perform the signal pro-Capstone Group 062 Design 433 DETECTION SYSTEM May 16, 2019cessing (Section 3.2). The code requires up to 11kB of flashmemory for the microcontroller to analyze impacts. 15kB ischosen as the design parameter to account for future additionsto the code, as well as associated libraries required for function.The 100B data packets and 48 bird impact events per day isbased on the data provided by the client, included in AppendixA. The size of 100B was found by saving a sample max-size char-acteristic data packet received from the detection system as atext file. The size of this file was significantly under 100B, butthe minimum specification was chosen to be over-designed incase more information is required in data packets in the future.48 events per day is decided by analyzing the data provided inAppendix A for the maximum annual collisions on any givenwindow on UBC Campus. The max number of impacts on onewindow per year previously found by the client is 26. This de-sign consideration is overestimated in case the client data is lowcompared to the actual number of bird impact events is under-estimated, or if the system is used in an area that experiencesmore bird impacts in the future.The maximum potential stored data per 7 day period is decidedby items 2 and 3 above. This consideration only considers theCapstone Group 062 Design 443 DETECTION SYSTEM May 16, 2019worst-case scenario where the system is unable to connect to thenetwork for the entire 7 day period due to unexpected circum-stances. 48 100B data packets is used to find that up to 4800Bof data packets may need to be stored locally on the device inthis scenario. For the entire 7 day period before maintenance,this indicates up to 33600B of data may need to be stored, or33.6kB.3.3.2 Minimum Specification DescriptionThe impact sensor (Section 3.1) consists of a single accelerome-ter. To support the Detection System, the microcontroller musthave one analog input pin for each of the two sensors. The ac-celerometer requires a 3.3V output pin that provides at least300µA of current(11). The sensor sampling rate must be atleast 520Hz, the Nyquist frequency for simulated bird impactevents. The minimum clock speed of the microcontroller mustbe at least this value to ensure sensor signals on the event ofa bird impact may be read properly. The microcontroller mustalso have at least 15kB of flash memory to hold code for sen-sor analog-to-digital conversion (Section 3.2). To fulfill NFR2,the microcontroller must have 33.6kB of on-board memory forbackup storage. This considers the case where the microcon-troller is unable to send data using the UBC Visitor network(Section 4) upon detecting a bird impact. It assumes impactCapstone Group 062 Design 453 DETECTION SYSTEM May 16, 2019data packets of approximately 100B, with 48 events stored perday for the entirety of the maintenance period of 7 days. Tosatisfy FR3 the microcontroller choice must be able to commu-nicate wirelessly using WiFi (Section 4).Table 2: Microcontroller Minimum SpecificationsFeatureMinimum Specifi-cationArduino UnoWiFi Rev2Analog Pins 1 6Output Voltage 3.3V 3.3VOutput Current 300µA 50mAClock Speed 520Hz 16MHzFlash Memory 15kB 48kBMemory Storage 33.6kB 6,144kBOnboard WiFi Mod-uleYes YesSee Appendix I for other microcontrollers evaluated.3.4 Recommendations for Future ComponentsFour components were conceptualized for the detection systemthat are not included in the final design. These componentscould all be included in future iterations of the detection sys-tem to potentially increase its functionality. The componentsconceptualized that are not included are as follows:Capstone Group 062 Design 464 COMMUNICATION SYSTEM May 16, 20191. Digital filter for the accelerometer (Section 3.1.1)2. Microphone sensor for impact detection3. WiFi disconnection in the case of long-term loss of network4. Damping Ratio Analysis for Detection AlgorithmThese components are presented in Appendix G. Due to thevarying stages of development of each component before theywere removed from consideration for the final design, they arenot presented in a completed format. These are suggestions forfuture design components that would potentially be beneficialfor the system.4 Communication SystemThe data communication method chosen for the system is WiFi(14).The WiFi network that is used on UBC Campus is UBC Visitor(15)(Section 4.2). Table 3 compares the specifications of WiFi to theminimum specifications for the subsystem. WiFi meets the min-imum data communication specifications, so it is chosen for thesystem.4.1 Communication System Design ConsiderationsThe main design consideration for the communication systemis the transmission rate of 4B/s. This assumes characteristicCapstone Group 062 Design 474 COMMUNICATION SYSTEM May 16, 2019Table 3: Data Communication Minimum SpecificationsFeature Minimum Specification WiFiWireless Yes YesConnectivity Across UBC Campus Across UBC CampusTransmission Rate 4B/s 737500B/sdata packets of 100B (Section 3.3.1) being transmitted by thedetection system (Section 3). In addition, this consideration as-sumes a 30 second limit on transmission of data communicationfrom the detection system to data storage. This limit is derivedfrom what is perceived as a reasonable amount of time for datapackets to be available after a bird impact event occurs.4.2 Minimum Wireless Specifications DescriptionThe Detection System (Section 3) must be able to communicatewith Data Storage (Section 5) wirelessly to satisfy FR2, FR3,and NFR3. Wireless communication removes the need for theuser to gather data from the device manually, so access is eas-ier. Wireless communication also ensures impact data is contin-uously available from the system data storage. Connectivity isdefined as a minimum specification instead of range due to theavailability of WiFi throughout UBC Campus(16). To ensurethat the system can meet C5, the communication system mustCapstone Group 062 Design 484 COMMUNICATION SYSTEM May 16, 2019be able to connect across UBC Campus. The data transmissionrate must be at least 4B/s (Section 4.1).4.3 UBC Visitor WiFi DescriptionThe UBC Visitor WiFi network(15) is a low-bandwidth networkprovided for guests of UBC Campus that are not faculty orstudents. It is an unsecured network that only requires acceptinga terms of service to access. UBC Visitor is used instead ofUBC Secure(17) due to the Arduino Uno Wifi Rev2 (Section3.3) being unable to validate with the UBC Secure network’ssecurity protocols. Due to the relatively low bandwidth requiredfor the communications, the limits of the UBC Visitor networkare not a concern for the function of the system.4.4 Accessing the UBC Visitor NetworkUnder normal circumstances, microcontrollers and similar de-vices are unable to access the UBC Visitor WiFi network(15).To connect to the network, the MAC address of the microcon-troller used must be registered with UBC IT. This service isoffered due to the low overall bandwidth of the system commu-nication. In addition, it is important that the system microcon-troller connects to the network at least once per week to ensurethat the device stays registered on the UBC Visitor WiFi. ThisCapstone Group 062 Design 494 COMMUNICATION SYSTEM May 16, 2019is considered to meet NFR2, as this maintenance is requiredonly once in every 7 day period.4.5 Other Data Communication Designs EvaluatedOther options that were evaluated for wireless communicationare:• LoRa(18)• Bluetooth 5.0(19)• Zigbee(20)Table 4: Communication System EvaluationFeature WiFi LoRaBluetooth5.0ZigbeeWireless Yes Yes Yes YesConnectivityAcross UBCCampusLimited onUBC Cam-pusRequiresnew infras-tructureRequiresnew infras-tructureTransmissionRate737500B/s 31.25B/s 250000B/s 31250B/sTable 4 compares these options to WiFi communication. All ofthe options considered would meet the minimum specificationsfor the communication method. WiFi was chosen due to itsCapstone Group 062 Design 505 DATA STORAGE May 16, 2019convenience and existing availability on UBC Campus. In addi-tion, WiFi has extensive support available online. Therefore, itis chosen as the communication system.5 Data StorageData storage for the system uses MyDevices Cayenne(21). TheCayenne database presents data in a processed and accessibleformat. It is also used to facilitate the system UI (Section 8).If required, data may be downloaded directly from the Cayennedatabase in a spreadsheet format, which is the format providedby the client shown in Appendix A. Table 5 compares the spec-ifications of Cayenne with the defined minimum specifications.5.1 Data Storage Design ConsiderationsThe following design components are considered in the data stor-age choice:• Able to store 3 individual data segments per impact• Data segment max size of at least 32 charactersThe 3 data segment design consideration for data storage isbased on the minimum required data specified by the client.It is required that the system store 3 different pieces of data onthe event of a bird impact:Capstone Group 062 Design 515 DATA STORAGE May 16, 2019• Bird impact timestamp• Bird impact location marker, identified as a specific windowin a building• Number of bird impacts at that locationThis ensures that the system can store all of the data requiredby the client on the event of a bird impact.The max data segment size of 32 characters is based on thesample data provided by the client in Appendix A. It is basedon the window location identifiers, which have the longest datasegments included in this sample data. 32 characters is over-designed based on the sample data provided, to provide flexibil-ity in future location identifiers that may be used.5.2 Minimum Specification DescriptionThese specifications assume that the data packets stored are amaximum size of 100B, with 48 events per day for a 7 day main-tenance period (Section 3.3.1). It is assumed that at the end ofthe 7 day maintenance period, a user ensures that the data stor-age subsystem has sufficient space remaining. Each package ofevent data consists of three segments - a timestamp and windowidentifier, to satisfy C2, and a total number of bird impacts atCapstone Group 062 Design 525 DATA STORAGE May 16, 2019that location. To meet FR2, FR3, and NFR2, Cayenne musthave at least 33.6kB of storage space (Section 3.3). In addi-tion, data storage must be able to hold at least 1008 individualsegments of data. This number ensures that the system maystore 48 3-segment data packets per day, for 7 days as describedabove (Section 3.3.1, Section 5.1). To store the impact locationdata, each data segment should be capable of storing at least 32characters (Section 5.1).Table 5: Data Storage Minimum SpecificationsFeatureMinimumSpecificationCayenneStorage Size 33.6kB UnlimitedUnique DataSegments1008 UnlimitedData SegmentLength32 Unlimited5.3 Cayenne DatabaseThe primary data storage method for the system is a Cayennedatabase(21), provided by MyDevices(22). Figure 3 shows howdata is stored in the Cayenne database. Cayenne meets or ex-ceeds all of the minimum specifications for data storage, so itprovides a viable solution. Cayenne also provides tools for acces-Capstone Group 062 Design 535 DATA STORAGE May 16, 2019sible displaying and accessing of data, used for the UI (Section8). Cayenne services are also provided for free, making it a goodchoice for the system.5.4 Other Data Storage Designs EvaluatedOther options that were evaluated for data storage are:• Secure Digital (SD) Card(23)• Amazon Web Servers(24)• Dropbox(25)• Google Sheets(26)Table 6 compares Cayenne and Google Sheets to the three op-tions that were not chosen. Google Sheets meets or exceeds allof the requirements for data storage, and was implemented inearly iterations of the system. Due to issues encountered withreliability, it was removed from the final version of the system.More information regarding Google Sheets and why it was notimplemented is presented in Appendix J.The SD card was not chosen as it requires the data from thedetection system be stored with the system, rather than on-line. This reduces accessibility, as the data must be collectedmanually from the SD card. An Amazon Web Server was notCapstone Group 062 Design 546 POWER SOURCE May 16, 2019Table 6: Data Storage Evaluation ComparisonFeature CayenneGoogleSheetsSD CardAmazonWebServersDropboxStorageSizeUnlimited Unlimited 512GB 5GB 2GBUniqueDataSegmentsUnlimited 5 ∗ 106 Unlimited Unlimited UnlimitedDataSegmentLengthUnlimited 50,000 Unlimited Unlimited Unlimitedchosen due to Cayenne and Google Sheets providing sufficientservices for free, while a S3 Web Server has a more limited freemodel(24). Dropbox was not chosen as it is limited to 2GB offree storage(25), while Cayenne and Google Sheets do not havea limit to future free scalability.6 Power SourceThe system is powered by a power adapter. Table 7 comparesthe specifications of an power adapter to the minimum specifica-tions for the subsystem. The power adapter meets the minimumpower specifications, so it is chosen for the system.Capstone Group 062 Design 556 POWER SOURCE May 16, 2019Table 7: Power Source Minimum SpecificationsFeature Minimum Specifications Power AdapterPower Capacity 2000 mAh UnlimitedDC Output Yes YesOutput Voltage 9-12 VDC 9-12 VDCOutput Current 250 mA 250 mA2.1 mm Plug Yes YesCenter Pin Positive Yes YesObtrusiveness of Win-dowLess Than 10% < 1%6.1 Minimum Specification DescriptionThe method for powering the system must satisfy C3, and NFR2.The power source must also be compatible with the microcon-troller (Section 3.3). The system in an idling state consumes 12mAh of power, so the power source of the system must have acapacity of 2000 mAh at minimum. The power method mustbe compatible with a center 2.1 mm center positive plug, havea VDC output of 9-12 V and have an output current of 250mA(13).Capstone Group 062 Design 566 POWER SOURCE May 16, 20196.2 Other Power Options EvaluatedThe other option evaluated for powering the system is by bat-tery.Table 8 compares a power adapter to a battery.Table 8: Power Source Evaluation ComparisonFeatureMAKITA BL10132000MAH 10,8V LI-ION(27)PowerAdapterObtrusiveness ofLess Than 10% ofWindowYes YesCompatibility withArduinoYes YesMaintenance Need Yes NoThe microcontroller (Section 3.3) consumes a minimum of 12mA at 5V and 16Hz while it is in an idling state since it hascapacities of standard shield, a standard USB interface, powerregulation and LEDs (13). A battery that met the minimumspecifications in Table 8 was considered and is a viable optionfor powering the system. However, a power adapter is morereliable and convenient for the maintenance of the system.Capstone Group 062 Design 577 SYSTEM SETUP May 16, 20197 System SetupThe physical portion of the Bird Impact Detection System con-sists of a microcontroller and sensor (Design Document Section3) that are mounted on the indoor side of window being ob-served for bird impacts. The decision to place the system in-doors is explained in further detail in Appendix H. The sensorfor the detection system is connected to the microcontroller di-rectly (Section 7.1). The sensor itself affixed to the indoor glasspane of the window directly, and the microcontroller is attachedto the window frame in a plastic enclosure (Section 7.2). Thephysical components of the Bird Impact Detection System arelinked to the non-physical components through a WiFi modulein the microcontroller (Section 3.3)The non-physical portion of the Bird Impact Detection systemconsists of a WiFi wireless internet connection (Section 4), My-Devices Cayenne (Section 5.1), and the UI (Section 8). MyDe-vices Cayenne is connected to the detection system through useof the internet (Section 6.3.1). The UI is connected to MyDe-vices Cayenne directly, as a provided service from MyDevices(Section 6.3.2).Capstone Group 062 Design 587 SYSTEM SETUP May 16, 20197.1 Sensor ConnectionsThe detection system sensor (Section 3.1) is connected to the mi-crocontroller (Section 3.3) using solid-core insulated wires. Fig-ure 15 displays the schematic for the wiring in the detection sys-tem. It is noted that the ADXL335 is displayed in the schematic,as the software used for the schematic labels all ADXL3XX ac-celerometers this way. In the construction of the system, theADXL337 should be used, as specified in the Detection System(Section 3.1).Figure 15: Detection System Wiring Schematic. It is noted that due to alimitation in the schematic generator, the ADXL335 is displayed instead ofthe ADXL337.Capstone Group 062 Design 597 SYSTEM SETUP May 16, 2019The pins of the sensors are connected to the microcontroller asfollows:1. Accelerometer Z-axis: Connected to input pin A0 of theArduino Uno Wifi Rev2.2. Accelerometer 3.3V: Connected to the 3.3V power pin ofthe Arduino Uno Wifi Rev2.3. Accelerometer Ground: Connected to the ground pin of theArduino Uno Wifi Rev2.The Accelerometer X- and Y-axis pins are not connected to themicrocontroller as they are not used in impact analysis (Section3.2). A 10nF capacitor is attached between the accelerometerZ-axis and ground to filter the signal that is recorded by theArduino Uno WiFi Rev2 (Section 3.1.2).7.2 Detection System Window InstallationThe detection system (Section 3) must be able to be attachedin an operating position on the inside of a window to satisfyC4. The justification for why the system is installed on theinside rather than outside of a window is found in AppendixH. The installed system must be able to detect bird impacts tosatisfy NFR1. The system consists of an accelerometer and amicrocontroller as displayed in Figure 2, connected using wires.Capstone Group 062 Design 607 SYSTEM SETUP May 16, 2019A power adapter (Section 6) connects the Arduino Uno WiFiRev2 (Section 3.3) to an appropriate wall plug for power. Awaterproofing solution for potential future iterations is found inAppendix :, if the system is changed to outside installation.7.2.1 Microcontroller Window InstallationThe Arduino Uno Wifi Rev2 microcontroller (Section 3.3) isplaced in a plastic enclosure box with dimensions of 7.62x7.62x3.81cm.The microcontroller is positioned on posts inside of the enclosurethat keep it in place. Figure 16 displays the microcontroller in-stalled inside the plastic box. A cover is normally included thatencloses the microcontroller, but is not shown in the figure forvisibility. Holes are included in the design of the box to allowsensor wires, computer cables, and power to be connected. Inaddition, a cavity is included in the box below the microcon-troller to allow for the filter capacitor of the accelerometer to beinstalled (Section 3.1.2).Capstone Group 062 Design 617 SYSTEM SETUP May 16, 2019Figure 16: Microcontroller Installed in Plastic BoxThis enclosure box is mounted on the metal frame of the windowbeing measured using double-sided mounting tape.(28). The boxis placed with one edge 10.795cm from the frame of the windowand one edge directly against the window glass, with the serialand power ports facing away from the window glass. Figure 17displays the plastic box affixed to the sample window, identifiedby the red circle.Capstone Group 062 Design 627 SYSTEM SETUP May 16, 2019Figure 17: Microcontroller inside Plastic Box (Red Circle), Accelerometerwith Cover (Blue Circle) Affixed to Sample Window7.2.2 Sensors Window InstallationThe accelerometer (Section 3.1) is affixed directly to the win-dow using duct putty(29), under a 3.175x3.175cm square plasticcover. Duct putty is a secure adhesive that does not harden inmost circumstances, while still transferring the majority of theCapstone Group 062 Design 637 SYSTEM SETUP May 16, 2019vibration energy from the surface it is attached to. This makesit a good choice for the situation of the project, as it does notdamage the window and allows for sensors to remain attachedfor long periods of time. An alternative that was considered wasdouble sided tape. However, double sided tape dampens the vi-brations transmitted to the sensor attached to the window dueto thickness compared to duct putty. In addition, a plastic coveris attached over the accelerometer using duct putty to protect itand keep it secured. Figure 17 displays the accelerometer affixedto the sample window, identified by the blue circle.7.2.3 Power Source InstallationThe adapter described in Section 6 (Power Source) that powersthe system is mounted against the wall beside a subject window.The adapter is mounted using cable tie mounts. These cable tiemounts will be installed using double-sided wall-safe tape(28).7.3 MyDevices Cayenne Database ConnectionAppendix K provides detailed instructions for setting up the My-Devices Cayenne database and connecting it to the Arduino UnoWiFi Rev2. The detection system (Section 3) is connected to theMyDevices Cayenne database (Section 5) using the communica-tion system (Section 4). The microcontroller in the detectionsystem communicates directly with Cayenne directly throughCapstone Group 062 Design 648 USER INTERFACE May 16, 2019the use of Cayenne libraries for the Arduino. No other setup isrequired for the detection system to communicate with Cayenne,as long as the communications system is accessible and the de-tection system is provided with the correct Cayenne credentialsfollowing the tutorial.8 User InterfaceThe UI for the system is handled using MyDevices Cayenne(21).Table 9 compares the specifications of the Cayenne UI to theminimum specifications. MyDevices Cayenne exceeds the mini-mum UI specifications, so it is chosen for the system. In addi-tion, Cayenne is used as the primary data storage (Section 5),so it is the primary choice for the system UI. Figure 18 displayshow data is presented to the user in the Cayenne Dashboard.Window identifier refers to the building and window index thatidentifies which window the detection system is installed on.Number of impacts is the total impacts detected by the sys-tem since it was installed on the window being monitored, pre-sented by the numerical counter. The line graph presents theimpact data over time to highlight bird impact number trends.Additionally, Cayenne allows for data to be downloaded in aspreadsheet-ready format.Capstone Group 062 Design 658 USER INTERFACE May 16, 2019Table 9: UI Minimum SpecificationsFeatureMinimum Specifi-cationCayenneData Visualization Numerical CounterNumerical Counter,Line Plot, Database,Spreadsheet DownloadFigure 18: Cayenne Dashboard UI featuring numerical counter (left) and lineplot (right) widgets, populated with sample data.8.1 Minimum Specification DescriptionThe UI must continuously provide a clear and easy-to-use vi-sualization of data to satisfy FR3 and NFR2. Visualization ofdata refers to presenting data from the data storage (Section5) in a user friendly manner. The UI must at least present anumerical counter of the number of impacts on the window thesystem is installed on.Capstone Group 062 Design 66REFERENCES May 16, 2019References1 M. T. Inc., “Arduino microcontroller cpu,”atmega4809 datasheet. [Online]. Available:http://ww1.microchip.com/downloads/en/DeviceDoc/megaAVR0-series-Family-Data-Sheet-DS40002015B.pdf2 C. University, “Golden-crowned kinglet,” 2017. [On-line]. Available: https://www.allaboutbirds.org/guide/Golden-crowned Kinglet/id3 A. Porter and A. Huang, “Bird collisions withglass: Ubc pilot project to assess bird collisionrates in western north america.” [Online]. Available:https://sustain.ubc.ca/sites/default/files/seedslibrary/BWC%20report%20SEEDS%20May%202015.pdf4 D. H. . B. C. S. Heideman, Michael T Johnson, “Gaussand the history of the fast fourier transform,” IEEE ASSPMagazine, vol. 1, no. 4, pp. 14–21.5 T. Zhang and J. Wu, “Learning long-term filter banksfor audio source separation and audio scene classification,”EURASIP Journal on Audio, Speech, and Music Processing,vol. 1, pp. 1 – 13, Dec. 2018.6 J. B. Allen, “Short time spectral analysis, synthesis, andCapstone Group 062 Design 67REFERENCES May 16, 2019modification by discrete fourier transform,” IEEE Transac-tions on Acoustics, Speech, and Signal Processing.7 “Make your windows bird-safe.” [Online].Available: https://www.humanesociety.org/resources/make-your-windows-bird-safe8 S. Hanly, “What’s the difference between vibration sensors?”[Online]. Available: https://www.machinedesign.com/motion-control/what-s-difference-between-vibration-sensors9 S. Grover, “Prediction of earthquake using 3 axis accelerome-ter sensor (adxl335) and arduino uno,” International Journalof Science and Research.10 “Appendix 12.1 — bird-impact forces — thephysics - transport canada.” [Online]. Avail-able: https://www.tc.gc.ca/eng/civilaviation/publications/tp13549-appendices-appendix12-1-410.htm11 T. Instruments, “Small, low power, 3-axis3g accelerometer,” adxl337 datasheet. [Online].Available: https://cdn.sparkfun.com/datasheets/Sensors/Accelerometers/ADXL337.pdf12 Motion sensor guide. [Online]. Available: https://www.safewise.com/resources/motion-sensor-guide/Capstone Group 062 Design 68REFERENCES May 16, 201913 Arduino. Arduino uno wifi rev2. [Online]. Available:https://store.arduino.cc/usa/arduino-uno-wifi-rev214 B. Mitchell. 802.11 standards explained:802.11ac, 802.11b/g/n, 802.11a. [On-line]. Available: https://www.lifewire.com/wireless-standards-802-11a-802-11b-g-n-and-802-11ac-81655315 UBC. ubcvisitor wireless network. [Online]. Avail-able: https://it.ubc.ca/services/email-voice-internet/wireless-internet-access/ubcvisitor-wireless-network16 ——. Wireless coverage. [Online]. Avail-able: https://it.ubc.ca/services/email-voice-internet/wireless-internet-access/wireless-coverage17 ——. ubcsecure wireless network. [Online]. Avail-able: https://it.ubc.ca/services/email-voice-internet/wireless-internet-access/ubcsecure-wireless-network18 T. Network. Limitations of lorawan. [Online]. Avail-able: https://www.thethingsnetwork.org/docs/lorawan/limitations.html19 J. G. Sponas. Things you should knowabout bluetooth range. [Online]. Avail-Capstone Group 062 Design 69REFERENCES May 16, 2019able: https://blog.nordicsemi.com/getconnected/things-you-should-know-about-bluetooth-range20 I. Poole. Zigbee technology tutorial. [Online]. Avail-able: https://www.radio-electronics.com/info/wireless/zigbee/zigbee.php21 MyDevices. Cayenne, the world’s first drag-and-drop iotproject builder. [Online]. Available: https://mydevices.com/cayenne/features/22 ——. About. [Online]. Available: https://mydevices.com/about/23 Move over sandisk, this 512gb microsd cardis now the biggest money can buy. [On-line]. Available: https://www.trustedreviews.com/news/integral-memory-new-512gb-microsd-card-338137824 Amazon. Amazon s3 pricing. [Online]. Available: https://aws.amazon.com/s3/pricing/?p=ps25 Dropbox. How much does dropbox cost? [Online]. Available:https://www.dropbox.com/help/billing/cost26 Google. Google spreadsheet limitations. [On-line]. Available: https://gsuitetips.com/tips/sheets/google-spreadsheet-limitations/Capstone Group 062 Design 70REFERENCES May 16, 201927 Makita bl1013 2000mah 10,8v li-ion. [Online]. Avail-able: https://www.tme.eu/en/details/accu-bl1013-2ah/rechargeable-batteries/makita-bl1013-2000mah-108v-li-ion/28 Staples. Scotch mounting tape. [Online]. Avail-able: https://www.staples.ca/en/Scotch-Mounting-Tape/product 11189 1-CA 1 2000129 S. Hanly. Accelerometer mounting bestpractices for vibration measurement. [On-line]. Available: https://blog.mide.com/accelerometer-mounting-best-practices-for-vibration-measurement30 Y. Q. Answered. (2016) 10 hours of people talking.[Online]. Available: https://www.youtube.com/watch?v=PHBJNN-M Mo31 S. C. E. X. K. M. David He, Stevan Vicentije-vic, “Version5 3 with reset,” https://github.com/Alpaca99/ELEC491/blob/master/intergratecode/Version5 3 with reset/Version5 3 with reset.ino, 2019,commit e0b8e21.32 E. Punskaya. Design of fir filters. [Online]. Avail-able: https://www.vyssotski.ch/BasicsOfInstrumentation/SpikeSorting/Design of FIR Filters.pdfCapstone Group 062 Design 71REFERENCES May 16, 201933 MathWorks. (2019) Window designer. [Online].Available: https://www.mathworks.com/help/signal/ref/windowdesigner-app.html34 L. C. H. Zhou, Li, “Microphone-based vibration sensor forugs applications,” IEEE Transactions on Industrial Elec-tronics, vol. 64, no. 8, pp. 6565–6572, 2017.35 K. Johnson, Physics, 1998.36 C. Inc., “Electret condenser microphone,” cMA-4544PF-W datasheet. [Online]. Available: https://www.cui.com/product/resource/cma-4544pf-w.pdf37 Arduino. Arduino mkr wan 1300. [Online]. Available:https://store.arduino.cc/usa/mkr-wan-130038 Linkit smart 7688. [Online]. Available: https://www.seeedstudio.com/LinkIt-Smart-7688-p-2573.html39 MyDevices. Sign up for cayenne. [Online]. Available:https://mydevices.com/cayenne/signup/40 ——. Step 3: Connect your arduino. [Online]. Avail-able: https://cayenne.mydevices.com/cayenne/dashboard/arduino/pending/8abdbe10-4838-11e9-a6b5-e30ec853fbf2/2Capstone Group 062 Design 72REFERENCES May 16, 201941 Canada’s rainiest cities. [Online]. Avail-able: https://www.currentresults.com/Weather-Extremes/Canada/wettest-cities.php42 J. M. A. S. Aschalew Kassu, Carlton Farley III, “Analysis ofspectral signatures of silicone-based sealant materials usedin residential and commercial buildings.”43 U. Silicones. How long should siliconesealant last around your home. [Online].Available: https://www.united-silicones.com/blog/how-long-should-silicone-sealant-last-around-your-home/Capstone Group 062 Design 73APPENDIX A: CLIENT SAMPLE COLLECTED DATA May 16, 2019Appendix A: Client Sample Collected DataCapstone Group 062 Design 74APPENDIX B: BIRD IMPACT CALCULATIONS May 16, 2019Appendix B: Bird Impact CalculationsThe following details the process of representing a bird impactmathematically for the kinglet. Kinglets commonly have ap-proximately the following relevant attributes:• 10cm length from head to tail• Mass of 7g• Flight speeds between 2.7m/s and 9.8m/sThe mock bird is approximated using these properties (Section2.1). The force imparted upon a window is then calculated usingthe following equation for force in units of g (gram-force):F =mv22d∗ 0.0098The parameters are defined as follows:d: The distance over which the bird impact is delivered, esti-mated as the 10cm length of the bird.m: The mass of the average kinglet, 7 grams.v: The speeds of impact considered, defined as the flight speedsabove.Table B1 displays the impact forces calculated using the equa-tion above for the considered flight speeds of the kinglet.Capstone Group 062 Design 75APPENDIX B: BIRD IMPACT CALCULATIONS May 16, 2019Table B1: Energy transfer of 7g bird at bird-window collision.Kinglet ImpactSpeed (m/s)Calculated Im-pact Force (gram-force)2.7 0.0269.8 0.342It is noted that for simplification, these estimated impact forcesdisregard parameters such as dampening due to feathers duringthe impact.For testing purposes, the energy of the bird at the moment ofcollision will be considered instead of the impact force. Kineticenergy is used to represent a bird impact, and potential en-ergy is used to simulate the impact using a pendulum (Section2.2). This is due to the use of a physical approximation of thebird (Section 2.1) with significantly different physical propertiesfrom a bird in terms of shape, compressibility, and mass. Thetwo equations used for calculation of kinetic (Ek) and potential(Ep) energies are:Ek =12mv2Ep = mghThe parameters used in these equations are defined as follows:Capstone Group 062 Design 76APPENDIX B: BIRD IMPACT CALCULATIONS May 16, 2019m: The mass of the kinglet (7g) or the mock bird (18g) (Section2.1)v: The velocity of the kinglet or mock bird. To cover a range ofimpact speeds, the following speeds are considered:• 9.8 m/s (6.2 m/s)• 6 m/s (3.83 m/s)• 2.7 m/s (1.7 m/s)g: The gravitational constant, approximated as 9.81 m/s2h: The drop height required to simulate a bird impact at thegiven speedTo simulate a bird impact, the kinetic energy of a kinglet atthe desired impact speed is calculated. Table B2 displays thekinetic energies of the three impact speeds considered, which aredefined above.Table B2: Energy transfer of 7g bird at bird-window collision.Capstone Group 062 Design 77APPENDIX B: BIRD IMPACT CALCULATIONS May 16, 2019Speed La-belKingletSpeed (m/s)EnergyTransferredEk (J)Drop Height(m)High Speed 9.7 0.336 4.8MediumSpeed6 0.126 1.8Low Speed 2.7 0.0255 0.37A pendulum (Section 2.2) is used to swing the mock bird (Sec-tion 2.1) at the window to simulate bird impacts. To approxi-mate a real bird impact, the height required for the mock birdto be dropped from the pendulum is equated to the kinetic en-ergy of the real impact. Tables B3 and B4 display the dropheights calculated for each required kinetic energy value definedin Table B2 for both mock bird masses. It is assumed that allof the potential energy is transferred into kinetic energy duringthe swing towards the glass of the window.Capstone Group 062 Design 78APPENDIX B: BIRD IMPACT CALCULATIONS May 16, 2019Table B3: Energy transfer of 18g mock bird at bird-window collision.Speed La-belMock BirdSpeed (m/s)PotentialEnergy Ep(J)Drop Height(m)High Speed 6.2 0.336 1.9MediumSpeed3.83 0.1268 0.71Low Speed 1.7 0.0255 0.14Table B4: Energy transfer of 57g mock bird at bird-window collision.Speed La-belMock BirdSpeed (m/s)PotentialEnergy Ep(J)Drop Height(m)High Speed 3.43 0.336 0.60MediumSpeed2.10 0.1268 0.22Low Speed 0.94 0.0255 0.045Capstone Group 062 Design 79APPENDIX C: SIMULATION PENDULUM SETUP May 16, 2019Appendix C: Simulation Pendulum SetupTo simulate bird impacts, a setup is required for impacting themock bird on the window. This setup must be adjustable forboth impact speed and location impacted on the window. Thesetup chosen is a pendulum design. Figure C1 displays the pen-dulum set up over the sample window in the manner used fortesting.Capstone Group 062 Design 80APPENDIX C: SIMULATION PENDULUM SETUP May 16, 2019Figure C1: Photo of Mock Bird Used for Validation TestsPendulum Setup ProcedureApparatusThe pendulum is constructed using the following apparatus:1. Mock bird (Section 2.1)Capstone Group 062 Design 81APPENDIX C: SIMULATION PENDULUM SETUP May 16, 20192. String with varying length3. String bag to hold mock bird, with secure mounting pointsfor string attachment4. Protractor5. Camera tripodProcedureThe pendulum should be assembled using the following steps:1. Place the mock bird (1) inside the string bag (3).2. Ensure the string (2) is of appropriate length for the birdimpact location desired. Shorter strings raise the locationof the impact on the test window, and longer strings lowerthe location of the impact on the test window.3. Attach the string (2) to the string bag (3) containing themock bird (1).4. Attach the other end of the string (2) to a secure mountingpoint on the top of the tripod (5).5. Ensure the pendulum is able to swing freely in a mannerthat allows it to impact the window unimpeded.Capstone Group 062 Design 82APPENDIX C: SIMULATION PENDULUM SETUP May 16, 20196. Use the protractor (4) to set the beginning angle of themock bird (1) to attain the desired impact speed (TableC1, C2)To ensure simulated impacts occur at the desired location onthe test window, allow the mock bird to hang freely. Positionthe tripod so the mock bird is positioned at the desired hori-zontal location. Adjust the height of the tripod to ensure thesimulated impact occurs at the appropriate vertical location onthe window. This should be set as appropriate for each test thatis conducted.Pendulum Setup CalculationsTo perform bird impacts using the pendulum, the string shouldbe held taut at a drop angle appropriate for the speed required,calculated for the 18g ball in Table C1 and the 57g ball in Ta-ble C2. Due to the nature of the pendulum design, it is moreaccurate to use starting angle instead of height for ensuring thecorrect impact energy is attained. The angle is calculated usingthe following equation:θ = arcsinhmax − hhmaxWhere:hmax: The drop height of the mock bird from Table C1 and C2Capstone Group 062 Design 83APPENDIX C: SIMULATION PENDULUM SETUP May 16, 2019h: The desired drop heightθ: The angle measured from the pendulum resting positionThe angles required for the different drop heights of both 18gand 57g mock birds are shown in Tables C1 and C2.Capstone Group 062 Design 84APPENDIX C: SIMULATION PENDULUM SETUP May 16, 2019Table C1: Pendulum Drop Angles of 18g bird with String Length of 1.9m.Speed La-belMock BirdSpeed (m/s)Drop Height(m)Pendulum θ(deg)1-HighSpeed6.2 1.9 902-MediumSpeed3.83 0.75 523-LowSpeed1.7 0.15 23Table C2: Pendulum Drop Angles of 57g Bird with String Length of 0.60m.Speed La-belMock BirdSpeed (m/s)Drop Height(m)Pendulum θ(deg)1-HighSpeed3.43 0.60 902-MediumSpeed2.10 0.22 523-LowSpeed0.94 0.045 23Capstone Group 062 Design 85APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019Appendix D: Ideal Environment TestVarying Sensor Placement TestPurposeThe purpose of this experiment is to find an acceptable place-ment of the accelerometer on the window by performing dropsat various location on the window while fixing the location ofthe impact shown in Figure H1. These experiments are designedto mimic the ideal conditions in which the system will operateat the UBC Vancouver campus.ApparatusThe apparatus for this experiment includes:• The test window• A window mount• A pendulum that will consist of a mock bird (Validationappendix) and a string• The microcontroller (Design Document, Section 3.3)• The accelerometer (Design Document, Section 3.1.1)Capstone Group 062 Design 86APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019It is noted that the common kinglet weighs approximately 7g,while we will be using a mock bird (Appendix B). This is doneto limit drop heights required, and is accounted for in later cal-culations. The test window is set up according to Figure (FigureC1). The sensors are connected according to Figure 16, in sec-tion 7.1.Procedure1. Verify the mass of the mock bird and attach the bird toa string with a measured length to the pendulum frame.Attach the pendulum frame, shown in Figure C1, to thetest window.2. Place the accelerometer in location 1 shown in Figure D1and connect to the microcontroller according to the schematicin Figure 14, section 7.1.3. Drop the mock bird onto the approximate area marked byblue circle in Figure D1 from 90 degree angle to simulatethe speed of 6.7m/s (which is listed in Table C2 and TableB2. Perform two impact. Save the signal for processing.4. Repeat Step 3 after changing the sensor location to loca-Capstone Group 062 Design 87APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019tions 2-7.Figure D1: Drops Performed at Varying Sensor Location(red) While Fixingthe Impact Location (Blue)Capstone Group 062 Design 88APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019ObservationsThe maximum peak-to-peak voltage and frequencies are recordedin Table D1.Table D1: Results from Varying Sensor PlacementsLocationMaximumPeak-to-PeakVoltage(V)Dominant Frequency(Hz)1 0.5736 82.5, 1651 0.593 82.5, 1652 0.2449 82.5,120,1652 0.2905 82.5,120,1653 0.1901 82.5,137,176.53 0.1998 82.5,137,176.54 0.3062 82.5,1654 0.3203 82.5,1655 0.2933 82.5,137.5, 167.5,257.55 0.2739 82.5,167.5 257.56 0.3062 82.5,120,165, 257.56 0.3094 82.5,167.5 2607 0.3803 82.5,165, 257.57 0.3642 82.5,167.5 257.5In order to find an acceptable location for the accelerometer, thedistance between the impact location and the sensor placementlocation is plotted against the maximum peak-to-peak voltageCapstone Group 062 Design 89APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019as shown in Figure D2.Figure D2: Scatter Plot with Best Fit Line of Voltage vs Distance by VaryingImpact LocationFrom the varying sensor placement test, the accelerometer testshows a correlation between the sensor location and voltage.The further the distance between the impact and the sensor,the lower the voltage. While the majority of the data points fallalong the best fit line that demonstrates an inverse relationshipbetween the voltage and distance, there is an outlier when thedistance is 9 inches. This outlier is from impacts at location 2.Capstone Group 062 Design 90APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019Potential causes of the outlier could be dampening due to therigidity of the metal window frame. In addition, the closer thesensor is to the frame the lower the resulting voltage as displayedin Table D1.ConclusionBased on the results and analysis summarized above, the ac-ceptable sensor placement location, as indicated by the figurebelow, is at least 3 inches away from both frames. Therefore,the accelerometer should be at least 3 inches away from theframes in any direction for an voltage output at least 20 timesthe noise floor. In addition, for the best coverage of window forimpact detection, it is better to place the sensor as close to thecenter (location 1) as possible. Figure D3 displays the accept-able locations for the sensor placement on the test window.Capstone Group 062 Design 91APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019Figure D3: Acceptable Sensor Placement Locations Indicated by GreenVarying Impact Location TestPurposeThe purpose of this varying impact location test is to identifythe voltage and frequency characteristics at different impact lo-cation on the window, while fixing the location of the sensor at6 inches away from the frame.ApparatusCapstone Group 062 Design 92APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019The apparatus for this experiment includes:• The test window• A window mount• A pendulum that will consist of a mock bird (Validationappendix) and a string• The microcontroller (Design Document, Section 3.3)• The accelerometer (Design Document, Section 3.1.1)Procedures1. The test is conducted as follows: Set up testing environ-ment according to Figure 14 section 7.1, with the accelerom-eter in the location marked for the sensors(red) shown inIdeal environment tests set-up shown in D3.2. Verify the mass of the mock bird and attach the bird toa string with a measured length to the pendulum frame.Attach the pendulum frame, shown in Figure C1, to thetest window.3. Drop the mock bird onto the approximate area marked byblue circle in Figure D4 from 90 degree angle to simulate aspeed of 6.7m/s (Drop Height 1 listed in Table C1). Per-form two impact. Save the signal for processing.Capstone Group 062 Design 93APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 20194. Repeat Step 3 for for locations 2-6.Figure D4: Drops Performed at Varying Impact Location(Blue) While Fixingthe Sensor LocationObservationsThe maximum peak-to-peak voltage and frequencies associatedwith each impact location are summarized below.Capstone Group 062 Design 94APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019Table D2: Results from Varying Impact LocationsLocationMaximumPeak-to-PeakVoltageDominant Frequency1 0.2997 120,2562 0.4318 120,2562 0.3996 120,2563 0.3738 82,165,2303 0.3964 82,165,2304 0.3964 82,165,2304 0.2997 82,165,2305 0.4157 82,120, 2575 0.3899 82,120, 2576 0.5736 82,1206 0.593 82,120The distance between the impact location and the sensor place-ment location is plotted against the maximum peak-to-peakvoltage as shown in Figure D5. No discernible correlation isestablished between impact location and sensor placement interms of maximum peak-to-peak voltage.Capstone Group 062 Design 95APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019Figure D5: Scatter Plot of Voltage vs Distance by Varying Impact LocationThe voltage range of the signals recorded by the accelerome-ter is from 0.1901V to 0.593V. The dominant frequencies of thesimulated impacts are identified as 82.5Hz, 120Hz, 165Hz, and260Hz. These frequencies consistently appear at a variety of im-pact locations.ConclusionsThis test is helpful in determining the voltage threshold andfrequency ranges for the detection algorithm outlined in section3.2.Capstone Group 062 Design 96APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019For the accelerometer, the voltage ranges from 0.1901V to 0.593V.Dominant frequencies are also identified: 82.5Hz and 165Hz,120Hz, 137Hz, 260Hz. These frequencies appear repeatedly indifferent impact locations.Capstone Group 062 Design 97APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 2019Appendix E: Non-Ideal Environment TestHuman Noise DisturbancePurposeThe purpose of the human noise disturbance test is to iden-tify the effects of noise on the signal’s characteristics such asvoltage and frequencies. The results of this test will help final-ize the voltage thresholds and frequency ranges in the detectionalgorithm to account for real-world operation scenarios.Apparatus• a UE WonderBoom bluetooth speaker• Decibel X application for iPhone• 2 iPhones• Ideal environment tests set-up shown in Appendix DProcedureThe human disturbance is created following these steps:1. Turn on the UE WonderBoom speaker and connect it to aniPhone with bluetoothCapstone Group 062 Design 98APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 20192. Place the bluetooth speaker 3 meters away from the backof the window3. Play the test sound on the iPhone connected to the speaker(30)4. Take the second iPhone, open Decibel X, and measure thenoise level next to the window5. Adjust the volume of the iPhone playing the sound untilthe decibel meter on the second iPhone reads 60-70dB6. Place the accelerometer the position indicated by the redcircle in Figure D1 and connect to the microcontroller ac-cording to the schematic in Figure 14, section 7.1.7. Drop the mock bird onto the approximate area marked bylocation 1 (blue) in Figure D1 from Drop Height 1 listedin Table C1. Perform two impact. Save the signal for pro-cessing.8. Repeat Step 7 for location 6 indicated by Figure D1.ObservationsThe observations are summarized below.Capstone Group 062 Design 99APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 2019Table E1: Summary of Maximum Peak-to-Peak Voltage with 70dB noise inthe BackgroundMaximum Peak-to-PeakVoltage(V)Best case w/noise 0.5221worst case w/noise 0.2224Best case: No noise 0.5736Worst case: No noise 0.2997Noise Floor: Human Noise 0.0161As shown from Table E1 and Figure E1, the strength of thenoise floor is negligible compared to the strength of the impactsignal. Therefore, it should not have significant effect on theimpact signals, which is confirmed below.Capstone Group 062 Design 100APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 2019Figure E1: Noise Floor Measurement of Human Talking at 70dBFigure E1 shows the spectrogram and and the FFT of the back-ground noise with Human Talking at 70dB. Compared to theCapstone Group 062 Design 101APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 2019ideal environment background noise (Figure 5 at Section 2.3.1),there is a frequency peak at around 270Hz, which may be causedby a vibration due to the loud human noise. However, when welook at the amplitude at frequency domain, the highest peak isaround 0.09, which can be ignored compared to even the worstcase, which have all four of its peaks over 1.3 when we havesmall impact at the edge (see Figure 7 at section 2.3.2).Capstone Group 062 Design 102APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 2019Figure E2: Comparison of Signals with and without Noise disturbanceThe voltage of the impact signal in the time domain are rel-atively consistent, with the strength of the signal in non-idealenvironment slightly lower than ideal environment.The human noise disturbance dampens the voltage and by aboutCapstone Group 062 Design 103APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 20198% in the best case impact and the about 25%. The noise floor is3% of the best case impact and 7% of the worst case impact withnoise. In the frequency domain, the locations of the dominantpeaks remain constant, while the signal in ideal environmenthaving higher amplitude than the one in non-ideal environmentat those peaks. The worst case impact demonstrates the samecharacteristics.ConclusionHuman noise disturbance dampens the strength of the signal.Therefore, the voltage threshold in the detection algorithm shouldbe changed accordingly to account for the noise. There’s no ef-fect on the frequencies ranges.RainPurposeThe purpose of this to examine the effect of rain on the im-pact signals.Apparatus• a 15ft garden hoseCapstone Group 062 Design 104APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 2019• a hose spray nozzle• duct tape• 1 garbage bag• Ideal environment tests set-up shown in the Appendix DProcedure1. Connect one end of the hose to the hose spray nozzle, andthe other end to the water outlet2. Tape the garbage bag to the back side of the window asshown in Figure E3.3. Place the accelerometer the position indicated by the redcircle in Figure D1 and connect to the microcontroller ac-cording to the schematic in Figure 14, section 7.1.4. Turn on water and aim nozzel at the window.5. Drop the mock bird onto the approximate area marked bylocation 1 (blue) in Figure D1 from Drop Height 1 listedin Table C1. Perform two impact. Save the signal for pro-cessing.6. Repeat Step 7 for location 6 indicated by Figure D1.Capstone Group 062 Design 105APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 2019Figure E3: Full Rain Test SetupFigure E4: Window with Garbage Bag Sealing and RainCapstone Group 062 Design 106APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 2019ObservationsTable E2: Summary of Maximum Peak-to-Peak Voltage with Rain in theBackgroundMaximum Peak-to-PeakVoltage(V)Best case w/noise 0.3642worst case w/noise 0.1192Best case: No noise 0.5736Worst case: No noise 0.2997Noise Floor: Light Rain 0.0097The rain disturbance dampens the voltage and by about 36% inthe best case impact and the about 60%. The noise floor is 3%of the best case impact and 8% of the worst case impact withnoise. As shown from Table E2 and Figure E5, the strengthof the noise floor is negligible compared to the strength of theimpact signal. However, the strength of the signal is dampenedsignificantly.Capstone Group 062 Design 107APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 2019Figure E5: Noise Floor Measurement of RainAs shown in Figure E5, the rain generates vibration with randomfrequency peaks with amplitudes less than 0.04 which can be ig-nored compared to the ideal environment background noise(FigureCapstone Group 062 Design 108APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 20196 at Section 2.3.1),Figure E6: Comparison of Signals with and without rain disturbanceThe voltage of the impact signal in the time domain is damp-ened significantly.Capstone Group 062 Design 109APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 2019In the frequency domain, the locations of the dominant peaksremain constant, while the signal in ideal environment havinghigher amplitude than the one in non-ideal environment at thosepeaks. The worst case impact demonstrates the similar charac-teristics.ConclusionIn conclusion, the maximum peak-to peak voltage difference ofan impact is lower in non-ideal environment compared to idealenvironment and the voltage threshold in the detection algo-rithm will be updated accordingly to account for possible sce-narios with rain. The dominant frequencies remain constant.Capstone Group 062 Design 110APPENDIX F: IMPACT DATA PROCESSING May 16, 2019Appendix F: Impact Data ProcessingIn order to determine an actual bird impact, a series of mockbird impact tests are performed to figure out the characteristicssuch as duration and frequency range. For the Discrete TimeFourier Transform we use the algorithm of fast Fourier Trans-form to calculate(4).The process of calculation is shown as below and more detailcan be referred to the code(31).1. Receive analog data from accelerometer at a rate of 2000Hzand store in a global array.2. Convert the signal into voltage.3. Remove the DC component by subtract the average voltageof stored data4. Measure the voltage difference by subtracting maximumvoltage by minimum voltage in the array5. Measure the duration by setting top and bottom voltagethreshold value and measure time when it dampens belowthat threshold6. Find frequency peaks by using Discrete Time Fourier Trans-form to convert the signal in frequency domainCapstone Group 062 Design 111APPENDIX F: IMPACT DATA PROCESSING May 16, 2019Figure F1: Accelerometer Impact Voltage in Time DomainFigure F1 displays how voltage difference is measured, FigureF2 displays how signal duration is measured, and Figure F3displays how frequency peaks are found.Capstone Group 062 Design 112APPENDIX F: IMPACT DATA PROCESSING May 16, 2019Figure F2: Accelerometer Impact Voltage in Time DomainFigure F3: Accelerometer Impact Voltage Signal in Frequency DomainCapstone Group 062 Design 113APPENDIX F: IMPACT DATA PROCESSING May 16, 2019ObservationsBy repeating mock bird impact testing and changing differentmaterial of mock bird (Section 2.1), we are able to characterizethe features of a bird impact, summarized in Table F1.Table F1: Impact Signal Patterns of AccelerometerTest Speed Voltage Difference (V) Duration (s) Frequency peaks (Hz)Low 0.1297 1.5725 84,173Medium 0.3258 0.2330 85,175High 0.5539 0.2662 86,175Minimum 0.0483 0.1175 85,178Table F1 is to record the Voltage Difference, Duration and Fre-quency peaks of accelerometer signal. (For the specific value ofspeed, please refer to Appendix C: Table C2.)Capstone Group 062 Design 114APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019Appendix G: Unimplemented Detection Sys-tem ComponentsFour components were considered for implementation in the de-tection system, but were not included in the final design. Thesecomponents are:1. Digital filter for the accelerometer (Section 3.1.1)2. Microphone sensor for impact detection3. WiFi disconnection in the case of long-term loss of network4. Damping Ratio Analysis for Detection AlgorithmThese components were not included but could be useful in fu-ture iterations of the system. They are suggested as potentialupgrades or additional functionality that could be added to im-prove various aspects of system function.Digital FilterA digital filter implemented in detection system removes thehigh-frequency components of signals produced by the accelerom-eter. These high-frequency signal components may interferewith the lower frequency analog signals in the 50-260Hz rangethat are indicative of a bird impact event. Therefore, a digi-tal filter enhances the ability of the detection system to analyzeCapstone Group 062 Design 115APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019signals from the sensor(32). The system is sampling the analogsignals at 2000Hz, so signals of 1000Hz or less may be filtereddigitally according to Nyquist’s Sampling Theorem. As the max-imum expected frequency on event of a bird impact is 260Hz,the digital filter is designed with a normalized cutoff frequencyof 0.26.A digital filter is implemented in the Arduino (Section 3.3) bymultiplying sample and a defined number of preceding samplesby a set of predetermined coefficients, then summing the result.The following filters were tested with recorded data from simu-lated bird impacts (Section 2):1. Rectangle2. Von Hann3. Hamming4. Blackman5. Chebyshev6. KaiserThese filter types were simulated using the MATLAB windowDe-signer command(33). Figure G1 compares the frequency domainoutput of each filter when applied to the same sample impactCapstone Group 062 Design 116APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019signal. Frequency domain output is the primary concern as it isused in the detection algorithm (Section 3.2).Figure G1: Frequency Domain Effect of Various Digital FilterseTable G1 compares the characteristics of each filter when appliedto a typical bird impact event signal. The digital filter propertiesare defined as:Mainlobe Width: Double the point at which the signal powerfalls 3dB below the peak power.Relative Sidelobe Attenuation: Difference between power ofthe mainlobe peak and peak power in sidelobes, measuredin dB.Capstone Group 062 Design 117APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019Leakage Factor: Ratio of power in the sidelobes of a signal tototal signal power.Length of Filter: The number of previous samples of the sig-nal required to apply the filter, in addition to the mostrecent samples.Table G1: Comparison of Digital Filter Properties with Bird Impact SignalDigital FilterMainlobeWidthRelativeSidelobeAttenuationLeakageFactorLength ofFilterRectangular 0.29688 -12.4dB 8.68% 6Von Hann 0.25781 -31.6dB 0.05% 12Hamming 0.25 -36.7dB 0.04% 11Blackman 0.25 -59.1dB 0% 14Chebyshev 0.26562 -100.0dB 0% 8Kaiser 0.27344 -24.2dB 0.45% 8The Chebyshev filter is recommended for use in the system dueto having approximately 0% leakage and a cutoff frequency veryclose to the desired cutoff frequency. The Chebyshev filter forCapstone Group 062 Design 118APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019the system is defined using the following set of coefficients:y(n) = 0.0055x(n) + 0.0388x(n− 1) + 0.1418x(n− 2) + 0.3482x(n− 3)+ 0.6333x(n− 4) + 0.8936x(n− 5) + 1.0000x(n− 6) + 0.8936x(n− 7)+ 0.6333x(n− 8) + 0.3482x(n− 9) + 0.1418x(n− 10)+ 0.0388x(n− 11) + +0.0055x(n− 12)To implement this filter in the detection system, these coeffi-cients are programmed into the code. As samples are read fromthe detection system sensor (Section 3.1), the samples should bemultiplied by the appropriate coefficients.Microphone SensorThe CMA-4544pf microphone sensor is one of the potential im-pact sensors of the detection system. Microphone sensors areknown to have a wide range of applications in detecting vibrations(8).For example, microphones have been previously used for mon-itoring underground vibrations continuously and reliably(34).Since the microphone sensor must detect the audible soundsfrom bird collisions to satisfy FR1, the sensor must operate inthe frequency range of human hearing (20 to 20,000Hz)(35).Considering the cost of the microcontroller, the sensors, and theother miscellaneous material, the budget of the microphone wasdetermined to be less than $10 to satisfy C1. The considerationsCapstone Group 062 Design 119APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019for choosing a microphone sensor (36) are summarized in TableG2.Table G2: Microphone Sensor Minimum Specification and ComparisonFeature Minimum Specification CMA-4544pfInput 20 to 20,000Hz 20 to 20,000HzOperating Voltage Range 3.3 to 5V 3 to 10VCost less than $10 $1.2The microphone may improve the accuracy of the detection sys-tem in environments that were not tested in the developmentof the Bird Impact Detection System. If the variety of environ-ments in which the system is expected to operate is increasedin the future, the microphone may become useful as a backupsensor for the accelerometer. Therefore, it is recommended foraddition to future iterations of the detection system.WiFi Disconnection HandlerIn validation testing of the Bird Impact Detection System, nosituation was encountered where the wireless communication(Section 4) was disconnected for an extended period of time.Therefore, the detection algorithm (Section 3.2) does not ac-count for the situation in which the communication system isinaccessible for an extended period of time due to unforeseencircumstances. The Bird Impact Detection System currentlyCapstone Group 062 Design 120APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019utilises the UBC Visitor WiFi network (Section 4.3), which iskept consistently accessible by UBC IT services. Due to this, acontingency for extended loss of connection was not a priorityin the detection system algorithm.Future iterations of the system may be used outside of UBCCampus, or in locations on UBC Campus where it is more dif-ficult to obtain a WiFi connection. If the system is plannedfor future use in these or other similar circumstances, it is rec-ommended that the detection system algorithm be altered toaccount for impacts that occur while the communication systemcannot be accessed. Such an algorithm would store a record ofimpact events that are not able to be sent immediately to datastorage (Section 5) to be sent once a connection is reestablished.Damping Ratio Analysis for Detection AlgorithmIn the current detection algorithm, the method to determinethe duration of an impact is by counting the amount of the timebetween the maximum peak-to-peak voltage until the signal set-tles back to noise floor as shown in Figure F2. However, thismethod require taking more data samples in order to capture thefull duration of the signal. Another method that would allow usto identify the damping characteristics of an impact signal.Capstone Group 062 Design 121APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019Motivation The damping ratio is a character unique to theimpact signal and can be used to effectively distinguish betweenimpact and other disturbances. A bird impact has a distinctivesignal profile different from other disturbances in the environ-ment such as rain or human talking. As shown in the FigureG2 and G3, the envelope of the impact signals display a cleardamping characteristic that is different from other disturbancesignals.Figure G2: Example Signal of ImpactCapstone Group 062 Design 122APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019Figure G3: Example Signal of Human NoiseCapstone Group 062 Design 123APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019How to Find the Damping Ratio in MatlabFigure G4: Example Signal of Impact1. Starting with an example signal shown in G4, we need toclean up the time-domain signal by eliminating all data en-tries before the index that corresponds to maximum volt-age,in order to get an envelope of the signal that pertainsto an exponential decay.Figure G5: Example Signal of Impact2. Use the “envelope” function [yupper, ylower] = envelope(x, np,′ peak′)in Matlab, to extract the upper envelope of the signal. Theenvelope function uses spline interpolation over local max-ima separated by an adjustable number of samples. yupperCapstone Group 062 Design 124APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019is the variable denoting the upper envelope. np is peak sep-aration, which is the number of sample over which the localmaxima are separated. The bigger the np, the smoother theenvelope, as shown in Figure G5.Figure G6: Different Configuration of Envelope Based on Peak Separationdenoted by np3. Using the Curve Fitting Tools in Matlab, we can generatethe an exponential curve fit to the envelope. Since thecurve fitting function is y = a ∗ e(b ∗ x), it is importantto eliminate the offset to allow for the constant term thatis not present in the function. The R-squared parameter isthe the proportion of the variance in the dependent variablethat is predictable from the independent variable, which isimportant for determining the quality of the fit. The closerR-squared is to 1, the better the fit. This process is shownin Figure G6.Capstone Group 062 Design 125APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019Figure G7: Finding the Largest R-squared Value4. Since we are looking at the damping ratio, using visualinspection of the time domain signal, we can see that thesamples between 0 to 200 display damping characteristics.Therefore, we can apply curve fit to the 200 samples anddiscard the rest. The resulting R-squared value is 0.94,which is a good fit.5. Using Matlab to automate the process for more data, wecan define the range of damping ratio and apply to theidentification algorithm.This method is not currently implemented because the arduino’slimited memory does not allow such heavy computation. How-ever,with a more powerful microcontroller such as an RaspberryPi, such functionality can be achieved.Capstone Group 062 Design 126APPENDIX H: SYSTEM PLACEMENT May 16, 2019Appendix H: System PlacementTwo options are available for the placement of the Bird ImpactDetection system. These options are:1. Placement inside the building in which the window is in-stalled.2. Placement outside the building in which the window is in-stalled.In both options, the sensor would be affixed directly to the glassof the window, and the microcontroller would be affixed directlyto the metal frame (Section 7.2). Bird impacts were conductedin both conditions using the simulated bird impact setup (Sec-tion 2). Figure H1 compares the sensor voltage readings fromimpacts with the sensor placed on the inside of the window (red)and the outside of the window (blue). The sensor was affixedto the same horizontal and vertical position on the window forboth the inside and the outside positions. The simulated birdimpact was on the same location of the window for both sensorplacements.Repeated impacts are performed on both the inside and outsideof the window and their peak-to-peak voltage are comparable asCapstone Group 062 Design 127APPENDIX H: SYSTEM PLACEMENT May 16, 2019Figure H1: Comparison of Repeated Impact Signals Performed Inside andOutside of the Windowshown in Figure H1. This is to show that placing the sensor oninside or outside has little effect on the accelerometer signal.To reduce the complexity of the system, the sensor is placed onthe inside of the window. This decision is reflected in the overallsystem installation (Section 7). It is assessed that this reducescomplexity by the more controlled conditions inside of buildingscompared to outside. If the system were placed outside, morestrict design constraints would be required with regard to weath-erproofing and access to power. A plan was created for the caseof the system being placed outside, presented in Appendix L.Capstone Group 062 Design 128APPENDIX I: MICROCONTROLLERS EVALUATED May 16, 2019Appendix I: Microcontrollers EvaluatedThe other options that were considered for the microcontrollerare:• Arduino MKR WAN 1300 (37)• LinkIt Smart 7688 (38)Table I1 compares these two microcontrollers to the ArduinoUno WiFi Rev2.The Arduino MKR WAN 1300 does not provide enough built-inmemory for the project, with regards to the worst-case mainte-nance needs. The LinkIt Smart 7688 was not chosen due to thenecessity of adding an SD card for data storage. In addition,the Arduino Uno WiFi Rev2 is already familiar to the groupmembers of Capstone Group 62. It has extensive online supportfor the functionality required for the project, reinforcing it asthe microcontroller choice over the other options.Capstone Group 062 Design 129APPENDIX I: MICROCONTROLLERS EVALUATED May 16, 2019Table I1: Microcontroller Evaluation ComparisonFeatureMinimumSpecifica-tionArduinoUno WiFiRev2ArduinoMKRWAN 1300LinkItSmart7688Analog Pins 1 6 7 12OutputVoltage3.3V 3.3V 3.3V 3.3VOutput Cur-rent300µA 50mA 7mA 4mAClock Speed 520Hz 16MHz 48MHz 580MHzFlash Mem-ory15kB 48kB 256kB 32MBMemoryStorage33.6kB 6,144kB 32kB SD CardOnboardWiFi Mod-uleYes Yes No YesCapstone Group 062 Design 130APPENDIX J: GOOGLE SHEETS INFORMATION May 16, 2019Appendix J: Google Sheets InformationGoogle Sheets, provided by Google Drive(26), was considered asthe second data storage method for the system. Google Sheetsmeets or exceeds all of the minimum specifications for data stor-age, so it provides a viable solution. In addition, Google Sheetsis an accessible format for raw data storage that is familiar tothe client, and is likely to be familiar to other potential users.It is also a free service provided by Google, as data stored in theGoogle Sheets application is unaffected by Google Drive freestorage limits. Google Sheets does require data to be presentedin HTTPS format to be parsed, meaning an API should be usedto connect it to the detection system (Section 3).However, while Google Sheets meets or exceeds all of the re-quirements of data storage (Section 5), issues were encounteredin the implementation of Google Sheets alongside Cayenne (Sec-tion 5.3). While Cayenne was able to receive data packages reli-ably during validation testing, Google Sheets became unreliablewhen implemented within the detection system state machine(Section 3.2). Therefore, despite meeting or exceeding the min-imum specifications defined, Google Sheets was not included inthe final design of the system.Capstone Group 062 Design 131APPENDIX K: DATABASE AND UI SETUP May 16, 2019Appendix K: Database and UI SetupA MyDevices Cayenne account is required to set up and accessthe features of the Cayenne database and UI. A free accountmay be registered at the MyDevices Cayenne website (39) tocomplete this setup.To connect the Arduino Uno Wifi Rev2 (Section 3.3) to theCayenne database, follow the tutorial provided on the MyDe-vices website(40). The tutorial for the Arduino Uno with a Wifishield should be followed, ensuring the following global vari-ables in the main code(31) match the values presented for thedatabase:1. MQTT Username2. MQTT Password3. Client ID4. MQTT Server5. MQTT PortName the device any desired, appropriate identifier. Ensurethat the UBC Visitor WiFi connection is available, and thatthe channel in the tutorial code matches the desired channel forCapstone Group 062 Design 132APPENDIX K: DATABASE AND UI SETUP May 16, 2019data transmission. Once the network and Arduino Uno WiFiRev2 are ready, run the code from the tutorial on the device.When the device is displayed as connected on the Cayenne dash-board, the custom widgets for the UI may be added. To adda custom widget, choose ‘device/widget’ from the ‘Add new. . . ’drop-down menu, pictured in Figure K1. The ‘Custom Wid-gets’ option should be used to add the widgets for the systemUI (Section 8). Note that the counter widget should already beadded from the tutorial completed to add the device, and thatwidget names and channels may be changed later if needed.Figure K1: Cayenne ’Add Widget’ Drop-Down MenuThe custom widgets for the UI are added as follows:Numerical Counter: Choose the ‘Value’ widget. Name theCapstone Group 062 Design 133APPENDIX K: DATABASE AND UI SETUP May 16, 2019widget with the device location identifier and ensure thecorrect device and channel are chosen. The data type shouldbe set to ‘Counter’, with units of ‘Analog’. Once complete,the ‘Add Widget’ button should be available if the deviceis connected. This will add the widget to the dashboard foruse. Figure K2 displays the settings that should be used.Line Chart: Choose the ‘Line Chart’ widget. Name the widgetappropriately for the device location identifier and ensurethe correct device and channel are chosen. The data typeshould be set to ‘Counter’, with units of ‘Analog’. Oncecomplete, the ‘Add Widget’ button should be available ifthe device is connected. This will add the widget to thedashboard for use. Figure K3 displays the settings thatshould be used. If desired, the y-axis scale may be adjusted.Figure K2: Settings for Cayenne Numerical CounterCapstone Group 062 Design 134APPENDIX K: DATABASE AND UI SETUP May 16, 2019Figure K3: Settings for Cayenne Line ChartCapstone Group 062 Design 135APPENDIX L: SYSTEM WATERPROOFING PLAN May 16, 2019Appendix L: System Waterproofing PlanThis is the installation method for the system if it is installedon the outside of a window. The system (Section 1) must beable to operate for seven days without need for maintenance tosatisfy NFR2. Vancouver has 164 rainy days per year on aver-age (41). The exposure of the system to rain or condensation isinevitable should the system be situated on a window. Water-proofing removes the risk of damage or breakage of the physicaldevice on the window by way of exposure to water. Assumingthat it rains every 2.2 days, our waterproofing method must beable to protect our system consistently from water exposure toenable our system to consistently detect bird impacts. This wa-terproofing plan includes how to waterproof each of the systemcomponents individually.Microcontroller Waterproofing SolutionThe Arduino system (Section 3.3) will be placed in a weather-resistant case. Holes will be drilled through the case so thatthe Arduino ports that are needed for the system will be acces-sible. Once required wires are in place, silicone or epoxy willbe used as an effective way to seal to holes. The method ofsilicon waterproofing components of the system was evaluatedCapstone Group 062 Design 136APPENDIX L: SYSTEM WATERPROOFING PLAN May 16, 2019as the implementation of silicon for the usage of waterproofingor sealing cracks is reliable. It is a solution that is ubiquitousand robust in areas of heat exposure, moisture and chemical use(42). The method of waterproofing for the Arduino provides thefollowing features: lasts a minimum of 20 years(43).Impact Sensors Waterproofing SolutionA layer of silicone or epoxy will be applied to the accelerometerto keep it from water damage. The method of silicon water-proofing components of the system was formulated as the im-plementation of silicon for the usage of waterproofing or sealingcracks is reliable. It is a solution that is ubiquitous and robustin areas of heat exposure, moisture and chemical use (42). Themethod of waterproofing for the impact sensor provides the fol-lowing features: last a minimum of 20 years(43).Capstone Group 062 Design 137 CAPSTONE Group 062List of Deliverables DocumentSusanna Chen David He Kieran MortonEmily Xiong Stevan VicentijevicApril 12, 2019CONTENTS April 12, 2019Contents1 Documents 52 Source Code 63 Schematics 64 Bill of Materials 85 Prototype 86 Capstone Video 11Capstone Group 062 Deliverables 2LIST OF FIGURES April 12, 2019List of Figures1 Detection System Wiring Schematic . . . . . . . . . . . . . . . 72 Detection System Arduino and Accelerometer with Plastic En-closure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10Capstone Group 062 Deliverables 3LIST OF TABLES April 12, 2019List of Tables1 Source Code Deliverables . . . . . . . . . . . . . . . . . . . . . 62 Bill of Materials for the Impact Detection System . . . . . . . 9Capstone Group 062 Deliverables 41 DOCUMENTS April 12, 20191 DocumentsThe documents that are given to the client at the conclusion of the projectare as follows:1. Requirements2. Design3. Validation4. Test DataThe Requirements Document includes background information on the prob-lem solved by the system, and outlines what the system must achieve. Thisincludes how the system benefits the client, and how it provides those ben-efits in the form of minimum requirements. This document is used as thebasis for the design decisions and validation of the system.The Design Document provides both high-level information about the sys-tem design, and detailed information about each subsystem. The focus of thedocument is on how each subsystem is designed, including rationale behinddesign decisions and verification these decisions meet minimum requirements.Additionally, design describes in detail how the system is constructed.The Validation Document provides details of tests conducted to ensure thesystem as a whole meets the requirements set out in the requirements doc-ument. Validation tests are designed and performed for each requirementdefined for the system. This document includes the methodology and resultsCapstone Group 062 Deliverables 52 SOURCE CODE April 12, 2019of each test conducted, and an overall summary of how the system meets thedefined requirements.Additionally, some of the parts of the Design and Validation documents re-quire test data that is stored in separate files. All of the necessary test datadefined in these sections is provided alongside their appropriate documents.2 Source CodeTable 1 presents the source code that is given to the client at the end of theproject.Table 1: Source Code DeliverablesCode Component Platform/Device SubsystemImpact Detection andCommunicationArduino Uno WifiRev2Detection System,CommunicationSystemThe code is provided in the appropriate file format of the platform it isdesigned for. Code is transferred to the client with the rest of the deliverabledocuments.3 SchematicsThe schematics for construction of the system are part of the deliverablematerials provided to the client. The schematics are included for the detec-Capstone Group 062 Deliverables 63 SCHEMATICS April 12, 2019tion system (Design Document Section 3). Figure 1 displays the schematicsof the detection system detailed in the Design document. It is noted thatthe ADXL335 is displayed in the schematic, as the software used for theschematic labels all ADXL3XX accelerometers this way. In the constructionof the system, the ADXL337 should be used, as specified in the DetectionSystem (Design Document Section 3.1).Figure 1: Detection System Wiring SchematicThe components and construction of the detection system are described indetail in the Design Document (Design Document Section 3, Section 7).Capstone Group 062 Deliverables 74 BILL OF MATERIALS April 12, 20194 Bill of MaterialsTable 2 presents the bill of materials, in table form, associated with a singleprototype (Section 5).5 PrototypeTwo complete prototypes will be presented to SEEDS. A prototype is definedas the entire device used to detect and record bird impact data, includingthe data collector and data storage. Each prototype consists of the followingphysical components:1. Arduino Uno WiFi Rev22. Plastic box enclosure for the Arduino Uno Wifi Rev23. ADXL337 Accelerometer with Breakout Board4. 10nF capacitor5. Solid-core insulated connecting wires6. 10g duct seal7. 10cm double sided mounting tape8. Power adapter9. Yellow LED10. 1kΩ resistorCapstone Group 062 Deliverables 85 PROTOTYPE April 12, 2019Table 2: Bill of Materials for the Impact Detection SystemItem Quantity ManufacturerManufacturerPart NumberDescription1 1 Arduino ABX00021Arduino Uno WifiRev22 1 David He N/APlastic BoxEnclosure7.62x7.62x3.81cm3 1 SparkFun SEN-12789ADXL337 Ac-celerometer withBreakout Board4 1 TDK FA24NP02E-103JNU06 10nF Capacitor5 1 SparkFun 11367 Hook-Up Wire6 1 Gardner Bender DS-130 Duct Seal7 1 Scotch 11189Heavy DutyMounting Tape8 1 Lee’s Electronics 1452012V 1A PowerAdapter9 1 Sparkfun 09594 Yellow LED 5mm10 1Stackpole Elec-tronics Inc.0702646255348 1kΩ ResistorCapstone Group 062 Deliverables 95 PROTOTYPE April 12, 2019These components are described in further detail in the Design Document(Design Document Section 3). In addition to the physical prototype com-ponents, the files necessary for 3D printing the plastic box enclosure (2) areprovided to the client. This allows for reproduction of the prototype, as theplastic box enclosure is custom made for the system. Figure 2 displays theArduino Uno WiFi Rev2, the plastic box enclosure, the ADXL337, and theinsulated wires of the prototype.Figure 2: Detection System Arduino and Accelerometer with Plastic Enclo-sureIn addition to these components, access to the non-physical components ofthe prototype will be provided to SEEDs. This includes source code (Section2), data storage (Design Document Section 5), and UI (Design DocumentSection 8). Due to the online nature of the data storage and UI, they aregiven to SEEDs securely in the form of the following components:1. MyDevices Cayenne UsernameCapstone Group 062 Deliverables 106 CAPSTONE VIDEO April 12, 20192. MyDevices Cayenne PasswordDue to the sensitive nature of these components they are presented in private,rather than with the rest of the documentation.6 Capstone VideoThe 120-second video produced for the capstone course is given to the client.This video focuses on the issue that the bird impact detection system aimsto solve (Requirements Document Section 1), and the solution that was de-signed. The video is in 720p definition, saved in mp4 format. This file willbe provided to the client along with the documents (Section 1).Capstone Group 062 Deliverables 11 UBC Social Ecological Economic Development Studies (SEEDS) Sustainability Program Student Research Report        CAPSTONE Group 062 Bird Impact Detection System Design Document Susanna Chen, David He, Kieran Morton, Emily Xiong, Stevan Vicentijevic University of British Columbia EECE 4XX Themes: Biodiversity, Buildings May 16, 2019         Disclaimer: “UBC SEEDS Sustainability Program provides students with the opportunity to share the findings of their studies, as well as their opinions, conclusions and recommendations with the UBC community. The reader should bear in mind that this is a student research project/report and is not an official document of UBC. Furthermore, readers should bear in mind that these reports may not reflect the current status of activities at UBC. We urge you to contact the research persons mentioned in a report or the SEEDS Sustainability Program representative about the current status of the subject matter of a project/report”. May 16, 2019Executive SummaryThe Bird Impact Monitor is a project inspired by SEEDS andtheir initiative on creating bird-friendly technology. UBC hap-pens to be on the migrating path for many bird species andbirds have important roles in the ecosystem. Previously stud-ies commissioned by SEEDs estimated that over 10,000 die dueto window collision on campus. The purpose of this project isto collect real-time bird impact data to help SEEDs implementa bird-friendly building guideline and for researchers to betterunderstand birds’ behavior.Our goal is be replace the manual data collection done by SEEDSin previous years with an automated system that is able to detectbird impacts more accurately and with minimal maintenance.More detailed outlines can be found the the Requirements doc-ument.The device is made of two sections: the detection system andthe communication system. The detection system consists of anaccelerometer connected to an Arduino Uno Wifi Rev 2. Theaccelerometer will be installed on the windows and transmitsanalog data to the Arduino for analysis and identification. OnceCapstone Group 062 Design 2May 16, 2019an impact is identified, the Arduino will send data to MyDevicesCayenne over Wifi. The client will be able to access and visual-ize the data using Cayenne.The prototype we have developed is able to satisfy all of SEEDsrequirements, in particular, it accurately detects bird impactwith a 95% accuracy while rejecting environmental disturbances,it costs less than $80 per unit, and obstructs less than 10% ofthe window. Further recommendations to the project are out-lined in the design documents and will serve as guidelines forfuture projects for improvements and scalability.Capstone Group 062 Design 3CONTENTS May 16, 2019Contents1 System Architecture 171.1 System Operation . . . . . . . . . . . . . . . . . . 192 Simulation of Bird Impact 212.1 Mock Bird . . . . . . . . . . . . . . . . . . . . . . 222.2 Pendulum Setup . . . . . . . . . . . . . . . . . . 252.3 Ideal Environment Simulation . . . . . . . . . . . 252.3.1 Sampling rate . . . . . . . . . . . . . . . . 262.3.2 Results Summary . . . . . . . . . . . . . . 272.4 Non-Ideal Environment Simulation . . . . . . . . 282.4.1 Results Summary . . . . . . . . . . . . . . 293 Detection System 293.1 Impact Sensor . . . . . . . . . . . . . . . . . . . . 303.1.1 Accelerometer . . . . . . . . . . . . . . . . 303.1.2 Anti-aliasing Filter . . . . . . . . . . . . . 323.1.3 Other Sensors Evaluated . . . . . . . . . . 343.2 Detection Algorithm . . . . . . . . . . . . . . . . 353.2.1 State Machine System . . . . . . . . . . . 363.2.2 Initialization State . . . . . . . . . . . . . 363.2.3 Voltage Reading State . . . . . . . . . . . 393.2.4 Identification State . . . . . . . . . . . . . 41Capstone Group 062 Design 4CONTENTS May 16, 20193.2.5 Data uploading . . . . . . . . . . . . . . . 423.3 Microcontroller . . . . . . . . . . . . . . . . . . . 433.3.1 Microcontroller Design Considerations . . 433.3.2 Minimum Specification Description . . . . 453.4 Recommendations for Future Components . . . . 464 Communication System 474.1 Communication System Design Considerations . . 474.2 Minimum Wireless Specifications Description . . . 484.3 UBC Visitor WiFi Description . . . . . . . . . . . 494.4 Accessing the UBC Visitor Network . . . . . . . . 494.5 Other Data Communication Designs Evaluated . 505 Data Storage 515.1 Data Storage Design Considerations . . . . . . . . 515.2 Minimum Specification Description . . . . . . . . 525.3 Cayenne Database . . . . . . . . . . . . . . . . . 535.4 Other Data Storage Designs Evaluated . . . . . . 546 Power Source 556.1 Minimum Specification Description . . . . . . . . 566.2 Other Power Options Evaluated . . . . . . . . . . 577 System Setup 587.1 Sensor Connections . . . . . . . . . . . . . . . . . 59Capstone Group 062 Design 5CONTENTS May 16, 20197.2 Detection System Window Installation . . . . . . 607.2.1 Microcontroller Window Installation . . . 617.2.2 Sensors Window Installation . . . . . . . . 637.2.3 Power Source Installation . . . . . . . . . 647.3 MyDevices Cayenne Database Connection . . . . 648 User Interface 658.1 Minimum Specification Description . . . . . . . . 66References 73Appendix A: Client Sample Collected Data 74Appendix B: Bird Impact Calculations 75Appendix C: Simulation Pendulum Setup 80Pendulum Setup Procedure . . . . . . . . . . . . . . . 81Pendulum Setup Calculations . . . . . . . . . . . . . . 83Appendix D: Ideal Environment Test 86Varying Sensor Placement Test . . . . . . . . . . . . . 86Varying Impact Location Test . . . . . . . . . . . . . . 92Appendix E: Non-Ideal Environment Test 98Human Noise Disturbance . . . . . . . . . . . . . . . . 98Rain . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104Capstone Group 062 Design 6CONTENTS May 16, 2019Appendix F: Impact Data Processing 111Appendix G: Unimplemented Detection System Com-ponents 115Digital Filter . . . . . . . . . . . . . . . . . . . . 115Microphone Sensor . . . . . . . . . . . . . . . . . 119WiFi Disconnection Handler . . . . . . . . . . . . 120Damping Ratio Analysis for Detection Algorithm . . . 121Appendix H: System Placement 127Appendix I: Microcontrollers Evaluated 129Appendix J: Google Sheets Information 131Appendix K: Database and UI Setup 132Appendix L: System Waterproofing Plan 136Capstone Group 062 Design 7LIST OF FIGURES May 16, 2019List of Figures1 High-Level Design of the System . . . . . . . . . . 172 System Operation Data Pathway through System 203 Cayenne Data Presentation with Sample Data . . 224 Mock Birds For Validation Tests . . . . . . . . . . 245 Accelerometer Signal Spectrogram of Ideal Envi-ronment Background Noise and Simulated birdImpact . . . . . . . . . . . . . . . . . . . . . . . . 266 Best Case Accelerometer Impact Signal, Time Do-main vs. Frequency Domain . . . . . . . . . . . . 277 Worst Case Accelerometer Impact Signal, TimeDomain vs. Frequency Domain . . . . . . . . . . 288 Detection System Diagram . . . . . . . . . . . . . 309 Sample Bird Impact Signal Before Anti-aliasingFilter is Applied . . . . . . . . . . . . . . . . . . . 3310 Sample Bird Impact Signal After Anti-aliasingFilter is Applied . . . . . . . . . . . . . . . . . . . 3311 System State Machine Diagram . . . . . . . . . . 3712 Reset Flag Register Bits (1) . . . . . . . . . . . . 3913 Recovery from Power Loss Flowchart . . . . . . . 4014 Flowchart of the Detection Algorithm . . . . . . . 42Capstone Group 062 Design 8LIST OF FIGURES May 16, 201915 Detection System Wiring Schematic. It is notedthat due to a limitation in the schematic gener-ator, the ADXL335 is displayed instead of theADXL337. . . . . . . . . . . . . . . . . . . . . . . 5916 Microcontroller Installed in Plastic Box . . . . . . 6217 Microcontroller inside Plastic Box (Red Circle),Accelerometer with Cover (Blue Circle) Affixedto Sample Window . . . . . . . . . . . . . . . . . 6318 Cayenne Dashboard UI featuring numerical counter(left) and line plot (right) widgets, populated withsample data. . . . . . . . . . . . . . . . . . . . . . 66C1 Photo of Mock Bird Used for Validation Tests . . 81D1 Drops Performed at Varying Sensor Location(red)While Fixing the Impact Location (Blue) . . . . 88D2 Scatter Plot with Best Fit Line of Voltage vs Dis-tance by Varying Impact Location . . . . . . . . 90D3 Acceptable Sensor Placement Locations Indicatedby Green . . . . . . . . . . . . . . . . . . . . . . . 92D4 Drops Performed at Varying Impact Location(Blue)While Fixing the Sensor Location . . . . . . . . . 94D5 Scatter Plot of Voltage vs Distance by VaryingImpact Location . . . . . . . . . . . . . . . . . . . 96Capstone Group 062 Design 9LIST OF FIGURES May 16, 2019E1 Noise Floor Measurement of Human Talking at70dB . . . . . . . . . . . . . . . . . . . . . . . . . 101E2 Comparison of Signals with and without Noisedisturbance . . . . . . . . . . . . . . . . . . . . . 103E3 Full Rain Test Setup . . . . . . . . . . . . . . . . 106E4 Window with Garbage Bag Sealing and Rain . . . 106E5 Noise Floor Measurement of Rain . . . . . . . . . 108E6 Comparison of Signals with and without rain dis-turbance . . . . . . . . . . . . . . . . . . . . . . . 109F1 Accelerometer Impact Voltage in Time Domain . 112F2 Accelerometer Impact Voltage in Time Domain . 113F3 Accelerometer Impact Voltage Signal in FrequencyDomain . . . . . . . . . . . . . . . . . . . . . . . 113G1 Frequency Domain Effect of Various Digital Filterse117G2 Example Signal of Impact . . . . . . . . . . . . . 122G3 Example Signal of Human Noise . . . . . . . . . . 123G4 Example Signal of Impact . . . . . . . . . . . . . 124G5 Example Signal of Impact . . . . . . . . . . . . . 124G6 Different Configuration of Envelope Based on PeakSeparation denoted by np . . . . . . . . . . . . . 125G7 Finding the Largest R-squared Value . . . . . . . 126H1 Comparison of Repeated Impact Signals PerformedInside and Outside of the Window . . . . . . . . . 128Capstone Group 062 Design 10LIST OF FIGURES May 16, 2019K1 Cayenne ’Add Widget’ Drop-Down Menu . . . . . 133K2 Settings for Cayenne Numerical Counter . . . . . 134K3 Settings for Cayenne Line Chart . . . . . . . . . . 135Capstone Group 062 Design 11LIST OF TABLES May 16, 2019List of Tables1 Technical Specifications of ADXL337 . . . . . . . 322 Microcontroller Minimum Specifications . . . . . 463 Data Communication Minimum Specifications . . 484 Communication System Evaluation . . . . . . . . 505 Data Storage Minimum Specifications . . . . . . . 536 Data Storage Evaluation Comparison . . . . . . . 557 Power Source Minimum Specifications . . . . . . . 568 Power Source Evaluation Comparison . . . . . . . 579 UI Minimum Specifications . . . . . . . . . . . . . 66B1 Energy transfer of 7g bird at bird-window collision. 76B2 Energy transfer of 7g bird at bird-window collision. 77B3 Energy transfer of 18g mock bird at bird-windowcollision. . . . . . . . . . . . . . . . . . . . . . . . 79B4 Energy transfer of 57g mock bird at bird-windowcollision. . . . . . . . . . . . . . . . . . . . . . . . 79C1 Pendulum Drop Angles of 18g bird with StringLength of 1.9m. . . . . . . . . . . . . . . . . . . . 85C2 Pendulum Drop Angles of 57g Bird with StringLength of 0.60m. . . . . . . . . . . . . . . . . . . 85D1 Results from Varying Sensor Placements . . . . . 89D2 Results from Varying Impact Locations . . . . . . 95Capstone Group 062 Design 12LIST OF TABLES May 16, 2019E1 Summary of Maximum Peak-to-Peak Voltage with70dB noise in the Background . . . . . . . . . . . 100E2 Summary of Maximum Peak-to-Peak Voltage withRain in the Background . . . . . . . . . . . . . . 107F1 Impact Signal Patterns of Accelerometer . . . . . 114G1 Comparison of Digital Filter Properties with BirdImpact Signal . . . . . . . . . . . . . . . . . . . . 118G2 Microphone Sensor Minimum Specification andComparison . . . . . . . . . . . . . . . . . . . . . 120I1 Microcontroller Evaluation Comparison . . . . . . 130Capstone Group 062 Design 13List of Abbreviations May 16, 2019List of AbbreviationsC1 Design Document Constraint 1. Pages:. 31, 119C2 Design Document Constraint 2. Pages:. 52C3 Design Document Constraint 3. Pages:. 56C4 Design Document Constraint 4. Pages:. 60C5 Design Document Constraint 5. Pages:. 48FR1 Design Document Functional Requirement 1. Pages:. 30,31, 36, 119FR2 Design Document Functional Requirement 2. Pages:. 36,48, 53FR3 Design Document Functional Requirement 3. Pages:. 46,48, 53, 66NFR1 Design Document Non-Functional Requirement 1. Pages:.25, 29–31, 36, 60NFR2 Design Document Non-Functional Requirement 2. Pages:.36, 45, 50, 53, 56, 66, 136NFR3 Design Document Non-Functional Requirement 3. Pages:.48Capstone Group 062 Design 14List of Abbreviations May 16, 2019List of Key TermsAliasing: Misidentification of the frequency of a signal. Causesdistortion or error.Analog Data: For a signal that is continuous, its time-varyingfeature is represented with another time-varying quantity.Bird Impact: The event where a bird collides with the windowupon which the Bird Impact Detection system is installed.Database: A set of data that is held in a structured way in acomputer.Data Segment: A piece of a data packet containing certaininformation for storage. Includes timestamps and locationdata.Kinglet: A type of bird identified by the client as being ofhigh concern for bird impacts on UBC Campus.Microcontroller: A computer that is composed on an in-tegrated circuit, that has various distinguishable features(number of CPUs, memory, input/output peripherals).Mock Bird: An object we use in order to simulate the equiv-alent energy produced by a bird, i.e., a kinglet.Capstone Group 062 Design 15List of Abbreviations May 16, 2019Nyquist Frequency: Twice the maximum expected frequencyof a signal, the minimum rate at which the signal may besampled without introducing error.SEEDS: The UBC Social Ecological Environmental Develop-ment Studies program.Sensor: A device that can detect or measure physical proper-ties.User Interface: The method in which an user and a computersystem interact.Voltage: A potential difference with the unit of Volts.Capstone Group 062 Design 161 SYSTEM ARCHITECTURE May 16, 20191 System ArchitectureThe design for the product is divided into four major compo-nents:• Detection System• Communication System• Data Storage• User Interface (UI)Figure 1: High-Level Design of the SystemThe detection system refers to an accelerometer and microcon-troller device that will be attached to the window being mea-sured (Section 3). The detection system in the system architec-ture is seen in Figure 1. The purpose of the detection systemportion of the device is to monitor the window for any sufficientCapstone Group 062 Design 171 SYSTEM ARCHITECTURE May 16, 2019signal that represents a bird colliding with the glass. The detec-tion system then sends this data to the data storage device foruse and analysis by SEEDS.The communication system (Section 4) refers to the WiFi con-nection the detection system uses to communicate data to datastorage (Section 5). This subsystem ensures that all bird impactdata recorded by the detection system is accurately transmittedto data storage. The primary purpose of the communicationsystem is to make access of data more convenient by making itremotely accessible.Data storage refers to Cayenne, which the detection systemsends bird impact information to (Section 5). The purpose ofthe data storage portion of the device is to store impacts thatare detected by the detection system. The data storage compo-nent provides a remote database that expands upon the spaceavailable for storage of impact data. As well, the data storagemakes the impact data consistently available for the UI and ac-cess by SEEDS.UI refers to the Cayenne Dashboard, which is used to presentthe data stored in the data storage component to users of theCapstone Group 062 Design 181 SYSTEM ARCHITECTURE May 16, 2019system (Section 8). It processes the data in data storage andpresents it in an easily readable and user-friendly format. Thisincludes a numerical counter that presents the location the datawas collected, and a tally of total impacts at that location. Inaddition, the UI plots the data over time from the location as-sociated with the counter.1.1 System OperationThe system is designed to detect bird impact events that occuron the window the system is installed upon. An occurrence ofa bird impact is defined as the primary condition in which thesystem will perform functions. The system does not performfunctions outside of monitoring for the occurrence of a bird im-pact event. Figure 2 displays the path of data from a bird impactthrough the system.The impact sensors continuously transmit data to the micro-controller representing the vibrations in the inner pane of thewindow the system is installed on. When a bird impacts thewindow the system is mounted on, the vibration generated isconverted into analog signals by the impact sensors (Section3.1). These analog signals are then transmitted as voltage alongCapstone Group 062 Design 191 SYSTEM ARCHITECTURE May 16, 2019Figure 2: System Operation Data Pathway through Systemwires to the microcontroller (Section 3.3) for processing.Analog data is received by the microcontroller through wiresthat connect it to the impact sensors. The microcontroller thenprocesses these analog signals, and monitors said signals for signsof a bird impact. When an impact is detected, the microcon-troller records the event. Recording consists of creating an ob-ject in the microcontroller’s memory, including the location andtime of the impact. Location is defined as an identifier of whichwindow the system is installed on, consisting of the building andan index referring to the window. Appendix A displays exam-ples of locations recorded, in the column marked ’facade’. ACapstone Group 062 Design 202 SIMULATION OF BIRD IMPACT May 16, 2019digital record of the impact is then transmitted using the com-munication system (Section 4) to data storage (Section 5). Anacknowledgement of the impact event is sent to the appropri-ate Cayenne channel. The Cayenne channel designates at whichbuilding location the system is located, and is coded into theArduino.The digital record packets sent by the microcontroller via WiFiare then received by Cayenne. Figure 3 displays how data isstored in Cayenne when a bird impact is received. Each linerepresents one data package that was received from the deviceby Cayenne. Sensor name is used to identify the location of thesystem, and is associated with the channel. Value refers to thenumber of impacts total that have been identified by the systemsince it was last reset. Timestamp is the approximate time whenthat data package was received, indicating when the associatedimpact occurred.2 Simulation of Bird ImpactIn a literature review, no previous work regarding the repeatablerecreation of a bird impact was found. Due to this, a methodfor simulating an bird impact is created for use in designing andtesting the Bird Impact Detection system. The client identifiedCapstone Group 062 Design 212 SIMULATION OF BIRD IMPACT May 16, 2019Figure 3: Cayenne Data Presentation with Sample Datathe kinglet(2) as a bird of particular concern for bird impactson UBC campus. This species is therefore used as the focusof bird impact simulations used to design and test the system.Appendix B provides more details, including calculations, for thedesign of a bird impact simulation. The bird impact simulationdescribed in this section is used for all of the applicable testingdone for design and validation of the system.2.1 Mock BirdThe bird considered in the design of the mock bird is the kinglet,a species identified by the client as the most common for birdimpacts on the UBC campus(3). Kinglets have the followingphysical characteristics:• 7g mass.• 14-18cm wingspan.Capstone Group 062 Design 222 SIMULATION OF BIRD IMPACT May 16, 2019• 8-11cm length from head to tail.• Foraging speeds between 2.7m/s and 9.7m/s.An 18g rubber ball and a 57g tennis ball are used as the mockbirds to simulate bird impacts on the test window. Figure 4displays the mock birds that were used for the simulations. Themock birds are designed using the following characteristics:• Mass• Physical size (wingspan, length from head to tail)• Flight SpeedsThe two mock birds are purposefully designed to have a mass of18g and 57g. This is done to limit the drop speed and dropheight required to simulate bird impacts, facilitating repeat-able and safe testing. A pendulum (Appendix C) is the chosenmethod of simulating the bird impacts because of its ability tocontrol impact locations and finely tune the impact speed. Sincethe maximum speed of the kinglet is too fast to be effectivelysimulated in a lab setting using the pendulum, ideal kinematicsequations are used with the increased masses of the mock birdsto reduce the speed of the simulated impacts (Appendix B). Wecan ensure that the mock bird impacts are consistent with truekinglet impacts by maintaining equivalent impact energies, asCapstone Group 062 Design 232 SIMULATION OF BIRD IMPACT May 16, 2019(a) Photo of 18g Mock Bird Used for Val-idation Tests(b) Photo of 57g Mock Bird Used for Val-idation TestsFigure 4: Mock Birds For Validation Testspresented in Appendix B. The shape of the mock birds is cho-sen to be a ball to ensure that simulated impacts are unaffectedby the rotation or other positioning upon collision with the win-dow. To simplify the simulation, the effects of air resistance anddeformation of the ball are disregarded.Capstone Group 062 Design 242 SIMULATION OF BIRD IMPACT May 16, 20192.2 Pendulum SetupTo simulate varied bird impacts in a reliable and repeatablemanner, a pendulum is used. By varying the drop angle of themock bird (Section 2.1), the pendulum can simulate differentbird impact speeds on different spots of the test window. Ap-pendix C describes the pendulum setup used in more detail.2.3 Ideal Environment SimulationThis section describes an experiment that was conducted to sup-plement the design of the detection algorithm (Section 3.2) ofthe detection system (Section 3). The complete ideal environ-ment simulation experiment can be found in Appendix D.The purpose of this experiment is to identify important charac-teristics (peak-to-peak voltage, duration, and frequencies) cap-tured by the accelerometer (Section 3.1) during a bird-windowcollision in ideal conditions. These characteristics are used inthe design of the detection algorithm that can distinguish bird-window collisions from other by/on window disturbances, meet-ing NFR1. A secondary purpose of this test is to determine thebest sensor placement location for the system setup (Section 7).This experiment is designed to mimic the ideal conditions inCapstone Group 062 Design 252 SIMULATION OF BIRD IMPACT May 16, 2019which the system will operate at the UBC Vancouver campus,with no external sources of noise such as rain or wind.2.3.1 Sampling rateIn order to calculate accurate frequency peaks when perform-ing a Fast Fourier Transform(4) to the data, we must deter-mine the frequency range of impact vibration on the glass. Todo this, we initially sampled the signal at the maximum rateof serial data transmission, 4000Hz, and recorded data in realtime while applying short time Fourier Transform to study theirfrequencies.(5).Figure 5: Accelerometer Signal Spectrogram of Ideal Environment Back-ground Noise and Simulated bird ImpactFigure 5 shows the spectrograms of the ideal background noise(on the left), and a typical simulated bird impact (on the right).Capstone Group 062 Design 262 SIMULATION OF BIRD IMPACT May 16, 2019It is apparent that the bird impact vibration is under 1000Hz.As a result, according to the Nyquist Frequency(6), the detec-tion system is designed with a sampling rate of 2000Hz.2.3.2 Results SummaryTesting multiple impact locations allows for the impact signalto be characterized. Impacts produce oscillating signals with anexponentially decreasing envelope in the time domain with twoor four peaks at frequency domain.Figure 6: Best Case Accelerometer Impact Signal, Time Domain vs. Fre-quency DomainFigure 6 shows the signals of the best case simulated impact,located on the center of a the glass. Appendix D, Figure D3Location 6 displays an example of a best case simulated impact.This is a typical impact with two frequency peaks around 80Hzand 160Hz.Capstone Group 062 Design 272 SIMULATION OF BIRD IMPACT May 16, 2019Figure 7: Worst Case Accelerometer Impact Signal, Time Domain vs. Fre-quency DomainFigure 7 shows the signal of the worst case simulated impact,located near the edge of the window (refer to Appendix D: Fig-ure D3: Location 1). This is not typical impact as it has fourfrequency peaks, which may be caused by the damping effect ofthe metal frame.As shown by the best and worst case impacts, the signals havedifferent maximum peak-to-peak voltages and frequency peaks.2.4 Non-Ideal Environment SimulationSimilarly to Section 2.3, this section uses an experiment thatwas conducted to supplement the design of the detection algo-rithm (Section 3.2) of the detection system (Section 3). Thecomplete non-ideal environment simulation experiment can befound in Appendix E.Capstone Group 062 Design 283 DETECTION SYSTEM May 16, 2019The purpose of this experiment is to identify important charac-teristics (peak-to-peak voltage, duration, and frequencies) cap-tured by the accelerometer (Section 3.1) during a bird-windowcollision with simulate environmental disturbances, rain and hu-man sound. These characteristics are used in the design of thedetection algorithm in order to distinguish bird-window colli-sions from other disturbances near the window, meeting NFR1.This experiment is designed to mimic the non-ideal conditionsin which the system will operate at the UBC Vancouver campus,testing rainy and noisy conditions.2.4.1 Results SummaryBased on the best and worst case impact data displayed in Ap-pendix E, we can see that rain and noise increase the noise floorlevel, but it is significantly smaller than any bird impact signaland can therefore be ignored.3 Detection SystemThe detection system consists of a microcontroller and one im-pact sensor. Figure 8 displays how these components are con-nected. The sensor used for impact detection is an accelerome-ter. This sensor is attached to the window being measured, inCapstone Group 062 Design 293 DETECTION SYSTEM May 16, 2019order to provide data to the microcontroller for processing. Themicrocontroller reads data from the sensor and uses it to deter-mine whether a bird impact has occurred. If the microcontrollerdetects a bird impact, it sends an acknowledgement to the datastorage (Section 5) using WiFi (Section 4).Figure 8: Detection System Diagram3.1 Impact SensorA bird impact is made up of audible sounds, vibrations, andmotion experienced by the glass of a window (7). The detec-tion system uses an accelerometer to capture the informationproduced from audible sounds and window vibrations during animpact for bird impact detection (8). This sensor is used tomeet FR1 and NFR1 of the system by accurately detecting birdimpacts.3.1.1 AccelerometerThe accelerometer ADXL337 is the impact sensor chosen for thisproject. Accelerometers are a type of sensor that outputs a volt-Capstone Group 062 Design 303 DETECTION SYSTEM May 16, 2019age signal as a function of the force on the sensor in a specifieddirection. The accelerometer’s versatile applications in buildingand structural monitoring make it applicable in our project(9).A kinglet, the bird identified by the client as being of most con-cern for bird impacts on UBC Campus, is estimated to produceapproximately 0.2N to 3N of force which is equivalent to 0.026gto 0.33g upon impact as shown in the calculations in AppendixB(10).In order to meet the cost constraint defined in C1, the accelerom-eter must also cost less than $30. In addition, a high sensitivityallows for the voltage output to be relatively large even whenthe vibration is small as in the case of a low speed impact. Sincethere is a trade-off between the sensitivity and the threshold ofacceleration of an accelerometer, we decided to purchase an ac-celerometer with high sensitivity up to 330mV/g so that impactfrom a small bird flying at low speed can be detected to satisfyFR1 and NFR1. The sensor must have and operating temper-ature range of at least -10◦C to 30◦C. This is to ensure thatthe system will function inside of buildings on UBC Campus.This range sufficiently larger than the expected range of tem-peratures inside of buildingsto ensure the system will functionproperly. Given the above considerations, the minimum specifi-Capstone Group 062 Design 313 DETECTION SYSTEM May 16, 2019cations of the accelerometer are summarized in Table 1(11).Table 1: Technical Specifications of ADXL337Feature Minimum Specification ADXL337Input 0.026g to 0.33g ±3 to ±3.6gSensitivity 100mV/g 270 to 330mV/gOperating Voltage Range 3.3 to 5V 1.8 to 3.6VOperating Temperature −10 to 30◦C −55 to +125◦CCost per Unit less than $30 $163.1.2 Anti-aliasing FilterAliasing is a concern that arises in reading the analog signalfrom the accelerometer. The Nyquist Frequency of the system isapproximately 520Hz, based on the bird impact simulation (Sec-tion 2). The Nyquist Frequency is calculated using the highestfrequencies observed in simulation, approximately 260Hz. Thesystem is sampling at 2000Hz, which is well above the minimumrequirement and results in oversampling. This oversampling in-troduces high frequency white noise that may make the detec-tion system less accurate. A physical anti-aliasing filter is usedto reduce this effect.This filter is implemented by connecting a capacitor betweenthe z-axis output of the accelerometer and ground. As sug-gested by the manufacturer of the ADXL337 (Section 3.1.1),Capstone Group 062 Design 323 DETECTION SYSTEM May 16, 2019a 10nF capacitor is used(11). Figure 9 displays a sample birdimpact signal without the filter implemented, and Figure 10 dis-plays the same signal after the filter is implemented. The filteris implemented mathematically in these two figures, to highlightthe effect of the anti-aliasing filter on a specific impact.Figure 9: Sample Bird Impact Signal Before Anti-aliasing Filter is AppliedFigure 10: Sample Bird Impact Signal After Anti-aliasing Filter is AppliedThe filter attenuates the signals used to identify bird impacts byCapstone Group 062 Design 333 DETECTION SYSTEM May 16, 2019up to 0.5dB, but maintains a satisfactory signal-to-noise ratio.In addition it significantly attenuates high frequency peaks, vis-ible in frequencies above the peak at approximately 250Hz. Thisindicates that the filter is limiting the analog signal to withinthe frequencies that are expected in the event of a bird impact.3.1.3 Other Sensors EvaluatedIn addition to the accelerometer mentioned above, we have alsoconsidered microphones, a piezo disc array, and infrared motionsensors as alternative options. Microphones meet the require-ments of the impact detection sensor, and are therefore a viablesensor option of the system. A microphone is not included inthe final design as no situation was discovered during validationtests where the microphone was able to detect a bird impact thatthe accelerometer could not. The microphone as an impact de-tection sensor is discusses in more detail in Appendix G. Piezodiscs are a type of pressure transducer that generate voltageswhen they are being compressed. However, piezo discs generateAC voltage, which is incompatible with the input format of themicrocontroller. Therefore this option has been eliminated.Infrared sensors emit infrared radiation and detect the reflectedradiation from an object to determine if there is movement in thesensing region (12). These sensors were initially considered as aCapstone Group 062 Design 343 DETECTION SYSTEM May 16, 2019way of confirming the presence of motion immediately in frontof the window when vibrations have been detected by the otherimpact sensors. The two IR sensors that were tested were theIR proximity sensor and the short-range distance sensor. How-ever, IR sensors require mounting on the outside of the windowto provide effective information from bird impacts. These sen-sors were therefore eliminated following the decision to place thesystem on the inside of the window, explained in Appendix H.3.2 Detection AlgorithmTo accurately detect bird impacts among the other vibrationsof the window, an algorithm is needed. This algorithm is im-plemented on the Arduino Uno WiFi Rev2 (Section 3.3). Thethree characteristics of the signal that are used by the algorithmare:1. Signal Voltage Amplitude2. Dominant Frequency Peaks3. Signal DurationBird impacts have distinct characteristics that can be used todistinguish them from other disturbances that cause vibrationin the window glass. The algorithm is implemented using a stateCapstone Group 062 Design 353 DETECTION SYSTEM May 16, 2019machine and a Fast Fourier Transform function for the ArduinoUno WiFi Rev2.3.2.1 State Machine SystemThe algorithm is implemented using 4 different states:1. Initialization2. Voltage Reading3. Identification4. Data UploadingThe state machine is implemented using the Arduin Uno WiFiRev2 (Section 3.3) to collect and analyze data from the ac-celerometer (Section 3.1). Figure 11 shows the state diagramfor the system, including how the states are connected and ba-sic next state logic. The primary purpose of the state machineis to satisfy FR1, FR2, NFR1, and NFR2, allowing the systemto monitor for impacts autonomously with a low error rate.3.2.2 Initialization StateThe first state of the state machine is initialization, which isentered when the system is reset or powered on. If the systementers this state from a spontaneous power loss, it recovers theCapstone Group 062 Design 363 DETECTION SYSTEM May 16, 2019Figure 11: System State Machine Diagramprevious impact data from internal memory using a method-ology defined below (Section 3.2.2.1). The system connects tothe WiFi network (Section 4.3) and MyDevices Cayenne (Sec-tion 5). It then waits until the signal from the accelerometerbecomes stable to avoid any issues with initial signal fluctua-tion. Once the system is connected to Cayenne and the signalis stable, it moves into state 2 (Section 3.2.3).Capstone Group 062 Design 373 DETECTION SYSTEM May 16, 20193.2.2.1 Recovery from Power LossDue to how bird impact information is stored on the Cayennedatabase (Section 5), the number of bird impacts recorded bythe system must be recalled in the case of a loss of power. Apower loss will erase the volatile local system memory, where thenumber of bird impacts is stored. Therefore, a method for recall-ing the bird impacts from a non-volatile memory is needed. Thisrecovery from power loss occurs during the initialization state ofthe state machine, which is always triggered upon booting thedevice. The two types of system power loss are:1. Power Supply Resets: power outage, a brownout, unplug-ging the power source from the system2. User Resets: pressing the reset button on the deviceTo recognize a power loss, the algorithm makes use of a featureon the microcontroller (Section 3.3) called the Reset Controller;the source of a reset occurrence is recorded into the Reset FlagRegister, shown on Figure 12 (1).Each bit is binary, storing a value of 1 or 0. The bits of interestare:Capstone Group 062 Design 383 DETECTION SYSTEM May 16, 2019Figure 12: Reset Flag Register Bits (1)• Bit 0: PORF - Power-On Reset Flag• Bit 1: BORF - Brownout Reset Flag• Bit 2: EXTRF - External Reset FlagBits 0 and 1 are set to 1 if a power supply reset occurs, whilebit 2 is set to 1 if a User Reset occurs.In the event of a power supply reset, the bird impact data isrecalled from the non-volatile memory on the microcontroller.In the event of a user reset, the bird impact data is set to 0. Thisis expressed in the flowchart in Figure 13. This functionality wasshown to work throughout various other tests, and is thereforevalidated.3.2.3 Voltage Reading StateIn this state, the system continuously monitors the signal fromthe accelerometer for the amplitude characteristic of a bird im-pact. The previous 25 milliseconds of accelerometer signal areCapstone Group 062 Design 393 DETECTION SYSTEM May 16, 2019Figure 13: Recovery from Power Loss Flowchartstored. When the signal amplitude becomes larger than thethreshold of 0.0968V (ten times of ideal environment noise floor),the system moves into state 3 (Section 3.2.4). Additionally, anLED attached to the microcontroller indicates when the systemis in this state to confirm the system is working properly. TheLED is on when in this state, and turns off when in any otherstate.Capstone Group 062 Design 403 DETECTION SYSTEM May 16, 20193.2.4 Identification StateIn this state, the system analyzes the data recorded from theaccelerometer for signs of a bird impact. The three key char-acteristics of amplitude, frequency peaks, and signal durationare analyzed (details of these calculations can be found in Ap-pendix F). Upon entering this state, an additional 400 millisec-onds of signal from the accelerometer are stored. A Fast FourierTransform allows the Arduino Uno WiFi Rev2 to identify thefrequency peaks of the signal, and the signal duration may becalculated. The frequency peaks that the system monitors forare:1. 80Hz2. 120Hz3. 160Hz4. 170HzIf the duration of the signal is within the window of 0.1-0.3 sec-onds and the dominant frequency peaks match the characteristicpeaks, the system moves into state 4 (Section 3.2.5). Otherwise,once analysis is complete the system moves back into state 2(Section 3.2.3). Figure 14 displays the flowchart for this processof analyzing the signal.Capstone Group 062 Design 413 DETECTION SYSTEM May 16, 2019Figure 14: Flowchart of the Detection Algorithm3.2.5 Data uploadingIf the system identifies window vibrations as a bird impact, itenters this state. The system updates the online data storage(Section 5) with the new bird impact using WiFi (Section 4)Capstone Group 062 Design 423 DETECTION SYSTEM May 16, 2019and saves the bird impact data for recovery (Section 3.2.2.1).Once the system confirms that the data packet has been sent,it automatically goes back to state 2 to continue monitoring forimpacts (Section 3.2.3).3.3 MicrocontrollerThe microcontroller chosen for the system is the Arduino UnoWiFi Rev2(13). Table 2 compares the specifications of this mi-crocontroller to the minimum specifications. The Arduino UnoWiFi Rev2 meets or exceeds the minimum microcontroller spec-ifications.3.3.1 Microcontroller Design ConsiderationsThe following design components are considered in the micro-controller choice:1. Microcontroller code size of 15kB2. 100B data packets3. Maximum of 48 bird impact events per day4. 33.6kB of potential stored data per 7 day periodThe code size consideration is based on the size of the code thatis developed for the microcontroller to perform the signal pro-Capstone Group 062 Design 433 DETECTION SYSTEM May 16, 2019cessing (Section 3.2). The code requires up to 11kB of flashmemory for the microcontroller to analyze impacts. 15kB ischosen as the design parameter to account for future additionsto the code, as well as associated libraries required for function.The 100B data packets and 48 bird impact events per day isbased on the data provided by the client, included in AppendixA. The size of 100B was found by saving a sample max-size char-acteristic data packet received from the detection system as atext file. The size of this file was significantly under 100B, butthe minimum specification was chosen to be over-designed incase more information is required in data packets in the future.48 events per day is decided by analyzing the data provided inAppendix A for the maximum annual collisions on any givenwindow on UBC Campus. The max number of impacts on onewindow per year previously found by the client is 26. This de-sign consideration is overestimated in case the client data is lowcompared to the actual number of bird impact events is under-estimated, or if the system is used in an area that experiencesmore bird impacts in the future.The maximum potential stored data per 7 day period is decidedby items 2 and 3 above. This consideration only considers theCapstone Group 062 Design 443 DETECTION SYSTEM May 16, 2019worst-case scenario where the system is unable to connect to thenetwork for the entire 7 day period due to unexpected circum-stances. 48 100B data packets is used to find that up to 4800Bof data packets may need to be stored locally on the device inthis scenario. For the entire 7 day period before maintenance,this indicates up to 33600B of data may need to be stored, or33.6kB.3.3.2 Minimum Specification DescriptionThe impact sensor (Section 3.1) consists of a single accelerome-ter. To support the Detection System, the microcontroller musthave one analog input pin for each of the two sensors. The ac-celerometer requires a 3.3V output pin that provides at least300µA of current(11). The sensor sampling rate must be atleast 520Hz, the Nyquist frequency for simulated bird impactevents. The minimum clock speed of the microcontroller mustbe at least this value to ensure sensor signals on the event ofa bird impact may be read properly. The microcontroller mustalso have at least 15kB of flash memory to hold code for sen-sor analog-to-digital conversion (Section 3.2). To fulfill NFR2,the microcontroller must have 33.6kB of on-board memory forbackup storage. This considers the case where the microcon-troller is unable to send data using the UBC Visitor network(Section 4) upon detecting a bird impact. It assumes impactCapstone Group 062 Design 453 DETECTION SYSTEM May 16, 2019data packets of approximately 100B, with 48 events stored perday for the entirety of the maintenance period of 7 days. Tosatisfy FR3 the microcontroller choice must be able to commu-nicate wirelessly using WiFi (Section 4).Table 2: Microcontroller Minimum SpecificationsFeatureMinimum Specifi-cationArduino UnoWiFi Rev2Analog Pins 1 6Output Voltage 3.3V 3.3VOutput Current 300µA 50mAClock Speed 520Hz 16MHzFlash Memory 15kB 48kBMemory Storage 33.6kB 6,144kBOnboard WiFi Mod-uleYes YesSee Appendix I for other microcontrollers evaluated.3.4 Recommendations for Future ComponentsFour components were conceptualized for the detection systemthat are not included in the final design. These componentscould all be included in future iterations of the detection sys-tem to potentially increase its functionality. The componentsconceptualized that are not included are as follows:Capstone Group 062 Design 464 COMMUNICATION SYSTEM May 16, 20191. Digital filter for the accelerometer (Section 3.1.1)2. Microphone sensor for impact detection3. WiFi disconnection in the case of long-term loss of network4. Damping Ratio Analysis for Detection AlgorithmThese components are presented in Appendix G. Due to thevarying stages of development of each component before theywere removed from consideration for the final design, they arenot presented in a completed format. These are suggestions forfuture design components that would potentially be beneficialfor the system.4 Communication SystemThe data communication method chosen for the system is WiFi(14).The WiFi network that is used on UBC Campus is UBC Visitor(15)(Section 4.2). Table 3 compares the specifications of WiFi to theminimum specifications for the subsystem. WiFi meets the min-imum data communication specifications, so it is chosen for thesystem.4.1 Communication System Design ConsiderationsThe main design consideration for the communication systemis the transmission rate of 4B/s. This assumes characteristicCapstone Group 062 Design 474 COMMUNICATION SYSTEM May 16, 2019Table 3: Data Communication Minimum SpecificationsFeature Minimum Specification WiFiWireless Yes YesConnectivity Across UBC Campus Across UBC CampusTransmission Rate 4B/s 737500B/sdata packets of 100B (Section 3.3.1) being transmitted by thedetection system (Section 3). In addition, this consideration as-sumes a 30 second limit on transmission of data communicationfrom the detection system to data storage. This limit is derivedfrom what is perceived as a reasonable amount of time for datapackets to be available after a bird impact event occurs.4.2 Minimum Wireless Specifications DescriptionThe Detection System (Section 3) must be able to communicatewith Data Storage (Section 5) wirelessly to satisfy FR2, FR3,and NFR3. Wireless communication removes the need for theuser to gather data from the device manually, so access is eas-ier. Wireless communication also ensures impact data is contin-uously available from the system data storage. Connectivity isdefined as a minimum specification instead of range due to theavailability of WiFi throughout UBC Campus(16). To ensurethat the system can meet C5, the communication system mustCapstone Group 062 Design 484 COMMUNICATION SYSTEM May 16, 2019be able to connect across UBC Campus. The data transmissionrate must be at least 4B/s (Section 4.1).4.3 UBC Visitor WiFi DescriptionThe UBC Visitor WiFi network(15) is a low-bandwidth networkprovided for guests of UBC Campus that are not faculty orstudents. It is an unsecured network that only requires acceptinga terms of service to access. UBC Visitor is used instead ofUBC Secure(17) due to the Arduino Uno Wifi Rev2 (Section3.3) being unable to validate with the UBC Secure network’ssecurity protocols. Due to the relatively low bandwidth requiredfor the communications, the limits of the UBC Visitor networkare not a concern for the function of the system.4.4 Accessing the UBC Visitor NetworkUnder normal circumstances, microcontrollers and similar de-vices are unable to access the UBC Visitor WiFi network(15).To connect to the network, the MAC address of the microcon-troller used must be registered with UBC IT. This service isoffered due to the low overall bandwidth of the system commu-nication. In addition, it is important that the system microcon-troller connects to the network at least once per week to ensurethat the device stays registered on the UBC Visitor WiFi. ThisCapstone Group 062 Design 494 COMMUNICATION SYSTEM May 16, 2019is considered to meet NFR2, as this maintenance is requiredonly once in every 7 day period.4.5 Other Data Communication Designs EvaluatedOther options that were evaluated for wireless communicationare:• LoRa(18)• Bluetooth 5.0(19)• Zigbee(20)Table 4: Communication System EvaluationFeature WiFi LoRaBluetooth5.0ZigbeeWireless Yes Yes Yes YesConnectivityAcross UBCCampusLimited onUBC Cam-pusRequiresnew infras-tructureRequiresnew infras-tructureTransmissionRate737500B/s 31.25B/s 250000B/s 31250B/sTable 4 compares these options to WiFi communication. All ofthe options considered would meet the minimum specificationsfor the communication method. WiFi was chosen due to itsCapstone Group 062 Design 505 DATA STORAGE May 16, 2019convenience and existing availability on UBC Campus. In addi-tion, WiFi has extensive support available online. Therefore, itis chosen as the communication system.5 Data StorageData storage for the system uses MyDevices Cayenne(21). TheCayenne database presents data in a processed and accessibleformat. It is also used to facilitate the system UI (Section 8).If required, data may be downloaded directly from the Cayennedatabase in a spreadsheet format, which is the format providedby the client shown in Appendix A. Table 5 compares the spec-ifications of Cayenne with the defined minimum specifications.5.1 Data Storage Design ConsiderationsThe following design components are considered in the data stor-age choice:• Able to store 3 individual data segments per impact• Data segment max size of at least 32 charactersThe 3 data segment design consideration for data storage isbased on the minimum required data specified by the client.It is required that the system store 3 different pieces of data onthe event of a bird impact:Capstone Group 062 Design 515 DATA STORAGE May 16, 2019• Bird impact timestamp• Bird impact location marker, identified as a specific windowin a building• Number of bird impacts at that locationThis ensures that the system can store all of the data requiredby the client on the event of a bird impact.The max data segment size of 32 characters is based on thesample data provided by the client in Appendix A. It is basedon the window location identifiers, which have the longest datasegments included in this sample data. 32 characters is over-designed based on the sample data provided, to provide flexibil-ity in future location identifiers that may be used.5.2 Minimum Specification DescriptionThese specifications assume that the data packets stored are amaximum size of 100B, with 48 events per day for a 7 day main-tenance period (Section 3.3.1). It is assumed that at the end ofthe 7 day maintenance period, a user ensures that the data stor-age subsystem has sufficient space remaining. Each package ofevent data consists of three segments - a timestamp and windowidentifier, to satisfy C2, and a total number of bird impacts atCapstone Group 062 Design 525 DATA STORAGE May 16, 2019that location. To meet FR2, FR3, and NFR2, Cayenne musthave at least 33.6kB of storage space (Section 3.3). In addi-tion, data storage must be able to hold at least 1008 individualsegments of data. This number ensures that the system maystore 48 3-segment data packets per day, for 7 days as describedabove (Section 3.3.1, Section 5.1). To store the impact locationdata, each data segment should be capable of storing at least 32characters (Section 5.1).Table 5: Data Storage Minimum SpecificationsFeatureMinimumSpecificationCayenneStorage Size 33.6kB UnlimitedUnique DataSegments1008 UnlimitedData SegmentLength32 Unlimited5.3 Cayenne DatabaseThe primary data storage method for the system is a Cayennedatabase(21), provided by MyDevices(22). Figure 3 shows howdata is stored in the Cayenne database. Cayenne meets or ex-ceeds all of the minimum specifications for data storage, so itprovides a viable solution. Cayenne also provides tools for acces-Capstone Group 062 Design 535 DATA STORAGE May 16, 2019sible displaying and accessing of data, used for the UI (Section8). Cayenne services are also provided for free, making it a goodchoice for the system.5.4 Other Data Storage Designs EvaluatedOther options that were evaluated for data storage are:• Secure Digital (SD) Card(23)• Amazon Web Servers(24)• Dropbox(25)• Google Sheets(26)Table 6 compares Cayenne and Google Sheets to the three op-tions that were not chosen. Google Sheets meets or exceeds allof the requirements for data storage, and was implemented inearly iterations of the system. Due to issues encountered withreliability, it was removed from the final version of the system.More information regarding Google Sheets and why it was notimplemented is presented in Appendix J.The SD card was not chosen as it requires the data from thedetection system be stored with the system, rather than on-line. This reduces accessibility, as the data must be collectedmanually from the SD card. An Amazon Web Server was notCapstone Group 062 Design 546 POWER SOURCE May 16, 2019Table 6: Data Storage Evaluation ComparisonFeature CayenneGoogleSheetsSD CardAmazonWebServersDropboxStorageSizeUnlimited Unlimited 512GB 5GB 2GBUniqueDataSegmentsUnlimited 5 ∗ 106 Unlimited Unlimited UnlimitedDataSegmentLengthUnlimited 50,000 Unlimited Unlimited Unlimitedchosen due to Cayenne and Google Sheets providing sufficientservices for free, while a S3 Web Server has a more limited freemodel(24). Dropbox was not chosen as it is limited to 2GB offree storage(25), while Cayenne and Google Sheets do not havea limit to future free scalability.6 Power SourceThe system is powered by a power adapter. Table 7 comparesthe specifications of an power adapter to the minimum specifica-tions for the subsystem. The power adapter meets the minimumpower specifications, so it is chosen for the system.Capstone Group 062 Design 556 POWER SOURCE May 16, 2019Table 7: Power Source Minimum SpecificationsFeature Minimum Specifications Power AdapterPower Capacity 2000 mAh UnlimitedDC Output Yes YesOutput Voltage 9-12 VDC 9-12 VDCOutput Current 250 mA 250 mA2.1 mm Plug Yes YesCenter Pin Positive Yes YesObtrusiveness of Win-dowLess Than 10% < 1%6.1 Minimum Specification DescriptionThe method for powering the system must satisfy C3, and NFR2.The power source must also be compatible with the microcon-troller (Section 3.3). The system in an idling state consumes 12mAh of power, so the power source of the system must have acapacity of 2000 mAh at minimum. The power method mustbe compatible with a center 2.1 mm center positive plug, havea VDC output of 9-12 V and have an output current of 250mA(13).Capstone Group 062 Design 566 POWER SOURCE May 16, 20196.2 Other Power Options EvaluatedThe other option evaluated for powering the system is by bat-tery.Table 8 compares a power adapter to a battery.Table 8: Power Source Evaluation ComparisonFeatureMAKITA BL10132000MAH 10,8V LI-ION(27)PowerAdapterObtrusiveness ofLess Than 10% ofWindowYes YesCompatibility withArduinoYes YesMaintenance Need Yes NoThe microcontroller (Section 3.3) consumes a minimum of 12mA at 5V and 16Hz while it is in an idling state since it hascapacities of standard shield, a standard USB interface, powerregulation and LEDs (13). A battery that met the minimumspecifications in Table 8 was considered and is a viable optionfor powering the system. However, a power adapter is morereliable and convenient for the maintenance of the system.Capstone Group 062 Design 577 SYSTEM SETUP May 16, 20197 System SetupThe physical portion of the Bird Impact Detection System con-sists of a microcontroller and sensor (Design Document Section3) that are mounted on the indoor side of window being ob-served for bird impacts. The decision to place the system in-doors is explained in further detail in Appendix H. The sensorfor the detection system is connected to the microcontroller di-rectly (Section 7.1). The sensor itself affixed to the indoor glasspane of the window directly, and the microcontroller is attachedto the window frame in a plastic enclosure (Section 7.2). Thephysical components of the Bird Impact Detection System arelinked to the non-physical components through a WiFi modulein the microcontroller (Section 3.3)The non-physical portion of the Bird Impact Detection systemconsists of a WiFi wireless internet connection (Section 4), My-Devices Cayenne (Section 5.1), and the UI (Section 8). MyDe-vices Cayenne is connected to the detection system through useof the internet (Section 6.3.1). The UI is connected to MyDe-vices Cayenne directly, as a provided service from MyDevices(Section 6.3.2).Capstone Group 062 Design 587 SYSTEM SETUP May 16, 20197.1 Sensor ConnectionsThe detection system sensor (Section 3.1) is connected to the mi-crocontroller (Section 3.3) using solid-core insulated wires. Fig-ure 15 displays the schematic for the wiring in the detection sys-tem. It is noted that the ADXL335 is displayed in the schematic,as the software used for the schematic labels all ADXL3XX ac-celerometers this way. In the construction of the system, theADXL337 should be used, as specified in the Detection System(Section 3.1).Figure 15: Detection System Wiring Schematic. It is noted that due to alimitation in the schematic generator, the ADXL335 is displayed instead ofthe ADXL337.Capstone Group 062 Design 597 SYSTEM SETUP May 16, 2019The pins of the sensors are connected to the microcontroller asfollows:1. Accelerometer Z-axis: Connected to input pin A0 of theArduino Uno Wifi Rev2.2. Accelerometer 3.3V: Connected to the 3.3V power pin ofthe Arduino Uno Wifi Rev2.3. Accelerometer Ground: Connected to the ground pin of theArduino Uno Wifi Rev2.The Accelerometer X- and Y-axis pins are not connected to themicrocontroller as they are not used in impact analysis (Section3.2). A 10nF capacitor is attached between the accelerometerZ-axis and ground to filter the signal that is recorded by theArduino Uno WiFi Rev2 (Section 3.1.2).7.2 Detection System Window InstallationThe detection system (Section 3) must be able to be attachedin an operating position on the inside of a window to satisfyC4. The justification for why the system is installed on theinside rather than outside of a window is found in AppendixH. The installed system must be able to detect bird impacts tosatisfy NFR1. The system consists of an accelerometer and amicrocontroller as displayed in Figure 2, connected using wires.Capstone Group 062 Design 607 SYSTEM SETUP May 16, 2019A power adapter (Section 6) connects the Arduino Uno WiFiRev2 (Section 3.3) to an appropriate wall plug for power. Awaterproofing solution for potential future iterations is found inAppendix :, if the system is changed to outside installation.7.2.1 Microcontroller Window InstallationThe Arduino Uno Wifi Rev2 microcontroller (Section 3.3) isplaced in a plastic enclosure box with dimensions of 7.62x7.62x3.81cm.The microcontroller is positioned on posts inside of the enclosurethat keep it in place. Figure 16 displays the microcontroller in-stalled inside the plastic box. A cover is normally included thatencloses the microcontroller, but is not shown in the figure forvisibility. Holes are included in the design of the box to allowsensor wires, computer cables, and power to be connected. Inaddition, a cavity is included in the box below the microcon-troller to allow for the filter capacitor of the accelerometer to beinstalled (Section 3.1.2).Capstone Group 062 Design 617 SYSTEM SETUP May 16, 2019Figure 16: Microcontroller Installed in Plastic BoxThis enclosure box is mounted on the metal frame of the windowbeing measured using double-sided mounting tape.(28). The boxis placed with one edge 10.795cm from the frame of the windowand one edge directly against the window glass, with the serialand power ports facing away from the window glass. Figure 17displays the plastic box affixed to the sample window, identifiedby the red circle.Capstone Group 062 Design 627 SYSTEM SETUP May 16, 2019Figure 17: Microcontroller inside Plastic Box (Red Circle), Accelerometerwith Cover (Blue Circle) Affixed to Sample Window7.2.2 Sensors Window InstallationThe accelerometer (Section 3.1) is affixed directly to the win-dow using duct putty(29), under a 3.175x3.175cm square plasticcover. Duct putty is a secure adhesive that does not harden inmost circumstances, while still transferring the majority of theCapstone Group 062 Design 637 SYSTEM SETUP May 16, 2019vibration energy from the surface it is attached to. This makesit a good choice for the situation of the project, as it does notdamage the window and allows for sensors to remain attachedfor long periods of time. An alternative that was considered wasdouble sided tape. However, double sided tape dampens the vi-brations transmitted to the sensor attached to the window dueto thickness compared to duct putty. In addition, a plastic coveris attached over the accelerometer using duct putty to protect itand keep it secured. Figure 17 displays the accelerometer affixedto the sample window, identified by the blue circle.7.2.3 Power Source InstallationThe adapter described in Section 6 (Power Source) that powersthe system is mounted against the wall beside a subject window.The adapter is mounted using cable tie mounts. These cable tiemounts will be installed using double-sided wall-safe tape(28).7.3 MyDevices Cayenne Database ConnectionAppendix K provides detailed instructions for setting up the My-Devices Cayenne database and connecting it to the Arduino UnoWiFi Rev2. The detection system (Section 3) is connected to theMyDevices Cayenne database (Section 5) using the communica-tion system (Section 4). The microcontroller in the detectionsystem communicates directly with Cayenne directly throughCapstone Group 062 Design 648 USER INTERFACE May 16, 2019the use of Cayenne libraries for the Arduino. No other setup isrequired for the detection system to communicate with Cayenne,as long as the communications system is accessible and the de-tection system is provided with the correct Cayenne credentialsfollowing the tutorial.8 User InterfaceThe UI for the system is handled using MyDevices Cayenne(21).Table 9 compares the specifications of the Cayenne UI to theminimum specifications. MyDevices Cayenne exceeds the mini-mum UI specifications, so it is chosen for the system. In addi-tion, Cayenne is used as the primary data storage (Section 5),so it is the primary choice for the system UI. Figure 18 displayshow data is presented to the user in the Cayenne Dashboard.Window identifier refers to the building and window index thatidentifies which window the detection system is installed on.Number of impacts is the total impacts detected by the sys-tem since it was installed on the window being monitored, pre-sented by the numerical counter. The line graph presents theimpact data over time to highlight bird impact number trends.Additionally, Cayenne allows for data to be downloaded in aspreadsheet-ready format.Capstone Group 062 Design 658 USER INTERFACE May 16, 2019Table 9: UI Minimum SpecificationsFeatureMinimum Specifi-cationCayenneData Visualization Numerical CounterNumerical Counter,Line Plot, Database,Spreadsheet DownloadFigure 18: Cayenne Dashboard UI featuring numerical counter (left) and lineplot (right) widgets, populated with sample data.8.1 Minimum Specification DescriptionThe UI must continuously provide a clear and easy-to-use vi-sualization of data to satisfy FR3 and NFR2. Visualization ofdata refers to presenting data from the data storage (Section5) in a user friendly manner. The UI must at least present anumerical counter of the number of impacts on the window thesystem is installed on.Capstone Group 062 Design 66REFERENCES May 16, 2019References1 M. T. Inc., “Arduino microcontroller cpu,”atmega4809 datasheet. [Online]. Available:http://ww1.microchip.com/downloads/en/DeviceDoc/megaAVR0-series-Family-Data-Sheet-DS40002015B.pdf2 C. University, “Golden-crowned kinglet,” 2017. [On-line]. Available: https://www.allaboutbirds.org/guide/Golden-crowned Kinglet/id3 A. Porter and A. Huang, “Bird collisions withglass: Ubc pilot project to assess bird collisionrates in western north america.” [Online]. Available:https://sustain.ubc.ca/sites/default/files/seedslibrary/BWC%20report%20SEEDS%20May%202015.pdf4 D. H. . B. C. S. Heideman, Michael T Johnson, “Gaussand the history of the fast fourier transform,” IEEE ASSPMagazine, vol. 1, no. 4, pp. 14–21.5 T. Zhang and J. Wu, “Learning long-term filter banksfor audio source separation and audio scene classification,”EURASIP Journal on Audio, Speech, and Music Processing,vol. 1, pp. 1 – 13, Dec. 2018.6 J. B. Allen, “Short time spectral analysis, synthesis, andCapstone Group 062 Design 67REFERENCES May 16, 2019modification by discrete fourier transform,” IEEE Transac-tions on Acoustics, Speech, and Signal Processing.7 “Make your windows bird-safe.” [Online].Available: https://www.humanesociety.org/resources/make-your-windows-bird-safe8 S. Hanly, “What’s the difference between vibration sensors?”[Online]. Available: https://www.machinedesign.com/motion-control/what-s-difference-between-vibration-sensors9 S. Grover, “Prediction of earthquake using 3 axis accelerome-ter sensor (adxl335) and arduino uno,” International Journalof Science and Research.10 “Appendix 12.1 — bird-impact forces — thephysics - transport canada.” [Online]. Avail-able: https://www.tc.gc.ca/eng/civilaviation/publications/tp13549-appendices-appendix12-1-410.htm11 T. Instruments, “Small, low power, 3-axis3g accelerometer,” adxl337 datasheet. [Online].Available: https://cdn.sparkfun.com/datasheets/Sensors/Accelerometers/ADXL337.pdf12 Motion sensor guide. [Online]. Available: https://www.safewise.com/resources/motion-sensor-guide/Capstone Group 062 Design 68REFERENCES May 16, 201913 Arduino. Arduino uno wifi rev2. [Online]. Available:https://store.arduino.cc/usa/arduino-uno-wifi-rev214 B. Mitchell. 802.11 standards explained:802.11ac, 802.11b/g/n, 802.11a. [On-line]. Available: https://www.lifewire.com/wireless-standards-802-11a-802-11b-g-n-and-802-11ac-81655315 UBC. ubcvisitor wireless network. [Online]. Avail-able: https://it.ubc.ca/services/email-voice-internet/wireless-internet-access/ubcvisitor-wireless-network16 ——. Wireless coverage. [Online]. Avail-able: https://it.ubc.ca/services/email-voice-internet/wireless-internet-access/wireless-coverage17 ——. ubcsecure wireless network. [Online]. Avail-able: https://it.ubc.ca/services/email-voice-internet/wireless-internet-access/ubcsecure-wireless-network18 T. Network. Limitations of lorawan. [Online]. Avail-able: https://www.thethingsnetwork.org/docs/lorawan/limitations.html19 J. G. Sponas. Things you should knowabout bluetooth range. [Online]. Avail-Capstone Group 062 Design 69REFERENCES May 16, 2019able: https://blog.nordicsemi.com/getconnected/things-you-should-know-about-bluetooth-range20 I. Poole. Zigbee technology tutorial. [Online]. Avail-able: https://www.radio-electronics.com/info/wireless/zigbee/zigbee.php21 MyDevices. Cayenne, the world’s first drag-and-drop iotproject builder. [Online]. Available: https://mydevices.com/cayenne/features/22 ——. About. [Online]. Available: https://mydevices.com/about/23 Move over sandisk, this 512gb microsd cardis now the biggest money can buy. [On-line]. Available: https://www.trustedreviews.com/news/integral-memory-new-512gb-microsd-card-338137824 Amazon. Amazon s3 pricing. [Online]. Available: https://aws.amazon.com/s3/pricing/?p=ps25 Dropbox. How much does dropbox cost? [Online]. Available:https://www.dropbox.com/help/billing/cost26 Google. Google spreadsheet limitations. [On-line]. Available: https://gsuitetips.com/tips/sheets/google-spreadsheet-limitations/Capstone Group 062 Design 70REFERENCES May 16, 201927 Makita bl1013 2000mah 10,8v li-ion. [Online]. Avail-able: https://www.tme.eu/en/details/accu-bl1013-2ah/rechargeable-batteries/makita-bl1013-2000mah-108v-li-ion/28 Staples. Scotch mounting tape. [Online]. Avail-able: https://www.staples.ca/en/Scotch-Mounting-Tape/product 11189 1-CA 1 2000129 S. Hanly. Accelerometer mounting bestpractices for vibration measurement. [On-line]. Available: https://blog.mide.com/accelerometer-mounting-best-practices-for-vibration-measurement30 Y. Q. Answered. (2016) 10 hours of people talking.[Online]. Available: https://www.youtube.com/watch?v=PHBJNN-M Mo31 S. C. E. X. K. M. David He, Stevan Vicentije-vic, “Version5 3 with reset,” https://github.com/Alpaca99/ELEC491/blob/master/intergratecode/Version5 3 with reset/Version5 3 with reset.ino, 2019,commit e0b8e21.32 E. Punskaya. Design of fir filters. [Online]. Avail-able: https://www.vyssotski.ch/BasicsOfInstrumentation/SpikeSorting/Design of FIR Filters.pdfCapstone Group 062 Design 71REFERENCES May 16, 201933 MathWorks. (2019) Window designer. [Online].Available: https://www.mathworks.com/help/signal/ref/windowdesigner-app.html34 L. C. H. Zhou, Li, “Microphone-based vibration sensor forugs applications,” IEEE Transactions on Industrial Elec-tronics, vol. 64, no. 8, pp. 6565–6572, 2017.35 K. Johnson, Physics, 1998.36 C. Inc., “Electret condenser microphone,” cMA-4544PF-W datasheet. [Online]. Available: https://www.cui.com/product/resource/cma-4544pf-w.pdf37 Arduino. Arduino mkr wan 1300. [Online]. Available:https://store.arduino.cc/usa/mkr-wan-130038 Linkit smart 7688. [Online]. Available: https://www.seeedstudio.com/LinkIt-Smart-7688-p-2573.html39 MyDevices. Sign up for cayenne. [Online]. Available:https://mydevices.com/cayenne/signup/40 ——. Step 3: Connect your arduino. [Online]. Avail-able: https://cayenne.mydevices.com/cayenne/dashboard/arduino/pending/8abdbe10-4838-11e9-a6b5-e30ec853fbf2/2Capstone Group 062 Design 72REFERENCES May 16, 201941 Canada’s rainiest cities. [Online]. Avail-able: https://www.currentresults.com/Weather-Extremes/Canada/wettest-cities.php42 J. M. A. S. Aschalew Kassu, Carlton Farley III, “Analysis ofspectral signatures of silicone-based sealant materials usedin residential and commercial buildings.”43 U. Silicones. How long should siliconesealant last around your home. [Online].Available: https://www.united-silicones.com/blog/how-long-should-silicone-sealant-last-around-your-home/Capstone Group 062 Design 73APPENDIX A: CLIENT SAMPLE COLLECTED DATA May 16, 2019Appendix A: Client Sample Collected DataCapstone Group 062 Design 74APPENDIX B: BIRD IMPACT CALCULATIONS May 16, 2019Appendix B: Bird Impact CalculationsThe following details the process of representing a bird impactmathematically for the kinglet. Kinglets commonly have ap-proximately the following relevant attributes:• 10cm length from head to tail• Mass of 7g• Flight speeds between 2.7m/s and 9.8m/sThe mock bird is approximated using these properties (Section2.1). The force imparted upon a window is then calculated usingthe following equation for force in units of g (gram-force):F =mv22d∗ 0.0098The parameters are defined as follows:d: The distance over which the bird impact is delivered, esti-mated as the 10cm length of the bird.m: The mass of the average kinglet, 7 grams.v: The speeds of impact considered, defined as the flight speedsabove.Table B1 displays the impact forces calculated using the equa-tion above for the considered flight speeds of the kinglet.Capstone Group 062 Design 75APPENDIX B: BIRD IMPACT CALCULATIONS May 16, 2019Table B1: Energy transfer of 7g bird at bird-window collision.Kinglet ImpactSpeed (m/s)Calculated Im-pact Force (gram-force)2.7 0.0269.8 0.342It is noted that for simplification, these estimated impact forcesdisregard parameters such as dampening due to feathers duringthe impact.For testing purposes, the energy of the bird at the moment ofcollision will be considered instead of the impact force. Kineticenergy is used to represent a bird impact, and potential en-ergy is used to simulate the impact using a pendulum (Section2.2). This is due to the use of a physical approximation of thebird (Section 2.1) with significantly different physical propertiesfrom a bird in terms of shape, compressibility, and mass. Thetwo equations used for calculation of kinetic (Ek) and potential(Ep) energies are:Ek =12mv2Ep = mghThe parameters used in these equations are defined as follows:Capstone Group 062 Design 76APPENDIX B: BIRD IMPACT CALCULATIONS May 16, 2019m: The mass of the kinglet (7g) or the mock bird (18g) (Section2.1)v: The velocity of the kinglet or mock bird. To cover a range ofimpact speeds, the following speeds are considered:• 9.8 m/s (6.2 m/s)• 6 m/s (3.83 m/s)• 2.7 m/s (1.7 m/s)g: The gravitational constant, approximated as 9.81 m/s2h: The drop height required to simulate a bird impact at thegiven speedTo simulate a bird impact, the kinetic energy of a kinglet atthe desired impact speed is calculated. Table B2 displays thekinetic energies of the three impact speeds considered, which aredefined above.Table B2: Energy transfer of 7g bird at bird-window collision.Capstone Group 062 Design 77APPENDIX B: BIRD IMPACT CALCULATIONS May 16, 2019Speed La-belKingletSpeed (m/s)EnergyTransferredEk (J)Drop Height(m)High Speed 9.7 0.336 4.8MediumSpeed6 0.126 1.8Low Speed 2.7 0.0255 0.37A pendulum (Section 2.2) is used to swing the mock bird (Sec-tion 2.1) at the window to simulate bird impacts. To approxi-mate a real bird impact, the height required for the mock birdto be dropped from the pendulum is equated to the kinetic en-ergy of the real impact. Tables B3 and B4 display the dropheights calculated for each required kinetic energy value definedin Table B2 for both mock bird masses. It is assumed that allof the potential energy is transferred into kinetic energy duringthe swing towards the glass of the window.Capstone Group 062 Design 78APPENDIX B: BIRD IMPACT CALCULATIONS May 16, 2019Table B3: Energy transfer of 18g mock bird at bird-window collision.Speed La-belMock BirdSpeed (m/s)PotentialEnergy Ep(J)Drop Height(m)High Speed 6.2 0.336 1.9MediumSpeed3.83 0.1268 0.71Low Speed 1.7 0.0255 0.14Table B4: Energy transfer of 57g mock bird at bird-window collision.Speed La-belMock BirdSpeed (m/s)PotentialEnergy Ep(J)Drop Height(m)High Speed 3.43 0.336 0.60MediumSpeed2.10 0.1268 0.22Low Speed 0.94 0.0255 0.045Capstone Group 062 Design 79APPENDIX C: SIMULATION PENDULUM SETUP May 16, 2019Appendix C: Simulation Pendulum SetupTo simulate bird impacts, a setup is required for impacting themock bird on the window. This setup must be adjustable forboth impact speed and location impacted on the window. Thesetup chosen is a pendulum design. Figure C1 displays the pen-dulum set up over the sample window in the manner used fortesting.Capstone Group 062 Design 80APPENDIX C: SIMULATION PENDULUM SETUP May 16, 2019Figure C1: Photo of Mock Bird Used for Validation TestsPendulum Setup ProcedureApparatusThe pendulum is constructed using the following apparatus:1. Mock bird (Section 2.1)Capstone Group 062 Design 81APPENDIX C: SIMULATION PENDULUM SETUP May 16, 20192. String with varying length3. String bag to hold mock bird, with secure mounting pointsfor string attachment4. Protractor5. Camera tripodProcedureThe pendulum should be assembled using the following steps:1. Place the mock bird (1) inside the string bag (3).2. Ensure the string (2) is of appropriate length for the birdimpact location desired. Shorter strings raise the locationof the impact on the test window, and longer strings lowerthe location of the impact on the test window.3. Attach the string (2) to the string bag (3) containing themock bird (1).4. Attach the other end of the string (2) to a secure mountingpoint on the top of the tripod (5).5. Ensure the pendulum is able to swing freely in a mannerthat allows it to impact the window unimpeded.Capstone Group 062 Design 82APPENDIX C: SIMULATION PENDULUM SETUP May 16, 20196. Use the protractor (4) to set the beginning angle of themock bird (1) to attain the desired impact speed (TableC1, C2)To ensure simulated impacts occur at the desired location onthe test window, allow the mock bird to hang freely. Positionthe tripod so the mock bird is positioned at the desired hori-zontal location. Adjust the height of the tripod to ensure thesimulated impact occurs at the appropriate vertical location onthe window. This should be set as appropriate for each test thatis conducted.Pendulum Setup CalculationsTo perform bird impacts using the pendulum, the string shouldbe held taut at a drop angle appropriate for the speed required,calculated for the 18g ball in Table C1 and the 57g ball in Ta-ble C2. Due to the nature of the pendulum design, it is moreaccurate to use starting angle instead of height for ensuring thecorrect impact energy is attained. The angle is calculated usingthe following equation:θ = arcsinhmax − hhmaxWhere:hmax: The drop height of the mock bird from Table C1 and C2Capstone Group 062 Design 83APPENDIX C: SIMULATION PENDULUM SETUP May 16, 2019h: The desired drop heightθ: The angle measured from the pendulum resting positionThe angles required for the different drop heights of both 18gand 57g mock birds are shown in Tables C1 and C2.Capstone Group 062 Design 84APPENDIX C: SIMULATION PENDULUM SETUP May 16, 2019Table C1: Pendulum Drop Angles of 18g bird with String Length of 1.9m.Speed La-belMock BirdSpeed (m/s)Drop Height(m)Pendulum θ(deg)1-HighSpeed6.2 1.9 902-MediumSpeed3.83 0.75 523-LowSpeed1.7 0.15 23Table C2: Pendulum Drop Angles of 57g Bird with String Length of 0.60m.Speed La-belMock BirdSpeed (m/s)Drop Height(m)Pendulum θ(deg)1-HighSpeed3.43 0.60 902-MediumSpeed2.10 0.22 523-LowSpeed0.94 0.045 23Capstone Group 062 Design 85APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019Appendix D: Ideal Environment TestVarying Sensor Placement TestPurposeThe purpose of this experiment is to find an acceptable place-ment of the accelerometer on the window by performing dropsat various location on the window while fixing the location ofthe impact shown in Figure H1. These experiments are designedto mimic the ideal conditions in which the system will operateat the UBC Vancouver campus.ApparatusThe apparatus for this experiment includes:• The test window• A window mount• A pendulum that will consist of a mock bird (Validationappendix) and a string• The microcontroller (Design Document, Section 3.3)• The accelerometer (Design Document, Section 3.1.1)Capstone Group 062 Design 86APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019It is noted that the common kinglet weighs approximately 7g,while we will be using a mock bird (Appendix B). This is doneto limit drop heights required, and is accounted for in later cal-culations. The test window is set up according to Figure (FigureC1). The sensors are connected according to Figure 16, in sec-tion 7.1.Procedure1. Verify the mass of the mock bird and attach the bird toa string with a measured length to the pendulum frame.Attach the pendulum frame, shown in Figure C1, to thetest window.2. Place the accelerometer in location 1 shown in Figure D1and connect to the microcontroller according to the schematicin Figure 14, section 7.1.3. Drop the mock bird onto the approximate area marked byblue circle in Figure D1 from 90 degree angle to simulatethe speed of 6.7m/s (which is listed in Table C2 and TableB2. Perform two impact. Save the signal for processing.4. Repeat Step 3 after changing the sensor location to loca-Capstone Group 062 Design 87APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019tions 2-7.Figure D1: Drops Performed at Varying Sensor Location(red) While Fixingthe Impact Location (Blue)Capstone Group 062 Design 88APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019ObservationsThe maximum peak-to-peak voltage and frequencies are recordedin Table D1.Table D1: Results from Varying Sensor PlacementsLocationMaximumPeak-to-PeakVoltage(V)Dominant Frequency(Hz)1 0.5736 82.5, 1651 0.593 82.5, 1652 0.2449 82.5,120,1652 0.2905 82.5,120,1653 0.1901 82.5,137,176.53 0.1998 82.5,137,176.54 0.3062 82.5,1654 0.3203 82.5,1655 0.2933 82.5,137.5, 167.5,257.55 0.2739 82.5,167.5 257.56 0.3062 82.5,120,165, 257.56 0.3094 82.5,167.5 2607 0.3803 82.5,165, 257.57 0.3642 82.5,167.5 257.5In order to find an acceptable location for the accelerometer, thedistance between the impact location and the sensor placementlocation is plotted against the maximum peak-to-peak voltageCapstone Group 062 Design 89APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019as shown in Figure D2.Figure D2: Scatter Plot with Best Fit Line of Voltage vs Distance by VaryingImpact LocationFrom the varying sensor placement test, the accelerometer testshows a correlation between the sensor location and voltage.The further the distance between the impact and the sensor,the lower the voltage. While the majority of the data points fallalong the best fit line that demonstrates an inverse relationshipbetween the voltage and distance, there is an outlier when thedistance is 9 inches. This outlier is from impacts at location 2.Capstone Group 062 Design 90APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019Potential causes of the outlier could be dampening due to therigidity of the metal window frame. In addition, the closer thesensor is to the frame the lower the resulting voltage as displayedin Table D1.ConclusionBased on the results and analysis summarized above, the ac-ceptable sensor placement location, as indicated by the figurebelow, is at least 3 inches away from both frames. Therefore,the accelerometer should be at least 3 inches away from theframes in any direction for an voltage output at least 20 timesthe noise floor. In addition, for the best coverage of window forimpact detection, it is better to place the sensor as close to thecenter (location 1) as possible. Figure D3 displays the accept-able locations for the sensor placement on the test window.Capstone Group 062 Design 91APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019Figure D3: Acceptable Sensor Placement Locations Indicated by GreenVarying Impact Location TestPurposeThe purpose of this varying impact location test is to identifythe voltage and frequency characteristics at different impact lo-cation on the window, while fixing the location of the sensor at6 inches away from the frame.ApparatusCapstone Group 062 Design 92APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019The apparatus for this experiment includes:• The test window• A window mount• A pendulum that will consist of a mock bird (Validationappendix) and a string• The microcontroller (Design Document, Section 3.3)• The accelerometer (Design Document, Section 3.1.1)Procedures1. The test is conducted as follows: Set up testing environ-ment according to Figure 14 section 7.1, with the accelerom-eter in the location marked for the sensors(red) shown inIdeal environment tests set-up shown in D3.2. Verify the mass of the mock bird and attach the bird toa string with a measured length to the pendulum frame.Attach the pendulum frame, shown in Figure C1, to thetest window.3. Drop the mock bird onto the approximate area marked byblue circle in Figure D4 from 90 degree angle to simulate aspeed of 6.7m/s (Drop Height 1 listed in Table C1). Per-form two impact. Save the signal for processing.Capstone Group 062 Design 93APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 20194. Repeat Step 3 for for locations 2-6.Figure D4: Drops Performed at Varying Impact Location(Blue) While Fixingthe Sensor LocationObservationsThe maximum peak-to-peak voltage and frequencies associatedwith each impact location are summarized below.Capstone Group 062 Design 94APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019Table D2: Results from Varying Impact LocationsLocationMaximumPeak-to-PeakVoltageDominant Frequency1 0.2997 120,2562 0.4318 120,2562 0.3996 120,2563 0.3738 82,165,2303 0.3964 82,165,2304 0.3964 82,165,2304 0.2997 82,165,2305 0.4157 82,120, 2575 0.3899 82,120, 2576 0.5736 82,1206 0.593 82,120The distance between the impact location and the sensor place-ment location is plotted against the maximum peak-to-peakvoltage as shown in Figure D5. No discernible correlation isestablished between impact location and sensor placement interms of maximum peak-to-peak voltage.Capstone Group 062 Design 95APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019Figure D5: Scatter Plot of Voltage vs Distance by Varying Impact LocationThe voltage range of the signals recorded by the accelerome-ter is from 0.1901V to 0.593V. The dominant frequencies of thesimulated impacts are identified as 82.5Hz, 120Hz, 165Hz, and260Hz. These frequencies consistently appear at a variety of im-pact locations.ConclusionsThis test is helpful in determining the voltage threshold andfrequency ranges for the detection algorithm outlined in section3.2.Capstone Group 062 Design 96APPENDIX D: IDEAL ENVIRONMENT TEST May 16, 2019For the accelerometer, the voltage ranges from 0.1901V to 0.593V.Dominant frequencies are also identified: 82.5Hz and 165Hz,120Hz, 137Hz, 260Hz. These frequencies appear repeatedly indifferent impact locations.Capstone Group 062 Design 97APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 2019Appendix E: Non-Ideal Environment TestHuman Noise DisturbancePurposeThe purpose of the human noise disturbance test is to iden-tify the effects of noise on the signal’s characteristics such asvoltage and frequencies. The results of this test will help final-ize the voltage thresholds and frequency ranges in the detectionalgorithm to account for real-world operation scenarios.Apparatus• a UE WonderBoom bluetooth speaker• Decibel X application for iPhone• 2 iPhones• Ideal environment tests set-up shown in Appendix DProcedureThe human disturbance is created following these steps:1. Turn on the UE WonderBoom speaker and connect it to aniPhone with bluetoothCapstone Group 062 Design 98APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 20192. Place the bluetooth speaker 3 meters away from the backof the window3. Play the test sound on the iPhone connected to the speaker(30)4. Take the second iPhone, open Decibel X, and measure thenoise level next to the window5. Adjust the volume of the iPhone playing the sound untilthe decibel meter on the second iPhone reads 60-70dB6. Place the accelerometer the position indicated by the redcircle in Figure D1 and connect to the microcontroller ac-cording to the schematic in Figure 14, section 7.1.7. Drop the mock bird onto the approximate area marked bylocation 1 (blue) in Figure D1 from Drop Height 1 listedin Table C1. Perform two impact. Save the signal for pro-cessing.8. Repeat Step 7 for location 6 indicated by Figure D1.ObservationsThe observations are summarized below.Capstone Group 062 Design 99APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 2019Table E1: Summary of Maximum Peak-to-Peak Voltage with 70dB noise inthe BackgroundMaximum Peak-to-PeakVoltage(V)Best case w/noise 0.5221worst case w/noise 0.2224Best case: No noise 0.5736Worst case: No noise 0.2997Noise Floor: Human Noise 0.0161As shown from Table E1 and Figure E1, the strength of thenoise floor is negligible compared to the strength of the impactsignal. Therefore, it should not have significant effect on theimpact signals, which is confirmed below.Capstone Group 062 Design 100APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 2019Figure E1: Noise Floor Measurement of Human Talking at 70dBFigure E1 shows the spectrogram and and the FFT of the back-ground noise with Human Talking at 70dB. Compared to theCapstone Group 062 Design 101APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 2019ideal environment background noise (Figure 5 at Section 2.3.1),there is a frequency peak at around 270Hz, which may be causedby a vibration due to the loud human noise. However, when welook at the amplitude at frequency domain, the highest peak isaround 0.09, which can be ignored compared to even the worstcase, which have all four of its peaks over 1.3 when we havesmall impact at the edge (see Figure 7 at section 2.3.2).Capstone Group 062 Design 102APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 2019Figure E2: Comparison of Signals with and without Noise disturbanceThe voltage of the impact signal in the time domain are rel-atively consistent, with the strength of the signal in non-idealenvironment slightly lower than ideal environment.The human noise disturbance dampens the voltage and by aboutCapstone Group 062 Design 103APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 20198% in the best case impact and the about 25%. The noise floor is3% of the best case impact and 7% of the worst case impact withnoise. In the frequency domain, the locations of the dominantpeaks remain constant, while the signal in ideal environmenthaving higher amplitude than the one in non-ideal environmentat those peaks. The worst case impact demonstrates the samecharacteristics.ConclusionHuman noise disturbance dampens the strength of the signal.Therefore, the voltage threshold in the detection algorithm shouldbe changed accordingly to account for the noise. There’s no ef-fect on the frequencies ranges.RainPurposeThe purpose of this to examine the effect of rain on the im-pact signals.Apparatus• a 15ft garden hoseCapstone Group 062 Design 104APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 2019• a hose spray nozzle• duct tape• 1 garbage bag• Ideal environment tests set-up shown in the Appendix DProcedure1. Connect one end of the hose to the hose spray nozzle, andthe other end to the water outlet2. Tape the garbage bag to the back side of the window asshown in Figure E3.3. Place the accelerometer the position indicated by the redcircle in Figure D1 and connect to the microcontroller ac-cording to the schematic in Figure 14, section 7.1.4. Turn on water and aim nozzel at the window.5. Drop the mock bird onto the approximate area marked bylocation 1 (blue) in Figure D1 from Drop Height 1 listedin Table C1. Perform two impact. Save the signal for pro-cessing.6. Repeat Step 7 for location 6 indicated by Figure D1.Capstone Group 062 Design 105APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 2019Figure E3: Full Rain Test SetupFigure E4: Window with Garbage Bag Sealing and RainCapstone Group 062 Design 106APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 2019ObservationsTable E2: Summary of Maximum Peak-to-Peak Voltage with Rain in theBackgroundMaximum Peak-to-PeakVoltage(V)Best case w/noise 0.3642worst case w/noise 0.1192Best case: No noise 0.5736Worst case: No noise 0.2997Noise Floor: Light Rain 0.0097The rain disturbance dampens the voltage and by about 36% inthe best case impact and the about 60%. The noise floor is 3%of the best case impact and 8% of the worst case impact withnoise. As shown from Table E2 and Figure E5, the strengthof the noise floor is negligible compared to the strength of theimpact signal. However, the strength of the signal is dampenedsignificantly.Capstone Group 062 Design 107APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 2019Figure E5: Noise Floor Measurement of RainAs shown in Figure E5, the rain generates vibration with randomfrequency peaks with amplitudes less than 0.04 which can be ig-nored compared to the ideal environment background noise(FigureCapstone Group 062 Design 108APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 20196 at Section 2.3.1),Figure E6: Comparison of Signals with and without rain disturbanceThe voltage of the impact signal in the time domain is damp-ened significantly.Capstone Group 062 Design 109APPENDIX E: NON-IDEAL ENVIRONMENT TEST May 16, 2019In the frequency domain, the locations of the dominant peaksremain constant, while the signal in ideal environment havinghigher amplitude than the one in non-ideal environment at thosepeaks. The worst case impact demonstrates the similar charac-teristics.ConclusionIn conclusion, the maximum peak-to peak voltage difference ofan impact is lower in non-ideal environment compared to idealenvironment and the voltage threshold in the detection algo-rithm will be updated accordingly to account for possible sce-narios with rain. The dominant frequencies remain constant.Capstone Group 062 Design 110APPENDIX F: IMPACT DATA PROCESSING May 16, 2019Appendix F: Impact Data ProcessingIn order to determine an actual bird impact, a series of mockbird impact tests are performed to figure out the characteristicssuch as duration and frequency range. For the Discrete TimeFourier Transform we use the algorithm of fast Fourier Trans-form to calculate(4).The process of calculation is shown as below and more detailcan be referred to the code(31).1. Receive analog data from accelerometer at a rate of 2000Hzand store in a global array.2. Convert the signal into voltage.3. Remove the DC component by subtract the average voltageof stored data4. Measure the voltage difference by subtracting maximumvoltage by minimum voltage in the array5. Measure the duration by setting top and bottom voltagethreshold value and measure time when it dampens belowthat threshold6. Find frequency peaks by using Discrete Time Fourier Trans-form to convert the signal in frequency domainCapstone Group 062 Design 111APPENDIX F: IMPACT DATA PROCESSING May 16, 2019Figure F1: Accelerometer Impact Voltage in Time DomainFigure F1 displays how voltage difference is measured, FigureF2 displays how signal duration is measured, and Figure F3displays how frequency peaks are found.Capstone Group 062 Design 112APPENDIX F: IMPACT DATA PROCESSING May 16, 2019Figure F2: Accelerometer Impact Voltage in Time DomainFigure F3: Accelerometer Impact Voltage Signal in Frequency DomainCapstone Group 062 Design 113APPENDIX F: IMPACT DATA PROCESSING May 16, 2019ObservationsBy repeating mock bird impact testing and changing differentmaterial of mock bird (Section 2.1), we are able to characterizethe features of a bird impact, summarized in Table F1.Table F1: Impact Signal Patterns of AccelerometerTest Speed Voltage Difference (V) Duration (s) Frequency peaks (Hz)Low 0.1297 1.5725 84,173Medium 0.3258 0.2330 85,175High 0.5539 0.2662 86,175Minimum 0.0483 0.1175 85,178Table F1 is to record the Voltage Difference, Duration and Fre-quency peaks of accelerometer signal. (For the specific value ofspeed, please refer to Appendix C: Table C2.)Capstone Group 062 Design 114APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019Appendix G: Unimplemented Detection Sys-tem ComponentsFour components were considered for implementation in the de-tection system, but were not included in the final design. Thesecomponents are:1. Digital filter for the accelerometer (Section 3.1.1)2. Microphone sensor for impact detection3. WiFi disconnection in the case of long-term loss of network4. Damping Ratio Analysis for Detection AlgorithmThese components were not included but could be useful in fu-ture iterations of the system. They are suggested as potentialupgrades or additional functionality that could be added to im-prove various aspects of system function.Digital FilterA digital filter implemented in detection system removes thehigh-frequency components of signals produced by the accelerom-eter. These high-frequency signal components may interferewith the lower frequency analog signals in the 50-260Hz rangethat are indicative of a bird impact event. Therefore, a digi-tal filter enhances the ability of the detection system to analyzeCapstone Group 062 Design 115APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019signals from the sensor(32). The system is sampling the analogsignals at 2000Hz, so signals of 1000Hz or less may be filtereddigitally according to Nyquist’s Sampling Theorem. As the max-imum expected frequency on event of a bird impact is 260Hz,the digital filter is designed with a normalized cutoff frequencyof 0.26.A digital filter is implemented in the Arduino (Section 3.3) bymultiplying sample and a defined number of preceding samplesby a set of predetermined coefficients, then summing the result.The following filters were tested with recorded data from simu-lated bird impacts (Section 2):1. Rectangle2. Von Hann3. Hamming4. Blackman5. Chebyshev6. KaiserThese filter types were simulated using the MATLAB windowDe-signer command(33). Figure G1 compares the frequency domainoutput of each filter when applied to the same sample impactCapstone Group 062 Design 116APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019signal. Frequency domain output is the primary concern as it isused in the detection algorithm (Section 3.2).Figure G1: Frequency Domain Effect of Various Digital FilterseTable G1 compares the characteristics of each filter when appliedto a typical bird impact event signal. The digital filter propertiesare defined as:Mainlobe Width: Double the point at which the signal powerfalls 3dB below the peak power.Relative Sidelobe Attenuation: Difference between power ofthe mainlobe peak and peak power in sidelobes, measuredin dB.Capstone Group 062 Design 117APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019Leakage Factor: Ratio of power in the sidelobes of a signal tototal signal power.Length of Filter: The number of previous samples of the sig-nal required to apply the filter, in addition to the mostrecent samples.Table G1: Comparison of Digital Filter Properties with Bird Impact SignalDigital FilterMainlobeWidthRelativeSidelobeAttenuationLeakageFactorLength ofFilterRectangular 0.29688 -12.4dB 8.68% 6Von Hann 0.25781 -31.6dB 0.05% 12Hamming 0.25 -36.7dB 0.04% 11Blackman 0.25 -59.1dB 0% 14Chebyshev 0.26562 -100.0dB 0% 8Kaiser 0.27344 -24.2dB 0.45% 8The Chebyshev filter is recommended for use in the system dueto having approximately 0% leakage and a cutoff frequency veryclose to the desired cutoff frequency. The Chebyshev filter forCapstone Group 062 Design 118APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019the system is defined using the following set of coefficients:y(n) = 0.0055x(n) + 0.0388x(n− 1) + 0.1418x(n− 2) + 0.3482x(n− 3)+ 0.6333x(n− 4) + 0.8936x(n− 5) + 1.0000x(n− 6) + 0.8936x(n− 7)+ 0.6333x(n− 8) + 0.3482x(n− 9) + 0.1418x(n− 10)+ 0.0388x(n− 11) + +0.0055x(n− 12)To implement this filter in the detection system, these coeffi-cients are programmed into the code. As samples are read fromthe detection system sensor (Section 3.1), the samples should bemultiplied by the appropriate coefficients.Microphone SensorThe CMA-4544pf microphone sensor is one of the potential im-pact sensors of the detection system. Microphone sensors areknown to have a wide range of applications in detecting vibrations(8).For example, microphones have been previously used for mon-itoring underground vibrations continuously and reliably(34).Since the microphone sensor must detect the audible soundsfrom bird collisions to satisfy FR1, the sensor must operate inthe frequency range of human hearing (20 to 20,000Hz)(35).Considering the cost of the microcontroller, the sensors, and theother miscellaneous material, the budget of the microphone wasdetermined to be less than $10 to satisfy C1. The considerationsCapstone Group 062 Design 119APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019for choosing a microphone sensor (36) are summarized in TableG2.Table G2: Microphone Sensor Minimum Specification and ComparisonFeature Minimum Specification CMA-4544pfInput 20 to 20,000Hz 20 to 20,000HzOperating Voltage Range 3.3 to 5V 3 to 10VCost less than $10 $1.2The microphone may improve the accuracy of the detection sys-tem in environments that were not tested in the developmentof the Bird Impact Detection System. If the variety of environ-ments in which the system is expected to operate is increasedin the future, the microphone may become useful as a backupsensor for the accelerometer. Therefore, it is recommended foraddition to future iterations of the detection system.WiFi Disconnection HandlerIn validation testing of the Bird Impact Detection System, nosituation was encountered where the wireless communication(Section 4) was disconnected for an extended period of time.Therefore, the detection algorithm (Section 3.2) does not ac-count for the situation in which the communication system isinaccessible for an extended period of time due to unforeseencircumstances. The Bird Impact Detection System currentlyCapstone Group 062 Design 120APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019utilises the UBC Visitor WiFi network (Section 4.3), which iskept consistently accessible by UBC IT services. Due to this, acontingency for extended loss of connection was not a priorityin the detection system algorithm.Future iterations of the system may be used outside of UBCCampus, or in locations on UBC Campus where it is more dif-ficult to obtain a WiFi connection. If the system is plannedfor future use in these or other similar circumstances, it is rec-ommended that the detection system algorithm be altered toaccount for impacts that occur while the communication systemcannot be accessed. Such an algorithm would store a record ofimpact events that are not able to be sent immediately to datastorage (Section 5) to be sent once a connection is reestablished.Damping Ratio Analysis for Detection AlgorithmIn the current detection algorithm, the method to determinethe duration of an impact is by counting the amount of the timebetween the maximum peak-to-peak voltage until the signal set-tles back to noise floor as shown in Figure F2. However, thismethod require taking more data samples in order to capture thefull duration of the signal. Another method that would allow usto identify the damping characteristics of an impact signal.Capstone Group 062 Design 121APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019Motivation The damping ratio is a character unique to theimpact signal and can be used to effectively distinguish betweenimpact and other disturbances. A bird impact has a distinctivesignal profile different from other disturbances in the environ-ment such as rain or human talking. As shown in the FigureG2 and G3, the envelope of the impact signals display a cleardamping characteristic that is different from other disturbancesignals.Figure G2: Example Signal of ImpactCapstone Group 062 Design 122APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019Figure G3: Example Signal of Human NoiseCapstone Group 062 Design 123APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019How to Find the Damping Ratio in MatlabFigure G4: Example Signal of Impact1. Starting with an example signal shown in G4, we need toclean up the time-domain signal by eliminating all data en-tries before the index that corresponds to maximum volt-age,in order to get an envelope of the signal that pertainsto an exponential decay.Figure G5: Example Signal of Impact2. Use the “envelope” function [yupper, ylower] = envelope(x, np,′ peak′)in Matlab, to extract the upper envelope of the signal. Theenvelope function uses spline interpolation over local max-ima separated by an adjustable number of samples. yupperCapstone Group 062 Design 124APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019is the variable denoting the upper envelope. np is peak sep-aration, which is the number of sample over which the localmaxima are separated. The bigger the np, the smoother theenvelope, as shown in Figure G5.Figure G6: Different Configuration of Envelope Based on Peak Separationdenoted by np3. Using the Curve Fitting Tools in Matlab, we can generatethe an exponential curve fit to the envelope. Since thecurve fitting function is y = a ∗ e(b ∗ x), it is importantto eliminate the offset to allow for the constant term thatis not present in the function. The R-squared parameter isthe the proportion of the variance in the dependent variablethat is predictable from the independent variable, which isimportant for determining the quality of the fit. The closerR-squared is to 1, the better the fit. This process is shownin Figure G6.Capstone Group 062 Design 125APPENDIX G: UNIMPLEMENTED DETECTION SYSTEMCOMPONENTSMay 16, 2019Figure G7: Finding the Largest R-squared Value4. Since we are looking at the damping ratio, using visualinspection of the time domain signal, we can see that thesamples between 0 to 200 display damping characteristics.Therefore, we can apply curve fit to the 200 samples anddiscard the rest. The resulting R-squared value is 0.94,which is a good fit.5. Using Matlab to automate the process for more data, wecan define the range of damping ratio and apply to theidentification algorithm.This method is not currently implemented because the arduino’slimited memory does not allow such heavy computation. How-ever,with a more powerful microcontroller such as an RaspberryPi, such functionality can be achieved.Capstone Group 062 Design 126APPENDIX H: SYSTEM PLACEMENT May 16, 2019Appendix H: System PlacementTwo options are available for the placement of the Bird ImpactDetection system. These options are:1. Placement inside the building in which the window is in-stalled.2. Placement outside the building in which the window is in-stalled.In both options, the sensor would be affixed directly to the glassof the window, and the microcontroller would be affixed directlyto the metal frame (Section 7.2). Bird impacts were conductedin both conditions using the simulated bird impact setup (Sec-tion 2). Figure H1 compares the sensor voltage readings fromimpacts with the sensor placed on the inside of the window (red)and the outside of the window (blue). The sensor was affixedto the same horizontal and vertical position on the window forboth the inside and the outside positions. The simulated birdimpact was on the same location of the window for both sensorplacements.Repeated impacts are performed on both the inside and outsideof the window and their peak-to-peak voltage are comparable asCapstone Group 062 Design 127APPENDIX H: SYSTEM PLACEMENT May 16, 2019Figure H1: Comparison of Repeated Impact Signals Performed Inside andOutside of the Windowshown in Figure H1. This is to show that placing the sensor oninside or outside has little effect on the accelerometer signal.To reduce the complexity of the system, the sensor is placed onthe inside of the window. This decision is reflected in the overallsystem installation (Section 7). It is assessed that this reducescomplexity by the more controlled conditions inside of buildingscompared to outside. If the system were placed outside, morestrict design constraints would be required with regard to weath-erproofing and access to power. A plan was created for the caseof the system being placed outside, presented in Appendix L.Capstone Group 062 Design 128APPENDIX I: MICROCONTROLLERS EVALUATED May 16, 2019Appendix I: Microcontrollers EvaluatedThe other options that were considered for the microcontrollerare:• Arduino MKR WAN 1300 (37)• LinkIt Smart 7688 (38)Table I1 compares these two microcontrollers to the ArduinoUno WiFi Rev2.The Arduino MKR WAN 1300 does not provide enough built-inmemory for the project, with regards to the worst-case mainte-nance needs. The LinkIt Smart 7688 was not chosen due to thenecessity of adding an SD card for data storage. In addition,the Arduino Uno WiFi Rev2 is already familiar to the groupmembers of Capstone Group 62. It has extensive online supportfor the functionality required for the project, reinforcing it asthe microcontroller choice over the other options.Capstone Group 062 Design 129APPENDIX I: MICROCONTROLLERS EVALUATED May 16, 2019Table I1: Microcontroller Evaluation ComparisonFeatureMinimumSpecifica-tionArduinoUno WiFiRev2ArduinoMKRWAN 1300LinkItSmart7688Analog Pins 1 6 7 12OutputVoltage3.3V 3.3V 3.3V 3.3VOutput Cur-rent300µA 50mA 7mA 4mAClock Speed 520Hz 16MHz 48MHz 580MHzFlash Mem-ory15kB 48kB 256kB 32MBMemoryStorage33.6kB 6,144kB 32kB SD CardOnboardWiFi Mod-uleYes Yes No YesCapstone Group 062 Design 130APPENDIX J: GOOGLE SHEETS INFORMATION May 16, 2019Appendix J: Google Sheets InformationGoogle Sheets, provided by Google Drive(26), was considered asthe second data storage method for the system. Google Sheetsmeets or exceeds all of the minimum specifications for data stor-age, so it provides a viable solution. In addition, Google Sheetsis an accessible format for raw data storage that is familiar tothe client, and is likely to be familiar to other potential users.It is also a free service provided by Google, as data stored in theGoogle Sheets application is unaffected by Google Drive freestorage limits. Google Sheets does require data to be presentedin HTTPS format to be parsed, meaning an API should be usedto connect it to the detection system (Section 3).However, while Google Sheets meets or exceeds all of the re-quirements of data storage (Section 5), issues were encounteredin the implementation of Google Sheets alongside Cayenne (Sec-tion 5.3). While Cayenne was able to receive data packages reli-ably during validation testing, Google Sheets became unreliablewhen implemented within the detection system state machine(Section 3.2). Therefore, despite meeting or exceeding the min-imum specifications defined, Google Sheets was not included inthe final design of the system.Capstone Group 062 Design 131APPENDIX K: DATABASE AND UI SETUP May 16, 2019Appendix K: Database and UI SetupA MyDevices Cayenne account is required to set up and accessthe features of the Cayenne database and UI. A free accountmay be registered at the MyDevices Cayenne website (39) tocomplete this setup.To connect the Arduino Uno Wifi Rev2 (Section 3.3) to theCayenne database, follow the tutorial provided on the MyDe-vices website(40). The tutorial for the Arduino Uno with a Wifishield should be followed, ensuring the following global vari-ables in the main code(31) match the values presented for thedatabase:1. MQTT Username2. MQTT Password3. Client ID4. MQTT Server5. MQTT PortName the device any desired, appropriate identifier. Ensurethat the UBC Visitor WiFi connection is available, and thatthe channel in the tutorial code matches the desired channel forCapstone Group 062 Design 132APPENDIX K: DATABASE AND UI SETUP May 16, 2019data transmission. Once the network and Arduino Uno WiFiRev2 are ready, run the code from the tutorial on the device.When the device is displayed as connected on the Cayenne dash-board, the custom widgets for the UI may be added. To adda custom widget, choose ‘device/widget’ from the ‘Add new. . . ’drop-down menu, pictured in Figure K1. The ‘Custom Wid-gets’ option should be used to add the widgets for the systemUI (Section 8). Note that the counter widget should already beadded from the tutorial completed to add the device, and thatwidget names and channels may be changed later if needed.Figure K1: Cayenne ’Add Widget’ Drop-Down MenuThe custom widgets for the UI are added as follows:Numerical Counter: Choose the ‘Value’ widget. Name theCapstone Group 062 Design 133APPENDIX K: DATABASE AND UI SETUP May 16, 2019widget with the device location identifier and ensure thecorrect device and channel are chosen. The data type shouldbe set to ‘Counter’, with units of ‘Analog’. Once complete,the ‘Add Widget’ button should be available if the deviceis connected. This will add the widget to the dashboard foruse. Figure K2 displays the settings that should be used.Line Chart: Choose the ‘Line Chart’ widget. Name the widgetappropriately for the device location identifier and ensurethe correct device and channel are chosen. The data typeshould be set to ‘Counter’, with units of ‘Analog’. Oncecomplete, the ‘Add Widget’ button should be available ifthe device is connected. This will add the widget to thedashboard for use. Figure K3 displays the settings thatshould be used. If desired, the y-axis scale may be adjusted.Figure K2: Settings for Cayenne Numerical CounterCapstone Group 062 Design 134APPENDIX K: DATABASE AND UI SETUP May 16, 2019Figure K3: Settings for Cayenne Line ChartCapstone Group 062 Design 135APPENDIX L: SYSTEM WATERPROOFING PLAN May 16, 2019Appendix L: System Waterproofing PlanThis is the installation method for the system if it is installedon the outside of a window. The system (Section 1) must beable to operate for seven days without need for maintenance tosatisfy NFR2. Vancouver has 164 rainy days per year on aver-age (41). The exposure of the system to rain or condensation isinevitable should the system be situated on a window. Water-proofing removes the risk of damage or breakage of the physicaldevice on the window by way of exposure to water. Assumingthat it rains every 2.2 days, our waterproofing method must beable to protect our system consistently from water exposure toenable our system to consistently detect bird impacts. This wa-terproofing plan includes how to waterproof each of the systemcomponents individually.Microcontroller Waterproofing SolutionThe Arduino system (Section 3.3) will be placed in a weather-resistant case. Holes will be drilled through the case so thatthe Arduino ports that are needed for the system will be acces-sible. Once required wires are in place, silicone or epoxy willbe used as an effective way to seal to holes. The method ofsilicon waterproofing components of the system was evaluatedCapstone Group 062 Design 136APPENDIX L: SYSTEM WATERPROOFING PLAN May 16, 2019as the implementation of silicon for the usage of waterproofingor sealing cracks is reliable. It is a solution that is ubiquitousand robust in areas of heat exposure, moisture and chemical use(42). The method of waterproofing for the Arduino provides thefollowing features: lasts a minimum of 20 years(43).Impact Sensors Waterproofing SolutionA layer of silicone or epoxy will be applied to the accelerometerto keep it from water damage. The method of silicon water-proofing components of the system was formulated as the im-plementation of silicon for the usage of waterproofing or sealingcracks is reliable. It is a solution that is ubiquitous and robustin areas of heat exposure, moisture and chemical use (42). Themethod of waterproofing for the impact sensor provides the fol-lowing features: last a minimum of 20 years(43).Capstone Group 062 Design 137 CAPSTONE Group 062List of Deliverables DocumentSusanna Chen David He Kieran MortonEmily Xiong Stevan VicentijevicApril 12, 2019CONTENTS April 12, 2019Contents1 Documents 52 Source Code 63 Schematics 64 Bill of Materials 85 Prototype 86 Capstone Video 11Capstone Group 062 Deliverables 2LIST OF FIGURES April 12, 2019List of Figures1 Detection System Wiring Schematic . . . . . . . . . . . . . . . 72 Detection System Arduino and Accelerometer with Plastic En-closure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10Capstone Group 062 Deliverables 3LIST OF TABLES April 12, 2019List of Tables1 Source Code Deliverables . . . . . . . . . . . . . . . . . . . . . 62 Bill of Materials for the Impact Detection System . . . . . . . 9Capstone Group 062 Deliverables 41 DOCUMENTS April 12, 20191 DocumentsThe documents that are given to the client at the conclusion of the projectare as follows:1. Requirements2. Design3. Validation4. Test DataThe Requirements Document includes background information on the prob-lem solved by the system, and outlines what the system must achieve. Thisincludes how the system benefits the client, and how it provides those ben-efits in the form of minimum requirements. This document is used as thebasis for the design decisions and validation of the system.The Design Document provides both high-level information about the sys-tem design, and detailed information about each subsystem. The focus of thedocument is on how each subsystem is designed, including rationale behinddesign decisions and verification these decisions meet minimum requirements.Additionally, design describes in detail how the system is constructed.The Validation Document provides details of tests conducted to ensure thesystem as a whole meets the requirements set out in the requirements doc-ument. Validation tests are designed and performed for each requirementdefined for the system. This document includes the methodology and resultsCapstone Group 062 Deliverables 52 SOURCE CODE April 12, 2019of each test conducted, and an overall summary of how the system meets thedefined requirements.Additionally, some of the parts of the Design and Validation documents re-quire test data that is stored in separate files. All of the necessary test datadefined in these sections is provided alongside their appropriate documents.2 Source CodeTable 1 presents the source code that is given to the client at the end of theproject.Table 1: Source Code DeliverablesCode Component Platform/Device SubsystemImpact Detection andCommunicationArduino Uno WifiRev2Detection System,CommunicationSystemThe code is provided in the appropriate file format of the platform it isdesigned for. Code is transferred to the client with the rest of the deliverabledocuments.3 SchematicsThe schematics for construction of the system are part of the deliverablematerials provided to the client. The schematics are included for the detec-Capstone Group 062 Deliverables 63 SCHEMATICS April 12, 2019tion system (Design Document Section 3). Figure 1 displays the schematicsof the detection system detailed in the Design document. It is noted thatthe ADXL335 is displayed in the schematic, as the software used for theschematic labels all ADXL3XX accelerometers this way. In the constructionof the system, the ADXL337 should be used, as specified in the DetectionSystem (Design Document Section 3.1).Figure 1: Detection System Wiring SchematicThe components and construction of the detection system are described indetail in the Design Document (Design Document Section 3, Section 7).Capstone Group 062 Deliverables 74 BILL OF MATERIALS April 12, 20194 Bill of MaterialsTable 2 presents the bill of materials, in table form, associated with a singleprototype (Section 5).5 PrototypeTwo complete prototypes will be presented to SEEDS. A prototype is definedas the entire device used to detect and record bird impact data, includingthe data collector and data storage. Each prototype consists of the followingphysical components:1. Arduino Uno WiFi Rev22. Plastic box enclosure for the Arduino Uno Wifi Rev23. ADXL337 Accelerometer with Breakout Board4. 10nF capacitor5. Solid-core insulated connecting wires6. 10g duct seal7. 10cm double sided mounting tape8. Power adapter9. Yellow LED10. 1kΩ resistorCapstone Group 062 Deliverables 85 PROTOTYPE April 12, 2019Table 2: Bill of Materials for the Impact Detection SystemItem Quantity ManufacturerManufacturerPart NumberDescription1 1 Arduino ABX00021Arduino Uno WifiRev22 1 David He N/APlastic BoxEnclosure7.62x7.62x3.81cm3 1 SparkFun SEN-12789ADXL337 Ac-celerometer withBreakout Board4 1 TDK FA24NP02E-103JNU06 10nF Capacitor5 1 SparkFun 11367 Hook-Up Wire6 1 Gardner Bender DS-130 Duct Seal7 1 Scotch 11189Heavy DutyMounting Tape8 1 Lee’s Electronics 1452012V 1A PowerAdapter9 1 Sparkfun 09594 Yellow LED 5mm10 1Stackpole Elec-tronics Inc.0702646255348 1kΩ ResistorCapstone Group 062 Deliverables 95 PROTOTYPE April 12, 2019These components are described in further detail in the Design Document(Design Document Section 3). In addition to the physical prototype com-ponents, the files necessary for 3D printing the plastic box enclosure (2) areprovided to the client. This allows for reproduction of the prototype, as theplastic box enclosure is custom made for the system. Figure 2 displays theArduino Uno WiFi Rev2, the plastic box enclosure, the ADXL337, and theinsulated wires of the prototype.Figure 2: Detection System Arduino and Accelerometer with Plastic Enclo-sureIn addition to these components, access to the non-physical components ofthe prototype will be provided to SEEDs. This includes source code (Section2), data storage (Design Document Section 5), and UI (Design DocumentSection 8). Due to the online nature of the data storage and UI, they aregiven to SEEDs securely in the form of the following components:1. MyDevices Cayenne UsernameCapstone Group 062 Deliverables 106 CAPSTONE VIDEO April 12, 20192. MyDevices Cayenne PasswordDue to the sensitive nature of these components they are presented in private,rather than with the rest of the documentation.6 Capstone VideoThe 120-second video produced for the capstone course is given to the client.This video focuses on the issue that the bird impact detection system aimsto solve (Requirements Document Section 1), and the solution that was de-signed. The video is in 720p definition, saved in mp4 format. This file willbe provided to the client along with the documents (Section 1).Capstone Group 062 Deliverables 11 CAPSTONE Group 062Bird Impact Detection SystemRequirements DocumentSusanna Chen David He Kieran MortonEmily Xiong Stevan VicentijevicApril 12, 2019CONTENTS April 12, 2019Contents1 Background and Context 32 Domain 43 Significance to Client 54 Functional Requirements 55 Non-Functional Requirements 66 Constraints 6References 8Appendix A: Client Sample Collected Data 9Capstone Group 062 Requirements 21 BACKGROUND AND CONTEXT April 12, 20191 Background and ContextThe UBC Social Ecological Environment Development Studies (SEEDS) pro-gram is internationally renowned for valuable contributions to UBC’s sustain-ability and environmental goals(1). The program views UBC campus as aliving laboratory, creating and implementing solutions to various sustainabil-ity issues that may be scaled up later for use on a larger city scale.The Green Building Manager at UBC, Penny Martyn, is a certified archi-tect with over 12 years of experience in the field of innovative green buildingdesign - and the primary client for the project. The Green Building Managerhas previously done research through SEEDS on the number of bird impactson the buildings of UBC campus due to birds being unable to distinguish re-flective or transparent windows as glass. Current research at UBC has shownthat potentially upwards of 20 birds collide with any given window on UBCcampus every year, as shown in Appendix A. This research has been suffi-cient for the Green Building Manager to identify bird collisions on campusas a challenge in green building design.The Green Building Manager has done many projects with SEEDS, includingmultiple reports related to birds and the ecosystem at UBC. As a primaryauthor of UBC’s green building policies and procedures, the Green BuildingManager is invested in the preservation of the natural ecosystem on UBCcampus. It is imperative to the Green Building Manager that the researchregarding bird impacts on campus is thorough and accurate, as it will guidefuture bird protection policies that are created. For further research pur-poses, the Green Building Manager requires a method to increase accuracyand make the collection of bird impact data more convenient for researchers.The goal of this project is ensuring that the collection of data is accurate,Capstone Group 062 Requirements 32 DOMAIN April 12, 2019and making that collection easier to perform.The current method of quantifying bird impacts on windows on UBC cam-pus is manual, relying on employees or volunteers surveying buildings forevidence of bird impacts. This is considered inadequate for long-term re-search purposes due to the high inherent error and significant time neces-sary to manually identify impacts. Manual identification of bird impacts isknown to have significant error for multiple reasons, including other animalsscavenging bird carcasses and birds moving away from the window beforesuccumbing to injuries.2 DomainThe project is a sensing system that fills a niche for identifying bird impactson windows. It is a noncommercial prototype that could be scaled up to iden-tify sustainability issues of buildings regarding bird impacts. The prototypewould be employed on UBC campus initially, with potential for the project tobe used in other environments in the future where bird impacts are a concern.Several studies on similar topics have been previously conducted for com-mercial and non-commercial purposes(2)(3)(4). These studies focus on theuse of sensor systems to quantify the number of bird impacts on wind turbinesin marine and terrestrial environments. All of the previous studies focus onthe narrow sector of bird impact detection on wind turbines, indicating thatthe domain for this project is unique in non-commercial terms. To the best ofthe knowledge of Capstone Group 62, no commercial bird impact detectiontechnology exists with a focus on windows.Currently, the only method the client has to collect data in the domainCapstone Group 062 Requirements 43 SIGNIFICANCE TO CLIENT April 12, 2019of bird impacts upon windows is manual detection via surveying (5). Thismethod serves as the requirements baseline for the project. The client esti-mates that the manual method has an approximate error rate of 25%. Thisproject automates the identification of bird impacts, using sensors to monitorsurfaces where impacts might occur rather than physical evidence.3 Significance to ClientThis project will provide the following benefits to the Green Building Man-ager at UBC:• Supports the Green Building Manager in designing future iterations ofthe UBC Green Buildings Action Plan, Bird Friendly Design section(6).• Facilitates future research regarding the effect of bird impacts on thecampus ecosystem.• Provides a basis for future projects in the domain of bird impact de-tection.4 Functional RequirementsThis list consists of the functional specifications of the system:FR1: The system must be able to detect bird impacts. More specifically,it must be able to acknowledge bird impacts involving a variety ofbird species, and discern between bird collisions and other disturbancesagainst window panes.FR2: The system must record bird impact events. Upon detection of a birdimpact as defined in Functional Specification 1, that event must berecorded in a database.Capstone Group 062 Requirements 55 NON-FUNCTIONAL REQUIREMENTS April 12, 2019FR3: Recorded bird impact events must be continuously accessible. A usermust be able to obtain data from the system at any time.5 Non-Functional RequirementsThis list consists of the non-functional specifications of the system:NFR1: Maximum bird strike detection error rate of at most 5% from anysingle source. The sources considered for this error rate are:• False Negatives• False PositivesFalse negatives indicate a strike occurred but was not recorded, andfalse positives indicate a strike was recorded but did not occur.NFR2: The system must be able to operate for 7 days continuously withoutneed for maintenance.NFR3: Data stored must be accessible to a user possessing basic spreadsheetskills.6 ConstraintsThe following are the constraints that have been identified for the system.C1: The overall system must cost less than $80 per one-window detectionsystem. This is identified by the client, to facilitate the reproductionand future iterations of the system.C2: Data recorded and stored must contain, at minimum, the informationprovided in Appendix A. This is defined as acknowledgement of theCapstone Group 062 Requirements 66 CONSTRAINTS April 12, 2019bird impact, and an identifier that identifies the building and windowon which the impact occurred. This is identified by the client, whorequires this data for research purposes.C3: The system must not cover or obscure more than 10% of the window itis installed on. This is identified by the client, as the window will stillbe in use when the bird impact detection system is installed.C4: The system must operate on a window with dimensions 2’ by 3’. This isidentified by the client, as the bird impact detection system must workon a typical window on UBC Campus.C5: The system must operate on UBC Campus. This is identified by theclient, who plans to measure bird impacts on UBC Campus.Capstone Group 062 Requirements 7REFERENCES April 12, 2019References1 SEEDS. About seeds. [Online]. Available: https://sustain.ubc.ca/courses-degrees/alternative-credit-options/seeds-sustainability-program/about-seeds2 A. Pandy, J. Hermence, and R. Harness, “Development of acost-effective system to monitor wind turbines for bird and batcollisions.” [Online]. Available: https://pdfs.semanticscholar.org/a6ef/0c54709a9b54995a3d3b4d3d918ca7259a4a.pdf3 J. Flowers, R. Albertani, T. Harrison, B. Polagye, and R. M. Suryan,“Design and initial component tests of an integrated avian and bat collisiondetection system for offshore wind turbines,” Seattle, WA.4 dtbird, “Bird monitoring reduction of collision risk with windturbines.” [Online]. Available: https://dtbird.com/images/Downloads/DTBird System Brochure Septem 2017.pdf5 A. Porter and A. Huang, “Bird collisions with glass: Ubc pilot project toassess bird collision rates in western north america (phase 2).” [Online].Available: https://sustain.ubc.ca/sites/sustain.ubc.ca/files/seedslibrary/BWC%20report%20SEEDS%20May%202015.pdf6 UBC. Bird friendly design. [Online]. Available: https://sustain.ubc.ca/campus-initiatives/green-buildings/bird-friendly-designCapstone Group 062 Requirements 8APPENDIX A: CLIENT SAMPLE COLLECTED DATA April 12, 2019Appendix A: Client Sample Collected DataCapstone Group 062 Requirements 9 UBC Social Ecological Economic Development Studies (SEEDS) Sustainability Program Student Research Report        CAPSTONE Group 062 Bird Impact Detection System Design Document Susanna Chen, David He, Kieran Morton, Emily Xiong, Stevan Vicentijevic University of British Columbia EECE 4XX Themes: Biodiversity, Buildings May 16, 2019         Disclaimer: “UBC SEEDS Sustainability Program provides students with the opportunity to share the findings of their studies, as well as their opinions, conclusions and recommendations with the UBC community. The reader should bear in mind that this is a student research project/report and is not an official document of UBC. Furthermore, readers should bear in mind that these reports may not reflect the current status of activities at UBC. We urge you to contact the research persons mentioned in a report or the SEEDS Sustainability Program representative about the current status of the subject matter of a project/report”. May 16, 2019Executive SummaryThe Bird Impact Monitor is a project inspired by SEEDS andtheir initiative on creating bird-friendly technology. UBC hap-pens to be on the migrating path for many bird species andbirds have important roles in the ecosystem. Previously stud-ies commissioned by SEEDs estimated that over 10,000 die dueto window collision on campus. The purpose of this project isto collect real-time bird impact data to help SEEDs implementa bird-friendly building guideline and for researchers to betterunderstand birds’ behavior.Our goal is be replace the manual data collection done by SEEDSin previous years with an automated system that is able to detectbird impacts more accurately and with minimal maintenance.More detailed outlines can be found the the Requirements doc-ument.The device is made of two sections: the detection system andthe communication system. The detection system consists of anaccelerometer connected to an Arduino Uno Wifi Rev 2. Theaccelerometer will be installed on the windows and transmitsanalog data to the Arduino for analysis and identification. OnceCapstone Group 062 Design 2May 16, 2019an impact is identified, the Arduino will send data to MyDevicesCayenne over Wifi. The client will be able to access and visual-ize the data using Cayenne.The prototype we have developed is able to satisfy all of SEEDsrequirements, in particular, it accurately detects bird impactwith a 95% accuracy while rejecting environmental disturbances,it costs less than $80 per unit, and obstructs less than 10% ofthe window. Further recommendations to the project are out-lined in the design documents and will serve as guidelines forfuture projects for improvements and scalability.Capstone Group 062 Design 3CONTENTS May 16, 2019Contents1 System Architecture 171.1 System Operation . . . . . . . . . . . . . . . . . . 192 Simulation of Bird Impact 212.1 Mock Bird . . . . . . . . . . . . . . . . . . . . . . 222.2 Pendulum Setup . . . . . . . . . . . . . . . . . . 252.3 Ideal Environment Simulation . . . . . . . . . . . 252.3.1 Sampling rate . . . . . . . . . . . . . . . . 262.3.2 Results Summary . . . . . . . . . . . . . . 272.4 Non-Ideal Environment Simulation . . . . . . . . 282.4.1 Results Summary . . . . . . . . . . . . . . 293 Detection System 293.1 Impact Sensor . . . . . . . . . . . . . . . . . . . . 303.1.1 Accelerometer . . . . . . . . . . . . . . . . 303.1.2 Anti-aliasing Filter . . . . . . . . . . . . . 323.1.3 Other Sensors Evaluated . . . . . . . . . . 343.2 Detection Algorithm . . . . . . . . . . . . . . . . 353.2.1 State Machine System . . . . . . . . . . . 363.2.2 Initialization State . . . . . . . . . . . . . 363.2.3 Voltage Reading State . . . . . . . . . . . 393.2.4 Identification State . . . . . . . . . . . . . 41Capstone Group 062 Design 4CONTENTS May 16, 20193.2.5 Data uploading . . . . . . . . . . . . . . . 423.3 Microcontroller . . . . . . . . . . . . . . . . . . . 433.3.1 Microcontroller Design Considerations . . 433.3.2 Minimum Specification Description . . . . 453.4 Recommendations for Future Components . . . . 464 Communication System 474.1 Communication System Design Considerations . . 474.2 Minimum Wireless Specifications Description . . . 484.3 UBC Visitor WiFi Description . . . . . . . . . . . 494.4 Accessing the UBC Visitor Network . . . . . . . . 494.5 Other Data Communication Designs Evaluated . 505 Data Storage 515.1 Data Storage Design Considerations . . . . . . . . 515.2 Minimum Specification Description . . . . . . . . 525.3 Cayenne Database . . . . . . . . . . . . . . . . . 535.4 Other Data Storage Designs Evaluated . . . . . . 546 Power Source 556.1 Minimum Specification Description . . . . . . . . 566.2 Other Power Options Evaluated . . . . . . . . . . 577 System Setup 587.1 Sensor Connections . . . . . . . . . . . . . . . . . 59Capstone Group 062 Design 5CONTENTS May 16, 20197.2 Detection System Window Installation . . . . . . 607.2.1 Microcontroller Window Installation . . . 617.2.2 Sensors Window Installation . . . . . . . . 637.2.3 Power Source Installation . . . . . . . . . 647.3 MyDevices Cayenne Database Connection . . . . 648 User Interface 658.1 Minimum Specification Description . . . . . . . . 66References 73Appendix A: Client Sample Collected Data 74Appendix B: Bird Impact Calculations 75Appendix C: Simulation Pendulum Setup 80Pendulum Setup Procedure . . . . . . . . . . . . . . . 81Pendulum Setup Calculations . . . . . . . . . . . . . . 83Appendix D: Ideal Environment Test 86Varying Sensor Placement Test . . . . . . . . . . . . . 86Varying Impact Location Test . . . . . . . . . . . . . . 92Appendix E: Non-Ideal Environment Test 98Human Noise Disturbance . . . . . . . . . . . . . . . . 98Rain . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104Capstone Group 062 Design 6CONTENTS May 16, 2019Appendix F: Impact Data Processing 111Appendix G: Unimplemented Detection System Com-ponents 115Digital Filter . . . . . . . . . . . . . . . . . . . . 115Microphone Sensor . . . . . . . . . . . . . . . . . 119WiFi Disconnection Handler . . . . . . . . . . . . 120Damping Ratio Analysis for Detection Algorithm . . . 121Appendix H: System Placement 127Appendix I: Microcontrollers Evaluated 129Appendix J: Google Sheets Information 131Appendix K: Database and UI Setup 132Appendix L: System Waterproofing Plan 136Capstone Group 062 Design 7LIST OF FIGURES May 16, 2019List of Figures1 High-Level Design of the System . . . . . . . . . . 172 System Operation Data Pathway through System 203 Cayenne Data Presentation with Sample Data . . 224 Mock Birds For Validation Tests . . . . . . . . . . 245 Accelerometer Signal Spectrogram of Ideal Envi-ronment Background Noise and Simulated birdImpact . . . . . . . . . . . . . . . . . . . . . . . . 266 Best Case Accelerometer Impact Signal, Time Do-main vs. Frequency Domain . . . . . . . . . . . . 277 Worst Case Accelerometer Impact Signal, TimeDomain vs. Frequency Domain . . . . . . . . . . 288 Detection System Diagram . . . . . . . . . . . . . 309 Sample Bird Impact Signal Before Anti-aliasingFilter is Applied . . . . . . . . . . . . . . . . . . . 3310 Sample Bird Impact Signal After Anti-aliasingFilter is Applied . . . . . . . . . . . . . . . . . . . 3311 System State Machine Diagram . . . . . . . . . . 3712 Reset Flag Register Bits (1) . . . . . . . . . . . . 3913 Recovery from Power Loss Flowchart . . . . . . . 4014 Flowchart of the Detection Algorithm . . . . . . . 42Capstone Group 062 Design 8LIST OF FIGURES May 16, 201915 Detection System Wiring Schematic. It is notedthat due to a limitation in the schematic gener-ator, the ADXL335 is displayed instead of theADXL337. . . . . . . . . . . . . . . . . . . . . . . 5916 Microcontroller Installed in Plastic Box . . . . . . 6217 Microcontroller inside Plastic Box (Red Circle),Accelerometer with Cover (Blue Circle) Affixedto Sample Window . . . . . . . . . . . . . . . . . 6318 Cayenne Dashboard UI featuring numerical counter(left) and line plot (right) widgets, populated withsample data. . . . . . . . . . . . . . . . . . . . . . 66C1 Photo of Mock Bird Used for Validation Tests . . 81D1 Drops Performed at Varying Sensor Location(red)While Fixing the Impact Location (Blue) . . . . 88D2 Scatter Plot with Best Fit Line of Voltage vs Dis-tance by Varying Impact Location . . . . . . . . 90D3 Acceptable Sensor Placement Locations Indicatedby Green . . . . . . . . . . . . . . . . . . . . . . . 92D4 Drops Performed at Varying Impact Location(Blue)While Fixing the Sensor Location . . . . . . . . . 94D5 Scatter Plot of Voltage vs Distance by VaryingImpact Location . . . . . . . . . . . . . . . . . . . 96Capstone Group 062 Design 9LIST OF FIGURES May 16, 2019E1 Noise Floor Measurement of Human Talking at70dB . . . . . . . . . . . . . . . . . . . . . . . . . 101E2 Comparison of Signals with and without Noisedisturbance . . . . . . . . . . . . . . . . . . . . . 103E3 Full Rain Test Setup . . . . . . . . . . . . . . . . 106E4 Window with Garbage Bag Sealing and Rain . . . 106E5 Noise Floor Measurement of Rain . . . . . . . . . 108E6 Comparison of Signals with and without rain dis-turbance . . . . . . . . . . . . . . . . . . . . . . . 109F1 Accelerometer Impact Voltage in Time Domain . 112F2 Accelerometer Impact Voltage in Time Domain . 113F3 Accelerometer Impact Voltage Signal in FrequencyDomain . . . . . . . . . . . . . . . . . . . . . . . 113G1 Frequency Domain Effect of Various Digital Filterse117G2 Example Signal of Impact . . . . . . . . . . . . . 122G3 Example Signal of Human Noise . . . . . . . . . . 123G4 Example Signal of Impact . . . . . . . . . . . . . 124G5 Example Signal of Impact . . . . . . . . . . . . . 124G6 Different Configuration of Envelope Based on PeakSeparation denoted by np . . . . . . . . . . . . . 125G7 Finding the Largest R-squared Value . . . . . . . 126H1 Comparison of Repeated Impact Signals PerformedInside and Outside of the Window . . . . . . . . . 128Capstone Group 062 Design 10LIST OF FIGURES May 16, 2019K1 Cayenne ’Add Widget’ Drop-Down Menu . . . . . 133K2 Settings for Cayenne Numerical Counter . . . . . 134K3 Settings for Cayenne Line Chart . . . . . . . . . . 135Capstone Group 062 Design 11LIST OF TABLES May 16, 2019List of Tables1 Technical Specifications of ADXL337 . . . . . . . 322 Microcontroller Minimum Specifications . . . . . 463 Data Communication Minimum Specifications . . 484 Communication System Evaluation . . . . . . . . 505 Data Storage Minimum Specifications . . . . . . . 536 Data Storage Evaluation Comparison . . . . . . . 557 Power Source Minimum Specifications . . . . . . . 568 Power Source Evaluation Comparison . . . . . . . 579 UI Minimum Specifications . . . . . . . . . . . . . 66B1 Energy transfer of 7g bird at bird-window collision. 76B2 Energy transfer of 7g bird at bird-window collision. 77B3 Energy transfer of 18g mock bird at bird-windowcollision. . . . . . . . . . . . . . . . . . . . . . . . 79B4 Energy transfer of 57g mock bird at bird-windowcollision. . . . . . . . . . . . . . . . . . . . . . . . 79C1 Pendulum Drop Angles of 18g bird with StringLength of 1.9m. . . . . . . . . . . . . . . . . . . . 85C2 Pendulum Drop Angles of 57g Bird with StringLength of 0.60m. . . . . . . . . . . . . . . . . . . 85D1 Results from Varying Sensor Placements . . . . . 89D2 Results from Varying Impact Locations . . . . . . 95Capstone Group 062 Design 12LIST OF TABLES May 16, 2019E1 Summary of Maximum Peak-to-Peak Voltage with70dB noise in the Background . . . . . . . . . . . 100E2 Summary of Maximum Peak-to-Peak Voltage withRain in the Background . . . . . . . . . . . . . . 107F1 Impact Signal Patterns of Accelerometer . . . . . 114G1 Comparison of Digital Filter Properties with BirdImpact Signal . . . . . . . . . . . . . . . . . . . . 118G2 Microphone Sensor Minimum Specification andComparison . . . . . . . . . . . . . . . . . . . . . 120I1 Microcontroller Evaluation Comparison . . . . . . 130Capstone Group 062 Design 13List of Abbreviations May 16, 2019List of AbbreviationsC1 Design Document Constraint 1. Pages:. 31, 119C2 Design Document Constraint 2. Pages:. 52C3 Design Document Constraint 3. Pages:. 56C4 Design Document Constraint 4. Pages:. 60C5 Design Document Constraint 5. Pages:. 48FR1 Design Document Functional Requirement 1. Pages:. 30,31, 36, 119FR2 Design Document Functional Requirement 2. Pages:. 36,48, 53FR3 Design Document Functional Requirement 3. Pages:. 46,48, 53, 66NFR1 Design Document Non-Functional Requirement 1. Pages:.25, 29–31, 36, 60NFR2 Design Document Non-Functional Requirement 2. Pages:.36, 45, 50, 53, 56, 66, 136NFR3 Design Document Non-Functional Requirement 3. Pages:.48Capstone Group 062 Design 14List of Abbreviations May 16, 2019List of Key TermsAliasing: Misidentification of the frequency of a signal. Causesdistortion or error.Analog Data: For a signal that is continuous, its time-varyingfeature is represented with another time-varying quantity.Bird Impact: The event where a bird collides with the windowupon which the Bird Impact Detection system is installed.Database: A set of data that is held in a structured way in acomputer.Data Segment: A piece of a data packet containing certaininformation for storage. Includes timestamps and locationdata.Kinglet: A type of bird identified by the client as being ofhigh concern for bird impacts on UBC Campus.Microcontroller: A computer that is composed on an in-tegrated circuit, that has various distinguishable features(number of CPUs, memory, input/output peripherals).Mock Bird: An object we use in order to simulate the equiv-alent energy produced by a bird, i.e., a kinglet.Capstone Group 062 Design 15List of Abbreviations May 16, 2019Nyquist Frequency: Twice the maximum expected frequencyof a signal, the minimum rate at which the signal may besampled without introducing error.SEEDS: The UBC Social Ecological Environmental Develop-ment Studies program.Sensor: A device that can detect or measure physical proper-ties.User Interface: The method in which an user and a computersystem interact.Voltage: A potential difference with the unit of Volts.Capstone Group 062 Design 161 SYSTEM ARCHITECTURE May 16, 20191 System ArchitectureThe design for the product is divided into four major compo-nents:• Detection System• Communication System• Data Storage• User Interface (UI)Figure 1: High-Level Design of the SystemThe detection system refers to an accelerometer and microcon-troller device that will be attached to the window being mea-sured (Section 3). The detection system in the system architec-ture is seen in Figure 1. The purpose of the detection systemportion of the device is to monitor the window for any sufficientCapstone Group 062 Design 171 SYSTEM ARCHITECTURE May 16, 2019signal that represents a bird colliding with the glass. The detec-tion system then sends this data to the data storage device foruse and analysis by SEEDS.The communication system (Section 4) refers to the WiFi con-nection the detection system uses to communicate data to datastorage (Section 5). This subsystem ensures that all bird impactdata recorded by the detection system is accurately transmittedto data storage. The primary purpose of the communicationsystem is to make access of data more convenient by making itremotely accessible.Data storage refers to Cayenne, which the detection systemsends bird impact information to (Section 5). The purpose ofthe data storage portion of the device is to store impacts thatare detected by the detection system. The data storage compo-nent provides a remote database that expands upon the spaceavailable for storage of impact data. As well, the data storagemakes the impact data consistently available for the UI and ac-cess by SEEDS.UI refers to the Cayenne Dashboard, which is used to presentthe data stored in the data storage component to users of theCapstone Group 062 Design 181 SYSTEM ARCHITECTURE May 16, 2019system (Section 8). It processes the data in data storage andpresents it in an easily readable and user-friendly format. Thisincludes a numerical counter that presents the location the datawas collected, and a tally of total impacts at that location. Inaddition, the UI plots the data over time from the location as-sociated with the counter.1.1 System OperationThe system is designed to detect bird impact events that occuron the window the system is installed upon. An occurrence ofa bird impact is defined as the primary condition in which thesystem will perform functions. The system does not performfunctions outside of monitoring for the occurrence of a bird im-pact event. Figure 2 displays the path of data from a bird impactthrough the system.The impact sensors continuously transmit data to the micro-controller representing the vibrations in the inner pane of thewindow the system is installed on. When a bird impacts thewindow the system is mounted on, the vibration generated isconverted into analog signals by the impact sensors (Section3.1). These analog signals are then transmitted as voltage alongCapstone Group 062 Design 191 SYSTEM ARCHITECTURE May 16, 2019Figure 2: System Operation Data Pathway through Systemwires to the microcontroller (Section 3.3) for processing.Analog data is received by the microcontroller through wiresthat connect it to the impact sensors. The microcontroller thenprocesses these analog signals, and monitors said signals for signsof a bird impact. When an impact is detected, the microcon-troller records the event. Recording consists of creating an ob-ject in the microcontroller’s memory, including the location andtime of the impact. Location is defined as an identifier of whichwindow the system is installed on, consisting of the building andan index referring to the window. Appendix A displays exam-ples of locations recorded, in the column marked ’facade’. ACapstone Group 062 Design 202 SIMULATION OF BIRD IMPACT May 16, 2019digital record of the impact is then transmitted using the com-munication system (Section 4) to data storage (Section 5). Anacknowledgement of the impact event is sent to the appropri-ate Cayenne channel. The Cayenne channel designates at whichbuilding location the system is located, and is coded into theArduino.The digital record packets sent by the microcontroller via WiFiare then received by Cayenne. Figure 3 displays how data isstored in Cayenne when a bird impact is received. Each linerepresents one data package that was received from the deviceby Cayenne. Sensor name is used to identify the location of thesystem, and is associated with the channel. Value refers to thenumber of impacts total that have been identified by the systemsince it was last reset. Timestamp is the approximate time whenthat data package was received, indicating when the associatedimpact occurred.2 Simulation of Bird ImpactIn a literature review, no previous work regarding the repeatablerecreation of a bird impact was found. Due to this, a methodfor simulating an bird impact is created for use in designing andtesting the Bird Impact Detection system. The client identifiedCapstone Group 062 Design 212 SIMULATION OF BIRD IMPACT May 16, 2019Figure 3: Cayenne Data Presentation with Sample Datathe kinglet(2) as a bird of particular concern for bird impactson UBC campus. This species is therefore used as the focusof bird impact simulations used to design and test the system.Appendix B provides more details, including calculations, for thedesign of a bird impact simulation. The bird impact simulationdescribed in this section is used for all of the applicable testingdone for design and validation of the system.2.1 Mock BirdThe bird considered in the design of the mock bird is the kinglet,a species identified by the client as the most common for birdimpacts on the UBC campus(3). Kinglets have the followingphysical characteristics:• 7g mass.• 14-18cm wingspan.Capstone Group 062 Design 222 SIMULATION OF BIRD IMPACT May 16, 2019• 8-11cm length from head to tail.• Foraging speeds between 2.7m/s and 9.7m/s.An 18g rubber ball and a 57g tennis ball are used as the mockbirds to simulate bird impacts on the test window. Figure 4displays the mock birds that were used for the simulations. Themock birds are designed using the following characteristics:• Mass• Physical size (wingspan, length from head to tail)• Flight SpeedsThe two mock birds are purposefully designed to have a mass of18g and 57g. This is done to limit the drop speed and dropheight required to simulate bird impacts, facilitating repeat-able and safe testing. A pendulum (Appendix C) is the chosenmethod of simulating the bird impacts because of its ability tocontrol impact locations and finely tune the impact speed. Sincethe maximum speed of the kinglet is too fast to be effectivelysimulated in a lab setting using the pendulum, ideal kinematicsequations are used with the increased masses of the mock birdsto reduce the speed of the simulated impacts (Appendix B). Wecan ensure that the mock bird impacts are consistent with truekinglet impacts by maintaining equivalent impact energies, asCapstone Group 062 Design 232 SIMULATION OF BIRD IMPACT May 16, 2019(a) Photo of 18g Mock Bird Used for Val-idation Tests(b) Photo of 57g Mock Bird Used for Val-idation TestsFigure 4: Mock Birds For Validation Testspresented in Appendix B. The shape of the mock birds is cho-sen to be a ball to ensure that simulated impacts are unaffectedby the rotation or other positioning upon collision with the win-dow. To simplify the simulation, the effects of air resistance anddeformation of the ball are disregarded.Capstone Group 062 Design 242 SIMULATION OF BIRD IMPACT May 16, 20192.2 Pendulum SetupTo simulate varied bird impacts in a reliable and repeatablemanner, a pendulum is used. By varying the drop angle of themock bird (Section 2.1), the pendulum can simulate differentbird impact speeds on different spots of the test window. Ap-pendix C describes the pendulum setup used in more detail.2.3 Ideal Environment SimulationThis section describes an experiment that was conducted to sup-plement the design of the detection algorithm (Section 3.2) ofthe detection system (Section 3). The complete ideal environ-ment simulation experiment can be found in Appendix D.The purpose of this experiment is to identify important charac-teristics (peak-to-peak voltage, duration, and frequencies) cap-tured by the accelerometer (Section 3.1) during a bird-windowcollision in ideal conditions. These characteristics are used inthe design of the detection algorithm that can distinguish bird-window collisions from other by/on window disturbances, meet-ing NFR1. A secondary purpose of this test is to determine thebest sensor placement location for the system setup (Section 7).This experiment is designed to mimic the ideal conditions inCapstone Group 062 Design 252 SIMULATION OF BIRD IMPACT May 16, 2019which the system will operate at the UBC Vancouver campus,with no external sources of noise such as rain or wind.2.3.1 Sampling rateIn order to calculate accurate frequency peaks when perform-ing a Fast Fourier Transform(4) to the data, we must deter-mine the frequency range of impact vibration on the glass. Todo this, we initially sampled the signal at the maximum rateof serial data transmission, 4000Hz, and recorded data in realtime while applying short time Fourier Transform to study theirfrequencies.(5).Figure 5: Accelerometer Signal Spectrogram of Ideal Environment Back-ground Noise and Simulated bird ImpactFigure 5 shows the spectrograms of the ideal background noise(on the left), and a typical simulated bird impact (on the right).Capstone Group 062 Design 262 SIMULATION OF BIRD IMPACT May 16, 2019It is apparent that the bird impact vibration is under 1000Hz.As a result, according to the Nyquist Frequency(6), the detec-tion system is designed with a sampling rate of 2000Hz.2.3.2 Results SummaryTesting multiple impact locations allows for the impact signalto be characterized. Impacts produce oscillating signals with anexponentially decreasing envelope in the time domain with twoor four peaks at frequency domain.Figure 6: Best Case Accelerometer Impact Signal, Time Domain vs. Fre-quency DomainFigure 6 shows the signals of the best case simulated impact,located on the center of a the glass. Appendix D, Figure D3Location 6 displays an example of a best case simulated impact.This is a typical impact with two frequency peaks around 80Hzand 160Hz.Capstone Group 062 Design 272 SIMULATION OF BIRD IMPACT May 16, 2019Figure 7: Worst Case Accelerometer Impact Signal, Time Domain vs. Fre-quency DomainFigure 7 shows the signal of the worst case simulated impact,located near the edge of the window (refer to Appendix D: Fig-ure D3: Location 1). This is not typical impact as it has fourfrequency peaks, which may be caused by the damping effect ofthe metal frame.As shown by the best and worst case impacts, the signals havedifferent maximum peak-to-peak voltages and frequency peaks.2.4 Non-Ideal Environment SimulationSimilarly to Section 2.3, this section uses an experiment thatwas conducted to supplement the design of the detection algo-rithm (Section 3.2) of the detection system (Section 3). Thecomplete non-ideal environment simulation experiment can befound in Appendix E.Capstone Group 062 Design 283 DETECTION SYSTEM May 16, 2019The purpose of this experiment is to identify important charac-teristics (peak-to-peak voltage, duration, and frequencies) cap-tured by the accelerometer (Section 3.1) during a bird-windowcollision with simulate environmental disturbances, rain and hu-man sound. These characteristics are used in the design of thedetection algorithm in order to distinguish bird-window colli-sions from other disturbances near the window, meeting NFR1.This experiment is designed to mimic the non-ideal conditionsin which the system will operate at the UBC Vancouver campus,testing rainy and noisy conditions.2.4.1 Results SummaryBased on the best and worst case impact data displayed in Ap-pendix E, we can see that rain and noise increase the noise floorlevel, but it is significantly smaller than any bird impact signaland can therefore be ignored.3 Detection SystemThe detection system consists of a microcontroller and one im-pact sensor. Figure 8 displays how these components are con-nected. The sensor used for impact detection is an accelerome-ter. This sensor is attached to the window being measured, inCapstone Group 062 Design 293 DETECTION SYSTEM May 16, 2019order to provide data to the microcontroller for processing. Themicrocontroller reads data from the sensor and uses it to deter-mine whether a bird impact has occurred. If the microcontrollerdetects a bird impact, it sends an acknowledgement to the datastorage (Section 5) using WiFi (Section 4).Figure 8: Detection System Diagram3.1 Impact SensorA bird impact is made up of audible sounds, vibrations, andmotion experienced by the glass of a window (7). The detec-tion system uses an accelerometer to capture the informationproduced from audible sounds and window vibrations during animpact for bird impact detection (8). This sensor is used tomeet FR1 and NFR1 of the system by accurately detecting birdimpacts.3.1.1 AccelerometerThe accelerometer ADXL337 is the impact sensor chosen for thisproject. Accelerometers are a type of sensor that outputs a volt-Capstone Group 062 Design 303 DETECTION SYSTEM May 16, 2019age signal as a function of the force on the sensor in a specifieddirection. The accelerometer’s versatile applications in buildingand structural monitoring make it applicable in our project(9).A kinglet, the bird identified by the client as being of most con-cern for bird impacts on UBC Campus, is estimated to produceapproximately 0.2N to 3N of force which is equivalent to 0.026gto 0.33g upon impact as shown in the calculations in AppendixB(10).In order to meet the cost constraint defined in C1, the accelerom-eter must also cost less than $30. In addition, a high sensitivityallows for the voltage output to be relatively large even whenthe vibration is small as in the case of a low speed impact. Sincethere is a trade-off between the sensitivity and the threshold ofacceleration of an accelerometer, we decided to purchase an ac-celerometer with high sensitivity up to 330mV/g so that impactfrom a small bird flying at low speed can be detected to satisfyFR1 and NFR1. The sensor must have and operating temper-ature range of at least -10◦C to 30◦C. This is to ensure thatthe system will function inside of buildings on UBC Campus.This range sufficiently larger than the expected range of tem-peratures inside of buildingsto ensure the system will functionproperly. Given the above considerations, the minimum specifi-Capstone Group 062 Design 313 DETECTION SYSTEM May 16, 2019cations of the accelerometer are summarized in Table 1(11).Table 1: Technical Specifications of ADXL337Feature Minimum Specification ADXL337Input 0.026g to 0.33g ±3 to ±3.6gSensitivity 100mV/g 270 to 330mV/gOperating Voltage Range 3.3 to 5V 1.8 to 3.6VOperating Temperature −10 to 30◦C −55 to +125◦CCost per Unit less than $30 $163.1.2 Anti-aliasing FilterAliasing is a concern that arises in reading the analog signalfrom the accelerometer. The Nyquist Frequency of the system isapproximately 520Hz, based on the bird impact simulation (Sec-tion 2). The Nyquist Frequency is calculated using the highestfrequencies observed in simulation, approximately 260Hz. Thesystem is sampling at 2000Hz, which is well above the minimumrequirement and results in oversampling. This oversampling in-troduces high frequency white noise that may make the detec-tion system less accurate. A physical anti-aliasing filter is usedto reduce this effect.This filter is implemented by connecting a capacitor betweenthe z-axis output of the accelerometer and ground. As sug-gested by the manufacturer of the ADXL337 (Section 3.1.1),Capstone Group 062 Design 323 DETECTION SYSTEM May 16, 2019a 10nF capacitor is used(11). Figure 9 displays a sample birdimpact signal without the filter implemented, and Figure 10 dis-plays the same signal after the filter is implemented. The filteris implemented mathematically in these two figures, to highlightthe effect of the anti-aliasing filter on a specific impact.Figure 9: Sample Bird Impact Signal Before Anti-aliasing Filter is AppliedFigure 10: Sample Bird Impact Signal After Anti-aliasing Filter is AppliedThe filter attenuates the signals used to identify bird impacts byCapstone Group 062 Design 333 DETECTION SYSTEM May 16, 2019up to 0.5dB, but maintains a satisfactory signal-to-noise ratio.In addition it significantly attenuates high frequency peaks, vis-ible in frequencies above the peak at approximately 250Hz. Thisindicates that the filter is limiting the analog signal to withinthe frequencies that are expected in the event of a bird impact.3.1.3 Other Sensors EvaluatedIn addition to the accelerometer mentioned above, we have alsoconsidered microphones, a piezo disc array, and infrared motionsensors as alternative options. Microphones meet the require-ments of the impact detection sensor, and are therefore a viablesensor option of the system. A microphone is not included inthe final design as no situation was discovered during validationtests where the microphone was able to detect a bird impact thatthe accelerometer could not. The microphone as an impact de-tection sensor is discusses in more detail in Appendix G. Piezodiscs are a type of pressure transducer that generate voltageswhen they are being compressed. However, piezo discs generateAC voltage, which is incompatible with the input format of themicrocontroller. Therefore this option has been eliminated.Infrared sensors emit infrared radiation and detect the reflectedradiation from an object to determine if there is movement in thesensing region (12). These sensors were initially considered as aCapstone Group 062 Design 343 DETECTION SYSTEM May 16, 2019way of confirming the presence of motion immediately in frontof the window when vibrations have been detected by the otherimpact sensors. The two IR sensors that were tested were theIR proximity sensor and the short-range distance sensor. How-ever, IR sensors require mounting on the outside of the windowto provide effective information from bird impacts. These sen-sors were therefore eliminated following the decision to place thesystem on the inside of the window, explained in Appendix H.3.2 Detection AlgorithmTo accurately detect bird impacts among the other vibrationsof the window, an algorithm is needed. This algorithm is im-plemented on the Arduino Uno WiFi Rev2 (Section 3.3). Thethree characteristics of the signal that are used by the algorithmare:1. Signal Voltage Amplitude2. Dominant Frequency Peaks3. Signal DurationBird impacts have distinct characteristics that can be used todistinguish them from other disturbances that cause vibrationin the window glass. The algorithm is implemented using a stateCapstone Group 062 Design 353 DETECTION SYSTEM May 16, 2019machine and a Fast Fourier Transform function for the ArduinoUno WiFi Rev2.3.2.1 State Machine SystemThe algorithm is implemented using 4 different states:1. Initialization2. Voltage Reading3. Identification4. Data UploadingThe state machine is implemented using the Arduin Uno WiFiRev2 (Section 3.3) to collect and analyze data from the ac-celerometer (Section 3.1). Figure 11 shows the state diagramfor the system, including how the states are connected and ba-sic next state logic. The primary purpose of the state machineis to satisfy FR1, FR2, NFR1, and NFR2, allowing the systemto monitor for impacts autonomously with a low error rate.3.2.2 Initialization StateThe first state of the state machine is initialization, which isentered when the system is reset or powered on. If the systementers this state from a spontaneous power loss, it recovers theCapstone Group 062 Design 363 DETECTION SYSTEM May 16, 2019Figure 11: System State Machine Diagramprevious impact data from internal memory using a method-ology defined below (Section 3.2.2.1). The system connects tothe WiFi network (Section 4.3) and MyDevices Cayenne (Sec-tion 5). It then waits until the signal from the accelerometerbecomes stable to avoid any issues with initial signal fluctua-tion. Once the system is connected to Cayenne and the signalis stable, it moves into state 2 (Section 3.2.3).Capstone Group 062 Design 373 DETECTION SYSTEM May 16, 20193.2.2.1 Recovery from Power LossDue to how bird impact information is stored on the Cayennedatabase (Section 5), the number of bird impacts recorded bythe system must be recalled in the case of a loss of power. Apower loss will erase the volatile local system memory, where thenumber of bird impacts is stored. Therefore, a method for recall-ing the bird impacts from a non-volatile memory is needed. Thisrecovery from power loss occurs during the initialization state ofthe state machine, which is always triggered upon booting thedevice. The two types of system power loss are:1. Power Supply Resets: power outage, a brownout, unplug-ging the power source from the system2. User Resets: pressing the reset button on the deviceTo recognize a power loss, the algorithm makes use of a featureon the microcontroller (Section 3.3) called the Reset Controller;the source of a reset occurrence is recorded into the Reset FlagRegister, shown on Figure 12 (1).Each bit is binary, storing a value of 1 or 0. The bits of interestare:Capstone Group 062 Design 383 DETECTION SYSTEM May 16, 2019Figure 12: Reset Flag Register Bits (1)• Bit 0: PORF - Power-On Reset Flag• Bit 1: BORF - Brownout Reset Flag• Bit 2: EXTRF - External Reset FlagBits 0 and 1 are set to 1 if a power supply reset occurs, whilebit 2 is set to 1 if a User Reset occurs.In the event of a power supply reset, the bird impact data isrecalled from the non-volatile memory on the microcontroller.In the event of a user reset, the bird impact data is set to 0. Thisis expressed in the flowchart in Figure 13. This functionality wasshown to work throughout various other tests, and is thereforevalidated.3.2.3 Voltage Reading StateIn this state, the system continuously monitors the signal fromthe accelerometer for the amplitude characteristic of a bird im-pact. The previous 25 milliseconds of accelerometer signal areCapstone Group 062 Design 393 DETECTION SYSTEM May 16, 2019Figure 13: Recovery from Power Loss Flowchartstored. When the signal amplitude becomes larger than thethreshold of 0.0968V (ten times of ideal environment noise floor),the system moves into state 3 (Section 3.2.4). Additionally, anLED attached to the microcontroller indicates when the systemis in this state to confirm the system is working properly. TheLED is on when in this state, and turns off when in any otherstate.Capstone Group 062 Design 403 DETECTION SYSTEM May 16, 20193.2.4 Identification StateIn this state, the system analyzes the data recorded from theaccelerometer for signs of a bird impact. The three key char-acteristics of amplitude, frequency peaks, and signal durationare analyzed (details of these calculations can be found in Ap-pendix F). Upon entering this state, an additional 400 millisec-onds of signal from the accelerometer are stored. A Fast FourierTransform allows the Arduino Uno WiFi Rev2 to identify thefrequency peaks of the signal, and the signal duration may becalculated. The frequency peaks that the system monitors forare:1. 80Hz2. 120Hz3. 160Hz4. 170HzIf the duration of the signal is within the window of 0.1-0.3 sec-onds and the dominant frequency peaks match the characteristicpeaks, the system moves into state 4 (Section 3.2.5). Otherwise,once analysis is complete the system moves back into state 2(Section 3.2.3). Figure 14 displays the flowchart for this processof analyzing the signal.Capstone Group 062 Design 413 DETECTION SYSTEM May 16, 2019Figure 14: Flowchart of the Detection Algorithm3.2.5 Data uploadingIf the system identifies window vibrations as a bird impact, itenters this state. The system updates the online data storage(Section 5) with the new bird impact using WiFi (Section 4)Capstone Group 062 Design 423 DETECTION SYSTEM May 16, 2019and saves the bird impact data for recovery (Section 3.2.2.1).Once the system confirms that the data packet has been sent,it automatically goes back to state 2 to continue monitoring forimpacts (Section 3.2.3).3.3 MicrocontrollerThe microcontroller chosen for the system is the Arduino UnoWiFi Rev2(13). Table 2 compares the specifications of this mi-crocontroller to the minimum specifications. The Arduino UnoWiFi Rev2 meets or exceeds the minimum microcontroller spec-ifications.3.3.1 Microcontroller Design ConsiderationsThe following design components are considered in the micro-controller choice:1. Microcontroller code size of 15kB2. 100B data packets3. Maximum of 48 bird impact events per day4. 33.6kB of potential stored data per 7 day periodThe code size consideration is based on the size of the code thatis developed for the microcontroller to perform the signal pro-Capstone Group 062 Design 433 DETECTION SYSTEM May 16, 2019cessing (Section 3.2). The code requires up to 11kB of flashmemory for the microcontroller to analyze impacts. 15kB ischosen as the design parameter to account for future additionsto the code, as well as associated libraries required for function.The 100B data packets and 48 bird impact events per day isbased on the data provided by the client, included in AppendixA. The size of 100B was found by saving a sample max-size char-acteristic data packet received from the detection system as atext file. The size of this file was significantly under 100B, butthe minimum specification was chosen to be over-designed incase more information is required in data packets in the future.48 events per day is decided by analyzing the data provided inAppendix A for the maximum annual collisions on any givenwindow on UBC Campus. The max number of impacts on onewindow per year previously found by the client is 26. This de-sign consideration is overestimated in case the client data is lowcompared to the actual number of bird impact events is under-estimated, or if the system is used in an area that experiencesmore bird impacts in the future.The maximum potential stored data per 7 day period is decidedby items 2 and 3 above. This consideration only considers theCapstone Group 062 Design 443 DETECTION SYSTEM May 16, 2019worst-case scenario where the system is unable to connect to thenetwork for the entire 7 day period due to unexpected circum-stances. 48 100B data packets is used to find that up to 4800Bof data packets may need to be stored locally on the device inthis scenario. For the entire 7 day period before maintenance,this indicates up to 33600B of data may need to be stored, or33.6kB.3.3.2 Minimum Specification DescriptionThe impact sensor (Section 3.1) consists of a single accelerome-ter. To support the Detection System, the microcontroller musthave one analog input pin for each of the two sensors. The ac-celerometer requires a 3.3V output pin that provides at least300µA of current(11). The sensor sampling rate must be atleast 520Hz, the Nyquist frequency for simulated bird impactevents. The minimum clock speed of the microcontroller mustbe at least this value to ensure sensor signals on the event ofa bird impact may be read properly. The microcontroller mustalso have at least 15kB of flash memory to hold code for sen-sor analog-to-digital conversion (Section 3.2). To fulfill NFR2,the microcontroller must have 33.6kB of on-board memory forbackup storage. This considers the case where the microcon-troller is unable to send data using the UBC Visitor network(Section 4) upon detecting a bird impact. It assumes impactCapstone Group 062 Design 453 DETECTION SYSTEM May 16, 2019data packets of approximately 100B, with 48 events stored perday for the entirety of the maintenance period of 7 days. Tosatisfy FR3 the microcontroller choice must be able to commu-nicate wirelessly using WiFi (Section 4).Table 2: Microcontroller Minimum SpecificationsFeatureMinimum Specifi-cationArduino UnoWiFi Rev2Analog Pins 1 6Output Voltage 3.3V 3.3VOutput Current 300µA 50mAClock Speed 520Hz 16MHzFlash Memory 15kB 48kBMemory Storage 33.6kB 6,144kBOnboard WiFi Mod-uleYes YesSee Appendix I for other microcontrollers evaluated.3.4 Recommendations for Future ComponentsFour components were conceptualized for the detection systemthat are not included in the final design. These componentscould all be included in future iterations of the detection sys-tem to potentially increase its functionality. The componentsconceptualized that are not included are as follows:Capstone Group 062 Design 464 COMMUNICATION SYSTEM May 16, 20191. Digital filter for the accelerometer (Section 3.1.1)2. Microphone sensor for impact detection3. WiFi disconnection in the case of long-term loss of network4. Damping Ratio Analysis for Detection AlgorithmThese components are presented in Appendix G. Due to thevarying stages of development of each component before theywere removed from consideration for the final design, they arenot presented in a completed format. These are suggestions forfuture design components that would potentially be beneficialfor the system.4 Communication SystemThe data communication method chosen for the system is WiFi(14).The WiFi network that is used on UBC Campus is UBC Visitor(15)(Section 4.2). Table 3 compares the specifications of WiFi to theminimum specifications for the subsystem. WiFi meets the min-imum data communication specifications, so it is chosen for thesystem.4.1 Communication System Design ConsiderationsThe main design consideration for the communication systemis the transmission rate of 4B/s. This assumes characteristicCapstone Group 062 Design 474 COMMUNICATION SYSTEM May 16, 2019Table 3: Data Communication Minimum SpecificationsFeature Minimum Specification WiFiWireless Yes YesConnectivity Across UBC Campus Across UBC CampusTransmission Rate 4B/s 737500B/sdata packets of 100B (Section 3.3.1) being transmitted by thedetection system (Section 3). In addition, this consideration as-sumes a 30 second limit on transmission of data communicationfrom the detection system to data storage. This limit is derivedfrom what is perceived as a reasonable amount of time for datapackets to be available after a bird impact event occurs.4.2 Minimum Wireless Specifications DescriptionThe Detection System (Section 3) must be able to communicatewith Data Storage (Section 5) wirelessly to satisfy FR2, FR3,and NFR3. Wireless communication removes the need for theuser to gather data from the device manually, so access is eas-ier. Wireless communication also ensures impact data is contin-uously available from the system data storage. Connectivity isdefined as a minimum specification instead of range due to theavailability of WiFi throughout UBC Campus(16). To ensurethat the system can meet C5, the communication system mustCapstone Group 062 Design 484 COMMUNICATION SYSTEM May 16, 2019be able to connect across UBC Campus. The data transmissionrate must be at least 4B/s (Section 4.1).4.3 UBC Visitor WiFi DescriptionThe UBC Visitor WiFi network(15) is a low-bandwidth networkprovided for guests of UBC Campus that are not faculty orstudents. It is an unsecured network that only requires acceptinga terms of service to access. UBC Visitor is used instead ofUBC Secure(17) due to the Arduino Uno Wifi Rev2 (Section3.3) being unable to validate with the UBC Secure network’ssecurity protocols. Due to the relatively low bandwidth requiredfor the communications, the limits of the UBC Visitor networkare not a concern for the function of the system.4.4 Accessing the UBC Visitor NetworkUnder normal circumstances, microcontrollers and similar de-vices are unable to access the UBC Visitor WiFi network(15).To connect to the network, the MAC address of the microcon-troller used must be registered with UBC IT. This service isoffered due to the low overall bandwidth of the system commu-nication. In addition, it is important that the system microcon-troller connects to the network at least once per week to ensurethat the device stays registered on the UBC Visitor WiFi. ThisCapstone Group 062 Design 494 COMMUNICATION SYSTEM May 16, 2019is considered to meet NFR2, as this maintenance is requiredonly once in every 7 day period.4.5 Other Data Communication Designs EvaluatedOther options that were evaluated for wireless communicationare:• LoRa(18)• Bluetooth 5.0(19)• Zigbee(20)Table 4: Communication System EvaluationFeature WiFi LoRaBluetooth5.0ZigbeeWireless Yes Yes Yes YesConnectivityAcross UBCCampusLimited onUBC Cam-pusRequiresnew infras-tructureRequiresnew infras-tructureTransmissionRate737500B/s 31.25B/s 250000B/s 31250B/sTable 4 compares these options to WiFi communication. All ofthe options considered would meet the minimum specificationsfor the communication method. WiFi was chosen due to itsCapstone Group 062 Design 505 DATA STORAGE May 16, 2019convenience and existing availability on UBC Campus. In addi-tion, WiFi has extensive support available online. Therefore, itis chosen as the communication system.5 Data StorageData storage for the system uses MyDevices Cayenne(21). TheCayenne database presents data in a processed and accessibleformat. It is also used to facilitate the system UI (Section 8).If required, data may be downloaded directly from the Cayennedatabase in a spreadsheet format, which is the format providedby the client shown in Appendix A. Table 5 compares the spec-ifications of Cayenne with the defined minimum specifications.5.1 Data Storage Design ConsiderationsThe following design components are considered in the data stor-age choice:• Able to store 3 individual data segments per impact• Data segment max size of at least 32 charactersThe 3 data segment design consideration for data storage isbased on the minimum required data specified by the client.It is required that the system store 3 different pieces of data onthe event of a bird impact:Capstone Group 062 Design 515 DATA STORAGE May 16, 2019• Bird impact timestamp• Bird impact location marker, identified as a specific windowin a building• Number of bird impacts at that locationThis ensures that the system can store all of the data requiredby the client on the event of a bird impact.The max data segment size of 32 characters is based on thesample data provided by the client in Appendix A. It is basedon the window location identifiers, which have the longest datasegments included in this sample data. 32 characters is over-designed based on the sample data provided, to provide flexibil-ity in future location identifiers that may be used.5.2 Minimum Specification DescriptionThese specifications assume that the data packets stored are amaximum size of 100B, with 48 events per day for a 7 day main-tenance period (Section 3.3.1). It is assumed that at the end ofthe 7 day maintenance period, a user ensures that the data stor-age subsystem has sufficient space remaining. Each package ofevent data consists of three segments - a timestamp and windowidentifier, to satisfy C2, and a total number of bird impacts atCapstone Group 062 Design 525 DATA STORAGE May 16, 2019that location. To meet FR2, FR3, and NFR2, Cayenne musthave at least 33.6kB of storage space (Section 3.3). In addi-tion, data storage must be able to hold at least 1008 individualsegments of data. This number ensures that the system maystore 48 3-segment data packets per day, for 7 days as describedabove (Section 3.3.1, Section 5.1). To store the impact locationdata, each data segment should be capable of storing at least 32characters (Section 5.1).Table 5: Data Storage Minimum SpecificationsFeatureMinimumSpecificationCayenneStorage Size 33.6kB UnlimitedUnique DataSegments1008 UnlimitedData SegmentLength32 Unlimited5.3 Cayenne DatabaseThe primary data storage method for the system is a Cayennedatabase(21), provided by MyDevices(22). Figure 3 shows howdata is stored in the Cayenne database. Cayenne meets or ex-ceeds all of the minimum specifications for data storage, so itprovides a viable solution. Cayenne also provides tools for acces-Capstone Group 062 Design 535 DATA STORAGE May 16, 2019sible displaying and accessing of data, used for the UI (Section8). Cayenne services are also provided for free, making it a goodchoice for the system.5.4 Other Data Storage Designs EvaluatedOther options that were evaluated for data storage are:• Secure Digital (SD) Card(23)• Amazon Web Servers(24)• Dropbox(25)• Google Sheets(26)Table 6 compares Cayenne and Google Sheets to the three op-tions that were not chosen. Google Sheets meets or exceeds allof the requirements for data storage, and was implemented inearly iterations of the system. Due to issues encountered withreliability, it was removed from the final version of the system.More information regarding Google Sheets and why it was notimplemented is presented in Appendix J.The SD card was not chosen as it requires the data from thedetection system be stored with the system, rather than on-line. This reduces accessibility, as the data must be collectedmanually from the SD card. An Amazon Web Server was notCapstone Group 062 Design 546 POWER SOURCE May 16, 2019Table 6: Data Storage Evaluation ComparisonFeature CayenneGoogleSheetsSD CardAmazonWebServersDropboxStorageSizeUnlimited Unlimited 512GB 5GB 2GBUniqueDataSegmentsUnlimited 5 ∗ 106 Unlimited Unlimited UnlimitedDataSegmentLengthUnlimited 50,000 Unlimited Unlimited Unlimitedchosen due to Cayenne and Google Sheets providing sufficientservices for free, while a S3 Web Server has a more limited freemodel(24). Dropbox was not chosen as it is limited to 2GB offree storage(25), while Cayenne and Google Sheets do not havea limit to future free scalability.6 Power SourceThe system is powered by a power adapter. Table 7 comparesthe specifications of an power adapter to the minimum specifica-tions for the subsystem. The power adapter meets the minimumpower specifications, so it is chosen for the system.Capstone Group 062 Design 556 POWER SOURCE May 16, 2019Table 7: Power Source Minimum SpecificationsFeature Minimum Specifications Power AdapterPower Capacity 2000 mAh UnlimitedDC Output Yes YesOutput Voltage 9-12 VDC 9-12 VDCOutput Current 250 mA 250 mA2.1 mm Plug Yes YesCenter Pin Positive Yes YesObtrusiveness of Win-dowLess Than 10% < 1%6.1 Minimum Specification DescriptionThe method for powering the system must satisfy C3, and NFR2.The power source must also be compatible with the microcon-troller (Section 3.3). The system in an idling state consumes 12mAh of power, so the power source of the system must have acapacity of 2000 mAh at minimum. The power method mustbe compatible with a center 2.1 mm center positive plug, havea VDC output of 9-12 V and have an output current of 250mA(13).Capstone Group 062 Design 566 POWER SOURCE May 16, 20196.2 Other Power Options EvaluatedThe other option evaluated for powering the system is by bat-tery.Table 8 compares a power adapter to a battery.Table 8: Power Source Evaluation ComparisonFeatureMAKITA BL10132000MAH 10,8V LI-ION(27)PowerAdapterObtrusiveness ofLess Than 10% ofWindowYes YesCompatibility withArduinoYes YesMaintenance Need Yes NoThe microcontroller (Section 3.3) consumes a minimum of 12mA at 5V and 16Hz while it is in an idling state since it hascapacities of standard shield, a standard USB interface, powerregulation and LEDs (13). A battery that met the minimumspecifications in Table 8 was considered and is a viable optionfor powering the system. However, a power adapter is morereliable and convenient for the maintenance of the system.Capstone Group 062 Design 577 SYSTEM SETUP May 16, 20197 System SetupThe physical portion of the Bird Impact Detection System con-sists of a microcontroller and sensor (Design Document Section3) that are mounted on the indoor side of window being ob-served for bird impacts. The decision to place the system in-doors is explained in further detail in Appendix H. The sensorfor the detection system is connected to the microcontroller di-rectly (Section 7.1). The sensor itself affixed to the indoor glasspane of the window directly, and the microcontroller is attachedto the window frame in a plastic enclosure (Section 7.2). Thephysical components of the Bird Impact Detection System arelinked to the non-physical components through a WiFi modulein the microcontroller (Section 3.3)The non-physical portion of the Bird Impact Detection systemconsists of a WiFi wireless internet connection (Section 4), My-Devices Cayenne (Section 5.1), and the UI (Section 8). MyDe-vices Cayenne is connected to the detection system through useof the internet (Section 6.3.1). The UI is connected to MyDe-vices Cayenne directly, as a provided service from MyDevices(Section 6.3.2).Capstone Group 062 Design 587 SYSTEM SETUP May 16, 20197.1 Sensor ConnectionsThe detection system sensor (Section 3.1) is connected to the mi-crocontroller (Section 3.3) using solid-core insulated wires. Fig-ure 15 displays the schematic for the wiring in the detection sys-tem. It is noted that the ADXL335 is displayed in the schematic,as the software used for the schematic labels all ADXL3XX ac-celerometers this way. In the construction of the system, theADXL337 should be used, as specified in the Detection System(Section 3.1).Figure 15: Detection System Wiring Schematic. It is noted that due to alimitation in the schematic generator, the ADXL335 is displayed instead ofthe ADXL337.Capstone Group 062 Design 597 SYSTEM SETUP May 16, 2019The pins of the sensors are connected to the microcontroller asfollows:1. Accelerometer Z-axis: Connected to input pin A0 of theArduino Uno Wifi Rev2.2. Accelerometer 3.3V: Connected to the 3.3V power pin ofthe Arduino Uno Wifi Rev2.3. Accelerometer Ground: Connected to the ground pin of theArduino Uno Wifi Rev2.The Accelerometer X- and Y-axis pins are not connected to themicrocontroller as they are not used in impact analysis (Section3.2). A 10nF capacitor is attached between the accelerometerZ-axis and ground to filter the signal that is recorded by theArduino Uno WiFi Rev2 (Section 3.1.2).7.2 Detection System Window InstallationThe detection system (Section 3) must be able to be attachedin an operating position on the inside of a window to satisfyC4. The justification for why the system is installed on theinside rather than outside of a window is found in AppendixH. The installed system must be able to detect bird impacts tosatisfy NFR1. The system consists of an accelerometer and amicrocontroller as displayed in Figure 2, connected using wires.Capstone Group 062 Design 607 SYSTEM SETUP May 16, 2019A power adapter (Section 6) connects the Arduino Uno WiFiRev2 (Section 3.3) to an appropriate wall plug for power. Awaterproofing solution for potential future iterations is found inAppendix :, if the system is changed to outside installation.7.2.1 Microcontroller Window InstallationThe Arduino Uno Wifi Rev2 microcontroller (Section 3.3) isplaced in a plastic enclosure box with dimensions of 7.62x7.62x3.81cm.The microcontroller is positioned on posts inside of the enclosurethat keep it in place. Figure 16 displays the microcontroller in-stalled inside the plastic box. A cover is normally included thatencloses the microcontroller, but is not shown in the figure forvisibility. Holes are included in the design of the box to allowsensor wires, computer cables, and power to be connected. Inaddition, a cavity is included in the box below the microcon-troller to allow for the filter capacitor of the accelerometer to beinstalled (Section 3.1.2).Capstone Group 062 Design 617 SYSTEM SETUP May 16, 2019Figure 16: Microcontroller Installed in Plastic BoxThis enclosure box is mounted on the metal frame of the windowbeing measured using double-sided mounting tape.(28). The boxis placed with one edge 10.795cm from the frame of the windowand one edge directly against the window glass, with the serialand power ports facing away from the window glass. Figure 17displays the plastic box affixed to the sample window, identifiedby the red circle.Capstone Group 062 Design 627 SYSTEM SETUP May 16, 2019Figure 17: Microcontroller inside Plastic Box (Red Circle), Accelerometerwith Cover (Blue Circle) Affixed to Sample Window7.2.2 Sensors Window InstallationThe accelerometer (Section 3.1) is affixed directly to the win-dow using duct putty(29), under a 3.175x3.175cm square plasticcover. Duct putty is a secure adhesive that does not harden inmost circumstances, while still transferring the majority of theCapstone Group 062 Design 637 SYSTEM SETUP May 16, 2019vibration energy from the surface it is attached to. This makesit a good choice for the situation of the project, as it does notdamage the window and allows for sensors to remain attachedfor long periods of time. An alternative that was considered wasdouble sided tape. However, double sided tape dampens the vi-brations transmitted to the sensor attached to the window dueto thickness compared to duct putty. In addition, a plastic coveris attached over the accelerometer using duct putty to protect itand keep it secured. Figure 17 displays the accelerometer affixedto the sample window, identified by the blue circle.7.2.3 Power Source InstallationThe adapter described in Section 6 (Power Source) that powersthe system is mounted against the wall beside a subject window.The adapter is mounted using cable tie mounts. These cable tiemounts will be installed using double-sided wall-safe tape(28).7.3 MyDevices Cayenne Database ConnectionAppendix K provides detailed instructions for setting up the My-Devices Cayenne database and connecting it to the Arduino UnoWiFi Rev2. The detection system (Section 3) is connected to theMyDevices Cayenne database (Section 5) using the communica-tion system (Section 4). The microcontroller in the detectionsystem communicates directly with Cayenne directly throughCapstone Group 062 Design 648 USER INTERFACE May 16, 2019the use of Cayenne libraries for the Arduino. No other setup isrequired for the detection system to communicate with Cayenne,as long as the communications system is accessible and the de-tection system is provided with the correct Cayenne credentialsfollowing the tutorial.8 User InterfaceThe UI for the system is handled using MyDevices Cayenne(21).Table 9 compares the specifications of the Cayenne UI to theminimum specifications. MyDevices Cayenne exceeds the mini-mum UI specifications, so it is chosen for the system. In addi-tion, Cayenne is used as the primary data storage (Section 5),so it is the primary choice for the system UI. Figure 18 displayshow data is presented to the user in the Cayenne Dashboard.Window identifier refers to the building and window index thatidentifies which window the detection system is installed on.Number of impacts is the total impacts detected by the sys-tem since it was installed on the window being monitored, pre-sented by the numerical counter. The line graph presents theimpact data over time to highlight bird impact number trends.Additionally, Cayenne allows for data to be downloaded in aspreadsheet-ready format.Capstone Group 062 Design 658 USER INTERFACE May 16, 2019Table 9: UI Minimum SpecificationsFeatureMinimum Specifi-cationCayenneData Visualization Numerical CounterNumerical Counter,Line Plot, Database,Spreadsheet DownloadFigure 18: Cayenne Dashboard UI featuring numerical counter (left) and lineplot (right) widgets, populated with sample data.8.1 Minimum Specification DescriptionThe UI must continuously provide a clear and easy-to-use vi-sualization of data to satisfy FR3 and NFR2. Visualization ofdata refers to presenting data from the data storage (Section5) in a user friendly manner. The UI must at least present anumerical counter of the number of impacts on the window thesystem is installed on.Capstone Group 062 Design 66REFERENCES May 16, 2019References1 M. T. Inc., “Arduino microcontroller cpu,”atmega4809 datasheet. [Online]. Available:http://ww1.microchip.com/downloads/en/DeviceDoc/megaAVR0-series-Family-Data-Sheet-DS40002015B.pdf2 C. University, “Golden-crowned kinglet,” 2017. [On-line]. Available: https://www.allaboutbirds.org/guide/Golden-crowned Kinglet/id3 A. Porter and A. Huang, “Bird collisions withglass: Ubc pilot project to assess bird collisionrates in western north america.” [Online]. Available:https://sustain.ubc.ca/sites/default/files/seedslibrary/BWC%20report%20SEEDS%20May%202015.pdf4 D. H. . B. C. S. Heideman, Michael T Johnson, “Gaussand the history of the fast fourier transform,” IEEE ASSPMagazine, vol. 1, no. 4, pp. 14–21.5 T. Zhang and J. Wu, “Learning long-term filter banksfor audio source separation and audio scene classification,”EURASIP Journal on Audio, Speech, and Music Processing,vol. 1, pp. 1 – 13, Dec. 2018.6 J. B. Allen, “Short time spectral analysis, synthesis, andCapstone Group 062 Design 67REFERENCES May 16, 2019modification by discrete fourier transform,” IEEE Transac-tions on Acoustics, Speech, and Signal Processing.7 “Make your windows bird-safe.” [Online].Available: https://www.humanesociety.org/resources/make-your-windows-bird-safe8 S. Hanly, “What’s the difference between vibration sensors?”[Online]. Available: https://www.machinedesign.com/motion-control/what-s-difference-between-vibration-sensors9 S. Grover, “Prediction of earthquake using 3 axis accelerome-ter sensor (adxl335) and arduino uno,” International Journalof Science and Research.10 “Appendix 12.1 — bird-impact forces — thephysics - transport canada.” [Online]. Avail-able: https://www.tc.gc.ca/eng/civilaviation/publications/tp13549-appendices-appendix12-1-410.htm11 T. Instruments, “Small, low power, 3-axis3g accelerometer,” adxl337 datasheet. [Online].Available: https://cdn.sparkfun.com/datasheets/Sensors/Accelerometers/ADXL337.pdf12 Motion sensor guide. [Online]. Available: https://www.safewise.com/resources/motion-sensor-guide/Capstone Group 062 Design 68REFERENCES May 16, 20