Full text
School of Computing, Engineering and Physical Sciences 1 Octavio Ferrero Ligorred Football Goal Scoring Detection System (EL3990) Submitted in partial satisfaction of the requirements for the degree of Bachelor of Engineering (with Honours) in Electronic Engineering April 2013 I declare that all material contained in this report, including ideas described in the text, computer programs and drawings, is my own work except where explicitly and individually acknowledged. Signed ……………………. Date ……………………….
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 2
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 3 Abstract The purpose of this project has been to develop an electronic system capable of detecting goals in a football goal scale made. This system intends to clarify goals which the referee is not sure if they are or not, commonly called: ghost goals. In this sense, this project focuses on an electronic system for detection goals in a short time and notify to the referee’s watch by wireless; in this project it is not going to be a wireless notification but a simulated notification will be done by a red led. The system is composed of IR-Leds and IR-Photodiodes, emitters and receivers. Starting for the bottom led until the top led, leds will be switched on and off until the ball is detected. It is like a scan going from the bottom to the top and starting again from the bottom; making an infinite loop until something is between the IR-Led and the IR-Photodiode. This scan will be carried out by a microcontroller which also makes a sequence for detecting when the ball is crossing the goal line. If something interposes between the emitter and the receiver, scanning will be stopped, then, the size of the object will be checked, if is the ball, it is goal; if not, no notification will be transmitted. The aim of this report is to demonstrate another solution about the ghost goals problem, apart from the real solution of magnetic fields which it has been approved by FIFA.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 4 Acknowledgements First of all, I would like to thank my supervisor, David Heys. Who gave me the idea of this project and who supported me in every problem or question that I had. I am thankful to the people who work in the store. They provided me with everything, every component I needed and they helped me in my questions as well. I wish to thank my friends met in Preston; I have made the most of my days here because of them. This is one of the reasons that I will always treasure my time in this place. I would also like to thank my friend, Charlotte Helen Gregory, student of Fashion Promotion in Preston, who helped me to write in English properly and I am thankful to my classmates Miguel Lázaro Civil and Noel Pueyo Izquierdo whom have helped me when I was stuck with my work. Finally, I would like to thank my parents and my friends who supported me from Spain and encouraged me during my stay here.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 5
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 6 Table of Contents Abstract ...................................................................................................................................... 3 Acknowledgements .................................................................................................................... 4 Table of Contents ....................................................................................................................... 6 List of Figures ........................................................................................................................... 8 List of Tables ........................................................................................................................... 10 List of Abbreviations ............................................................................................................... 11 1. Introduction. .................................................................................................................... 13 2. Background. .................................................................................................................... 15 2.1. GLT: GoalRef. .......................................................................................................... 17 2.2. Systems Available in Others Sports. ........................................................................ 20 - Tennis: ...................................................................................................................... 21 - Cricket:...................................................................................................................... 23 - Snooker: .................................................................................................................... 23 - Other Sports:............................................................................................................. 23 3. Analysis............................................................................................................................ 25 3.1. Requirements. ........................................................................................................... 26 3.2. Problems and solutions adopted. ............................................................................. 26 3.2.1. What kind of technology to use? Infrared curtains. ........................................... 26 3.2.2. What kind of emitters and receivers to use? IR-Leds and IR-Photodiodes. ...... 28 3.2.3. What kind of IR-Leds and IR-Photodiodes to use? L-7113F3BT and BPW41N. 33 3.2.4. What kind of goal notification to use? Red Led. ............................................... 33 3.2.5. Non-electronic components used for the model. ............................................... 33 3.2.6. How to place the emitters and the receivers in the goal? ................................... 36 3.2.7. How fast the switching of the E-R pairs has to be done? .................................. 37 .......................................................................................................................................... 38 3.2.8. What kind of microcontroller to use? And how to connect the emitter-receiver pairs with the microcontroller. ......................................................................................... 38
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 7 3.2.9. How to detect a goal? Double scan. ................................................................... 41 4. System design. ................................................................................................................. 44 4.1. Hardware. ................................................................................................................. 45 4.1.1. System parameters. ............................................................................................ 45 4.1.2. Board and tracks. ............................................................................................... 45 4.1.3. Goal notification. ............................................................................................... 45 4.1.4. IR-Leds and IR-Photodiodes.............................................................................. 46 4.1.5. Voltage reference. .............................................................................................. 47 4.1.6. Board development. ........................................................................................... 49 4.1.7. List of components. ............................................................................................ 50 4.2. Software. ................................................................................................................... 50 4.2.1. Flow chart of the main loop. .............................................................................. 51 4.2.2. Flow chart of the KBI interruption, first scan. ................................................... 52 Figure 4.2.2.1: 1st scan flow chart. ................................................................................... 52 4.2.3. Flow chart of the KBI interruption, second scan. .............................................. 53 Figure 4.2.3.1: 2nd scan flow chart. .................................................................................. 53 4.3. How this system works. ............................................................................................ 54 5. Building and test. ............................................................................................................ 58 6. Future work. .................................................................................................................... 63 7. Conclusions. .................................................................................................................... 66 Appendix A: References. ....................................................................................................... 68 Appendix B: Statement of work. ............................................................................................. 70 Gant chart ................................................................................ ¡Error! Marcador no definido. Appendix C: Code in C Language. ......................................................................................... 75
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 8 List of Figures Figure 2.1: The Goal. Figure 2.2: The Referee. Picture 2.3: The Ball. Figure 2.4: Simulation of GoalRef Figure 2.5: Hawk-Eye in Tennis. Figure 2.6: The Company Logo. Figure 3.1: When a goal is correct. Figure 3.2.1.1: Infrared Light Curtains. Figure 3.2.2.1: Visible Spectrum. Figure 3.2.2.2: LED Equivalent Schematic. Figure 3.2.2.3: IR-Led chosen. Figure 3.2.2.4: IR-Photodiode chosen Figure 3.2.4.1: Common red Led. Figure 3.2.5.1: Goal, Ball and Goalkeeper. Figure 3.2.7.1: David’s shot.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 9 Figure 3.2.7.1: Microcontroller. Figure 3.2.7.2: 40pin connector. Figure 4.1: System diagram. Figure 4.1.3: Goal Led. Figure 4.1.4: IR-Leds. Figure 4.1.4: IR-Photodiodes. Figure 4.1.5: Capacitors. Figure 5.1: IR testing board. Figure 5.2: Design of IR testing circuit using ISIS. Figure 5.3: IR-Led at working. Figure 5.4: DEMO9S08QG8. Figure 5.5: PCB board.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 16 Tests in the laboratory are compliant with basic standards of FIFA. The ball and the referee's watch must comply with international standards. The field tests are used to determine the reliability and performance of the systems. Different tests are made, such as shots on goal, shots on an impact wall, test the cart across the goal line and test in various weather conditions. Finally the tests in real situations of the game consist of the installation in two stadiums in official training sessions. Both systems send a signal to the referee's watch, in less than a second, he can indicates the goal. The referee has the power to allow the goal or not, he has the last word. Figure 2.2: The Referee. When the systems put into operation, the role of the referee will be modified. The IFAB, the International Football Association Board (international association made up of the four football associations of the United Kingdom and FIFA), is responsible for defining the rules of football worldwide and any amendments thereto; it was founded on 2 June 1886 in London.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 17 IFAB has decided that the referee has the authority to choose to use GLT or not. The referee, after a series of tests 60 minutes before kickoff, is free to ignore this technology. If he decides to use the GLT and the ball completely crosses the line, the GLT will automatically notify the referees, goal. The message will show in the of the referee’s watch. After the successful test in the FIFA Club World Cup 2012 in Japan last December, it can be said that GLT is a part of reality. Its utilisation was so enormous that GLT will be utilised in the FIFA Confederation Cup this year in Brazil and FIFA World Cup Championship next year 2014 in the same country. Also in the strongest European football leagues in the coming years we will see these technologies. The Premier League in England and the FußballBundersliga in Germany, will utilise these techs next season 2013-2014. In Spain “La Liga”, in Italy “Il Calcio” and then in France “Ligue 1” will wait until their organisations are agreed with the condition of the use of both technologies. 2.1. GLT: GoalRef. The company responsible of developing this technology note: “GoalRef is a radio-based sensing system that uses low-frequency magnetic fields to detect if a goal has been scored. The system uses low-frequency magnetic fields. One field is created in the goal area, the other is created in and around the ball whenever it approaches the goal. This is achieved through magnetic induction, which in turn is made possible by a passive electronic circuit embedded in the ball.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 18 The interaction between the main field around the goal and the field induced around the ball is picked up by coils attached to the goal. By measuring and analysing changes in the magnetic field around the goal, it is possible to determine whether the ball has completely crossed the line. The data is processed using software developed by Fraunhofer IIS, yielding a clear, accurate result that removes any doubt about whether a goal has been scored. The result is wirelessly transmitted to the referee’s wristwatch, and a message is displayed in real time, coupled with a vibrating alert. The information is encrypted to prevent eavesdropping or tampering.” Picture 2.3: The Ball. GoalRef technology was not developed to solve the problem of “ghost goals” in football, but rather that was conceived as a solution in handball. Fraunhofer IIS is the German company responsible for the technology, is an institute for integrated circuits. In 2011, GoalRef began to work with the German organisation the Fraunhofer IIS, entering the first set of GLT tests in February 2011.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 19 Rene Dunkler, manager of communications and public relations for GoalRef, said June 7, 2012, after some tests on Numremberg, how the system works: “Our system works in each goal, with ten antennas mounted on the goalposts and crossbar, encased in plastic. There is an antenna ‘exciter’ that is partially below the ground, and this is connected to a processor. Inside the ball, there are three electronic coils, sitting between the bladder of the ball and the ball panels. When the ball enters the goal, the antenna system is activated, and ‘excites’ the processor. Once the magnetic field has been crossed, signalling a goal, the wireless RF signal is transmitted to the referee’s watch. We believe we can achieve all this in less than 0.5 seconds.” Figure 2.4: Simulation of GoalRef After these statements, Mr Dunkler continued with an explanation that would be more understandable: “Imagine a still lake with no wind; the water is completely flat.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 20 Then if it begins to rain, the first raindrop disturbs the surface of the water. When our balls crosses the magnetic field, this ‘disturbs’ our system, and we can pinpoint that the ball has crossed the goal-line.” 2.2. Systems Available in Others Sports. The most commonly used system to clarify controversial plays in other sports is Hawk-Eye. This is due to the high percentage of reliability. In sports like tennis, rugby, cricket or American football this technology is implemented in the routine of the game for a long time. First developed in 1999, Hawk-Eye Innovations Ltd. has used the expertise gleaned from years of broadcasting to remain at the cutting edge of sports technology and broadcasting. Hawk-Eye has become one of the leading vision processing companies within the sports sector. Since first used in cricket, the company has revolutionised sports broadcasting, officiating and coaching across a number of sports. The company is proud to be an integral part of many of the world's premier sporting events. With an annual involvement in over one hundred events, these include The Wimbledon Championships, the Cricket World Cup, Davis and Federation Cups, World Championships snooker, the Indian Premier League cricket, and The Olympic Games.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 21 Figure 2.5: Hawk-Eye in Tennis. - Tennis: The Hawk-Eye tennis officiating system is the first and only ball-tracking technology to have passed stringent ITF testing measures. With 6 years of officiating history behind it, the technology is now an integral part of the ATP, WTA and ITF tennis tours, featuring at over 60 events across the tennis calendar. Using 10 high-speed cameras situated around the main tennis arenas, the Hawk-Eye Official Review System has now become an expected element of elite tennis match play. Travelling teams of trained Hawk-Eye technicians temporarily install and operate systems throughout the tennis year, with up to 10 different events worldwide able to capitalise on the technology for any given week.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 22 The system is able to display the outcome of any given bounce within 5 seconds of the ball landing, with the result displayed to the players, umpire, fans and via television simultaneously. The company responsible of developing this technology note: “2D (x,y): Vision processing is used to identify the centre of the ball within each frame of each camera. Camera movement is compensated for by also tracking the lines of the court. 3D (x,y,z): The system triangulates the information from each calibrated camera to provide the 3D position of the ball. 4D (x,y,z,t): This process is repeated for each frame so that the 3D positions of the ball can be combined to produce a single trajectory of the flight of the ball. Bounce Mark: The trajectory is then used to calculate the exact contact area that the ball made with the court during the bounce phase, being quickly and clearly shown via our virtual reality software.” Figure 2.6: The Company Logo.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 23 - Cricket: As the pioneering sport, Hawk-Eye's cricket systems have been used by host broadcasters around the world since 2001. In a similar fashion to tennis, the accuracy and reliability of the system soon reached a level that meant that it was added as part of the Decision Review System, first used in the New Zealand series late in 2008. As applications of Hawk-Eye in cricket relates are in: Beehives, RailCam, Ball speeds and Reaction Time. - Snooker: In this sport, the Hawk-Eye system is focused to the viewer. It offers a vision of the board in 3D and 4D to make it more attractive to see the player's decision. Among the displays are: Player's view, Blue Dot, Animated Shots, Shadow, Distance Potting, Potting Angle. - Other Sports: In other sports like GAA (Gaelic Athletic Association) or baseball (in USA) the Hawk-Eye system is being tested, to be implemented in the future and used in the routine of the game.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 24 CHAPTER 3 ANALYSIS
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 25 3. Analysis. The requirement of the project is switching on and off every single pair of emitter-receiver of the column placed behind the vertical goal posts. This scan from the bottom to the top of the column will be carried out until something interferes with the IR-beam. If something blocks that beam a second scan will be done in order to clarify what kind of object is. The situation of the IR-beam is the key because as FIFA says, until the ball has not completely crossed the goal line, the goal will not be counted. For this reason the emitterreceiver pairs will be placed exactly the radius of the ball far from the goal line, this is so that when the ball has just crossed the goal line, the IR-beam will be blocked by the diameter of the ball in order to make the determination of the object easy, if it is the ball or not. Figure 3.1: When a goal is correct.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 32 Figure 3.2.2.3: IR-Led chosen. Photodiodes are PN junction diodes designed specifically to harness the photoelectric effect. This means the device exposes the junction region of the PN diode to incoming photons which results in conducting the transfer of electrons across the junction. This process can also be reversed to produce photons. As can be speculated, there are many useful applications of this phenomenon, such as solar cells, light detection/emission, and thus signal receiving/sending. Figure 3.2.2.4: IR-Photodiode chosen.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 33 3.2.3. What kind of IR-Leds and IR-Photodiodes to use? L-7113F3BT and BPW41N. These electronic devices have been chosen because it was easy to get them in the store and for the project propose have been useful. Their datasheets have been included in the appendices. 3.2.4. What kind of goal notification to use? Red Led. It was thought of using a common red Led which will be switched on when the whole ball has crossed the goal line. Like IR-Leds and IR-Photodiodes, datasheets of this led has been included in the appendices. Figure 3.2.4.1: Common red Led. 3.2.5. Non-electronic components used for the model. A ball done to scale has been used, the ball of old computer mousse with a measurement of 22.29 mm. From there, it has been calculated the scale (1:10).
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 34 SCALE 1:10 REALITY MODEL GOAL 7320 mm (width) 2440 mm (heigh) 732 mm (width) 244 mm (heigh) BALL 222.9 mm (diameter) 22.29 mm (diameter) PLAYER 1800 mm (heigh) 180 mm (heigh) Table 3.2.5.1: Model size. The material to represent the goal has been wood and net. For the player, a dummy has been used which was according with the scale measures. To support the model wooden plank 1250 mm (width) x 500 mm (length) have been used, that is the basis of the project and a couple of bars of rectangular 100 mm (width) x 50 mm (height) x 500 mm (length) of wood that also serve as support. The goal has been built with dimensions of 732 mm (width) x 244 mm (height) x 150 mm (length) and placed on the base. The wooden posts are vertical, square base and with dimensions of 12 mm (width) x 12 mm (length) x 244 mm (height). The horizontal post or cross post is also of wood and a square base and with dimensions of 756 mm (w) x 12 mm (length) x 12 mm (height).
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 35 The auxiliary posts have been placed in the back of the goal to make the model more realistic. These sticks are made of wood and a square base, like other pots. The dimensions are 12 mm (width) x 12 mm (W) x 50 mm (height). All pots, including auxiliary, have been painted white with appropriate paint for wood, then varnished. The posts are secured to the floor with an appropriate adhesive and resistant glue, in the same way the auxiliary posts are stuck to the rear cross post of the goal. For net, fishing net has been bought which simulates the net used in the football fields. The net has been anchored to the posts by staples, ensuring that it will not open anywhere. To simulate a player, in this case has been simulated a goalkeeper, has been used a miniature mannequin whose height, scale, looks like a keeper, 200 mm. Figure 3.2.5.1: Goal, Ball and Goalkeeper.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 36 3.2.6. How to place the emitters and the receivers in the goal? Thirty E-R pairs have been used and placed behind the vertical goal posts with a 1 mm gap between them. IR-Led's and IR-Photodiode’s columns have been separated from the goal line the distance of the ball radium, 11.15 mm. This point has been very difficult to solve because the position of the IR-beam is crucial for this project and has been the most important thing to think about it. First of all, placing the IR-beam exactly the diameter of the ball far from the goal line was thought of. Doing this, it got that if the ball blocked the beam, it would be goal. The problem of this is that anything could block the beam and there was not any way to recognise if it was the ball of not, so this idea was removed. Afterwards, placing the IR-beam exactly the radium of the ball far from the goal line, was thought of; which meant that when the ball had completely crossed the goal line, the beam would have been blocked by the diameter of the ball. In addition, choosing this option meant that the size of the blocking object could be measured and make the difference between the ball and the rest of the things doing a double scan, when the ball had blocked the IR-beam without having crossed completely the goal line firstly and then when the ball had already crossed the goal line. The situation of the beam was located but the number of E-R pairs has to be chosen.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 37 Taking into account the height of the in the model (244 mm), the size of the ball in the model (22.29 mm), the size of the IR-Leds and the IR-Photodiodes, 30 was chosen as the number of E-R pairs with a gap between them of 1 mm. Thereby, when the ball is blocking the IR-beam, only 3 E-R pairs will be blocked at most. At this point, the problem of the placement of emitters and receivers had been solved. 3.2.7. How fast will the switching of the E-R pairs have to be done? After doing research and looking for the most powerful shot in football, it can be said that David Hirst in the 96/97 season in the match Sheffield WednesdayArsenal. The strike was 114 mph which means 51 mm/ms. With these calculations the switching of the whole model, the 30 pairs, would have to be done in less than 1ms. To summarise, no delays between the E-R pair switching has been chosen just for one reason, to do the scan as fast as the microcontroller can. After the first scan 5 seconds of delay has been decided to do in order to simulate the advancement of the ball.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 38 . Figure 3.2.7.1: David’s shot. 3.2.8. What kind of microcontroller to use? And how to connect the emitter-receiver pairs with the microcontroller. The MC9S08QG8 microcontroller was chosen. It was chosen because I was acquainted with its operation and it is thought that it could be useful for this project. Figure 3.2.7.1: Microcontroller.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 39 A microcontroller (μC) is a programmable integrated circuit capable of executing the orders recorded in its memory. It includes within the three main functional units of a computer: central processing unit, memory and peripheral input / output (I/O). When manufactured, the microcontroller does not contain data in ROM. So, to manage some processes, it is necessary to generate or create and then record in the EEPROM, or equivalent, of the microcontroller a program, which can be written in assembly language or other language for microcontrollers. The first μC was the Intel 4004 microprocessor of 4 bits, launched in 1971. However, its processor required additional circuitry to implement a working system, raising total system cost. The Smithsonian Institution says that Texas Instruments engineers Gary Boone and Michael Cochran succeeded in creating the first microcontroller, TMS 1000, in 1971, was marketed in 1974. It combined ROM, RAM, microprocessor and clock on a chip and it was intended for embedded systems. Microcontrollers are designed to reduce economic costs and energy consumptions of a particular system. So, the size of the central processing unit, the amount of memory and peripherals included depend on the application.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 40 People think a microcontroller is equal to a microprocessor, but it is not. They differ from each another in many ways. The first and most important difference is its functionality. In order to use the microprocessor in a real application, it must be connected with components such as memory components or data transmission buses. Although the microprocessor is considered a powerful computing machine, it is not ready for a communication with peripheral devices connected to it. To communicate microprocessors with peripherals, special circuits must be used. That was in the beginning and this practice is still in force today. On the other hand, the microcontroller is designed so it has all the components integrated in the same chip. It does not need other specialized components for its application because all necessary circuits, which otherwise correspond to peripherals are already incorporated. In this sense, time and space are saved to build the device. After choosing the microcontroller, it had to think about how to connect it with 30 E-R pairs. The solution was simple, multiplexers and de-multiplexers. Having 2 multiplexers which would be connected their outputs with the E-R pair. In this sense it would choose what E-R pair that one would like. In addition 2 de-multiplexers would be used and connected with the IR-Photodiodes with the purpose of detecting which one is not receiving the IR-beam.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 41 Also, to connect the 30 E-R pairs with the multiplexers and de-multiplexers 2 of 40-pin connector have been used for this purpose. Figure 3.2.7.2: 40pin connector. 3.2.9. How to detect a goal? Double scan. This point has been also difficult to solve, it was about how to identify and detect a ball that has crossed the line. Having the IR-beam 11.5 mm far from the goal line, the detection of a goal was not too difficult to do. Moreover, the way to make out between the ball and the rest of the thing that could cross the IR-beam had to be found. First of all, it was thought of, having all E-R pairs on, focusing the IR-beam with a lens but this idea was removed because of the price and the size of it, doing a recalculation of the number of E-R pairs and their positions. At that point a double scan was thought of.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 48 Typically, application systems have two separate capacitors across the power pins: a bulk electrolytic capacitor, such as a 10-μF tantalum capacitor, to provide bulk charge storage for the overall system, and a bypass capacitor, such as a 0.1-μF ceramic capacitor, located as near to the MCU power pins as practical to suppress high-frequency noise.” Figure 4.1.5: Capacitors.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 49 4.1.6. Board development. The program used to develop and implement the boards is Proteus 7 Professional.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 50 4.1.7. List of components. Description Details Manufacturer Quantity Microcontroller MC9S08QG8 Freescale 1 Mux/De-Mux CD4067BE Texas Instruments 4 Resistor 91 Ω 0.5W carbon film resistor TruOhm 31 Resistor 3 kΩ 0.5W carbon film resistor TruOhm 30 IR-Led L-7113F3BT Kingbright 30 IR-Photodiode BPW41N Kingbright 30 Red Led L-7113HD Kingbright 1 Capacitor 10 μF Radial electrolytic capacitor Panasonic 1 Capacitor 0.1 μF Radial electrolytic capacitor Panasonic 1 Connector 40pin connrector Rapid 2 μC Board 16.5 mm x 9 mm - 1 Table 4.1.7.1: List of components. 4.2. Software. The software part has been written using the C language; and the program used to compile and program the microcontroller is CodeWarrior. This program is available when bought the microcontroller and the demo kit. Two main programs were written, one for the main loop and the other for the interruption. To explain the operation of the programs, some flow charts are represented below.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 51 There are two programs, the main program that is an infinite loop and the KBI interruption that occurs only when the microcontroller detects that interruption. After the interruption the program comes back to the main loop. 4.2.1. Flow chart of the main loop. YES NO Figure 4.2.1.1: Main loop. START Variables Configuration Ports Configuration Led Nº = 1 Led Nº = 30 Program Delay E-R pair Nº = ON E-R pair Nº = OFF Increment Led Nº Increment E-R pair Nº Program Delay
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 52 4.2.2. Flow chart of the KBI interruption, first scan. Figure 4.2.2.1: 1st scan flow chart.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 53 4.2.3. Flow chart of the KBI interruption, second scan. Figure 4.2.3.1: 2nd scan flow chart. Second Scan
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 54 4.3. How this system works. This chapter will explain how the system works more in depth. As it has already been mentioned, the system is based on the action of a double scan to determine a goal and in turn identify whether is the ball or other object which has completely crossed the goal line. The microcontroller has two ports, PTAD and PTBD. PTBD is dedicated entirely to the selector pin of the multiplexers and the de-multiplexers. 16 bits, the lower level corresponds to the outputs from the 0 to the 3 and the other 4 remained outputs correspond to 8 bits of the higher level. PTAD is projected to enable the de-multiplexers, to receive if an interruption of the two multiplexers and to notify a goal by the Goal Led. This port has 6 outputs but only the 5 firsts have been used. Once the ports have been configured as inputs and outputs, depending on further use, the main loop is planned to switch on and off each E-R pair, starting from the bottom to the top. This is realized by increasing PTBD as it will be changing the channel selection in both demultiplexers that they will select the emitters and the multiplexers that they will select the receiver.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 55 Once the scan reaches to the top then it will start again from the bottom making an infinite loop that it will be only interrupted if at the same time that the E-R pair is switched on, the emitter emits light and the receiver does not receive it which means that something blocks the light . Thus when this takes place, reading PTBD, it will be known what pair is switched on and which one is not receiving light. Before turning to the second scan, it is determined if the object that interrupts the light beam is the ball or not. To do so said pair will be activated simultaneously with the upper pair. If both do not receive light this means that object is larger than the ball and the interruption ended back to the main loop. If it receives light this last pair is switched off and the first pair are activated and also the lower pair for the same purpose. If both do not receive light means that object is larger than the ball and the interruption ended back to the main loop. If it receives, this last pair is switched off and it is moved on to the second scan. It should be noted that if the penultimate pair, starting from the bottom or from the top, only the pair immediately below and immediately above the pair have to be switched on, respectively, to determine the size of the object. The second scan aims to determine that the ball has crossed the goal line completely and notify a goal only when the object is the ball. To do this, after having obtained pair of E-R from the first scan, it has to wait 5 seconds to simulate the movement of the ball. The choice of this time is described above in the chapter of switching time.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 56 After these five seconds the second scan will start and will be performed in the same modus operandi that the first scan did, with the difference that instead of going to another scan, it will be thrown on to the goal notification by the goal led. The determination of the object’s size is explained in that, if when one of the upper or lower pair does not receive light it will be determined a goal. In case of it receives light; the object will be somewhat less than the ball and the interruption will end getting back to the main loop.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 57 CHAPTER 5 BUILDING & TEST
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 64 If the project wants to be expanded, different ways to Goal Line Detection Systems could be implemented. A list of possible task is given below: - GLT by the use of IR curtains focusing the beam. - GLT by the use of laser sensors. - GLT by the use of IR curtains with all E-R pairs switched ON at the same time. - GLT by the use of 2 E-R pairs (one pair behind the two posts and the other pair behind the cross bar and on the ground). - Building a small model with a different technology.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 65 CHAPTER 7 CONCLUSIONS
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 66 7. Conclusions. The design and development of the project has been done successfully. A Football Goal Scoring Detection System has been made with specific requirements. The characteristics of the system allow an easy and intuitive use of the system by the users. The model is also quite big because it has been done to a scale of an actual goal. The design and development of the microcontroller is needed to manage the E-R pairs, it is the main item which has to be looked after. After having some difficulties writing the code and programming the microcontroller, finally it was done successfully. The last order of components was delayed but in the end the project could be built. Also some problems have been had with the manufacture of the PCB board due to the magnitude of it. In addition, in some tests, a small percentage of them, this system does not work as it has to. Once the model was built with the E-R pairs and the microcontroller was programmed, the main conclusion obtained was that implementing this technology into a scale, has been quite elaborate. The principal reason is that all non-electronics components were in a scale except the electronic devices, for example, the ball has been reduced to a scale from its actual size but, on the other hand the IR-Leds has not. This means that if this technology could be used in a real goal, it would probably work.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 67 APPENDICES
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 68 Appendix A: References. 1. Books: A.Bergh, Light Emitting Diodes, Edition Oxford 2000. H.Schneider, Quantum Well Infrared Photo-Detectors: Physics and Applications, Edition Berlin 2007. K.Schneider, Highly Sensitive Optical Receivers, Edition Berlin 2006. J. Wilson, J. Hawkes, Optoelectronics an Introduction, Edition London, 1998. X. Maldague, Infrared Methodology and Technology, Edition Canada 1994.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 69 2. WebPages: FIFA (no date) “Goal Line Technology” Available at: http://www.fifa.com/search/index.html?q=goal+line+technology FRAUNHOFER (Jul 05, 2012) “GoalRef: FIFA approves intelligent goal from Fraunhofer” Available at: http://www.iis.fraunhofer.de/en/pr/pm_archiv/press-releases-2012/goalref.html HAWKEYE INNOVATIONS (no date) “Hawk-Eye in Sports” Available at: http://www.hawkeyeinnovations.co.uk/
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 70 Appendix B: Statement of work. 1. Aim The project objective is to simulate Goal Line Technology in a football goal. For that, it will be used Infra-Red technology, IR-Curtain. This IR-Curtain will be done using IR-LEDs and Photodiodes, such as emitters and receivers. 2. Background Since television has allowed to see replays of controversial plays in a match, have been observed refereeing errors. One of the most controversial is the ghost goal. FIFA, initially opposed any technological improvement, gave the approval on Thursday July 5, 2012 to two systems that let you know if the ball completely crosses the goal line or not. These systems are: Hawk-eye, used in tennis, cricket or rugby, and GoalRef technology that has a chip inside the ball and creating a magnetic field on the goal line, can be known if it is goal or not. Both systems send a signal to the referee's watch, in less than a second, he is that indicates the goal. The referee has the power to allow the goal or not, he has the last word. FIFA has given its approval, but the organ that dictates the laws of football is the International Football Association Board (IFAB), the organization responsible for the regulation of football, and after refereeing errors in the last European Championship, despite having auxiliary referees, decided to investigate possible solutions to this problem.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 71 3. Activities 3.1 Work breakdown structure 1. Background Study 1.1. GoalRef (GLT-Goal Line Technology) 1.2. Other Systems 1.3. Approach Model 1.4. Technology to Use 2. Construction 2.1. Match Data and Statistics 2.2. Preliminary Design 2.3. Advantages and Disadvantages 2.4. Model Estimates 2.5. Final Model 2.6. Testing and Repairing possible errors 3. Reporting 3.1. Progress Report Revision 3.2. Draft Report Compilation 3.3. Final Report Preparation 3.2 Task descriptions After doing the Background Study about technologies currently in different sports (WBS1.11.2), it will be available to explain the technology chosen. That technology is the Infra-Red technology, IR-Curtain (WBS1.4). Once the technology has been defined and specified for
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 72 the aim of the project it will begin with the analysis of data collected from different matches (WBS2.1). Those data may include, average goals per match, the number of times a player crosses the goal line, how many times a part of the body of goalkeeper crosses the line... During this time it will proceed to the construction of the structure of the model (WBS2.2). Then, it will be listed advantages and disadvantages to use this technology in the model and in reality, doing a comparison between the two. At this point it will start with the calculations of the electronic circuits, uC, PCB... (WBS2.3-2.4) Just then, it will build the rest of the model, incorporating electronic items recently calculated, and then the whole model will be tested. In the case there will be any failure, it must be repaired to its correct operation (WBS2.5-2.6). Finally there will be a report that will include everything done up to that time (WBS3). 3.3 Programme A Gantt chart is attached. 4. Dependencies Tasks 2.2, 2.4, 2.5, 2.6 will require use of lab and electronic devices and components and access to the labs in C&T Building. 5. Risk management 1. Non-availability of labs, causing delay to the project. To manage this risk, the labs will be booked a week in advance of its being required. 2. Lost or stolen computer, causing delays in the project and data loss. To avoid this will proceed to save files in different digital platforms.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 73 3. Delays in the project due to many tasks in other subjects, extracurricular activities or due to illness. This can be solved, being strict in the planning defined in the Gantt Chart. 4. Delays components, both electronic and none, in charge, causing delays in the project. The way to avoid this is to order what is needed in advance. 6. Deliverables Item Due date 1. Interim report 2. Draft Final Report 9 Nov 2012 9 Apr 2013 3. Final report (2 copies) 26 Apr 2013 7. References http://www.fifa.com http://www.iis.fraunhofer.de/en.html http://www.hawkeyeinnovations.co.uk/ J. Wilson, J. Hawkes, Optoelectronics an Introduction, Edition London, 1998.
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 80 FirstStep: PTBD += 0b00000001; // Increment Low Level PTBD, Initial E-R else goto FINAL; // NO-GOAL, It is something bigger than ball } else goto FINAL; // NO-GOAL, It is something bigger than ball goto SecondScan; } else if (PTAD_PTAD3 == 1){ // High Level PTBD PTBD -= 0b00010000; // Decrement High Level PTBD, Check Lower E-R if (PTBD < 0b00010000){ // Check Low or High Level PTBD if (PTAD_PTAD2 == 0){ // Check Low Level PTBD PTBD += 0b00000010; // Increment x2 PTBD, Check Upper E-R if (PTAD_PTAD3 == 0) // Check High Level PTBD PTBD -= 0b000100000; // Decrement High Level PTBD, Initial E-R else goto FINAL; // NO-GOAL, It is something bigger than ball } else goto FINAL; // NO-GOAL, It is something bigger than ball } else if (PTAD_PTAD3 == 0){ // Check High Level PTBD if (PTBD == 0b11010000){ // Check 2nd Highest E-R PTBD += 0b00010000; // Increment PTBD, Check Upper E-R goto SecondStep; // Jump to
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 81 } else PTBD += 0b00100000; // Decrement x2 PTBD, Check Upper E-R if (PTAD_PTAD3 == 0) // Check High Level PTBD SecondStep: PTBD += 0b00010000; // Increment High Level PTBD, Initial E-R else goto FINAL; // NO-GOAL, It is something bigger than ball } else goto FINAL; // NO-GOAL, It is something bigger than ball goto SecondScan; } SecondScan: { Delay2 (5000); // 5s Delay in order to start the SecondScan if (PTAD_PTAD2 == 1){ // Low Level PTBD PTBD += 0b00000001; // Increment Low Level PTBD, Check Upper E-R if (PTBD > 0b00001111){ // Check Low or High Level PTBD if (PTAD_PTAD3 == 1) // Check High Level PTBD goto GOAL; // GOAL else PTBD -= 0b00000010; // Decrement x2 PTBD, Check lower E-R if (PTAD_PTAD2 == 1) // Check Low Level PTBD goto GOAL; else goto FINAL; // NO-GOAL, It is something bigger than ball }
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 82 else if (PTAD_PTAD2 == 1){ // Check Low Level PTBD goto GOAL; // GOAL if (PTBD == 0b00000010); // Check 2nd Lowest E-R PTBD -= 0b00000001; // Decrement PTBD, Check Lowest E-R goto ThirdStep; // Jump to } else PTBD -= 0b00000010; // Decrement x2 PTBD, Check Lower E-R if (PTAD_PTAD2 == 1) // Check Low Level PTBD ThirdStep: goto GOAL; // GOAL else goto FINAL; // NO-GOAL, It is something bigger than ball } else if (PTAD_PTAD3 == 1){ // High Level PTBD PTBD -= 0b00010000; // Decrement High Level PTBD, Check Lower E-R if (PTBD < 0b00010000){ // Check Low or High Level PTBD if (PTAD_PTAD2 == 1) // Check Low Level PTBD goto GOAL; // GOAL else PTBD += 0b00000010; // Increment x2 PTBD, Check Upper E-R if (PTAD_PTAD3 == 1) // Check High Level PTBD goto GOAL; // GOAL else goto FINAL; // NO-GOAL, It is something bigger than ball
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 83 } else if (PTAD_PTAD3 == 1){ // Check High Level PTBD goto GOAL; // GOAL if (PTBD == 0b11010000); // Check 2nd Highest E-R PTBD += 0b00010000; // Increment PTBD, Check Upper E-R goto FourthStep; // Jump to } else PTBD += 0b00100000; // Decrement x2 PTBD, Check Upper E-R if (PTAD_PTAD3 == 1) // Check High Level PTBD FourthStep: goto GOAL; // Increment High Level PTBD, Initial E-R else goto FINAL; // NO-GOAL, It is something bigger than ball } } GOAL: { PTBD = 0b00000000; // E-R Off Counter = 1; do { // GOAL-Led Loop PTAD = 0b00010011; // GOAL-Led On Delay (125); // 125ms PTAD = 0b00000011; // GOAL-Led Off
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 84 Counter ++; } while (Counter<40); // 5s Loop } FINAL: KBISC_KBACK = 1; // ACK_Interrupt } void KBIStart (void){ KBISC = 0b00000110; KBIPE = 0b00000110; KBIES = 0b00000000; }
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 85 Appendix D: Datasheets
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 86 The datasheets have been printed and submitted with this project. The datasheets describe the following components: - Microcontroller: MC9S08QG8. - IR-Led: L-7113F3BT IR LED 5MM BLUE LENS (RC). - IR-Photodiode: BPW41N INFRA RED SENSOR (RC). - Mux and De-Mux: CD4067BE. - Red Led: L-7113HD LED 5MM RED DIFF 5MCD (RC).
University of Central Lancashire School of Computing, Engineering & Physical Sciences EL3990 Football Goal Scoring Detection System Final Report 2012-2013 Octavio Ferrero Ligorred G20580701 87